--- /home/fdroid/fdroiddata/tmp/net.alexbarry.alexgames_2.apk +++ /home/fdroid/fdroiddata/unsigned/net.alexbarry.alexgames_2.apk ├── APK Signing Block │ @@ -1,121 +0,0 @@ │ -Key 0x42726577: │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -0000000000000000000000000000000000000000000000000000000000000000000000 │ -00000000000000000000000000000000000000 │ - │ -Key 0x7109871a: │ -330700002f070000e503000060000000280000000301000020000000fa75b7bd288885 │ -d552c65d44ec10d5d67495453a9514e312b482929480bbf8b430000000210400002800 │ -00002190604618667b2644102a5747d57b43bf1fdd627bc0502289761d25336d143c97 │ -09d4000000000069030000650300003082036130820249a00302010202042e9d1d7f30 │ -0d06092a864886f70d01010b05003060310b300906035504061302554b310c300a0603 │ -55040813034f5247310c300a060355040713034f524731133011060355040a130a6664 │ -726f69642e6f7267310f300d060355040b13064644726f6964310f300d060355040313 │ -064644726f69643020170d3234303530393139353133375a180f323035313039323531 │ -39353133375a3060310b300906035504061302554b310c300a060355040813034f5247 │ -310c300a060355040713034f524731133011060355040a130a6664726f69642e6f7267 │ -310f300d060355040b13064644726f6964310f300d060355040313064644726f696430 │ -820122300d06092a864886f70d01010105000382010f003082010a0282010100890ca5 │ -51420e0fba5109c7a1f918d3ba8fedfaf0b748dc41b309aca38c16e63fc7666973b6ed │ -41bcdfc685fef4517fe0731a13bc07e9427621247f015123022ed9efcfe69600df6a96 │ -f66deb045d3cbafd86f2316f3710ba66b27d7c7cfa2cca84cf5879425ce384156864b8 │ -0b2e22d2cd893858b71005c216aba2c9f963224e81f7ff64a38de58934803329680086 │ -341d5beea48d6eb7d3f43abb8670d68f5676b2b2acedd022f04e446e83ca2e606e6d69 │ -11c8a2d6818a4a23c5c183a4f1df0e86594ac2a63b863ccaf9164977e4b68edb226d15 │ -2091cb81450316723b47596456fbbb40b34666709f90de93994c06d94dc43dcf7d85b1 │ -d71a5277de51ff030203010001a321301f301d0603551d0e04160414063d292032bfc2 │ -6f43d9eb036b896ad62d882bf7300d06092a864886f70d01010b050003820101000ebd │ -bfefc93bc8e4649e491342afa6d95c9fd77ce19df792783d324fd805a58a25b1f243db │ -d05c4af3e0c66c25d987462cac8ed8b139f6ab134421c8b4bd085fa8fd32e2b6375cc9 │ -b125640ec6ef00957df85e892f54a8b3b3735643148c22760e99cdc5c79a15d7734223 │ -ccb453e18dde088a8c53aaf81d382c2ca27c0707de2c9e00f87c89142ea678ba0a3214 │ -98387de194eaebf01755656d328be78d46d1aca27d61b6096d2f1dd70bab6b1c352100 │ -43c861921b487cfc47a5e772b2d85a7556621ec2615f77e587ca3f8a1cd82eda429121 │ -1d814010eebea4c27af8eddbcb333cb65370fab5e2a8567055246214e30f2d26025268 │ -063fa76898273b627a0c000000080000000df0efbe0300000000000000180200000801 │ -000003010000000100005b4a8b3220640cae2288e7cb1d8eb4535ca474c740a971263d │ -dbc862310c24405ea0b65e1fb69cf96a9ed0fa61a792e1fe6e16a2729b0e82906a19a2 │ -00ad660b973705a6a9b384844a3719ff632948ed3a54f6a55b064fe0fa40b6e16dc3fe │ -f92e298ed9ecc07d0f093858661d68455471baa37c61bb083f600276c167c73a0e58e7 │ -5cf063ccc56d6345b951a88d00b46ce5faf8bb65c471b8c544f93c097454f659002331 │ -720f63856c914595d38daf215d7c3cc31e7c87f5722a808cd5ffabc019055999fd14ed │ -d9094c4a72598faf411838b1b29a5d138543599708b36da3e978dbbc116b701be872ef │ -a71990ff2ce5fd5edd2406b62c5463353553333e2c0801000021040000000100005b4a │ -8b3220640cae2288e7cb1d8eb4535ca474c740a971263ddbc862310c24405ea0b65e1f │ -b69cf96a9ed0fa61a792e1fe6e16a2729b0e82906a19a200ad660b973705a6a9b38484 │ -4a3719ff632948ed3a54f6a55b064fe0fa40b6e16dc3fef92e298ed9ecc07d0f093858 │ -661d68455471baa37c61bb083f600276c167c73a0e58e75cf063ccc56d6345b951a88d │ -00b46ce5faf8bb65c471b8c544f93c097454f659002331720f63856c914595d38daf21 │ -5d7c3cc31e7c87f5722a808cd5ffabc019055999fd14edd9094c4a72598faf411838b1 │ -b29a5d138543599708b36da3e978dbbc116b701be872efa71990ff2ce5fd5edd2406b6 │ -2c5463353553333e2c2601000030820122300d06092a864886f70d0101010500038201 │ -0f003082010a0282010100890ca551420e0fba5109c7a1f918d3ba8fedfaf0b748dc41 │ -b309aca38c16e63fc7666973b6ed41bcdfc685fef4517fe0731a13bc07e9427621247f │ -015123022ed9efcfe69600df6a96f66deb045d3cbafd86f2316f3710ba66b27d7c7cfa │ -2cca84cf5879425ce384156864b80b2e22d2cd893858b71005c216aba2c9f963224e81 │ -f7ff64a38de58934803329680086341d5beea48d6eb7d3f43abb8670d68f5676b2b2ac │ -edd022f04e446e83ca2e606e6d6911c8a2d6818a4a23c5c183a4f1df0e86594ac2a63b │ -863ccaf9164977e4b68edb226d152091cb81450316723b47596456fbbb40b34666709f │ -90de93994c06d94dc43dcf7d85b1d71a5277de51ff030203010001 │ - │ -Key 0xf05368c0: │ -330700002f070000dd03000060000000280000000301000020000000fa75b7bd288885 │ -d552c65d44ec10d5d67495453a9514e312b482929480bbf8b430000000210400002800 │ -00002190604618667b2644102a5747d57b43bf1fdd627bc0502289761d25336d143c97 │ -09d4000000000069030000650300003082036130820249a00302010202042e9d1d7f30 │ -0d06092a864886f70d01010b05003060310b300906035504061302554b310c300a0603 │ -55040813034f5247310c300a060355040713034f524731133011060355040a130a6664 │ -726f69642e6f7267310f300d060355040b13064644726f6964310f300d060355040313 │ -064644726f69643020170d3234303530393139353133375a180f323035313039323531 │ -39353133375a3060310b300906035504061302554b310c300a060355040813034f5247 │ -310c300a060355040713034f524731133011060355040a130a6664726f69642e6f7267 │ -310f300d060355040b13064644726f6964310f300d060355040313064644726f696430 │ -820122300d06092a864886f70d01010105000382010f003082010a0282010100890ca5 │ -51420e0fba5109c7a1f918d3ba8fedfaf0b748dc41b309aca38c16e63fc7666973b6ed │ -41bcdfc685fef4517fe0731a13bc07e9427621247f015123022ed9efcfe69600df6a96 │ -f66deb045d3cbafd86f2316f3710ba66b27d7c7cfa2cca84cf5879425ce384156864b8 │ -0b2e22d2cd893858b71005c216aba2c9f963224e81f7ff64a38de58934803329680086 │ -341d5beea48d6eb7d3f43abb8670d68f5676b2b2acedd022f04e446e83ca2e606e6d69 │ -11c8a2d6818a4a23c5c183a4f1df0e86594ac2a63b863ccaf9164977e4b68edb226d15 │ -2091cb81450316723b47596456fbbb40b34666709f90de93994c06d94dc43dcf7d85b1 │ -d71a5277de51ff030203010001a321301f301d0603551d0e04160414063d292032bfc2 │ -6f43d9eb036b896ad62d882bf7300d06092a864886f70d01010b050003820101000ebd │ -bfefc93bc8e4649e491342afa6d95c9fd77ce19df792783d324fd805a58a25b1f243db │ -d05c4af3e0c66c25d987462cac8ed8b139f6ab134421c8b4bd085fa8fd32e2b6375cc9 │ -b125640ec6ef00957df85e892f54a8b3b3735643148c22760e99cdc5c79a15d7734223 │ -ccb453e18dde088a8c53aaf81d382c2ca27c0707de2c9e00f87c89142ea678ba0a3214 │ -98387de194eaebf01755656d328be78d46d1aca27d61b6096d2f1dd70bab6b1c352100 │ -43c861921b487cfc47a5e772b2d85a7556621ec2615f77e587ca3f8a1cd82eda429121 │ -1d814010eebea4c27af8eddbcb333cb65370fab5e2a8567055246214e30f2d26025268 │ -063fa76898273b627a18000000ffffff7f0000000018000000ffffff7f180200000801 │ -0000030100000001000017a68025725ac8644b5f3de0004f524c675b7b64e66f005577 │ -2b6676f78dcb5a1952af0c47b9de1fda48c7f4fe96f2068620c90b7f8cccc3827ba5c8 │ -b38b4e3333f3bb466cd6d37e7e79e3550072d8bde3dbf13a9b04e8444b4c6127963ab1 │ -1a2297b5d56fb5d5214361cedc91f4c9fc7812518f667cc3ac99593140c5ab5f0194ff │ -722f96c82441510e62239adbcbe29c13ca648d03c4969e4612ec047293e2e427cb0128 │ -11bcf416a0de1677ff583b80c061203c9f85470ace2ce1e78330ff031263c45427f28c │ -808a7e52489203343b7e19f5eaff7ba9c04d1cdba0315ecbd440423d0ea86d3b578811 │ -e549ced64abf123b53e9a5083e6101d1c485b359bc08010000210400000001000017a6 │ -8025725ac8644b5f3de0004f524c675b7b64e66f0055772b6676f78dcb5a1952af0c47 │ -b9de1fda48c7f4fe96f2068620c90b7f8cccc3827ba5c8b38b4e3333f3bb466cd6d37e │ -7e79e3550072d8bde3dbf13a9b04e8444b4c6127963ab11a2297b5d56fb5d5214361ce │ -dc91f4c9fc7812518f667cc3ac99593140c5ab5f0194ff722f96c82441510e62239adb │ -cbe29c13ca648d03c4969e4612ec047293e2e427cb012811bcf416a0de1677ff583b80 │ -c061203c9f85470ace2ce1e78330ff031263c45427f28c808a7e52489203343b7e19f5 │ -eaff7ba9c04d1cdba0315ecbd440423d0ea86d3b578811e549ced64abf123b53e9a508 │ -3e6101d1c485b359bc2601000030820122300d06092a864886f70d0101010500038201 │ -0f003082010a0282010100890ca551420e0fba5109c7a1f918d3ba8fedfaf0b748dc41 │ -b309aca38c16e63fc7666973b6ed41bcdfc685fef4517fe0731a13bc07e9427621247f │ -015123022ed9efcfe69600df6a96f66deb045d3cbafd86f2316f3710ba66b27d7c7cfa │ -2cca84cf5879425ce384156864b80b2e22d2cd893858b71005c216aba2c9f963224e81 │ -f7ff64a38de58934803329680086341d5beea48d6eb7d3f43abb8670d68f5676b2b2ac │ -edd022f04e446e83ca2e606e6d6911c8a2d6818a4a23c5c183a4f1df0e86594ac2a63b │ -863ccaf9164977e4b68edb226d152091cb81450316723b47596456fbbb40b34666709f │ -90de93994c06d94dc43dcf7d85b1d71a5277de51ff030203010001 ├── /usr/lib/android-sdk/build-tools/debian/apksigner verify --verbose --print-certs {} │┄ error from `/usr/lib/android-sdk/build-tools/debian/apksigner verify --verbose --print-certs {}` (b): │┄ DOES NOT VERIFY │┄ ERROR: Missing META-INF/MANIFEST.MF │ @@ -1,17 +0,0 @@ │ -Verifies │ -Verified using v1 scheme (JAR signing): false │ -Verified using v2 scheme (APK Signature Scheme v2): true │ -Verified using v3 scheme (APK Signature Scheme v3): true │ -Verified using v3.1 scheme (APK Signature Scheme v3.1): false │ -Verified using v4 scheme (APK Signature Scheme v4): false │ -Verified for SourceStamp: false │ -Number of signers: 1 │ -Signer #1 certificate DN: CN=FDroid, OU=FDroid, O=fdroid.org, L=ORG, ST=ORG, C=UK │ -Signer #1 certificate SHA-256 digest: 3466536ce7052bcae59599765ed9aaf186f4077b965ee563ea7f914522c1ef07 │ -Signer #1 certificate SHA-1 digest: bf41aeeeeaf24598365901053f359987390a879a │ -Signer #1 certificate MD5 digest: 71a67dec2df377f277eaf3b78342e04a │ -Signer #1 key algorithm: RSA │ -Signer #1 key size (bits): 2048 │ -Signer #1 public key SHA-256 digest: 60446c3002741fdbed8914e8d512542a64a3867ee75e4d8a20e809d3facf09ce │ -Signer #1 public key SHA-1 digest: a31eac3d203de078cafc674f3a00bae95df07fb6 │ -Signer #1 public key MD5 digest: a50a40ee6f06c38752a47c72c0e3b4aa ├── zipinfo {} │ @@ -1,8 +1,8 @@ │ -Zip file size: 13900183 bytes, number of entries: 1150 │ +Zip file size: 13803472 bytes, number of entries: 1147 │ -rw-r--r-- 0.0 unx 56 b- defN 81-Jan-01 01:01 META-INF/com/android/build/gradle/app-metadata.properties │ -rw-r--r-- 0.0 unx 6199888 b- defN 81-Jan-01 01:01 classes.dex │ -rw-r--r-- 0.0 unx 1267912 b- stor 81-Jan-01 01:01 lib/arm64-v8a/libalex_games_android_jni.so │ -rw-r--r-- 0.0 unx 820956 b- stor 81-Jan-01 01:01 lib/armeabi-v7a/libalex_games_android_jni.so │ -rw-r--r-- 0.0 unx 1373924 b- stor 81-Jan-01 01:01 lib/x86/libalex_games_android_jni.so │ -rw-r--r-- 0.0 unx 1358296 b- stor 81-Jan-01 01:01 lib/x86_64/libalex_games_android_jni.so │ -rw-r--r-- 0.0 unx 1157 b- stor 81-Jan-01 01:01 assets/games/img/arrow.png │ @@ -272,16 +272,16 @@ │ -rw-r--r-- 0.0 unx 3889 b- defN 81-Jan-01 01:01 assets/games/preload/libs/ui/buttons.lua │ -rw-r--r-- 0.0 unx 779 b- defN 81-Jan-01 01:01 assets/games/preload/libs/ui/show_buttons_popup.lua │ -rw-r--r-- 0.0 unx 3993 b- defN 81-Jan-01 01:01 assets/games/preload/libs/ui/soft_numpad.lua │ -rw-r--r-- 0.0 unx 1338 b- defN 81-Jan-01 01:01 assets/games/preload/libs/ui/touchpad.lua │ -rw-r--r-- 0.0 unx 4526 b- defN 81-Jan-01 01:01 assets/games/preload/libs/utils.lua │ -rw-r--r-- 0.0 unx 3301 b- defN 81-Jan-01 01:01 assets/games/preload/libs/words.lua │ -rw-r--r-- 0.0 unx 1139918 b- defN 81-Jan-01 01:01 assets/html/alexgames_wasm.data │ --rw-r--r-- 0.0 unx 305907 b- defN 81-Jan-01 01:01 assets/html/alexgames_wasm.js │ --rw-r--r-- 0.0 unx 1440557 b- defN 81-Jan-01 01:01 assets/html/alexgames_wasm.wasm │ +-rw-r--r-- 0.0 unx 305923 b- defN 81-Jan-01 01:01 assets/html/alexgames_wasm.js │ +-rw-r--r-- 0.0 unx 1446987 b- defN 81-Jan-01 01:01 assets/html/alexgames_wasm.wasm │ -rw-r--r-- 0.0 unx 45 b- defN 81-Jan-01 01:01 assets/html/cache.manifest │ -rw-r--r-- 0.0 unx 3935 b- defN 81-Jan-01 01:01 assets/html/css/style.css │ -rw-r--r-- 0.0 unx 608 b- defN 81-Jan-01 01:01 assets/html/css/style_collapsable.css │ -rw-r--r-- 0.0 unx 1698 b- defN 81-Jan-01 01:01 assets/html/css/style_dark.css │ -rw-r--r-- 0.0 unx 1779 b- defN 81-Jan-01 01:01 assets/html/css/style_very_dark.css │ -rw-r--r-- 0.0 unx 5830 b- defN 81-Jan-01 01:01 assets/html/example_game_apidemo.zip │ -rw-r--r-- 0.0 unx 48983 b- defN 81-Jan-01 01:01 assets/html/game_api_doc.html │ @@ -1142,11 +1142,8 @@ │ -rw---- 0.0 fat 396 b- defN 81-Jan-01 01:01 res/z3.xml │ -rw---- 0.0 fat 1116 b- defN 81-Jan-01 01:01 res/zH.xml │ -rw---- 0.0 fat 318 b- stor 81-Jan-01 01:01 res/zN.png │ -rw---- 0.0 fat 887 b- stor 81-Jan-01 01:01 res/zQ.png │ -rw---- 0.0 fat 1076 b- defN 81-Jan-01 01:01 res/zY.xml │ -rw---- 0.0 fat 840 b- defN 81-Jan-01 01:01 res/zq.xml │ -rw---- 0.0 fat 686856 b- stor 81-Jan-01 01:01 resources.arsc │ --rw---- 2.0 fat 114206 b- defN 81-Jan-01 01:01 META-INF/454C5DCB.SF │ --rw---- 2.0 fat 1336 b- defN 81-Jan-01 01:01 META-INF/454C5DCB.RSA │ --rw---- 2.0 fat 114079 b- defN 81-Jan-01 01:01 META-INF/MANIFEST.MF │ -1150 files, 25224568 bytes uncompressed, 13734331 bytes compressed: 45.6% │ +1147 files, 25001393 bytes uncompressed, 13643374 bytes compressed: 45.4% ├── assets/html/example_game_apidemo.zip │ ├── zipinfo {} │ │ @@ -1,5 +1,5 @@ │ │ Zip file size: 5830 bytes, number of entries: 3 │ │ --rw-r--r-- 3.0 unx 2173 tx defN 24-Jun-10 20:59 game_core.lua │ │ --rw-r--r-- 3.0 unx 6402 tx defN 24-Jun-10 20:59 game_draw.lua │ │ --rw-r--r-- 3.0 unx 7713 tx defN 24-Jun-10 20:59 game.lua │ │ +-rw-r--r-- 3.0 unx 2173 tx defN 25-Oct-18 22:52 game_core.lua │ │ +-rw-r--r-- 3.0 unx 6402 tx defN 25-Oct-18 22:52 game_draw.lua │ │ +-rw-r--r-- 3.0 unx 7713 tx defN 25-Oct-18 22:52 game.lua │ │ 3 files, 16288 bytes uncompressed, 5356 bytes compressed: 67.1% │ ├── zipdetails --redact --walk --utc {} │ │ @@ -1,30 +1,30 @@ │ │ │ │ 0000 LOCAL HEADER #1 04034B50 (67324752) │ │ 0004 Extract Zip Spec 14 (20) '2.0' │ │ 0005 Extract OS 00 (0) 'MS-DOS' │ │ 0006 General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 0008 Compression Method 0008 (8) 'Deflated' │ │ -000A Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +000A Modification Time 5B52B683 (1532147331) 'Sat Oct 18 22:52:06 2025' │ │ 000E CRC 3DE3D9E4 (1038342628) │ │ 0012 Compressed Size 000002B2 (690) │ │ 0016 Uncompressed Size 0000087D (2173) │ │ 001A Filename Length 000D (13) │ │ 001C Extra Length 001C (28) │ │ 001E Filename 'XXXXXXXXXXXXX' │ │ # │ │ # WARNING: Offset 0x1E: Filename 'XXXXXXXXXXXXX' │ │ # Zero length filename │ │ # │ │ 002B Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 002D Length 0009 (9) │ │ 002F Flags 03 (3) 'Modification Access' │ │ -0030 Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ -0034 Access Time 66676917 (1718053143) 'Mon Jun 10 20:59:03 2024' │ │ +0030 Modification Time 68F41A16 (1760827926) 'Sat Oct 18 22:52:06 2025' │ │ +0034 Access Time 68F41A17 (1760827927) 'Sat Oct 18 22:52:07 2025' │ │ 0038 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 003A Length 000B (11) │ │ 003C Version 01 (1) │ │ 003D UID Size 04 (4) │ │ 003E UID 000003E8 (1000) │ │ 0042 GID Size 04 (4) │ │ 0043 GID 000003E8 (1000) │ │ @@ -32,30 +32,30 @@ │ │ │ │ 02F9 LOCAL HEADER #2 04034B50 (67324752) │ │ 02FD Extract Zip Spec 14 (20) '2.0' │ │ 02FE Extract OS 00 (0) 'MS-DOS' │ │ 02FF General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 0301 Compression Method 0008 (8) 'Deflated' │ │ -0303 Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +0303 Modification Time 5B52B684 (1532147332) 'Sat Oct 18 22:52:08 2025' │ │ 0307 CRC 42800EDC (1115688668) │ │ 030B Compressed Size 00000705 (1797) │ │ 030F Uncompressed Size 00001902 (6402) │ │ 0313 Filename Length 000D (13) │ │ 0315 Extra Length 001C (28) │ │ 0317 Filename 'XXXXXXXXXXXXX' │ │ # │ │ # WARNING: Offset 0x317: Filename 'XXXXXXXXXXXXX' │ │ # Zero length filename │ │ # │ │ 0324 Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 0326 Length 0009 (9) │ │ 0328 Flags 03 (3) 'Modification Access' │ │ -0329 Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ -032D Access Time 66676917 (1718053143) 'Mon Jun 10 20:59:03 2024' │ │ +0329 Modification Time 68F41A17 (1760827927) 'Sat Oct 18 22:52:07 2025' │ │ +032D Access Time 68F41A37 (1760827959) 'Sat Oct 18 22:52:39 2025' │ │ 0331 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 0333 Length 000B (11) │ │ 0335 Version 01 (1) │ │ 0336 UID Size 04 (4) │ │ 0337 UID 000003E8 (1000) │ │ 033B GID Size 04 (4) │ │ 033C GID 000003E8 (1000) │ │ @@ -63,30 +63,30 @@ │ │ │ │ 0A45 LOCAL HEADER #3 04034B50 (67324752) │ │ 0A49 Extract Zip Spec 14 (20) '2.0' │ │ 0A4A Extract OS 00 (0) 'MS-DOS' │ │ 0A4B General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 0A4D Compression Method 0008 (8) 'Deflated' │ │ -0A4F Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +0A4F Modification Time 5B52B684 (1532147332) 'Sat Oct 18 22:52:08 2025' │ │ 0A53 CRC 89BE64C8 (2310956232) │ │ 0A57 Compressed Size 00000B35 (2869) │ │ 0A5B Uncompressed Size 00001E21 (7713) │ │ 0A5F Filename Length 0008 (8) │ │ 0A61 Extra Length 001C (28) │ │ 0A63 Filename 'XXXXXXXX' │ │ # │ │ # WARNING: Offset 0xA63: Filename 'XXXXXXXX' │ │ # Zero length filename │ │ # │ │ 0A6B Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 0A6D Length 0009 (9) │ │ 0A6F Flags 03 (3) 'Modification Access' │ │ -0A70 Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ -0A74 Access Time 66676917 (1718053143) 'Mon Jun 10 20:59:03 2024' │ │ +0A70 Modification Time 68F41A17 (1760827927) 'Sat Oct 18 22:52:07 2025' │ │ +0A74 Access Time 68F41A37 (1760827959) 'Sat Oct 18 22:52:39 2025' │ │ 0A78 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 0A7A Length 000B (11) │ │ 0A7C Version 01 (1) │ │ 0A7D UID Size 04 (4) │ │ 0A7E UID 000003E8 (1000) │ │ 0A82 GID Size 04 (4) │ │ 0A83 GID 000003E8 (1000) │ │ @@ -96,15 +96,15 @@ │ │ 15C0 Created Zip Spec 1E (30) '3.0' │ │ 15C1 Created OS 03 (3) 'Unix' │ │ 15C2 Extract Zip Spec 14 (20) '2.0' │ │ 15C3 Extract OS 00 (0) 'MS-DOS' │ │ 15C4 General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 15C6 Compression Method 0008 (8) 'Deflated' │ │ -15C8 Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +15C8 Modification Time 5B52B683 (1532147331) 'Sat Oct 18 22:52:06 2025' │ │ 15CC CRC 3DE3D9E4 (1038342628) │ │ 15D0 Compressed Size 000002B2 (690) │ │ 15D4 Uncompressed Size 0000087D (2173) │ │ 15D8 Filename Length 000D (13) │ │ 15DA Extra Length 0018 (24) │ │ 15DC Comment Length 0000 (0) │ │ 15DE Disk Start 0000 (0) │ │ @@ -118,15 +118,15 @@ │ │ # │ │ # WARNING: Offset 0x15EA: Filename 'XXXXXXXXXXXXX' │ │ # Zero length filename │ │ # │ │ 15F7 Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 15F9 Length 0005 (5) │ │ 15FB Flags 03 (3) 'Modification Access' │ │ -15FC Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ +15FC Modification Time 68F41A16 (1760827926) 'Sat Oct 18 22:52:06 2025' │ │ 1600 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 1602 Length 000B (11) │ │ 1604 Version 01 (1) │ │ 1605 UID Size 04 (4) │ │ 1606 UID 000003E8 (1000) │ │ 160A GID Size 04 (4) │ │ 160B GID 000003E8 (1000) │ │ @@ -135,15 +135,15 @@ │ │ 1613 Created Zip Spec 1E (30) '3.0' │ │ 1614 Created OS 03 (3) 'Unix' │ │ 1615 Extract Zip Spec 14 (20) '2.0' │ │ 1616 Extract OS 00 (0) 'MS-DOS' │ │ 1617 General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 1619 Compression Method 0008 (8) 'Deflated' │ │ -161B Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +161B Modification Time 5B52B684 (1532147332) 'Sat Oct 18 22:52:08 2025' │ │ 161F CRC 42800EDC (1115688668) │ │ 1623 Compressed Size 00000705 (1797) │ │ 1627 Uncompressed Size 00001902 (6402) │ │ 162B Filename Length 000D (13) │ │ 162D Extra Length 0018 (24) │ │ 162F Comment Length 0000 (0) │ │ 1631 Disk Start 0000 (0) │ │ @@ -157,15 +157,15 @@ │ │ # │ │ # WARNING: Offset 0x163D: Filename 'XXXXXXXXXXXXX' │ │ # Zero length filename │ │ # │ │ 164A Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 164C Length 0005 (5) │ │ 164E Flags 03 (3) 'Modification Access' │ │ -164F Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ +164F Modification Time 68F41A17 (1760827927) 'Sat Oct 18 22:52:07 2025' │ │ 1653 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 1655 Length 000B (11) │ │ 1657 Version 01 (1) │ │ 1658 UID Size 04 (4) │ │ 1659 UID 000003E8 (1000) │ │ 165D GID Size 04 (4) │ │ 165E GID 000003E8 (1000) │ │ @@ -174,15 +174,15 @@ │ │ 1666 Created Zip Spec 1E (30) '3.0' │ │ 1667 Created OS 03 (3) 'Unix' │ │ 1668 Extract Zip Spec 14 (20) '2.0' │ │ 1669 Extract OS 00 (0) 'MS-DOS' │ │ 166A General Purpose Flag 0000 (0) │ │ [Bits 1-2] 0 'Normal Compression' │ │ 166C Compression Method 0008 (8) 'Deflated' │ │ -166E Modification Time 58CAA760 (1489676128) 'Mon Jun 10 20:59:00 2024' │ │ +166E Modification Time 5B52B684 (1532147332) 'Sat Oct 18 22:52:08 2025' │ │ 1672 CRC 89BE64C8 (2310956232) │ │ 1676 Compressed Size 00000B35 (2869) │ │ 167A Uncompressed Size 00001E21 (7713) │ │ 167E Filename Length 0008 (8) │ │ 1680 Extra Length 0018 (24) │ │ 1682 Comment Length 0000 (0) │ │ 1684 Disk Start 0000 (0) │ │ @@ -196,15 +196,15 @@ │ │ # │ │ # WARNING: Offset 0x1690: Filename 'XXXXXXXX' │ │ # Zero length filename │ │ # │ │ 1698 Extra ID #1 5455 (21589) 'Extended Timestamp [UT]' │ │ 169A Length 0005 (5) │ │ 169C Flags 03 (3) 'Modification Access' │ │ -169D Modification Time 66676914 (1718053140) 'Mon Jun 10 20:59:00 2024' │ │ +169D Modification Time 68F41A17 (1760827927) 'Sat Oct 18 22:52:07 2025' │ │ 16A1 Extra ID #2 7875 (30837) 'Unix Extra type 3 [ux]' │ │ 16A3 Length 000B (11) │ │ 16A5 Version 01 (1) │ │ 16A6 UID Size 04 (4) │ │ 16A7 UID 000003E8 (1000) │ │ 16AB GID Size 04 (4) │ │ 16AC GID 000003E8 (1000) │ ├── filetype from file(1) │ │ @@ -1 +1 @@ │ │ -Zip archive data, made by v3.0 UNIX, extract using at least v2.0, last modified Jun 10 2024 20:59:00, uncompressed size 2173, method=deflate │ │ +Zip archive data, made by v3.0 UNIX, extract using at least v2.0, last modified Oct 18 2025 22:52:06, uncompressed size 2173, method=deflate ├── assets/html/alexgames_wasm.wasm │ ├── wasm2wat --no-check {} │ │ @@ -73,49 +73,53 @@ │ │ (type (;71;) (func (param f64 i64) (result i32))) │ │ (type (;72;) (func (param i32 i64 i64) (result i64))) │ │ (type (;73;) (func (param i32 f64 f64) (result f64))) │ │ (type (;74;) (func (param i64 i64) (result i64))) │ │ (type (;75;) (func (param i32 i64 i32 i32 i64) (result i32))) │ │ (type (;76;) (func (param i32 i64 i32) (result i32))) │ │ (type (;77;) (func (param i32 i32 i64 i32 i32) (result i32))) │ │ - (type (;78;) (func (param i64 i64 i32 i64 i32) (result i64))) │ │ - (type (;79;) (func (param i32 i64 i64 i32 i64 i32 i32 i32 i64 i32 i32) (result i32))) │ │ - (type (;80;) (func (param i32 i64 i32 i32 i32) (result i32))) │ │ - (type (;81;) (func (param i32 i32 i32 i64))) │ │ - (type (;82;) (func (param i64) (result i64))) │ │ - (type (;83;) (func (param i32 i32 i32 i64) (result i64))) │ │ - (type (;84;) (func (param i32 i64 i32 i64 i64 i32 i32) (result i32))) │ │ - (type (;85;) (func (param i32 i32 i64 i64 i32 i32 i32 i32) (result i32))) │ │ - (type (;86;) (func (param i32 i64 i64 i32) (result i32))) │ │ - (type (;87;) (func (param f64) (result f64))) │ │ - (type (;88;) (func (param f64) (result i64))) │ │ - (type (;89;) (func (param f64 f64) (result f64))) │ │ - (type (;90;) (func (param f64 i32) (result i32))) │ │ - (type (;91;) (func (param f64 f64 i32) (result f64))) │ │ - (type (;92;) (func (param i32 f64) (result f64))) │ │ - (type (;93;) (func (param f64 i64 i64) (result f64))) │ │ - (type (;94;) (func (param f64 i32) (result f64))) │ │ - (type (;95;) (func (param i32 i64 i64 i64 i64))) │ │ - (type (;96;) (func (param i32 i64 i64 i32))) │ │ - (type (;97;) (func (param i64 i64) (result i32))) │ │ - (type (;98;) (func (param i32 i64 i64))) │ │ - (type (;99;) (func (param i32 i32 i32) (result f32))) │ │ - (type (;100;) (func (param i64 i32 i32) (result i32))) │ │ - (type (;101;) (func (param i64 i64 i64 i64) (result i32))) │ │ - (type (;102;) (func (param i32 f32))) │ │ - (type (;103;) (func (param i64 i64) (result f64))) │ │ - (type (;104;) (func (param i64 i64) (result f32))) │ │ - (type (;105;) (func (param i32 i32 i64 i32 i32))) │ │ - (type (;106;) (func (param i32 i32 i32 i32) (result i64))) │ │ - (type (;107;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) │ │ - (type (;108;) (func (param i32 i32 i32 i32 i64) (result i32))) │ │ - (type (;109;) (func (param i32 i32 i32 i32 f64) (result i32))) │ │ - (type (;110;) (func (param i32 i32 i32 i32 i64 i64) (result i32))) │ │ - (type (;111;) (func (param i32 i32 i32 i32 i32 i64 i64) (result i32))) │ │ - (type (;112;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32))) │ │ + (type (;78;) (func (param i32 i32 i32 i32 i64 i32 i32) (result i64))) │ │ + (type (;79;) (func (param i32 i32 i32 i64 i32 i32) (result i32))) │ │ + (type (;80;) (func (param i64 i32 i64 i32 i32) (result i32))) │ │ + (type (;81;) (func (param i32 i32 i64 i64 i32) (result i32))) │ │ + (type (;82;) (func (param i64 i64 i32 i64 i32) (result i64))) │ │ + (type (;83;) (func (param i32 i64 i64 i32 i64 i32 i32 i32 i64 i32 i32) (result i32))) │ │ + (type (;84;) (func (param i32 i64 i32 i32 i32) (result i32))) │ │ + (type (;85;) (func (param i32 i32 i32 i64))) │ │ + (type (;86;) (func (param i64) (result i64))) │ │ + (type (;87;) (func (param i32 i32 i32 i64) (result i64))) │ │ + (type (;88;) (func (param i32 i64 i32 i64 i64 i32 i32) (result i32))) │ │ + (type (;89;) (func (param i32 i32 i64 i64 i32 i32 i32 i32) (result i32))) │ │ + (type (;90;) (func (param i32 i64 i64 i32) (result i32))) │ │ + (type (;91;) (func (param f64) (result f64))) │ │ + (type (;92;) (func (param f64) (result i64))) │ │ + (type (;93;) (func (param f64 f64) (result f64))) │ │ + (type (;94;) (func (param f64 i32) (result i32))) │ │ + (type (;95;) (func (param f64 f64 i32) (result f64))) │ │ + (type (;96;) (func (param i32 f64) (result f64))) │ │ + (type (;97;) (func (param f64 i64 i64) (result f64))) │ │ + (type (;98;) (func (param f64 i32) (result f64))) │ │ + (type (;99;) (func (param i32 i64 i64 i64 i64))) │ │ + (type (;100;) (func (param i32 i64 i64 i32))) │ │ + (type (;101;) (func (param i64 i64) (result i32))) │ │ + (type (;102;) (func (param i32 i64 i64))) │ │ + (type (;103;) (func (param i32 i32 i32) (result f32))) │ │ + (type (;104;) (func (param i64 i32 i32) (result i32))) │ │ + (type (;105;) (func (param i64 i64 i64 i64) (result i32))) │ │ + (type (;106;) (func (param i32 f32))) │ │ + (type (;107;) (func (param i64 i64) (result f64))) │ │ + (type (;108;) (func (param i64 i64) (result f32))) │ │ + (type (;109;) (func (param i32 i32 i64 i32 i32))) │ │ + (type (;110;) (func (param i32 i32 i32 i32) (result i64))) │ │ + (type (;111;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32))) │ │ + (type (;112;) (func (param i32 i32 i32 i32 i64) (result i32))) │ │ + (type (;113;) (func (param i32 i32 i32 i32 f64) (result i32))) │ │ + (type (;114;) (func (param i32 i32 i32 i32 i64 i64) (result i32))) │ │ + (type (;115;) (func (param i32 i32 i32 i32 i32 i64 i64) (result i32))) │ │ + (type (;116;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32))) │ │ (import "env" "js_draw_graphic_raw" (func $js_draw_graphic_raw (type 27))) │ │ (import "env" "js_add_game_option_json_str" (func $js_add_game_option_json_str (type 2))) │ │ (import "env" "js_set_game_handle2" (func $js_set_game_handle2 (type 1))) │ │ (import "env" "js_show_popup_json" (func $js_show_popup_json (type 0))) │ │ (import "env" "js_get_game_id" (func $js_get_game_id (type 2))) │ │ (import "env" "js_draw_line" (func $js_draw_line (type 12))) │ │ (import "env" "js_draw_text" (func $js_draw_text (type 13))) │ │ @@ -237,150 +241,150 @@ │ │ (func $get_game_name (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $alex_get_game_name) │ │ (func $start_game (type 0) (param i32 i32 i32 i32) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=56 │ │ local.tee 4 │ │ br_if 0 (;@1;) │ │ i32.const 1024 │ │ - i32.const 19482 │ │ + i32.const 19785 │ │ i32.const 0 │ │ call $alex_log_err_user_visible │ │ return │ │ end │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ call_indirect (type 0)) │ │ (func $update (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=8 │ │ call_indirect (type 1)) │ │ (func $handle_user_string_input (type 0) (param i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=12 │ │ call_indirect (type 0)) │ │ (func $handle_user_clicked (type 2) (param i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=16 │ │ call_indirect (type 2)) │ │ (func $handle_mousemove (type 0) (param i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=20 │ │ call_indirect (type 0)) │ │ (func $handle_mouse_evt (type 3) (param i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=24 │ │ call_indirect (type 3)) │ │ (func $handle_wheel_changed (type 2) (param i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=28 │ │ call_indirect (type 2)) │ │ (func $handle_key_evt (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=32 │ │ call_indirect (type 4)) │ │ (func $handle_touch_evt (type 3) (param i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=36 │ │ call_indirect (type 3)) │ │ (func $handle_msg_received (type 3) (param i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=40 │ │ call_indirect (type 3)) │ │ (func $handle_btn_clicked (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=44 │ │ call_indirect (type 1)) │ │ (func $handle_popup_btn_clicked (type 0) (param i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=48 │ │ call_indirect (type 0)) │ │ (func $handle_game_option_evt (type 0) (param i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=52 │ │ call_indirect (type 0)) │ │ (func $start_game_b64 (type 0) (param i32 i32 i32 i32) │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.const 1024 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ call $alex_start_game_b64) │ │ (func $get_state (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ i32.const 0 │ │ local.set 3 │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=60 │ │ local.tee 4 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 65536 │ │ call $dlmalloc │ │ local.set 5 │ │ @@ -400,15 +404,15 @@ │ │ local.get 3) │ │ (func $get_init_state (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ i32.const 0 │ │ local.set 3 │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=64 │ │ local.tee 4 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 65536 │ │ call $dlmalloc │ │ local.set 5 │ │ @@ -427,24 +431,24 @@ │ │ end │ │ local.get 3) │ │ (func $lua_run_cmd (type 2) (param i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=68 │ │ call_indirect (type 2)) │ │ (func $destroy_game (type 5) (param i32) │ │ - i32.const 10104 │ │ + i32.const 10311 │ │ call $puts │ │ drop │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83600 │ │ + i32.load offset=83968 │ │ i32.load offset=4 │ │ call_indirect (type 5)) │ │ (func $new_file (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $alex_new_file) │ │ (func $write_to_file (type 0) (param i32 i32 i32 i32) │ │ @@ -507,26 +511,26 @@ │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=16 │ │ - i32.const 22226 │ │ + i32.const 22529 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 2 │ │ local.get 1 │ │ i32.store │ │ - i32.const 83504 │ │ + i32.const 83872 │ │ i32.const 64 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.get 2 │ │ call $snprintf │ │ drop │ │ local.get 0 │ │ local.get 1 │ │ call $js_set_game_handle2 │ │ local.get 2 │ │ @@ -550,135 +554,135 @@ │ │ call $js_show_popup_json │ │ local.get 4 │ │ i32.const 10240 │ │ i32.add │ │ global.set $__stack_pointer) │ │ (func $db_helper_get_new_session_id (type 9) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83568 │ │ + i32.load offset=83936 │ │ call $saved_state_db_get_new_session_id) │ │ (func $db_helper_get_last_session_id (type 10) (param i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83568 │ │ + i32.load offset=83936 │ │ local.get 0 │ │ call $saved_state_db_get_last_session_id) │ │ (func $db_helper_save_state (type 2) (param i32 i32 i32) │ │ i32.const 0 │ │ - i32.load offset=83568 │ │ - i32.const 83504 │ │ + i32.load offset=83936 │ │ + i32.const 83872 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $saved_state_db_save_state) │ │ (func $db_helper_has_saved_state_offset (type 6) (param i32 i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83568 │ │ + i32.load offset=83936 │ │ local.get 0 │ │ local.get 1 │ │ call $saved_state_db_has_saved_state_offset) │ │ (func $db_helper_get_saved_state_offset (type 14) (param i32 i32 i32 i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83568 │ │ + i32.load offset=83936 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ call $saved_state_db_get_saved_state_offset) │ │ (func $init_game_api (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ - i32.const 12313 │ │ + i32.const 12582 │ │ call $puts │ │ drop │ │ local.get 2 │ │ local.get 0 │ │ i32.store offset=16 │ │ - i32.const 83504 │ │ + i32.const 83872 │ │ i32.const 64 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ call $get_emscripten_game_dict_api │ │ call $set_game_dict_api │ │ i32.const 0 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $saved_state_db_init │ │ - i32.store offset=83568 │ │ + i32.store offset=83936 │ │ i32.const 1024 │ │ local.get 0 │ │ local.get 1 │ │ call $alex_init_game │ │ local.set 0 │ │ local.get 2 │ │ - i32.const 19209 │ │ + i32.const 19512 │ │ i32.store offset=4 │ │ local.get 2 │ │ - i32.const 16981 │ │ + i32.const 17284 │ │ i32.store │ │ - i32.const 20177 │ │ + i32.const 20480 │ │ local.get 2 │ │ call $iprintf │ │ drop │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 0) │ │ (func $get_emscripten_game_dict_api (type 9) (result i32) │ │ - i32.const 22664) │ │ + i32.const 22972) │ │ (func $update_dict (type 11) │ │ - i32.const 4771 │ │ + i32.const 4820 │ │ call $puts │ │ drop │ │ i32.const 0 │ │ call $time │ │ call $srandom │ │ i32.const 0 │ │ i32.const 1996 │ │ call $build_word_dict_from_file │ │ - i32.store offset=83572) │ │ + i32.store offset=83940) │ │ (func $dict2_is_dict_ready (type 9) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83572 │ │ + i32.load offset=83940 │ │ i32.const 0 │ │ i32.ne) │ │ (func $dict2_is_valid_word (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ call $get_c_dictionary_api │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=83572 │ │ + i32.load offset=83940 │ │ local.get 1 │ │ local.get 2 │ │ i32.load offset=8 │ │ call_indirect (type 6)) │ │ (func $dict2_get_word_freq (type 7) (param i32 i32) (result f32) │ │ (local i32) │ │ call $get_c_dictionary_api │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=83572 │ │ + i32.load offset=83940 │ │ local.get 1 │ │ local.get 2 │ │ i32.load offset=12 │ │ call_indirect (type 7)) │ │ (func $dict2_get_random_word (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ (local i32) │ │ call $get_c_dictionary_api │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=83572 │ │ + i32.load offset=83940 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ i32.load offset=16 │ │ call_indirect (type 8)) │ │ @@ -709,18 +713,18 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=40 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=36 │ │ local.get 5 │ │ - i32.const 13742 │ │ + i32.const 14011 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 13256 │ │ + i32.const 13525 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ local.get 0 │ │ local.get 1 │ │ @@ -741,15 +745,15 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=20 │ │ local.get 5 │ │ local.get 4 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 7248 │ │ + i32.const 7297 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 5 │ │ @@ -815,22 +819,22 @@ │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ local.get 3 │ │ - i32.const 3140 │ │ + i32.const 3189 │ │ i32.store │ │ - i32.const 20300 │ │ + i32.const 20603 │ │ local.get 3 │ │ call $alex_log │ │ i32.const 0 │ │ local.get 2 │ │ - i32.store offset=83576 │ │ + i32.store offset=83944 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 46 │ │ i32.const 0 │ │ call $luaL_requiref │ │ local.get 3 │ │ i32.const 16 │ │ @@ -842,22 +846,22 @@ │ │ i32.const 136 │ │ call $luaL_checkversion_ │ │ local.get 0 │ │ i32.const 0 │ │ i32.const 6 │ │ call $lua_createtable │ │ local.get 0 │ │ - i32.const 22688 │ │ + i32.const 23008 │ │ i32.const 0 │ │ call $luaL_setfuncs │ │ i32.const 1) │ │ (func $lua_dict_ready (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83576 │ │ + i32.load offset=83944 │ │ i32.load │ │ call_indirect (type 9) │ │ call $lua_pushboolean │ │ i32.const 1) │ │ (func $lua_dict_init (type 10) (param i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ @@ -872,18 +876,18 @@ │ │ local.get 0 │ │ i32.const 1 │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ call $lua_tolstring │ │ i32.const 0 │ │ - i32.load offset=83576 │ │ + i32.load offset=83944 │ │ i32.load offset=4 │ │ call_indirect (type 10) │ │ - i32.store offset=83580 │ │ + i32.store offset=83948 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_dict_is_valid_word (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ @@ -900,18 +904,18 @@ │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ call $lua_tolstring │ │ local.set 2 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83580 │ │ + i32.load offset=83948 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83576 │ │ + i32.load offset=83944 │ │ i32.load offset=8 │ │ call_indirect (type 6) │ │ call $lua_pushboolean │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ @@ -931,18 +935,18 @@ │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ call $lua_tolstring │ │ local.set 2 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83580 │ │ + i32.load offset=83948 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83576 │ │ + i32.load offset=83944 │ │ i32.load offset=12 │ │ call_indirect (type 7) │ │ f64.promote_f32 │ │ call $lua_pushnumber │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ @@ -977,25 +981,25 @@ │ │ call $lua_type │ │ i32.const 5 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 1 │ │ - i32.const 7818 │ │ + i32.const 7867 │ │ call $lua_getfield │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 7818 │ │ + i32.const 7867 │ │ i32.const 0 │ │ - i32.const 11168 │ │ + i32.const 11437 │ │ call $lua_get_int_or_float_func │ │ local.tee 2 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ @@ -1013,25 +1017,25 @@ │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 1 │ │ - i32.const 7807 │ │ + i32.const 7856 │ │ call $lua_getfield │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 7807 │ │ + i32.const 7856 │ │ i32.const 0 │ │ - i32.const 11168 │ │ + i32.const 11437 │ │ call $lua_get_int_or_float_func │ │ local.tee 2 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ @@ -1049,57 +1053,57 @@ │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 1 │ │ - i32.const 5758 │ │ + i32.const 5807 │ │ call $lua_getfield │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 1 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 5758 │ │ + i32.const 5807 │ │ i32.const 0 │ │ - i32.const 11168 │ │ + i32.const 11437 │ │ call $lua_get_int_or_float_func │ │ f32.store offset=88 │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ - i32.const 10599 │ │ + i32.const 10868 │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ call $lua_error │ │ drop │ │ end │ │ local.get 1 │ │ i32.const -1 │ │ i32.store offset=76 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=83580 │ │ + i32.load offset=83948 │ │ local.get 1 │ │ i32.const 80 │ │ i32.add │ │ local.get 1 │ │ i32.const 64 │ │ local.get 1 │ │ i32.const 76 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=83576 │ │ + i32.load offset=83944 │ │ i32.load offset=16 │ │ call_indirect (type 8) │ │ call $lua_pushlstring │ │ drop │ │ local.get 1 │ │ i32.const 96 │ │ i32.add │ │ @@ -1136,116 +1140,116 @@ │ │ local.get 1 │ │ i32.const -2 │ │ i32.add │ │ br_table 0 (;@18;) 2 (;@16;) 3 (;@15;) 9 (;@9;) 11 (;@7;) 11 (;@7;) 4 (;@14;) 1 (;@17;) 7 (;@11;) 11 (;@7;) 11 (;@7;) 11 (;@7;) 11 (;@7;) 11 (;@7;) 11 (;@7;) 11 (;@7;) 8 (;@10;) 11 (;@7;) │ │ end │ │ block ;; label = @18 │ │ local.get 0 │ │ - i32.const 6111 │ │ + i32.const 6160 │ │ i32.const 3 │ │ call $memcmp │ │ br_if 0 (;@18;) │ │ - i32.const 14894 │ │ + i32.const 15163 │ │ return │ │ end │ │ local.get 0 │ │ i32.const 1950 │ │ i32.const 3 │ │ call $memcmp │ │ br_if 16 (;@1;) │ │ - i32.const 14419 │ │ + i32.const 14688 │ │ return │ │ end │ │ local.get 0 │ │ i32.const 2325 │ │ i32.const 10 │ │ call $memcmp │ │ br_if 8 (;@8;) │ │ - i32.const 14191 │ │ + i32.const 14460 │ │ return │ │ end │ │ i32.const 0 │ │ local.set 3 │ │ i32.const 0 │ │ local.set 4 │ │ local.get 0 │ │ i32.load align=1 │ │ i32.const 7549235 │ │ i32.ne │ │ br_if 8 (;@7;) │ │ - i32.const 14704 │ │ + i32.const 14973 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 11040 │ │ + i32.const 11309 │ │ i32.const 5 │ │ call $memcmp │ │ br_if 1 (;@13;) │ │ - i32.const 15261 │ │ + i32.const 15530 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 3630 │ │ + i32.const 3679 │ │ i32.const 9 │ │ call $memcmp │ │ br_if 1 (;@12;) │ │ - i32.const 14616 │ │ + i32.const 14885 │ │ return │ │ end │ │ i32.const 1 │ │ local.set 4 │ │ i32.const 0 │ │ local.set 3 │ │ local.get 0 │ │ - i32.const 13974 │ │ + i32.const 14243 │ │ i32.const 5 │ │ call $memcmp │ │ br_if 5 (;@7;) │ │ - i32.const 15429 │ │ + i32.const 15698 │ │ return │ │ end │ │ i32.const 1 │ │ local.set 3 │ │ i32.const 0 │ │ local.set 4 │ │ local.get 0 │ │ - i32.const 6933 │ │ + i32.const 6982 │ │ i32.const 9 │ │ call $memcmp │ │ br_if 4 (;@7;) │ │ - i32.const 15384 │ │ + i32.const 15653 │ │ return │ │ end │ │ local.get 0 │ │ i32.const 2298 │ │ i32.const 11 │ │ call $memcmp │ │ br_if 5 (;@5;) │ │ - i32.const 14112 │ │ + i32.const 14381 │ │ return │ │ end │ │ local.get 0 │ │ i32.const 2268 │ │ i32.const 19 │ │ call $memcmp │ │ br_if 8 (;@1;) │ │ - i32.const 14036 │ │ + i32.const 14305 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 10760 │ │ + i32.const 11029 │ │ i32.const 6 │ │ call $memcmp │ │ br_if 2 (;@6;) │ │ - i32.const 15169 │ │ + i32.const 15438 │ │ return │ │ end │ │ block ;; label = @8 │ │ local.get 0 │ │ - i32.const 9710 │ │ + i32.const 9844 │ │ i32.const 10 │ │ call $memcmp │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ i32.const 1 │ │ local.set 5 │ │ i32.const 0 │ │ @@ -1254,15 +1258,15 @@ │ │ local.set 6 │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ local.set 3 │ │ br 6 (;@2;) │ │ end │ │ - i32.const 15126 │ │ + i32.const 15395 │ │ return │ │ end │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ local.get 1 │ │ @@ -1272,55 +1276,55 @@ │ │ end │ │ block ;; label = @10 │ │ local.get 0 │ │ i32.const 2309 │ │ i32.const 16 │ │ call $memcmp │ │ br_if 0 (;@10;) │ │ - i32.const 14152 │ │ + i32.const 14421 │ │ return │ │ end │ │ i32.const 0 │ │ local.set 2 │ │ i32.const 1 │ │ local.set 6 │ │ local.get 3 │ │ br_if 2 (;@7;) │ │ br 6 (;@3;) │ │ end │ │ i32.const 1 │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 5136 │ │ + i32.const 5185 │ │ i32.const 12 │ │ call $memcmp │ │ br_if 0 (;@8;) │ │ - i32.const 14735 │ │ + i32.const 15004 │ │ return │ │ end │ │ i32.const 0 │ │ local.set 6 │ │ local.get 3 │ │ i32.eqz │ │ br_if 4 (;@3;) │ │ end │ │ i32.const 0 │ │ local.set 5 │ │ i32.const 0 │ │ local.set 3 │ │ local.get 0 │ │ - i32.const 7347 │ │ + i32.const 7396 │ │ i32.const 9 │ │ call $memcmp │ │ br_if 4 (;@2;) │ │ - i32.const 15003 │ │ + i32.const 15272 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 11306 │ │ + i32.const 11575 │ │ i32.const 6 │ │ call $memcmp │ │ i32.eqz │ │ br_if 1 (;@4;) │ │ i32.const 1 │ │ local.set 3 │ │ i32.const 0 │ │ @@ -1331,30 +1335,30 @@ │ │ local.set 5 │ │ i32.const 0 │ │ local.set 4 │ │ br 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 0 │ │ - i32.const 6203 │ │ + i32.const 6252 │ │ i32.const 11 │ │ call $memcmp │ │ br_if 0 (;@5;) │ │ - i32.const 14923 │ │ + i32.const 15192 │ │ return │ │ end │ │ local.get 0 │ │ i32.const 2287 │ │ i32.const 11 │ │ call $memcmp │ │ br_if 3 (;@1;) │ │ - i32.const 14078 │ │ + i32.const 14347 │ │ return │ │ end │ │ - i32.const 15294 │ │ + i32.const 15563 │ │ return │ │ end │ │ i32.const 0 │ │ local.set 5 │ │ i32.const 0 │ │ local.set 3 │ │ end │ │ @@ -1364,198 +1368,198 @@ │ │ i32.ne │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const 1961 │ │ i32.const 7 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14448 │ │ + i32.const 14717 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 3515 │ │ + i32.const 3564 │ │ i32.const 6 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14522 │ │ + i32.const 14791 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 4 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 9328 │ │ + i32.const 9462 │ │ i32.const 5 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 15093 │ │ + i32.const 15362 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 6 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const 2202 │ │ i32.const 7 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14485 │ │ + i32.const 14754 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 6908 │ │ + i32.const 6957 │ │ i32.const 6 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14968 │ │ + i32.const 15237 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 12 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 8250 │ │ + i32.const 8384 │ │ i32.const 13 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 15044 │ │ + i32.const 15313 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 3692 │ │ + i32.const 3741 │ │ i32.const 12 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14657 │ │ + i32.const 14926 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 6 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 11312 │ │ + i32.const 11581 │ │ i32.const 16 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 15329 │ │ + i32.const 15598 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 17 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 3564 │ │ + i32.const 3613 │ │ i32.const 18 │ │ call $memcmp │ │ br_if 0 (;@3;) │ │ - i32.const 14557 │ │ + i32.const 14826 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 5495 │ │ + i32.const 5544 │ │ i32.const 18 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14835 │ │ + i32.const 15104 │ │ return │ │ end │ │ block ;; label = @2 │ │ local.get 5 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const 1640 │ │ i32.const 10 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ - i32.const 14376 │ │ + i32.const 14645 │ │ return │ │ end │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const -14 │ │ i32.add │ │ br_table 0 (;@3;) 2 (;@1;) 1 (;@2;) 2 (;@1;) │ │ end │ │ local.get 0 │ │ - i32.const 5148 │ │ + i32.const 5197 │ │ i32.const 15 │ │ call $memcmp │ │ br_if 1 (;@1;) │ │ - i32.const 14782 │ │ + i32.const 15051 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 11028 │ │ + i32.const 11297 │ │ i32.const 17 │ │ call $memcmp │ │ br_if 0 (;@1;) │ │ - i32.const 15204 │ │ + i32.const 15473 │ │ return │ │ end │ │ i32.const 0) │ │ (func $start_lua_game (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 4128 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ - i32.const 22744 │ │ + i32.const 23064 │ │ call $set_game_api │ │ block ;; label = @1 │ │ local.get 0 │ │ local.get 1 │ │ call $init_lua_game │ │ local.tee 3 │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=16 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 4096 │ │ - i32.const 19403 │ │ + i32.const 19706 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 2 │ │ i32.const 4096 │ │ i32.store │ │ local.get 2 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.store offset=4 │ │ - i32.const 4329 │ │ + i32.const 4378 │ │ local.get 2 │ │ call $alex_log_err │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 4096 │ │ local.get 0 │ │ @@ -1574,25 +1578,25 @@ │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ local.set 3 │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=83584 │ │ + i32.store offset=83952 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.const 9456 │ │ i32.add │ │ i32.const 4096 │ │ call $alex_get_root_dir │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 5065 │ │ + i32.const 5114 │ │ i32.const 0 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 3 │ │ local.get 2 │ │ @@ -1608,58 +1612,58 @@ │ │ i32.const 1023 │ │ call $strncat │ │ local.get 1 │ │ i32.const 1023 │ │ call $strncat │ │ local.tee 4 │ │ i32.store offset=192 │ │ - i32.const 21779 │ │ + i32.const 22082 │ │ local.get 2 │ │ i32.const 192 │ │ i32.add │ │ call $alex_log │ │ - i32.const 21748 │ │ + i32.const 22051 │ │ i32.const 0 │ │ call $alex_log │ │ local.get 2 │ │ call $luaL_newstate │ │ local.tee 0 │ │ i32.store offset=176 │ │ - i32.const 20304 │ │ + i32.const 20607 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ call $alex_log │ │ local.get 0 │ │ call $luaL_openlibs │ │ local.get 0 │ │ - i32.const 3159 │ │ + i32.const 3208 │ │ call $get_game_dict_api │ │ call $init_lua_alex_dict │ │ local.get 0 │ │ - i32.const 4106 │ │ + i32.const 4155 │ │ i32.const 53 │ │ i32.const 0 │ │ call $luaL_requiref │ │ local.get 0 │ │ i32.const 0 │ │ call $lua_settop │ │ local.get 0 │ │ i32.const 0 │ │ call $lua_settop │ │ - i32.const 20046 │ │ + i32.const 20349 │ │ i32.const 0 │ │ call $alex_log │ │ local.get 0 │ │ - i32.const 11005 │ │ + i32.const 11274 │ │ call $lua_getglobal │ │ drop │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 7928 │ │ + i32.const 7977 │ │ call $lua_getfield │ │ drop │ │ local.get 0 │ │ i32.const -1 │ │ i32.const 0 │ │ call $lua_tolstring │ │ local.set 1 │ │ @@ -1667,59 +1671,59 @@ │ │ local.get 2 │ │ i32.const 4336 │ │ i32.add │ │ i32.const 4096 │ │ call $alex_get_root_dir │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 5042 │ │ + i32.const 5091 │ │ i32.const 0 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ - i32.const 17205 │ │ + i32.const 17508 │ │ i32.store offset=164 │ │ local.get 2 │ │ local.get 2 │ │ i32.const 4336 │ │ i32.add │ │ i32.store offset=160 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.const 4096 │ │ - i32.const 4336 │ │ + i32.const 4385 │ │ local.get 2 │ │ i32.const 160 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 2 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.store offset=144 │ │ - i32.const 22414 │ │ + i32.const 22717 │ │ local.get 2 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ local.get 2 │ │ i32.const 112 │ │ i32.add │ │ i32.const 16 │ │ i32.add │ │ - i32.const 16961 │ │ + i32.const 17264 │ │ i32.store │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=112 │ │ local.get 2 │ │ - i32.const 17197 │ │ + i32.const 17500 │ │ i32.store offset=124 │ │ local.get 2 │ │ local.get 2 │ │ i32.const 9456 │ │ i32.add │ │ i32.store offset=116 │ │ local.get 2 │ │ @@ -1728,107 +1732,107 @@ │ │ i32.add │ │ i32.store offset=120 │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.const 4336 │ │ i32.add │ │ i32.const 4096 │ │ - i32.const 15485 │ │ + i32.const 15754 │ │ local.get 2 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.tee 3 │ │ i32.const 4096 │ │ i32.lt_u │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 2 │ │ i32.const 4096 │ │ i32.store │ │ - i32.const 21175 │ │ + i32.const 21478 │ │ local.get 2 │ │ call $alex_log_err │ │ i32.const 0 │ │ local.set 3 │ │ local.get 2 │ │ i32.const 232 │ │ i32.add │ │ i32.const 0 │ │ - i32.load8_u offset=22840 │ │ + i32.load8_u offset=23160 │ │ i32.store8 │ │ local.get 2 │ │ i32.const 208 │ │ i32.add │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=22832 │ │ + i64.load offset=23152 │ │ i64.store │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=22824 │ │ + i64.load offset=23144 │ │ i64.store offset=216 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=22816 │ │ + i64.load offset=23136 │ │ i64.store offset=208 │ │ local.get 2 │ │ i32.const 208 │ │ i32.add │ │ i32.const 25 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ local.get 2 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.store offset=96 │ │ - i32.const 22471 │ │ + i32.const 22774 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ call $alex_log │ │ local.get 2 │ │ - i32.const 16961 │ │ + i32.const 17264 │ │ i32.store offset=80 │ │ - i32.const 22512 │ │ + i32.const 22815 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ local.get 0 │ │ local.get 2 │ │ i32.const 4336 │ │ i32.add │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 7928 │ │ + i32.const 7977 │ │ call $lua_setfield │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ - i32.const 20332 │ │ + i32.store8 offset=83956 │ │ + i32.const 20635 │ │ i32.const 0 │ │ call $alex_log │ │ - i32.const 20633 │ │ + i32.const 20936 │ │ i32.const 0 │ │ call $alex_log │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @2 │ │ @@ -1837,100 +1841,100 @@ │ │ local.get 0 │ │ local.get 4 │ │ i32.const 0 │ │ call $luaL_loadfilex │ │ local.tee 3 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - i32.const 20671 │ │ + i32.const 20974 │ │ i32.const 0 │ │ call $alex_log │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ i32.const 0 │ │ i32.const 1 │ │ i32.const 0 │ │ i32.const 0 │ │ call $lua_pcallk │ │ local.set 3 │ │ - i32.const 20671 │ │ + i32.const 20974 │ │ i32.const 0 │ │ call $alex_log │ │ local.get 3 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ local.get 2 │ │ local.get 3 │ │ i32.store offset=68 │ │ local.get 2 │ │ i32.const 600 │ │ i32.store offset=64 │ │ - i32.const 21328 │ │ + i32.const 21631 │ │ local.get 2 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ i32.const 0 │ │ local.set 3 │ │ local.get 2 │ │ local.get 0 │ │ i32.const -1 │ │ i32.const 0 │ │ call $lua_tolstring │ │ local.tee 0 │ │ i32.store offset=48 │ │ - i32.const 20214 │ │ + i32.const 20517 │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ local.get 0 │ │ call $strlen │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ i32.const 0 │ │ i32.store offset=32 │ │ - i32.const 22027 │ │ + i32.const 22330 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=36 │ │ call_indirect (type 11) │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 2 │ │ - i32.const 10138 │ │ + i32.const 10345 │ │ i32.store offset=16 │ │ - i32.const 21671 │ │ + i32.const 21974 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ end │ │ local.get 0 │ │ local.set 3 │ │ @@ -1946,128 +1950,128 @@ │ │ i32.const 136 │ │ call $luaL_checkversion_ │ │ local.get 0 │ │ i32.const 0 │ │ i32.const 36 │ │ call $lua_createtable │ │ local.get 0 │ │ - i32.const 22848 │ │ + i32.const 23168 │ │ i32.const 0 │ │ call $luaL_setfuncs │ │ local.get 0 │ │ i64.const 2 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15935 │ │ + i32.const 16238 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 1 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15862 │ │ + i32.const 16165 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 3 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16294 │ │ + i32.const 16597 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 4 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15950 │ │ + i32.const 16253 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 5 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15875 │ │ + i32.const 16178 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 6 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15969 │ │ + i32.const 16272 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 7 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15892 │ │ + i32.const 16195 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 1 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15809 │ │ + i32.const 16112 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 0 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16310 │ │ + i32.const 16613 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 0 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15841 │ │ + i32.const 16144 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const -1 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15792 │ │ + i32.const 16095 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 1 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16262 │ │ + i32.const 16565 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 2 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16030 │ │ + i32.const 16333 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 3 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 15989 │ │ + i32.const 16292 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 1 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16014 │ │ + i32.const 16317 │ │ call $lua_setfield │ │ local.get 0 │ │ i64.const 2 │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 16328 │ │ + i32.const 16631 │ │ call $lua_setfield │ │ i32.const 1) │ │ (func $lua_err_handler (type 10) (param i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 48 │ │ i32.sub │ │ @@ -2076,64 +2080,64 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ call $lua_isstring │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 5180 │ │ + i32.const 5229 │ │ i32.store │ │ - i32.const 16452 │ │ + i32.const 16755 │ │ local.get 1 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ - i32.const 8138 │ │ + i32.const 8272 │ │ call $lua_getglobal │ │ drop │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const -1 │ │ call $lua_type │ │ i32.const 5 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ local.get 1 │ │ - i32.const 5180 │ │ + i32.const 5229 │ │ i32.store offset=32 │ │ - i32.const 16479 │ │ + i32.const 16782 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 7643 │ │ + i32.const 7692 │ │ call $lua_getfield │ │ drop │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const -1 │ │ call $lua_type │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const -3 │ │ call $lua_settop │ │ local.get 1 │ │ - i32.const 5180 │ │ + i32.const 5229 │ │ i32.store offset=16 │ │ - i32.const 16413 │ │ + i32.const 16716 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ @@ -2157,92 +2161,92 @@ │ │ (func $destroy_lua_game (type 5) (param i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 64 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ - i32.const 20615 │ │ + i32.const 20918 │ │ i32.const 0 │ │ call $alex_log │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 7797 │ │ + i32.const 7846 │ │ i32.store offset=36 │ │ local.get 1 │ │ i32.const 648 │ │ i32.store offset=32 │ │ - i32.const 20398 │ │ + i32.const 20701 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.load offset=56 │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 5810 │ │ + i32.const 5859 │ │ i32.store offset=56 │ │ local.get 1 │ │ - i32.const 7797 │ │ + i32.const 7846 │ │ i32.store offset=52 │ │ local.get 1 │ │ i32.const 648 │ │ i32.store offset=48 │ │ - i32.const 20423 │ │ + i32.const 20726 │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ call_indirect (type 11) │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 7797 │ │ + i32.const 7846 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 649 │ │ i32.store │ │ - i32.const 20398 │ │ + i32.const 20701 │ │ local.get 1 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.load offset=156 │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 7147 │ │ + i32.const 7196 │ │ i32.store offset=24 │ │ local.get 1 │ │ - i32.const 7797 │ │ + i32.const 7846 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 649 │ │ i32.store offset=16 │ │ - i32.const 20423 │ │ + i32.const 20726 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ @@ -2262,34 +2266,34 @@ │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 21423 │ │ + i32.load offset=60376 │ │ + i32.const 21726 │ │ local.get 2 │ │ call $fiprintf │ │ drop │ │ br 1 (;@1;) │ │ end │ │ call $alexgames_mutex_take │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=16 │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ @@ -2298,35 +2302,35 @@ │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=164 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=160 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 2 │ │ i32.const 160 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 1 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const 1 │ │ i32.store offset=48 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2334,38 +2338,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=36 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=32 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 3 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ local.get 3 │ │ i32.store offset=80 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2373,34 +2377,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=68 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=64 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ call $lua_getglobal │ │ local.tee 3 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -2412,46 +2416,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=144 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 3 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 2 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=136 │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=132 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=128 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 2 │ │ i32.const 128 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 2 │ │ i32.const 176 │ │ @@ -2459,15 +2463,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ f64.convert_i32_s │ │ @@ -2490,18 +2494,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=116 │ │ local.get 2 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=112 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 2 │ │ i32.const 112 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -2514,25 +2518,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=100 │ │ local.get 2 │ │ - i32.const 9564 │ │ + i32.const 9698 │ │ i32.store offset=96 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 2 │ │ i32.const 1200 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -2553,61 +2557,61 @@ │ │ call $lua_pcallk │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=48 │ │ - i32.const 21286 │ │ + i32.const 21589 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @2 │ │ local.get 0 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ - i32.const 4702 │ │ + i32.const 4751 │ │ i32.store │ │ - i32.const 20571 │ │ + i32.const 20874 │ │ local.get 3 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const -1 │ │ i32.const 0 │ │ call $lua_tolstring │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ - i32.const 4702 │ │ + i32.const 4751 │ │ i32.store offset=16 │ │ - i32.const 20550 │ │ + i32.const 20853 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ local.get 2 │ │ i32.store offset=32 │ │ - i32.const 20234 │ │ + i32.const 20537 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ local.get 2 │ │ local.get 2 │ │ i32.const 1000 │ │ call $strnlen │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ end │ │ local.get 3 │ │ @@ -2622,21 +2626,21 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 4 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2645,51 +2649,51 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=164 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=160 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=144 │ │ local.get 4 │ │ local.get 2 │ │ i32.store offset=148 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=152 │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=156 │ │ - i32.const 21059 │ │ + i32.const 21362 │ │ local.get 4 │ │ i32.const 144 │ │ i32.add │ │ call $iprintf │ │ drop │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.const 2 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 4 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2699,36 +2703,36 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 5 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 4 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2738,23 +2742,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ @@ -2777,23 +2781,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 4 │ │ local.get 0 │ │ @@ -2806,15 +2810,15 @@ │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=112 │ │ local.get 4 │ │ i32.const 176 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 4 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 4 │ │ i32.const 176 │ │ @@ -2822,15 +2826,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 4 │ │ i32.const 176 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ @@ -2857,18 +2861,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 4 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 4 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -2883,23 +2887,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 4 │ │ i32.const 2122 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 4 │ │ i32.const 1200 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -2910,56 +2914,56 @@ │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 3 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store offset=128 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 3 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -2967,38 +2971,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 4 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3006,34 +3010,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ call $lua_getglobal │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ call $lua_settop │ │ @@ -3044,25 +3048,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=116 │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store offset=112 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 112 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.extend_i32_s │ │ call $lua_pushinteger │ │ local.get 0 │ │ @@ -3087,18 +3091,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 3 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -3111,25 +3115,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 3 │ │ - i32.const 12498 │ │ + i32.const 12767 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -3140,56 +3144,56 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 4 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 4 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 4 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.const 4 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 4 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3197,38 +3201,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 5 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 4 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3236,34 +3240,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ call $lua_getglobal │ │ local.tee 5 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -3275,46 +3279,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 4 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=116 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=112 │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 4 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 4 │ │ i32.const 160 │ │ @@ -3322,15 +3326,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.extend_i32_s │ │ @@ -3361,18 +3365,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 4 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 4 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -3385,25 +3389,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 4 │ │ - i32.const 9193 │ │ + i32.const 9327 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 4 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -3414,21 +3418,21 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 5 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3437,33 +3441,33 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 5 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 5 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.const 5 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3473,36 +3477,36 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 6 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3512,23 +3516,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ @@ -3551,23 +3555,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 6 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 5 │ │ local.get 0 │ │ @@ -3580,15 +3584,15 @@ │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=112 │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 5 │ │ i32.const 160 │ │ @@ -3596,15 +3600,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.extend_i32_s │ │ @@ -3639,18 +3643,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 5 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -3665,23 +3669,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 5 │ │ i32.const 2083 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 5 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -3692,56 +3696,56 @@ │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 3 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3749,38 +3753,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 4 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3788,34 +3792,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ call $lua_getglobal │ │ local.tee 4 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -3827,46 +3831,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 4 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=116 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=112 │ │ local.get 3 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 3 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 3 │ │ i32.const 160 │ │ @@ -3874,15 +3878,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 3 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.extend_i32_s │ │ @@ -3909,18 +3913,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 3 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -3933,25 +3937,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 3 │ │ - i32.const 12562 │ │ + i32.const 12831 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 3 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -3964,21 +3968,21 @@ │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ i32.const 0 │ │ local.set 4 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 3 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -3987,34 +3991,34 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=164 │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=160 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 3 │ │ i32.const 160 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ call $lua_gettop │ │ i32.const 1 │ │ @@ -4023,15 +4027,15 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ br 1 (;@3;) │ │ end │ │ block ;; label = @4 │ │ @@ -4040,15 +4044,15 @@ │ │ local.tee 4 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ call $lua_gettop │ │ i32.const 1 │ │ @@ -4057,15 +4061,15 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ @@ -4092,25 +4096,25 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=144 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 3 │ │ local.get 0 │ │ @@ -4123,15 +4127,15 @@ │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=128 │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 3 │ │ i32.const 128 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 3 │ │ i32.const 176 │ │ @@ -4139,15 +4143,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 3 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ call $lua_pushstring │ │ @@ -4193,15 +4197,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ i32.const 2048 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ end │ │ local.get 0 │ │ i32.const -1 │ │ call $lua_toboolean │ │ local.set 4 │ │ @@ -4221,18 +4225,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 3 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -4247,34 +4251,34 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 3 │ │ i32.const 2028 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ local.get 4 │ │ i32.const 0 │ │ i32.ne │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 3 │ │ i32.const 2224 │ │ i32.add │ │ global.set $__stack_pointer │ │ @@ -4286,21 +4290,21 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 5 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4309,33 +4313,33 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=212 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=208 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 5 │ │ i32.const 208 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4345,36 +4349,36 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 6 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4384,23 +4388,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ @@ -4423,23 +4427,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=196 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=192 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 192 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 6 │ │ call $lua_typename │ │ local.set 4 │ │ local.get 5 │ │ local.get 0 │ │ @@ -4452,15 +4456,15 @@ │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=176 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 5 │ │ i32.const 176 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 5 │ │ i32.const 224 │ │ @@ -4468,15 +4472,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ @@ -4501,15 +4505,15 @@ │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_checkstack │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.const 2 │ │ i32.store offset=96 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @6 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4519,36 +4523,36 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 4 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ local.get 4 │ │ i32.store offset=128 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @6 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4558,23 +4562,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=116 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=112 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 3 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ i32.const 3 │ │ call $lua_createtable │ │ local.get 0 │ │ @@ -4586,15 +4590,15 @@ │ │ i32.add │ │ local.tee 4 │ │ i64.load │ │ f64.convert_i64_s │ │ call $lua_pushnumber │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 11734 │ │ + i32.const 12003 │ │ call $lua_setfield │ │ local.get 0 │ │ local.get 4 │ │ f64.load offset=8 │ │ call $lua_pushnumber │ │ local.get 0 │ │ i32.const -2 │ │ @@ -4639,18 +4643,18 @@ │ │ local.get 4 │ │ call $lua_typename │ │ i32.store offset=168 │ │ local.get 5 │ │ local.get 4 │ │ i32.store offset=164 │ │ local.get 5 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=160 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -4665,23 +4669,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 5 │ │ i32.const 2066 │ │ i32.store offset=144 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 5 │ │ i32.const 1248 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -4692,56 +4696,56 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 5 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 5 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4749,38 +4753,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 6 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -4788,34 +4792,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ call $lua_getglobal │ │ local.tee 6 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -4827,46 +4831,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 6 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 5 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=116 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=112 │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 5 │ │ i32.const 160 │ │ @@ -4874,15 +4878,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ @@ -4911,18 +4915,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 5 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -4935,25 +4939,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 5 │ │ - i32.const 11737 │ │ + i32.const 12006 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 5 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -4964,56 +4968,56 @@ │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 2 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 2 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const 2 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5021,38 +5025,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 3 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ local.get 3 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 2 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5060,34 +5064,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ call $lua_getglobal │ │ local.tee 3 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -5099,46 +5103,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 3 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 2 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=116 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=112 │ │ local.get 2 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 2 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 2 │ │ i32.const 160 │ │ @@ -5146,15 +5150,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 2 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ call $lua_pushstring │ │ @@ -5177,18 +5181,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 2 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -5201,25 +5205,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 2 │ │ - i32.const 12543 │ │ + i32.const 12812 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 2 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -5230,56 +5234,56 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 4 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 4 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 4 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5287,38 +5291,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 5 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 4 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5326,34 +5330,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ call $lua_getglobal │ │ local.tee 5 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -5365,46 +5369,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 3 │ │ local.get 4 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=116 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=112 │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 4 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 4 │ │ i32.const 160 │ │ @@ -5412,15 +5416,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ call $lua_pushstring │ │ @@ -5429,15 +5433,15 @@ │ │ local.get 2 │ │ i64.extend_i32_s │ │ call $lua_pushinteger │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 3 │ │ br_if 0 (;@4;) │ │ - i32.const 16144 │ │ + i32.const 16447 │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 0 │ │ call $lua_pushnil │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ @@ -5466,25 +5470,25 @@ │ │ local.tee 1 │ │ i32.const 4 │ │ i32.add │ │ i64.load32_u │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 11734 │ │ + i32.const 12003 │ │ call $lua_setfield │ │ local.get 0 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ i64.load32_u │ │ call $lua_pushinteger │ │ local.get 0 │ │ i32.const -2 │ │ - i32.const 12121 │ │ + i32.const 12390 │ │ call $lua_setfield │ │ local.get 0 │ │ i32.const -2 │ │ local.get 6 │ │ i64.const 1 │ │ i64.add │ │ local.tee 6 │ │ @@ -5514,18 +5518,18 @@ │ │ local.get 3 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=100 │ │ local.get 4 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 4 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -5538,25 +5542,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 4 │ │ - i32.const 12518 │ │ + i32.const 12787 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 4 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -5567,21 +5571,21 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 4 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5590,33 +5594,33 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 4 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.const 2 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 4 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5626,36 +5630,36 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 5 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 4 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5665,23 +5669,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ @@ -5704,23 +5708,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 1 │ │ local.get 4 │ │ local.get 0 │ │ @@ -5733,15 +5737,15 @@ │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=112 │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 4 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 4 │ │ i32.const 160 │ │ @@ -5749,15 +5753,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 2 │ │ call $lua_pushstring │ │ @@ -5794,18 +5798,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 4 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 4 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -5820,23 +5824,23 @@ │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 4 │ │ i32.const 2043 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 4 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -5847,56 +5851,56 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 4 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=148 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=144 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 4 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 4 │ │ call $lua_checkstack │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.const 4 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 4 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5904,38 +5908,38 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ call $lua_gettop │ │ local.tee 5 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 4 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ block ;; label = @4 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -5943,34 +5947,34 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ block ;; label = @3 │ │ local.get 0 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ call $lua_getglobal │ │ local.tee 5 │ │ i32.const 6 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ i32.const 0 │ │ @@ -5982,46 +5986,46 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=132 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=128 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 128 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 5 │ │ call $lua_typename │ │ local.set 2 │ │ local.get 4 │ │ local.get 0 │ │ i32.const 6 │ │ call $lua_typename │ │ i32.store offset=120 │ │ local.get 4 │ │ local.get 2 │ │ i32.store offset=116 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=112 │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 4 │ │ i32.const 112 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 4 │ │ i32.const 160 │ │ @@ -6029,15 +6033,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 4 │ │ i32.const 160 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 2 (;@1;) │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.extend_i32_s │ │ @@ -6075,18 +6079,18 @@ │ │ local.get 2 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 4 │ │ local.get 2 │ │ i32.store offset=100 │ │ local.get 4 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 4 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -6099,25 +6103,25 @@ │ │ i32.lt_s │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 4 │ │ - i32.const 10117 │ │ + i32.const 10324 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 4 │ │ i32.const 1184 │ │ i32.add │ │ global.set $__stack_pointer) │ │ @@ -6131,20 +6135,20 @@ │ │ local.get 3 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=4 │ │ local.get 3 │ │ local.get 0 │ │ i32.store │ │ - i32.const 20928 │ │ + i32.const 21231 │ │ local.get 3 │ │ call $iprintf │ │ drop │ │ local.get 0 │ │ - i32.const 9516 │ │ + i32.const 9650 │ │ i32.const 1 │ │ local.get 1 │ │ local.get 2 │ │ call $call_func_get_bytearray │ │ local.set 0 │ │ local.get 3 │ │ i32.const 16 │ │ @@ -6160,21 +6164,21 @@ │ │ global.set $__stack_pointer │ │ call $alexgames_mutex_take │ │ i32.const 0 │ │ local.set 6 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=83588 │ │ + i32.load8_u offset=83956 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store │ │ - i32.const 21438 │ │ + i32.const 21741 │ │ local.get 5 │ │ call $alex_log_err │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ call $lua_gettop │ │ @@ -6183,34 +6187,34 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=308 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=304 │ │ - i32.const 22599 │ │ + i32.const 22902 │ │ local.get 5 │ │ i32.const 304 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 3 │ │ call $lua_checkstack │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.const 3 │ │ i32.store offset=32 │ │ - i32.const 20005 │ │ + i32.const 20308 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ call $lua_gettop │ │ i32.const 1 │ │ @@ -6219,15 +6223,15 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=20 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=16 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log │ │ br 1 (;@3;) │ │ end │ │ block ;; label = @4 │ │ @@ -6236,15 +6240,15 @@ │ │ local.tee 6 │ │ i32.const 20 │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=64 │ │ - i32.const 21121 │ │ + i32.const 21424 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ call $lua_gettop │ │ i32.const 1 │ │ @@ -6253,24 +6257,24 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=52 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=48 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log │ │ i32.const 0 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 2 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 54 │ │ i32.const 0 │ │ call $lua_pushcclosure │ │ local.get 0 │ │ @@ -6300,23 +6304,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=276 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=272 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 272 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ call $alexgames_mutex_release │ │ local.get 0 │ │ local.get 7 │ │ call $lua_typename │ │ local.set 3 │ │ local.get 5 │ │ local.get 0 │ │ @@ -6329,15 +6333,15 @@ │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=256 │ │ local.get 5 │ │ i32.const 320 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4511 │ │ + i32.const 4560 │ │ local.get 5 │ │ i32.const 256 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ local.get 5 │ │ i32.const 320 │ │ @@ -6345,15 +6349,15 @@ │ │ i32.const 0 │ │ call $alex_log_err │ │ local.get 5 │ │ i32.const 320 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 4 (;@1;) │ │ end │ │ local.get 7 │ │ i32.const 6 │ │ i32.eq │ │ @@ -6372,23 +6376,23 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=292 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=288 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 288 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 2 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 6 │ │ local.get 0 │ │ i32.const 0 │ │ i32.const 1 │ │ @@ -6420,15 +6424,15 @@ │ │ call $lua_tointegerx │ │ local.set 8 │ │ block ;; label = @9 │ │ local.get 5 │ │ i32.load offset=320 │ │ br_if 0 (;@9;) │ │ local.get 0 │ │ - i32.const 16505 │ │ + i32.const 16808 │ │ i32.const 0 │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ @@ -6461,15 +6465,15 @@ │ │ local.get 5 │ │ local.get 8 │ │ i64.store offset=168 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=160 │ │ local.get 0 │ │ - i32.const 13335 │ │ + i32.const 13604 │ │ local.get 5 │ │ i32.const 160 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ local.get 8 │ │ i32.wrap_i64 │ │ @@ -6493,15 +6497,15 @@ │ │ local.get 5 │ │ local.get 10 │ │ i64.store32 offset=212 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=208 │ │ local.get 0 │ │ - i32.const 19569 │ │ + i32.const 19872 │ │ local.get 5 │ │ i32.const 208 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 5 │ │ @@ -6527,15 +6531,15 @@ │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=196 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=192 │ │ local.get 0 │ │ - i32.const 16724 │ │ + i32.const 17027 │ │ local.get 5 │ │ i32.const 192 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 6 │ │ @@ -6588,15 +6592,15 @@ │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=244 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=240 │ │ local.get 0 │ │ - i32.const 13209 │ │ + i32.const 13478 │ │ local.get 5 │ │ i32.const 240 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ local.get 5 │ │ i32.load offset=320 │ │ @@ -6606,50 +6610,50 @@ │ │ local.get 2 │ │ local.get 6 │ │ call $__memcpy │ │ drop │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=224 │ │ - i32.const 20586 │ │ + i32.const 20889 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ call $iprintf │ │ drop │ │ br 1 (;@6;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ local.set 4 │ │ local.get 5 │ │ local.get 0 │ │ local.get 2 │ │ call $lua_typename │ │ i32.store offset=148 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=144 │ │ local.get 4 │ │ - i32.const 8500 │ │ + i32.const 8634 │ │ local.get 5 │ │ i32.const 144 │ │ i32.add │ │ call $alex_log_err_user_visible │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=128 │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=132 │ │ - i32.const 19768 │ │ + i32.const 20071 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ call $iprintf │ │ drop │ │ i32.const 0 │ │ local.set 1 │ │ @@ -6661,15 +6665,15 @@ │ │ loop ;; label = @7 │ │ local.get 5 │ │ local.get 3 │ │ local.get 1 │ │ i32.add │ │ i32.load8_u │ │ i32.store offset=112 │ │ - i32.const 19563 │ │ + i32.const 19866 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 1 │ │ i32.const 1 │ │ @@ -6704,18 +6708,18 @@ │ │ local.get 1 │ │ call $lua_typename │ │ i32.store offset=104 │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=100 │ │ local.get 5 │ │ - i32.const 5196 │ │ + i32.const 5245 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 17741 │ │ + i32.const 18044 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -6730,41 +6734,41 @@ │ │ local.get 5 │ │ local.get 0 │ │ call $lua_gettop │ │ i32.store offset=84 │ │ local.get 5 │ │ i32.const 1428 │ │ i32.store offset=80 │ │ - i32.const 22553 │ │ + i32.const 22856 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store8 offset=83588 │ │ + i32.store8 offset=83956 │ │ end │ │ call $alexgames_mutex_release │ │ end │ │ local.get 5 │ │ i32.const 1344 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 6) │ │ (func $get_init_state.1 (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0 │ │ - i32.const 9501 │ │ + i32.const 9635 │ │ i32.const 0 │ │ local.get 1 │ │ local.get 2 │ │ call $call_func_get_bytearray) │ │ (func $lua_run_cmd.1 (type 2) (param i32 i32 i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ @@ -6785,34 +6789,34 @@ │ │ i32.const 0 │ │ i32.const 0 │ │ call $lua_pcallk │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ local.get 1 │ │ i32.store │ │ - i32.const 22383 │ │ + i32.const 22686 │ │ local.get 3 │ │ call $alex_log │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.const 1 │ │ i32.store offset=32 │ │ - i32.const 21144 │ │ + i32.const 21447 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ local.get 3 │ │ local.get 0 │ │ i32.const -1 │ │ i32.const 0 │ │ call $lua_tolstring │ │ i32.store offset=16 │ │ - i32.const 20249 │ │ + i32.const 20552 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err │ │ local.get 0 │ │ i32.const 0 │ │ call $lua_settop │ │ @@ -6852,15 +6856,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -6870,36 +6874,36 @@ │ │ call $lua_tolstring │ │ local.set 2 │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ i32.const 1631 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.set 5 │ │ local.get 0 │ │ i32.const 3 │ │ i32.const 1808 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.set 6 │ │ local.get 0 │ │ i32.const 4 │ │ - i32.const 7910 │ │ + i32.const 7959 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.set 7 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 2964 │ │ + i32.const 3013 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.set 8 │ │ local.get 1 │ │ i32.const 24 │ │ i32.add │ │ call $default_draw_graphic_params │ │ block ;; label = @1 │ │ @@ -6920,25 +6924,25 @@ │ │ call $lua_type │ │ i32.const 5 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 6 │ │ - i32.const 4132 │ │ + i32.const 4181 │ │ call $lua_getfield │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 4132 │ │ + i32.const 4181 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.tee 9 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ @@ -6972,15 +6976,15 @@ │ │ call $lua_toboolean │ │ i32.const 0 │ │ i32.ne │ │ i32.store8 offset=28 │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ - i32.const 17960 │ │ + i32.const 18263 │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ call $lua_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -7001,38 +7005,38 @@ │ │ call $lua_toboolean │ │ i32.const 0 │ │ i32.ne │ │ i32.store8 offset=29 │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ - i32.const 18019 │ │ + i32.const 18322 │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ call $lua_error │ │ drop │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 6 │ │ - i32.const 2902 │ │ + i32.const 2951 │ │ call $lua_getfield │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 4132 │ │ + i32.const 4181 │ │ i32.const 0 │ │ - i32.const 13776 │ │ + i32.const 14045 │ │ call $lua_get_int_or_float_func │ │ local.tee 9 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ @@ -7046,15 +7050,15 @@ │ │ end │ │ block ;; label = @4 │ │ local.get 10 │ │ i64.const 101 │ │ i64.lt_u │ │ br_if 0 (;@4;) │ │ local.get 0 │ │ - i32.const 17045 │ │ + i32.const 17348 │ │ call $lua_pushstring │ │ drop │ │ end │ │ local.get 1 │ │ local.get 10 │ │ i64.store32 offset=32 │ │ end │ │ @@ -7073,36 +7077,36 @@ │ │ call $lua_toboolean │ │ i32.const 0 │ │ i32.ne │ │ i32.store8 offset=36 │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ - i32.const 18078 │ │ + i32.const 18381 │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ call $lua_error │ │ drop │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ - i32.const 10654 │ │ + i32.const 10923 │ │ call $lua_pushstring │ │ drop │ │ local.get 0 │ │ call $lua_error │ │ drop │ │ end │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=8 │ │ local.set 0 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 8 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ @@ -7221,15 +7225,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -7239,17 +7243,17 @@ │ │ call $lua_tolstring │ │ local.set 2 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 9014 │ │ + i32.const 9148 │ │ i32.const 0 │ │ - i32.const 9909 │ │ + i32.const 10043 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7261,17 +7265,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 6 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 3 │ │ - i32.const 16955 │ │ + i32.const 17258 │ │ i32.const 0 │ │ - i32.const 9909 │ │ + i32.const 10043 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7283,17 +7287,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 7 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 4 │ │ - i32.const 16958 │ │ + i32.const 17261 │ │ i32.const 0 │ │ - i32.const 9909 │ │ + i32.const 10043 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7305,17 +7309,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 8 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 16908 │ │ + i32.const 17211 │ │ i32.const 0 │ │ - i32.const 9909 │ │ + i32.const 10043 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7339,17 +7343,17 @@ │ │ local.get 9 │ │ i32.wrap_i64 │ │ local.set 11 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 6 │ │ - i32.const 16911 │ │ + i32.const 17214 │ │ i32.const 0 │ │ - i32.const 9909 │ │ + i32.const 10043 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7365,15 +7369,15 @@ │ │ local.get 3 │ │ local.get 4 │ │ local.get 10 │ │ local.get 11 │ │ local.get 6 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=12 │ │ call_indirect (type 12) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -7408,15 +7412,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -7452,15 +7456,15 @@ │ │ local.get 1 │ │ local.get 5 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ @@ -7537,15 +7541,15 @@ │ │ local.get 7 │ │ i32.wrap_i64 │ │ local.get 8 │ │ i32.wrap_i64 │ │ local.get 9 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=16 │ │ call_indirect (type 13) │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -7575,15 +7579,15 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 2 │ │ br 1 (;@1;) │ │ end │ │ @@ -7597,15 +7601,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ i32.const 2427 │ │ i32.const 0 │ │ - i32.const 3278 │ │ + i32.const 3327 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7619,15 +7623,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 3 │ │ i32.const 2435 │ │ i32.const 0 │ │ - i32.const 3278 │ │ + i32.const 3327 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7639,17 +7643,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 6 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 4 │ │ - i32.const 11342 │ │ + i32.const 11611 │ │ i32.const 0 │ │ - i32.const 3278 │ │ + i32.const 3327 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7670,17 +7674,17 @@ │ │ local.get 7 │ │ i32.wrap_i64 │ │ local.set 9 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 11348 │ │ + i32.const 11617 │ │ i32.const 0 │ │ - i32.const 3278 │ │ + i32.const 3327 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7697,15 +7701,15 @@ │ │ i32.load offset=12 │ │ local.get 3 │ │ local.get 8 │ │ local.get 9 │ │ local.get 5 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=20 │ │ call_indirect (type 12) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -7735,15 +7739,15 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 2 │ │ br 1 (;@1;) │ │ end │ │ @@ -7755,17 +7759,17 @@ │ │ call $lua_tolstring │ │ local.set 2 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 16955 │ │ + i32.const 17258 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7777,17 +7781,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 5 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 3 │ │ - i32.const 16958 │ │ + i32.const 17261 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7799,17 +7803,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 6 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 4 │ │ - i32.const 16908 │ │ + i32.const 17211 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7821,17 +7825,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 7 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 16911 │ │ + i32.const 17214 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7843,17 +7847,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 8 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 6 │ │ - i32.const 16902 │ │ + i32.const 17205 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7880,17 +7884,17 @@ │ │ local.get 9 │ │ i32.wrap_i64 │ │ local.set 13 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 7 │ │ - i32.const 16905 │ │ + i32.const 17208 │ │ i32.const 0 │ │ - i32.const 10372 │ │ + i32.const 10641 │ │ call $lua_get_int_or_float_func │ │ local.tee 4 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -7909,15 +7913,15 @@ │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ local.get 13 │ │ local.get 5 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=24 │ │ call_indirect (type 13) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -7947,15 +7951,15 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 2 │ │ @@ -7988,15 +7992,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 3 │ │ br 1 (;@1;) │ │ end │ │ @@ -8010,15 +8014,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 3 │ │ i32.const 1631 │ │ i32.const 0 │ │ - i32.const 10390 │ │ + i32.const 10659 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -8032,15 +8036,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 4 │ │ i32.const 1808 │ │ i32.const 0 │ │ - i32.const 10390 │ │ + i32.const 10659 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -8052,17 +8056,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 7 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 3416 │ │ + i32.const 3465 │ │ i32.const 0 │ │ - i32.const 10390 │ │ + i32.const 10659 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -8083,17 +8087,17 @@ │ │ local.get 8 │ │ i32.wrap_i64 │ │ local.set 10 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 6 │ │ - i32.const 7902 │ │ + i32.const 7951 │ │ i32.const 1 │ │ - i32.const 10390 │ │ + i32.const 10659 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -8113,31 +8117,31 @@ │ │ i32.load offset=40 │ │ local.get 4 │ │ local.get 9 │ │ local.get 10 │ │ local.get 6 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=28 │ │ call_indirect (type 13) │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_draw_clear (type 10) (param i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ i32.const 0) │ │ (func $lua_draw_refresh (type 10) (param i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=36 │ │ call_indirect (type 11) │ │ i32.const 0) │ │ (func $lua_send_message (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 48 │ │ @@ -8168,15 +8172,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -8212,15 +8216,15 @@ │ │ local.get 1 │ │ local.get 5 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ @@ -8237,15 +8241,15 @@ │ │ end │ │ local.get 2 │ │ local.get 1 │ │ i32.load offset=44 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=40 │ │ call_indirect (type 0) │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -8280,15 +8284,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -8324,15 +8328,15 @@ │ │ local.get 1 │ │ local.get 5 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ @@ -8346,15 +8350,15 @@ │ │ local.get 3 │ │ local.get 0 │ │ i32.const 3 │ │ i32.const 0 │ │ call $lua_tointegerx │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=44 │ │ call_indirect (type 2) │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -8389,15 +8393,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -8410,15 +8414,15 @@ │ │ local.get 2 │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_toboolean │ │ i32.const 0 │ │ i32.ne │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=48 │ │ call_indirect (type 1) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -8453,15 +8457,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -8474,15 +8478,15 @@ │ │ local.get 2 │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_toboolean │ │ i32.const 0 │ │ i32.ne │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=52 │ │ call_indirect (type 1) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -8501,18 +8505,18 @@ │ │ local.get 0 │ │ i32.const 1 │ │ call $lua_type │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=224 │ │ local.get 0 │ │ - i32.const 18172 │ │ + i32.const 18475 │ │ local.get 1 │ │ i32.const 224 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -8535,15 +8539,15 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.store offset=212 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=208 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 208 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 4 │ │ @@ -8569,46 +8573,46 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ i64.const 8589935977 │ │ i64.store offset=196 align=4 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=192 │ │ local.get 0 │ │ - i32.const 10564 │ │ + i32.const 10833 │ │ local.get 1 │ │ i32.const 192 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 10152 │ │ + i32.const 10359 │ │ call $lua_getfield │ │ local.tee 2 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=184 │ │ local.get 1 │ │ i32.const 1392 │ │ i32.store offset=180 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=176 │ │ local.get 0 │ │ - i32.const 13056 │ │ + i32.const 13325 │ │ local.get 1 │ │ i32.const 176 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 3 │ │ @@ -8621,33 +8625,33 @@ │ │ drop │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 3778 │ │ + i32.const 3827 │ │ call $lua_getfield │ │ local.tee 2 │ │ i32.const 5 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=168 │ │ local.get 1 │ │ i32.const 1403 │ │ i32.store offset=164 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=160 │ │ local.get 0 │ │ - i32.const 13159 │ │ + i32.const 13428 │ │ local.get 1 │ │ i32.const 160 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -8681,33 +8685,33 @@ │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_gettable │ │ drop │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 9726 │ │ + i32.const 9860 │ │ call $lua_getfield │ │ local.tee 2 │ │ i32.const 3 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=152 │ │ local.get 1 │ │ i32.const 1422 │ │ i32.store offset=148 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=144 │ │ local.get 0 │ │ - i32.const 12803 │ │ + i32.const 13072 │ │ local.get 1 │ │ i32.const 144 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 3 │ │ @@ -8742,33 +8746,33 @@ │ │ i32.const -1 │ │ i32.add │ │ br_table 0 (;@8;) 2 (;@6;) 1 (;@7;) 4 (;@4;) │ │ end │ │ block ;; label = @8 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 8159 │ │ + i32.const 8293 │ │ call $lua_getfield │ │ local.tee 2 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=24 │ │ local.get 1 │ │ i32.const 1435 │ │ i32.store offset=20 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 13007 │ │ + i32.const 13276 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 9 │ │ @@ -8782,29 +8786,29 @@ │ │ br 2 (;@5;) │ │ end │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 11734 │ │ + i32.const 12003 │ │ call $lua_getfield │ │ local.tee 8 │ │ br_table 0 (;@9;) 1 (;@8;) 1 (;@8;) 2 (;@7;) 1 (;@8;) │ │ end │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ i64.const 1448 │ │ i64.store offset=100 align=4 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=96 │ │ local.get 0 │ │ - i32.const 7171 │ │ + i32.const 7220 │ │ local.get 1 │ │ i32.const 96 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@7;) │ │ end │ │ @@ -8813,18 +8817,18 @@ │ │ local.get 1 │ │ local.get 8 │ │ i32.store offset=88 │ │ local.get 1 │ │ i32.const 1451 │ │ i32.store offset=84 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=80 │ │ local.get 0 │ │ - i32.const 13392 │ │ + i32.const 13661 │ │ local.get 1 │ │ i32.const 80 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 1 │ │ @@ -8844,49 +8848,49 @@ │ │ br_if 0 (;@7;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ i32.const 1457 │ │ i32.store offset=68 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=64 │ │ local.get 0 │ │ - i32.const 5311 │ │ + i32.const 5360 │ │ local.get 1 │ │ i32.const 64 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @7 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 7320 │ │ + i32.const 7369 │ │ call $lua_getfield │ │ local.tee 8 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 8 │ │ i32.store offset=56 │ │ local.get 1 │ │ i32.const 1464 │ │ i32.store offset=52 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=48 │ │ local.get 0 │ │ - i32.const 12956 │ │ + i32.const 13225 │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 2 │ │ @@ -8901,33 +8905,33 @@ │ │ drop │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @7 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 3744 │ │ + i32.const 3793 │ │ call $lua_getfield │ │ local.tee 8 │ │ i32.const 5 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 8 │ │ i32.store offset=40 │ │ local.get 1 │ │ i32.const 1473 │ │ i32.store offset=36 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 13107 │ │ + i32.const 13376 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 0 │ │ @@ -9002,18 +9006,18 @@ │ │ local.get 1 │ │ local.get 8 │ │ i32.store offset=136 │ │ local.get 1 │ │ i32.const 1497 │ │ i32.store offset=132 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=128 │ │ local.get 0 │ │ - i32.const 12906 │ │ + i32.const 13175 │ │ local.get 1 │ │ i32.const 128 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 2 │ │ @@ -9028,33 +9032,33 @@ │ │ drop │ │ local.get 0 │ │ i32.const -2 │ │ call $lua_settop │ │ block ;; label = @6 │ │ local.get 0 │ │ i32.const -1 │ │ - i32.const 11734 │ │ + i32.const 12003 │ │ call $lua_getfield │ │ local.tee 2 │ │ i32.const 3 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=120 │ │ local.get 1 │ │ i32.const 1506 │ │ i32.store offset=116 │ │ local.get 1 │ │ - i32.const 5795 │ │ + i32.const 5844 │ │ i32.store offset=112 │ │ local.get 0 │ │ - i32.const 12858 │ │ + i32.const 13127 │ │ local.get 1 │ │ i32.const 112 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 9 │ │ @@ -9082,24 +9086,24 @@ │ │ call $lua_settop │ │ local.get 0 │ │ local.get 4 │ │ local.get 1 │ │ i32.load offset=236 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=72 │ │ call_indirect (type 0) │ │ local.get 1 │ │ i32.const 1532 │ │ i32.store offset=4 │ │ local.get 1 │ │ - i32.const 13888 │ │ + i32.const 14157 │ │ i32.store │ │ - i32.const 21088 │ │ + i32.const 21391 │ │ local.get 1 │ │ call $iprintf │ │ drop │ │ end │ │ local.get 1 │ │ i32.const 240 │ │ i32.add │ │ @@ -9136,15 +9140,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=68 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=64 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 64 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -9163,50 +9167,50 @@ │ │ i32.const 5 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ i64.const 8589936135 │ │ i64.store offset=52 align=4 │ │ local.get 1 │ │ - i32.const 6214 │ │ + i32.const 6263 │ │ i32.store offset=48 │ │ local.get 0 │ │ - i32.const 10564 │ │ + i32.const 10833 │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ i32.const 1 │ │ i32.const 264 │ │ call $dlcalloc │ │ local.set 3 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 9750 │ │ + i32.const 9884 │ │ call $lua_getfield │ │ local.tee 4 │ │ i32.const 3 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=40 │ │ local.get 1 │ │ i32.const 1554 │ │ i32.store offset=36 │ │ local.get 1 │ │ - i32.const 6214 │ │ + i32.const 6263 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 13454 │ │ + i32.const 13723 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ block ;; label = @1 │ │ @@ -9241,15 +9245,15 @@ │ │ i32.add │ │ i32.const 1 │ │ i32.gt_u │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 7320 │ │ + i32.const 7369 │ │ call $lua_getfield │ │ local.tee 4 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ call $dlfree │ │ @@ -9261,18 +9265,18 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=24 │ │ local.get 1 │ │ i32.const 1564 │ │ i32.store offset=20 │ │ local.get 1 │ │ - i32.const 6214 │ │ + i32.const 6263 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 17685 │ │ + i32.const 17988 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 3 │ │ @@ -9289,15 +9293,15 @@ │ │ i32.load │ │ i32.const 2 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ - i32.const 9437 │ │ + i32.const 9571 │ │ call $lua_getfield │ │ local.tee 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ call $dlfree │ │ @@ -9309,18 +9313,18 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=8 │ │ local.get 1 │ │ i32.const 1575 │ │ i32.store offset=4 │ │ local.get 1 │ │ - i32.const 6214 │ │ + i32.const 6263 │ │ i32.store │ │ local.get 0 │ │ - i32.const 17631 │ │ + i32.const 17934 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 3 │ │ local.get 0 │ │ i32.const -1 │ │ @@ -9329,15 +9333,15 @@ │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ call $lua_settop │ │ local.get 2 │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=60 │ │ call_indirect (type 1) │ │ local.get 3 │ │ call $dlfree │ │ local.get 1 │ │ i32.const 80 │ │ i32.add │ │ @@ -9369,15 +9373,15 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.store offset=20 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 2 │ │ @@ -9409,15 +9413,15 @@ │ │ local.get 1 │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ unreachable │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ @@ -9429,25 +9433,25 @@ │ │ local.get 2 │ │ local.get 1 │ │ i32.load offset=44 │ │ local.get 0 │ │ local.get 1 │ │ i32.load offset=40 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=76 │ │ call_indirect (type 0) │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_hide_popup (type 10) (param i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=56 │ │ call_indirect (type 11) │ │ i32.const 0) │ │ (func $lua_set_status_msg (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ @@ -9478,15 +9482,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ @@ -9500,15 +9504,15 @@ │ │ local.get 1 │ │ i32.load offset=12 │ │ local.set 2 │ │ end │ │ local.get 0 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=64 │ │ call_indirect (type 1) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -9543,15 +9547,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ @@ -9565,31 +9569,31 @@ │ │ local.get 1 │ │ i32.load offset=12 │ │ local.set 2 │ │ end │ │ local.get 0 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_set_timer_update_ms (type 10) (param i32) (result i32) │ │ (local f32 i32) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ - i32.const 3828 │ │ + i32.const 3877 │ │ i32.const 0 │ │ - i32.const 3792 │ │ + i32.const 3841 │ │ call $lua_get_int_or_float_func │ │ local.tee 1 │ │ f32.abs │ │ f32.const 0x1p+31 (;=2.14748e+09;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -9600,15 +9604,15 @@ │ │ end │ │ i32.const -2147483648 │ │ local.set 2 │ │ end │ │ local.get 0 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=80 │ │ call_indirect (type 10) │ │ f64.convert_i32_s │ │ call $lua_pushnumber │ │ i32.const 1) │ │ (func $lua_delete_timer (type 10) (param i32) (result i32) │ │ (local i32 f64 i32) │ │ @@ -9628,24 +9632,24 @@ │ │ call $lua_tonumberx │ │ local.set 2 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.load offset=12 │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ - i32.const 5163 │ │ + i32.const 5212 │ │ i32.store │ │ local.get 0 │ │ - i32.const 5567 │ │ + i32.const 5616 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ end │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=84 │ │ local.set 0 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 2 │ │ f64.abs │ │ f64.const 0x1p+31 (;=2.14748e+09;) │ │ @@ -9699,15 +9703,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ @@ -9721,26 +9725,26 @@ │ │ local.get 1 │ │ i32.load offset=12 │ │ local.set 2 │ │ end │ │ local.get 0 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_get_time_ms (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=96 │ │ call_indirect (type 9) │ │ f64.convert_i32_s │ │ call $lua_pushnumber │ │ i32.const 1) │ │ (func $lua_get_time_of_day (type 10) (param i32) (result i32) │ │ (local i32) │ │ @@ -9750,28 +9754,28 @@ │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.const 128 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=100 │ │ call_indirect (type 6) │ │ call $lua_pushlstring │ │ drop │ │ local.get 1 │ │ i32.const 128 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 1) │ │ (func $lua_get_new_session_id (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=112 │ │ call_indirect (type 9) │ │ f64.convert_i32_s │ │ call $lua_pushnumber │ │ i32.const 1) │ │ (func $lua_get_last_session_id (type 10) (param i32) (result i32) │ │ (local i32 i32 i32) │ │ @@ -9785,27 +9789,27 @@ │ │ local.get 1 │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 128 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=4 │ │ call_indirect (type 2) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ local.set 3 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.load8_u │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ - i32.const 8372 │ │ + i32.const 8506 │ │ i32.const 0 │ │ call $alex_log_err_user_visible │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 1 │ │ @@ -9864,15 +9868,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=52 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store offset=48 │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ i32.const 48 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -9902,15 +9906,15 @@ │ │ local.get 1 │ │ i32.const 72 │ │ i32.add │ │ call $lua_tolstring │ │ local.get 1 │ │ i32.load offset=72 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=104 │ │ call_indirect (type 0) │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ call $lua_type │ │ @@ -9985,18 +9989,18 @@ │ │ local.get 1 │ │ local.get 9 │ │ i64.store32 offset=24 │ │ local.get 1 │ │ i32.const 1675 │ │ i32.store offset=20 │ │ local.get 1 │ │ - i32.const 15544 │ │ + i32.const 15813 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 5604 │ │ + i32.const 5653 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ br 3 (;@1;) │ │ end │ │ @@ -10033,18 +10037,18 @@ │ │ local.get 1 │ │ local.get 9 │ │ i64.store32 offset=8 │ │ local.get 1 │ │ i32.const 1682 │ │ i32.store offset=4 │ │ local.get 1 │ │ - i32.const 15544 │ │ + i32.const 15813 │ │ i32.store │ │ local.get 0 │ │ - i32.const 16791 │ │ + i32.const 17094 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 3 (;@1;) │ │ end │ │ local.get 4 │ │ local.get 8 │ │ @@ -10064,15 +10068,15 @@ │ │ end │ │ end │ │ i32.const 0 │ │ local.get 2 │ │ local.get 4 │ │ local.get 6 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=104 │ │ call_indirect (type 0) │ │ local.get 4 │ │ call $dlfree │ │ end │ │ local.get 1 │ │ i32.const 80 │ │ @@ -10110,15 +10114,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -10134,15 +10138,15 @@ │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 65536 │ │ call $dlmalloc │ │ local.tee 4 │ │ i32.const 65536 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=108 │ │ call_indirect (type 14) │ │ local.tee 2 │ │ i32.const -1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ @@ -10196,15 +10200,15 @@ │ │ local.get 1 │ │ local.get 5 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 2 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ @@ -10220,15 +10224,15 @@ │ │ local.set 2 │ │ end │ │ local.get 3 │ │ i32.wrap_i64 │ │ local.get 0 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=120 │ │ call_indirect (type 2) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -10242,20 +10246,20 @@ │ │ local.get 0 │ │ i32.const 2 │ │ i32.const 0 │ │ call $lua_tointegerx │ │ local.set 2 │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=124 │ │ local.tee 3 │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ - i32.const 16108 │ │ + i32.const 16411 │ │ i32.const 0 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ return │ │ end │ │ local.get 0 │ │ @@ -10321,48 +10325,48 @@ │ │ drop │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 2 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=128 │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ - i32.const 16069 │ │ + i32.const 16372 │ │ i32.const 0 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ i32.const 65536 │ │ call $dlmalloc │ │ local.set 2 │ │ local.get 1 │ │ local.get 3 │ │ i64.store offset=32 │ │ local.get 1 │ │ local.get 4 │ │ i64.store offset=40 │ │ - i32.const 20765 │ │ + i32.const 21068 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ call $iprintf │ │ drop │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.wrap_i64 │ │ local.get 4 │ │ i32.wrap_i64 │ │ local.get 2 │ │ i32.const 65536 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=128 │ │ call_indirect (type 14) │ │ local.tee 5 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ @@ -10378,15 +10382,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ call $dlfree │ │ local.get 1 │ │ local.get 5 │ │ i32.store │ │ local.get 0 │ │ - i32.const 13674 │ │ + i32.const 13943 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 2 │ │ br 1 (;@1;) │ │ end │ │ @@ -10409,15 +10413,15 @@ │ │ call $dlfree │ │ i32.const 0 │ │ local.set 2 │ │ local.get 1 │ │ i32.const 0 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 13674 │ │ + i32.const 13943 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $luaL_error │ │ drop │ │ end │ │ local.get 1 │ │ @@ -10456,15 +10460,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -10476,15 +10480,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 2 │ │ i32.const 1631 │ │ i32.const 0 │ │ - i32.const 4303 │ │ + i32.const 4352 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -10498,15 +10502,15 @@ │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 3 │ │ i32.const 1808 │ │ i32.const 0 │ │ - i32.const 4303 │ │ + i32.const 4352 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -10518,17 +10522,17 @@ │ │ i64.const -9223372036854775808 │ │ local.set 7 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 4 │ │ - i32.const 7910 │ │ + i32.const 7959 │ │ i32.const 0 │ │ - i32.const 4303 │ │ + i32.const 4352 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -10549,17 +10553,17 @@ │ │ local.get 8 │ │ i32.wrap_i64 │ │ local.set 9 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 5 │ │ - i32.const 2964 │ │ + i32.const 3013 │ │ i32.const 0 │ │ - i32.const 4303 │ │ + i32.const 4352 │ │ call $lua_get_int_or_float_func │ │ local.tee 5 │ │ f32.abs │ │ f32.const 0x1p+63 (;=9.22337e+18;) │ │ f32.lt │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -10574,15 +10578,15 @@ │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 9 │ │ local.get 6 │ │ i32.wrap_i64 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=132 │ │ call_indirect (type 3) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -10617,15 +10621,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -10633,15 +10637,15 @@ │ │ i32.const 12 │ │ i32.add │ │ call $lua_tolstring │ │ local.set 2 │ │ end │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=136 │ │ call_indirect (type 5) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ @@ -10676,15 +10680,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 1 │ │ @@ -10692,25 +10696,25 @@ │ │ i32.const 12 │ │ i32.add │ │ call $lua_tolstring │ │ local.set 2 │ │ end │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=140 │ │ call_indirect (type 5) │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ i32.const 0) │ │ (func $lua_delete_extra_canvases (type 10) (param i32) (result i32) │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=144 │ │ call_indirect (type 11) │ │ i32.const 0) │ │ (func $lua_get_user_colour_pref (type 10) (param i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 128 │ │ @@ -10718,15 +10722,15 @@ │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.const 128 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=148 │ │ call_indirect (type 6) │ │ call $lua_pushlstring │ │ drop │ │ local.get 1 │ │ i32.const 128 │ │ i32.add │ │ @@ -10763,15 +10767,15 @@ │ │ local.get 1 │ │ local.get 4 │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.store │ │ local.get 0 │ │ - i32.const 8581 │ │ + i32.const 8715 │ │ local.get 1 │ │ call $luaL_error │ │ drop │ │ i32.const 0 │ │ local.set 3 │ │ br 1 (;@1;) │ │ end │ │ @@ -10786,15 +10790,15 @@ │ │ i32.load offset=12 │ │ local.set 2 │ │ end │ │ local.get 0 │ │ local.get 3 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=83584 │ │ + i32.load offset=83952 │ │ i32.load offset=152 │ │ call_indirect (type 6) │ │ call $lua_pushboolean │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ @@ -10808,15 +10812,15 @@ │ │ global.set $__stack_pointer │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83592 │ │ + i32.load offset=83960 │ │ local.tee 3 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ local.get 1 │ │ local.get 3 │ │ call_indirect (type 1) │ │ @@ -10840,26 +10844,26 @@ │ │ global.set $__stack_pointer │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83596 │ │ + i32.load offset=83964 │ │ local.tee 3 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ local.get 1 │ │ local.get 3 │ │ call_indirect (type 1) │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.tee 3 │ │ local.get 0 │ │ local.get 1 │ │ call $vfprintf │ │ drop │ │ local.get 0 │ │ call $strlen │ │ @@ -10942,26 +10946,26 @@ │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 0 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=83596 │ │ + i32.load offset=83964 │ │ local.tee 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ local.get 0 │ │ local.get 2 │ │ call_indirect (type 1) │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.tee 2 │ │ local.get 1 │ │ local.get 0 │ │ call $vfprintf │ │ drop │ │ local.get 1 │ │ call $strlen │ │ @@ -10992,27 +10996,27 @@ │ │ local.get 0 │ │ i32.const 22 │ │ i32.gt_u │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 23152 │ │ + i32.const 23472 │ │ i32.add │ │ i32.load │ │ local.set 1 │ │ end │ │ local.get 1) │ │ (func $set_game_api (type 5) (param i32) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=83600) │ │ + i32.store offset=83968) │ │ (func $alex_new_file (type 6) (param i32 i32) (result i32) │ │ local.get 1 │ │ - i32.const 13957 │ │ + i32.const 14226 │ │ call $fopen) │ │ (func $alex_write_to_file (type 0) (param i32 i32 i32 i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ @@ -11030,16 +11034,16 @@ │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 2 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 21346 │ │ + i32.load offset=60376 │ │ + i32.const 21649 │ │ local.get 4 │ │ call $fiprintf │ │ drop │ │ end │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ @@ -11058,29 +11062,29 @@ │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 1 │ │ i32.const 16 │ │ local.get 1 │ │ - i32.const 13971 │ │ + i32.const 14240 │ │ call $fopen │ │ local.tee 3 │ │ call $fread │ │ local.tee 4 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ local.set 5 │ │ loop ;; label = @2 │ │ local.get 2 │ │ local.get 5 │ │ i32.store offset=16 │ │ - i32.const 19723 │ │ + i32.const 20026 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $iprintf │ │ drop │ │ i32.const 0 │ │ local.set 1 │ │ @@ -11089,15 +11093,15 @@ │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ local.get 1 │ │ i32.add │ │ i32.load8_u │ │ i32.store │ │ - i32.const 19563 │ │ + i32.const 19866 │ │ local.get 2 │ │ call $iprintf │ │ drop │ │ local.get 1 │ │ i32.const 1 │ │ i32.add │ │ local.tee 1 │ │ @@ -11211,16 +11215,16 @@ │ │ local.get 2 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 2 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 22159 │ │ + i32.load offset=60376 │ │ + i32.const 22462 │ │ local.get 2 │ │ call $fiprintf │ │ drop │ │ end │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -11257,16 +11261,16 @@ │ │ i32.add │ │ call $zip_error_strerror │ │ i32.store offset=4 │ │ local.get 3 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 22442 │ │ + i32.load offset=60376 │ │ + i32.const 22745 │ │ local.get 3 │ │ call $fiprintf │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ call $strdup │ │ @@ -11279,30 +11283,30 @@ │ │ local.get 4 │ │ i32.const 0 │ │ call $zip_get_num_entries │ │ local.tee 5 │ │ i32.wrap_i64 │ │ local.tee 1 │ │ i32.store offset=128 │ │ - i32.const 21475 │ │ + i32.const 21778 │ │ local.get 3 │ │ i32.const 128 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 1 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i64.const 4294967295 │ │ i64.and │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 7 │ │ i64.const 0 │ │ local.set 5 │ │ loop ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 4 │ │ @@ -11315,15 +11319,15 @@ │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=112 │ │ local.get 7 │ │ - i32.const 21258 │ │ + i32.const 21561 │ │ local.get 3 │ │ i32.const 112 │ │ i32.add │ │ call $fiprintf │ │ drop │ │ br 1 (;@3;) │ │ end │ │ @@ -11336,15 +11340,15 @@ │ │ i64.load offset=4264 │ │ i64.store offset=104 │ │ local.get 3 │ │ local.get 5 │ │ i32.wrap_i64 │ │ local.tee 8 │ │ i32.store offset=96 │ │ - i32.const 19967 │ │ + i32.const 20270 │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 4 │ │ local.get 5 │ │ @@ -11360,15 +11364,15 @@ │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=20 │ │ local.get 3 │ │ local.get 8 │ │ i32.store offset=16 │ │ local.get 7 │ │ - i32.const 21839 │ │ + i32.const 22142 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $fiprintf │ │ drop │ │ br 1 (;@3;) │ │ end │ │ @@ -11386,15 +11390,15 @@ │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=84 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 4412 │ │ + i32.const 4461 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $snprintf │ │ drop │ │ block ;; label = @4 │ │ local.get 8 │ │ @@ -11402,15 +11406,15 @@ │ │ i32.ne │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ i32.store offset=32 │ │ - i32.const 22130 │ │ + i32.const 22433 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 3 │ │ i32.const 144 │ │ @@ -11420,35 +11424,35 @@ │ │ br 1 (;@3;) │ │ end │ │ local.get 3 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ i32.store offset=64 │ │ - i32.const 22309 │ │ + i32.const 22612 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $iprintf │ │ drop │ │ block ;; label = @4 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ - i32.const 13957 │ │ + i32.const 14226 │ │ call $fopen │ │ local.tee 8 │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ i32.store offset=48 │ │ local.get 7 │ │ - i32.const 20135 │ │ + i32.const 20438 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $fiprintf │ │ drop │ │ br 1 (;@3;) │ │ end │ │ @@ -11506,117 +11510,117 @@ │ │ (func $alex_init_game (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 432 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ - i32.const 12359 │ │ + i32.const 12628 │ │ call $puts │ │ drop │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=128 │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ i32.const 256 │ │ - i32.const 19384 │ │ + i32.const 19687 │ │ local.get 3 │ │ i32.const 128 │ │ i32.add │ │ call $snprintf │ │ local.get 0 │ │ i32.load offset=64 │ │ call_indirect (type 1) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ - i32.const 12693 │ │ + i32.const 12962 │ │ call $strcmp │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 1 │ │ block ;; label = @3 │ │ - i32.const 16961 │ │ + i32.const 17264 │ │ i32.const 0 │ │ call $access │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ - i32.const 16961 │ │ + i32.const 17264 │ │ i32.store offset=48 │ │ local.get 0 │ │ - i32.const 17217 │ │ + i32.const 17520 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $alex_set_status_err_vargs │ │ br 2 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 1 │ │ block ;; label = @3 │ │ - i32.const 15462 │ │ + i32.const 15731 │ │ i32.const 0 │ │ call $access │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ - i32.const 15462 │ │ + i32.const 15731 │ │ i32.store offset=32 │ │ - i32.const 22331 │ │ + i32.const 22634 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err │ │ local.get 3 │ │ - i32.const 15476 │ │ + i32.const 15745 │ │ i32.store offset=16 │ │ local.get 0 │ │ - i32.const 22331 │ │ + i32.const 22634 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $alex_set_status_err_vargs │ │ br 2 (;@1;) │ │ end │ │ local.get 3 │ │ - i32.const 15462 │ │ + i32.const 15731 │ │ i32.store │ │ - i32.const 21551 │ │ + i32.const 21854 │ │ local.get 3 │ │ call $iprintf │ │ drop │ │ local.get 0 │ │ - i32.const 15462 │ │ + i32.const 15731 │ │ call $start_lua_game │ │ local.set 1 │ │ br 1 (;@1;) │ │ end │ │ local.get 1 │ │ local.get 2 │ │ call $get_lua_game_path │ │ local.set 4 │ │ local.get 3 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.store offset=112 │ │ - i32.const 22115 │ │ + i32.const 22418 │ │ local.get 3 │ │ i32.const 112 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=96 │ │ - i32.const 22281 │ │ + i32.const 22584 │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ call $iprintf │ │ drop │ │ block ;; label = @2 │ │ local.get 4 │ │ @@ -11634,22 +11638,22 @@ │ │ local.get 2 │ │ i32.const 14 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ i32.const 14 │ │ local.set 4 │ │ local.get 1 │ │ - i32.const 9571 │ │ + i32.const 9705 │ │ i32.const 15 │ │ call $memcmp │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ call $get_history_browse_api │ │ local.tee 2 │ │ - i32.store offset=83600 │ │ + i32.store offset=83968 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 14 │ │ local.get 2 │ │ i32.load │ │ call_indirect (type 4) │ │ local.set 1 │ │ @@ -11657,15 +11661,15 @@ │ │ end │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=84 │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=80 │ │ - i32.const 20905 │ │ + i32.const 21208 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $alex_log_err │ │ local.get 3 │ │ local.get 2 │ │ i32.store offset=64 │ │ @@ -11674,15 +11678,15 @@ │ │ i32.store offset=68 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 3 │ │ i32.const 176 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 12458 │ │ + i32.const 12727 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $snprintf │ │ local.tee 1 │ │ i32.const 1 │ │ i32.lt_s │ │ @@ -11696,23 +11700,23 @@ │ │ call_indirect (type 1) │ │ br 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.const 160 │ │ i32.add │ │ i32.const 0 │ │ - i32.load8_u offset=23264 │ │ + i32.load8_u offset=23584 │ │ i32.store8 │ │ local.get 3 │ │ i32.const 0 │ │ - i64.load offset=23256 │ │ + i64.load offset=23576 │ │ i64.store offset=152 │ │ local.get 3 │ │ i32.const 0 │ │ - i64.load offset=23248 │ │ + i64.load offset=23568 │ │ i64.store offset=144 │ │ local.get 3 │ │ i32.const 144 │ │ i32.add │ │ i32.const 17 │ │ local.get 0 │ │ i32.load offset=68 │ │ @@ -11727,36 +11731,36 @@ │ │ global.set $__stack_pointer │ │ local.get 1) │ │ (func $default_draw_graphic_params (type 5) (param i32) │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23276 align=4 │ │ + i64.load offset=23596 align=4 │ │ i64.store align=4 │ │ local.get 0 │ │ i32.const 0 │ │ - i64.load offset=23268 align=4 │ │ + i64.load offset=23588 align=4 │ │ i64.store align=4) │ │ (func $alex_start_game_b64 (type 12) (param i32 i32 i32 i32 i32 i32) │ │ (local i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 65664 │ │ i32.sub │ │ local.tee 6 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store │ │ i32.const 0 │ │ - i32.const 20371 │ │ + i32.const 20674 │ │ local.get 6 │ │ call $alex_log_err_user_visible │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 5 │ │ call $b64_encoded_size_to_max_decoded_size │ │ @@ -11767,34 +11771,34 @@ │ │ local.get 6 │ │ local.get 7 │ │ i32.store offset=24 │ │ local.get 6 │ │ local.get 5 │ │ i32.store offset=20 │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store offset=16 │ │ local.get 1 │ │ - i32.const 20708 │ │ + i32.const 21011 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ call $alex_log_err_user_visible │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 7 │ │ call $dlmalloc │ │ local.tee 8 │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store offset=32 │ │ local.get 1 │ │ - i32.const 21397 │ │ + i32.const 21700 │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ call $alex_log_err_user_visible │ │ br 1 (;@1;) │ │ end │ │ local.get 8 │ │ @@ -11806,32 +11810,32 @@ │ │ local.get 6 │ │ local.get 4 │ │ i32.store offset=120 │ │ local.get 6 │ │ local.get 5 │ │ i32.store offset=116 │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store offset=112 │ │ - i32.const 20276 │ │ + i32.const 20579 │ │ local.get 6 │ │ i32.const 112 │ │ i32.add │ │ call $alex_log │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store offset=96 │ │ local.get 6 │ │ local.get 9 │ │ i32.store offset=100 │ │ local.get 6 │ │ i32.const 128 │ │ i32.add │ │ i32.const 65536 │ │ - i32.const 19832 │ │ + i32.const 20135 │ │ local.get 6 │ │ i32.const 96 │ │ i32.add │ │ call $snprintf │ │ local.set 5 │ │ block ;; label = @2 │ │ local.get 9 │ │ @@ -11850,15 +11854,15 @@ │ │ i32.const 128 │ │ i32.add │ │ local.get 5 │ │ i32.add │ │ i32.const 65536 │ │ local.get 5 │ │ i32.sub │ │ - i32.const 19563 │ │ + i32.const 19866 │ │ local.get 6 │ │ i32.const 80 │ │ i32.add │ │ call $snprintf │ │ local.get 5 │ │ i32.add │ │ local.set 5 │ │ @@ -11878,15 +11882,15 @@ │ │ i32.const 128 │ │ i32.add │ │ local.get 5 │ │ i32.add │ │ i32.const 65536 │ │ local.get 5 │ │ i32.sub │ │ - i32.const 22644 │ │ + i32.const 22947 │ │ i32.const 0 │ │ call $snprintf │ │ local.get 5 │ │ i32.add │ │ i32.store offset=64 │ │ local.get 6 │ │ i32.const 128 │ │ @@ -11916,18 +11920,18 @@ │ │ local.get 6 │ │ local.get 7 │ │ i32.store offset=56 │ │ local.get 6 │ │ local.get 4 │ │ i32.store offset=52 │ │ local.get 6 │ │ - i32.const 16863 │ │ + i32.const 17166 │ │ i32.store offset=48 │ │ local.get 1 │ │ - i32.const 20454 │ │ + i32.const 20757 │ │ local.get 6 │ │ i32.const 48 │ │ i32.add │ │ call $alex_log_err_user_visible │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ @@ -11960,15 +11964,15 @@ │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 96 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ local.get 0 │ │ - i32.const 19461 │ │ + i32.const 19764 │ │ local.get 1 │ │ call $strncpy │ │ local.tee 4 │ │ i32.const 10 │ │ i32.add │ │ local.set 0 │ │ local.get 1 │ │ @@ -11990,22 +11994,22 @@ │ │ br_table 3 (;@4;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 0 (;@7;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 3 (;@3;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 2 (;@3;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12016,15 +12020,15 @@ │ │ local.set 8 │ │ br 2 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 15717 │ │ + i32.const 16020 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 13 │ │ i32.add │ │ local.set 6 │ │ local.get 5 │ │ i32.const -13 │ │ @@ -12033,37 +12037,37 @@ │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.load offset=128 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 9 │ │ i32.const 0 │ │ local.set 10 │ │ loop ;; label = @5 │ │ block ;; label = @6 │ │ local.get 10 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ local.get 6 │ │ - i32.const 17458 │ │ + i32.const 17761 │ │ local.get 0 │ │ call $strncpy │ │ i32.const 1 │ │ i32.add │ │ local.set 6 │ │ local.get 0 │ │ i32.const -1 │ │ i32.add │ │ local.set 0 │ │ end │ │ local.get 6 │ │ - i32.const 16687 │ │ + i32.const 16990 │ │ local.get 0 │ │ call $strncpy │ │ local.set 6 │ │ local.get 3 │ │ local.get 2 │ │ local.get 10 │ │ i32.const 4100 │ │ @@ -12075,15 +12079,15 @@ │ │ local.tee 7 │ │ i32.load │ │ i32.store offset=64 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ i32.const 16 │ │ - i32.const 13714 │ │ + i32.const 13983 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 6 │ │ i32.const 8 │ │ @@ -12116,15 +12120,15 @@ │ │ i32.load │ │ local.tee 0 │ │ i32.const -1 │ │ i32.add │ │ br_table 0 (;@10;) 2 (;@8;) 3 (;@7;) 1 (;@9;) │ │ end │ │ local.get 8 │ │ - i32.const 19452 │ │ + i32.const 19755 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 8 │ │ i32.add │ │ local.set 0 │ │ local.get 5 │ │ i32.const -8 │ │ @@ -12147,22 +12151,22 @@ │ │ br_table 3 (;@13;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 2 (;@14;) 1 (;@15;) 0 (;@16;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@14;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 3 (;@12;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 2 (;@12;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12209,18 +12213,18 @@ │ │ br 0 (;@10;) │ │ end │ │ end │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=20 │ │ local.get 3 │ │ - i32.const 4633 │ │ + i32.const 4682 │ │ i32.store offset=16 │ │ local.get 9 │ │ - i32.const 13509 │ │ + i32.const 13778 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $fiprintf │ │ drop │ │ local.get 8 │ │ i32.const 1187 │ │ @@ -12232,29 +12236,29 @@ │ │ local.get 5 │ │ i32.const -21 │ │ i32.add │ │ local.set 0 │ │ br 2 (;@6;) │ │ end │ │ local.get 8 │ │ - i32.const 16697 │ │ + i32.const 17000 │ │ local.get 5 │ │ call $strncpy │ │ local.set 0 │ │ local.get 3 │ │ local.get 11 │ │ i32.const 136 │ │ i32.add │ │ i32.load │ │ i32.store offset=48 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ i32.const 16 │ │ - i32.const 13714 │ │ + i32.const 13983 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 0 │ │ i32.const 6 │ │ @@ -12269,15 +12273,15 @@ │ │ call $strncpy │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $strlen │ │ local.tee 6 │ │ i32.add │ │ - i32.const 19431 │ │ + i32.const 19734 │ │ local.get 0 │ │ local.get 6 │ │ i32.sub │ │ local.tee 5 │ │ call $strncpy │ │ i32.const 9 │ │ i32.add │ │ @@ -12303,22 +12307,22 @@ │ │ br_table 3 (;@11;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 2 (;@12;) 1 (;@13;) 0 (;@14;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@12;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 3 (;@10;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 2 (;@10;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12362,15 +12366,15 @@ │ │ local.get 8 │ │ i32.add │ │ local.set 0 │ │ br 0 (;@8;) │ │ end │ │ end │ │ local.get 8 │ │ - i32.const 19441 │ │ + i32.const 19744 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 10 │ │ i32.add │ │ local.set 0 │ │ local.get 5 │ │ i32.const -10 │ │ @@ -12393,22 +12397,22 @@ │ │ br_table 3 (;@10;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 2 (;@11;) 1 (;@12;) 0 (;@13;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@11;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 3 (;@9;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 2 (;@9;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12421,29 +12425,29 @@ │ │ end │ │ i32.const 0 │ │ local.set 12 │ │ local.get 0 │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 16696 │ │ + i32.const 16999 │ │ local.get 5 │ │ call $strncpy │ │ local.set 0 │ │ local.get 3 │ │ local.get 11 │ │ i32.const 136 │ │ i32.add │ │ i32.load │ │ i32.store offset=32 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ i32.const 16 │ │ - i32.const 13714 │ │ + i32.const 13983 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 0 │ │ i32.const 7 │ │ @@ -12458,15 +12462,15 @@ │ │ call $strncpy │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $strlen │ │ local.tee 6 │ │ i32.add │ │ - i32.const 15704 │ │ + i32.const 16007 │ │ local.get 0 │ │ local.get 6 │ │ i32.sub │ │ local.tee 6 │ │ call $strncpy │ │ i32.const 12 │ │ i32.add │ │ @@ -12492,15 +12496,15 @@ │ │ i32.add │ │ local.set 6 │ │ block ;; label = @12 │ │ local.get 12 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ local.get 0 │ │ - i32.const 17458 │ │ + i32.const 17761 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 1 │ │ i32.add │ │ local.set 0 │ │ local.get 5 │ │ i32.const -1 │ │ @@ -12508,15 +12512,15 @@ │ │ local.set 5 │ │ end │ │ local.get 6 │ │ i32.const 400 │ │ i32.add │ │ local.set 6 │ │ local.get 0 │ │ - i32.const 19480 │ │ + i32.const 19783 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 1 │ │ i32.add │ │ local.set 0 │ │ local.get 5 │ │ i32.const -1 │ │ @@ -12535,22 +12539,22 @@ │ │ br_table 3 (;@15;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 2 (;@16;) 1 (;@17;) 0 (;@18;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@16;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 3 (;@14;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 5 │ │ call $strncpy │ │ drop │ │ br 2 (;@14;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12561,15 +12565,15 @@ │ │ local.set 8 │ │ br 2 (;@13;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 19480 │ │ + i32.const 19783 │ │ local.get 5 │ │ call $strncpy │ │ i32.const 1 │ │ i32.add │ │ local.set 0 │ │ local.get 5 │ │ i32.const -1 │ │ @@ -12669,19 +12673,19 @@ │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=8 │ │ local.get 3 │ │ local.get 5 │ │ i32.store offset=4 │ │ local.get 3 │ │ - i32.const 4633 │ │ + i32.const 4682 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 19864 │ │ + i32.load offset=60376 │ │ + i32.const 20167 │ │ local.get 3 │ │ call $fiprintf │ │ drop │ │ end │ │ local.get 3 │ │ i32.const 96 │ │ i32.add │ │ @@ -12722,29 +12726,29 @@ │ │ local.get 0 │ │ i32.const 1209 │ │ local.get 1 │ │ call $strncpy │ │ local.tee 4 │ │ i32.const 1 │ │ i32.add │ │ - i32.const 16688 │ │ + i32.const 16991 │ │ local.get 1 │ │ i32.const -1 │ │ i32.add │ │ call $strncpy │ │ drop │ │ local.get 3 │ │ local.get 2 │ │ i32.load │ │ i32.store offset=16 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ i32.const 16 │ │ - i32.const 13714 │ │ + i32.const 13983 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 4 │ │ i32.const 8 │ │ @@ -12759,23 +12763,23 @@ │ │ call $strncpy │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ call $strlen │ │ local.tee 5 │ │ i32.add │ │ - i32.const 17458 │ │ + i32.const 17761 │ │ local.get 0 │ │ local.get 5 │ │ i32.sub │ │ local.tee 6 │ │ call $strncpy │ │ i32.const 1 │ │ i32.add │ │ - i32.const 19442 │ │ + i32.const 19745 │ │ local.get 6 │ │ i32.const -1 │ │ i32.add │ │ call $strncpy │ │ i32.const 9 │ │ i32.add │ │ local.set 0 │ │ @@ -12800,22 +12804,22 @@ │ │ br_table 3 (;@4;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 0 (;@7;) │ │ end │ │ local.get 7 │ │ i32.const 34 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ local.get 0 │ │ - i32.const 19428 │ │ + i32.const 19731 │ │ local.get 6 │ │ call $strncpy │ │ drop │ │ br 3 (;@3;) │ │ end │ │ local.get 0 │ │ - i32.const 6879 │ │ + i32.const 6928 │ │ local.get 6 │ │ call $strncpy │ │ drop │ │ br 2 (;@3;) │ │ end │ │ local.get 0 │ │ local.get 7 │ │ @@ -12826,15 +12830,15 @@ │ │ local.set 8 │ │ br 2 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 19480 │ │ + i32.const 19783 │ │ local.get 6 │ │ call $strncpy │ │ local.tee 7 │ │ i32.const 1 │ │ i32.add │ │ local.set 5 │ │ local.get 6 │ │ @@ -12844,32 +12848,32 @@ │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.load │ │ i32.const 2 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ - i32.const 17458 │ │ + i32.const 17761 │ │ local.get 0 │ │ call $strncpy │ │ drop │ │ local.get 7 │ │ i32.const 2 │ │ i32.add │ │ - i32.const 16678 │ │ + i32.const 16981 │ │ local.get 6 │ │ i32.const -2 │ │ i32.add │ │ call $strncpy │ │ drop │ │ local.get 7 │ │ i32.const 10 │ │ i32.add │ │ - i32.const 9323 │ │ - i32.const 9638 │ │ + i32.const 9457 │ │ + i32.const 9772 │ │ local.get 2 │ │ i32.load offset=260 │ │ local.tee 5 │ │ select │ │ local.get 6 │ │ i32.const -10 │ │ i32.add │ │ @@ -12910,19 +12914,19 @@ │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=8 │ │ local.get 3 │ │ local.get 6 │ │ i32.store offset=4 │ │ local.get 3 │ │ - i32.const 4656 │ │ + i32.const 4705 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 19864 │ │ + i32.load offset=60376 │ │ + i32.const 20167 │ │ local.get 3 │ │ call $fiprintf │ │ drop │ │ end │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ @@ -12953,26 +12957,26 @@ │ │ local.set 0 │ │ br 0 (;@1;) │ │ end) │ │ (func $alexgames_mutex_take (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83604 │ │ + i32.load offset=83972 │ │ local.tee 0 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call_indirect (type 11) │ │ end) │ │ (func $alexgames_mutex_release (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=83608 │ │ + i32.load offset=83976 │ │ local.tee 0 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call_indirect (type 11) │ │ end) │ │ (func $alex_get_root_dir (type 6) (param i32 i32) (result i32) │ │ @@ -12983,38 +12987,38 @@ │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ local.set 3 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=87712 │ │ + i32.load8_u offset=88080 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ - i32.const 83616 │ │ + i32.const 83984 │ │ i32.store │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.get 2 │ │ call $snprintf │ │ local.set 0 │ │ - i32.const 83616 │ │ + i32.const 83984 │ │ i32.const 4096 │ │ call $strnlen │ │ local.set 3 │ │ br 1 (;@1;) │ │ end │ │ local.get 2 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.store offset=16 │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ local.set 0 │ │ end │ │ local.get 2 │ │ @@ -13028,52 +13032,52 @@ │ │ i32.ne │ │ select) │ │ (func $get_default_params (type 5) (param i32) │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23292 align=4 │ │ + i64.load offset=23612 align=4 │ │ i64.store align=4 │ │ local.get 0 │ │ i32.const 0 │ │ - i64.load offset=23284 align=4 │ │ + i64.load offset=23604 align=4 │ │ i64.store align=4) │ │ (func $set_game_dict_api (type 5) (param i32) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=87716) │ │ + i32.store offset=88084) │ │ (func $get_game_dict_api (type 9) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=87716 │ │ + i32.load offset=88084 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 7728 │ │ + i32.const 7777 │ │ call $puts │ │ drop │ │ i32.const 0 │ │ - i32.load offset=87716 │ │ + i32.load offset=88084 │ │ return │ │ end │ │ - i32.const 6489 │ │ + i32.const 6538 │ │ call $puts │ │ drop │ │ call $get_c_dictionary_api) │ │ (func $write_b64 (type 14) (param i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ - i32.const 16853 │ │ + i32.const 17156 │ │ i32.store offset=16 │ │ - i32.const 20166 │ │ + i32.const 20469 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $iprintf │ │ drop │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -13154,15 +13158,15 @@ │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i32.add │ │ local.get 7 │ │ i32.const 2 │ │ i32.shr_u │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 1 │ │ i32.or │ │ @@ -13175,15 +13179,15 @@ │ │ i32.const 16 │ │ i32.shl │ │ i32.or │ │ i32.const 12 │ │ i32.shr_u │ │ i32.const 63 │ │ i32.and │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 2 │ │ i32.or │ │ @@ -13191,27 +13195,27 @@ │ │ local.get 8 │ │ local.get 10 │ │ i32.or │ │ i32.const 6 │ │ i32.shr_u │ │ i32.const 63 │ │ i32.and │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 3 │ │ i32.or │ │ i32.add │ │ local.get 8 │ │ i32.const 63 │ │ i32.and │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 1 │ │ i32.const 4 │ │ i32.add │ │ local.set 1 │ │ @@ -13228,17 +13232,17 @@ │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=8 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=4 │ │ local.get 4 │ │ - i32.const 16853 │ │ + i32.const 17156 │ │ i32.store │ │ - i32.const 21944 │ │ + i32.const 22247 │ │ local.get 4 │ │ call $alex_log_err │ │ end │ │ i32.const 0 │ │ local.set 1 │ │ br 1 (;@1;) │ │ end │ │ @@ -13247,15 +13251,15 @@ │ │ i32.rem_u │ │ local.tee 6 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ local.get 5 │ │ local.get 6 │ │ - i32.const 23300 │ │ + i32.const 23620 │ │ i32.add │ │ i32.load8_u │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 6 │ │ i32.const 1 │ │ i32.gt_u │ │ @@ -13286,84 +13290,84 @@ │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ local.set 5 │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=87720 │ │ + i32.load8_u offset=88088 │ │ br_if 0 (;@1;) │ │ loop ;; label = @2 │ │ local.get 5 │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_s │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ local.get 5 │ │ i32.store8 │ │ local.get 5 │ │ i32.const 1 │ │ i32.or │ │ local.tee 6 │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_s │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ local.get 6 │ │ i32.store8 │ │ local.get 5 │ │ i32.const 2 │ │ i32.or │ │ local.tee 6 │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_s │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ local.get 6 │ │ i32.store8 │ │ local.get 5 │ │ i32.const 3 │ │ i32.or │ │ local.tee 6 │ │ - i32.const 23312 │ │ + i32.const 23632 │ │ i32.add │ │ i32.load8_s │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ local.get 6 │ │ i32.store8 │ │ local.get 5 │ │ i32.const 4 │ │ i32.add │ │ local.tee 5 │ │ i32.const 64 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=87720 │ │ + i32.store8 offset=88088 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.const 3 │ │ i32.and │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ local.get 3 │ │ i32.store offset=4 │ │ local.get 4 │ │ - i32.const 16883 │ │ + i32.const 17186 │ │ i32.store │ │ - i32.const 21507 │ │ + i32.const 21810 │ │ local.get 4 │ │ call $alex_log_err │ │ i32.const 0 │ │ local.set 7 │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -13407,15 +13411,15 @@ │ │ i32.add │ │ i32.load8_s │ │ local.tee 10 │ │ i32.const 61 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 10 │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ i32.load8_s │ │ local.set 9 │ │ end │ │ block ;; label = @3 │ │ local.get 2 │ │ local.get 6 │ │ @@ -13424,15 +13428,15 @@ │ │ i32.add │ │ i32.load8_s │ │ local.tee 10 │ │ i32.const 61 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 10 │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ i32.load8_s │ │ local.set 8 │ │ end │ │ i32.const 0 │ │ local.set 10 │ │ i32.const 0 │ │ @@ -13445,15 +13449,15 @@ │ │ i32.add │ │ i32.load8_s │ │ local.tee 12 │ │ i32.const 61 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 12 │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ i32.load8_s │ │ local.set 11 │ │ end │ │ block ;; label = @3 │ │ local.get 2 │ │ local.get 6 │ │ @@ -13462,15 +13466,15 @@ │ │ i32.add │ │ i32.load8_s │ │ local.tee 12 │ │ i32.const 61 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 12 │ │ - i32.const 87728 │ │ + i32.const 88096 │ │ i32.add │ │ i32.load8_s │ │ local.set 10 │ │ end │ │ local.get 8 │ │ i32.const 12 │ │ i32.shl │ │ @@ -13591,15 +13595,15 @@ │ │ i32.const 117 │ │ i32.store offset=388 │ │ local.get 0 │ │ i32.const 88 │ │ i32.add │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 4 │ │ i32.const 65536 │ │ call $operator_new___unsigned_long_ │ │ local.set 5 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ @@ -13630,28 +13634,28 @@ │ │ call $SavedStateDb::get_new_session_id__ │ │ local.get 9 │ │ i32.const -1 │ │ i32.xor │ │ i32.add │ │ local.tee 10 │ │ i32.store offset=80 │ │ - i32.const 21013 │ │ + i32.const 21316 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 2 │ │ local.get 9 │ │ i32.store offset=64 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.const 32 │ │ - i32.const 12739 │ │ + i32.const 13008 │ │ local.get 2 │ │ i32.const 64 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 2 │ │ i32.const 240 │ │ @@ -13710,136 +13714,136 @@ │ │ end │ │ local.get 13 │ │ local.get 11 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=136 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ local.get 2 │ │ i32.load offset=368 │ │ local.get 2 │ │ i32.const 368 │ │ i32.add │ │ local.get 2 │ │ i32.load8_s offset=379 │ │ i32.const 0 │ │ i32.lt_s │ │ select │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ block ;; label = @14 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@14;) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=140 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ local.get 2 │ │ i32.load offset=368 │ │ local.get 2 │ │ i32.const 368 │ │ i32.add │ │ local.get 2 │ │ i32.load8_s offset=379 │ │ i32.const 0 │ │ i32.lt_s │ │ select │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 118 │ │ local.get 1 │ │ local.get 10 │ │ call $invoke_iii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 119 │ │ local.get 1 │ │ local.get 10 │ │ local.get 13 │ │ local.get 5 │ │ i32.const 65536 │ │ call $invoke_iiiiii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@12;) │ │ local.get 2 │ │ local.get 10 │ │ i32.store offset=52 │ │ local.get 2 │ │ local.get 11 │ │ i32.store offset=48 │ │ - i32.const 20970 │ │ + i32.const 21273 │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 11 │ │ i32.const -1 │ │ i32.ne │ │ br_if 3 (;@11;) │ │ - i32.const 11365 │ │ + i32.const 11634 │ │ call $puts │ │ drop │ │ i32.const 2 │ │ local.set 11 │ │ br 4 (;@10;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -13860,21 +13864,21 @@ │ │ drop │ │ br 9 (;@2;) │ │ end │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ - i32.store offset=87988 │ │ + i32.store offset=88356 │ │ local.get 2 │ │ i32.const 0 │ │ i32.store8 offset=240 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 120 │ │ local.get 1 │ │ local.get 10 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.const 128 │ │ @@ -13883,86 +13887,86 @@ │ │ i32.add │ │ i32.const 64 │ │ local.get 2 │ │ i32.const 172 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@3;) │ │ block ;; label = @11 │ │ local.get 2 │ │ i32.load8_u offset=240 │ │ br_if 0 (;@11;) │ │ local.get 6 │ │ i32.const 0 │ │ - i32.load offset=23416 │ │ + i32.load offset=23736 │ │ i32.store │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ i32.const 32 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23408 │ │ + i64.load offset=23728 │ │ i64.store │ │ local.get 7 │ │ i32.const 0 │ │ - i64.load offset=23400 │ │ + i64.load offset=23720 │ │ i64.store │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=23392 │ │ + i64.load offset=23712 │ │ i64.store │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23384 │ │ + i64.load offset=23704 │ │ i64.store offset=104 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23376 │ │ + i64.load offset=23696 │ │ i64.store offset=96 │ │ local.get 2 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ i32.store offset=32 │ │ local.get 4 │ │ - i32.const 20300 │ │ + i32.const 20603 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ call $fiprintf │ │ drop │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ i32.const 44 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@11;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 11 │ │ call $getTempRet0 │ │ @@ -13972,28 +13976,28 @@ │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ call $strlen │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 121 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @11 │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@13;) │ │ @@ -14004,15 +14008,15 @@ │ │ i32.const 240 │ │ i32.add │ │ i32.store offset=16 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ i32.const 64 │ │ - i32.const 22077 │ │ + i32.const 22380 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ local.set 11 │ │ local.get 2 │ │ local.get 10 │ │ @@ -14024,37 +14028,37 @@ │ │ i32.store offset=8 │ │ local.get 2 │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ i32.store │ │ local.get 4 │ │ - i32.const 20079 │ │ + i32.const 20382 │ │ local.get 2 │ │ call $fiprintf │ │ drop │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ local.get 2 │ │ i32.const 96 │ │ i32.add │ │ local.get 11 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@12;) │ │ i32.const 4 │ │ local.set 11 │ │ br 3 (;@10;) │ │ @@ -14069,103 +14073,103 @@ │ │ local.set 11 │ │ call $getTempRet0 │ │ drop │ │ br 9 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 122 │ │ local.get 2 │ │ i32.const 384 │ │ i32.add │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ - i32.const 22744 │ │ + i32.store offset=91444 │ │ + i32.const 23064 │ │ i32.load offset=56 │ │ local.get 13 │ │ local.get 10 │ │ local.get 5 │ │ local.get 11 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ - i32.const 22744 │ │ + i32.store offset=91444 │ │ + i32.const 23064 │ │ i32.load offset=8 │ │ local.get 13 │ │ i32.const 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ - i32.const 22744 │ │ + i32.store offset=91444 │ │ + i32.const 23064 │ │ i32.load offset=4 │ │ local.get 13 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=87988 │ │ + i32.store offset=88356 │ │ i32.const 123 │ │ i32.const 44 │ │ call $invoke_ii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@8;) │ │ local.get 11 │ │ i64.const 0 │ │ i64.store align=4 │ │ @@ -14215,72 +14219,72 @@ │ │ i32.add │ │ i32.load │ │ i32.store │ │ br 1 (;@11;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 124 │ │ local.get 11 │ │ local.get 2 │ │ i32.load offset=368 │ │ local.get 2 │ │ i32.load offset=372 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@8;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 125 │ │ local.get 11 │ │ i32.const 12 │ │ i32.add │ │ local.get 2 │ │ i32.const 240 │ │ i32.add │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 125 │ │ local.get 12 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@8;) │ │ local.get 11 │ │ local.get 10 │ │ i32.store offset=40 │ │ @@ -14325,24 +14329,24 @@ │ │ i32.add │ │ local.tee 13 │ │ i32.const 1073741824 │ │ i32.lt_u │ │ br_if 0 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 126 │ │ local.get 3 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@13;) │ │ br 13 (;@1;) │ │ end │ │ block ;; label = @14 │ │ @@ -14368,50 +14372,50 @@ │ │ end │ │ local.get 15 │ │ i32.const 1073741824 │ │ i32.lt_u │ │ br_if 1 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 127 │ │ - i32.const 9115 │ │ + i32.const 9249 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.ne │ │ br_if 12 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 11 │ │ call $getTempRet0 │ │ drop │ │ br 10 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 123 │ │ local.get 15 │ │ i32.const 2 │ │ i32.shl │ │ call $invoke_ii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 16 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@8;) │ │ end │ │ local.get 13 │ │ local.get 14 │ │ @@ -14515,17 +14519,17 @@ │ │ local.get 11 │ │ i32.const 479 │ │ i32.gt_s │ │ select │ │ i32.store offset=104 │ │ local.get 5 │ │ call $dlfree │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=140 │ │ call_indirect (type 5) │ │ local.get 2 │ │ i32.const 544 │ │ i32.add │ │ global.set $__stack_pointer │ │ return │ │ @@ -14556,130 +14560,130 @@ │ │ unreachable │ │ end │ │ unreachable) │ │ (func $preview_get_user_colour_pref_char*__unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=148 │ │ call_indirect (type 6)) │ │ (func $preview_set_status_err_char_const*__unsigned_long_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ call_indirect (type 1)) │ │ (func $preview_draw_refresh__ (type 11) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=36 │ │ call_indirect (type 11)) │ │ (func $preview_draw_clear__ (type 11) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11)) │ │ (func $preview_draw_circle_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ (type 13) (param i32 i32 i32 i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ local.get 7 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=28 │ │ call_indirect (type 13)) │ │ (func $preview_draw_rect_char_const*__unsigned_long__int__int__int__int_ (type 12) (param i32 i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=20 │ │ call_indirect (type 12)) │ │ (func $preview_draw_text_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ (type 13) (param i32 i32 i32 i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ local.get 7 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ call_indirect (type 13)) │ │ (func $preview_draw_line_char_const*__int__int__int__int__int_ (type 12) (param i32 i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=12 │ │ call_indirect (type 12)) │ │ (func $preview_draw_graphic_char_const*__int__int__int__int__draw_graphic_params_const*_ (type 12) (param i32 i32 i32 i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=8 │ │ call_indirect (type 12)) │ │ (func $preview_get_game_id_void_const*__char*__unsigned_long_ (type 2) (param i32 i32 i32) │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=87988 │ │ + i32.load offset=88356 │ │ local.get 2 │ │ call $strncpy │ │ drop) │ │ (func $std::__2::__vector_base_>::__throw_length_error___const (type 5) (param i32) │ │ local.get 0 │ │ call $std::__2::__vector_base_common::__throw_length_error___const │ │ unreachable) │ │ (func $std::__2::__throw_length_error_char_const*_ (type 5) (param i32) │ │ (local i32) │ │ i32.const 8 │ │ call $__cxa_allocate_exception │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 128 │ │ local.get 1 │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ - i32.const 75024 │ │ + i32.const 75392 │ │ i32.const 129 │ │ call $__cxa_throw │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ call $getTempRet0 │ │ @@ -15451,15 +15455,15 @@ │ │ i32.const 15484 │ │ i32.store16 offset=232 │ │ local.get 2 │ │ i32.const 2 │ │ i32.store8 offset=243 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 130 │ │ local.get 2 │ │ i32.const 248 │ │ i32.add │ │ local.get 2 │ │ i32.const 232 │ │ i32.add │ │ @@ -15474,19 +15478,19 @@ │ │ i32.const 6 │ │ i32.div_s │ │ local.tee 5 │ │ i32.const 0 │ │ i32.const 131 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -15502,30 +15506,30 @@ │ │ block ;; label = @17 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 132 │ │ local.get 0 │ │ i32.const 48 │ │ i32.add │ │ local.tee 6 │ │ local.get 2 │ │ i32.const 248 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@16;) │ │ block ;; label = @18 │ │ local.get 2 │ │ i32.load8_s offset=259 │ │ @@ -15550,15 +15554,15 @@ │ │ i32.const 60 │ │ i32.store16 offset=176 │ │ local.get 2 │ │ i32.const 1 │ │ i32.store8 offset=187 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 130 │ │ local.get 2 │ │ i32.const 192 │ │ i32.add │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ @@ -15568,38 +15572,38 @@ │ │ i32.add │ │ local.get 4 │ │ local.get 5 │ │ i32.const 1 │ │ i32.const 131 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 132 │ │ local.get 6 │ │ local.get 2 │ │ i32.const 192 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@13;) │ │ block ;; label = @18 │ │ local.get 2 │ │ i32.load8_s offset=203 │ │ @@ -15621,15 +15625,15 @@ │ │ call $operator_delete_void*_ │ │ end │ │ local.get 2 │ │ i32.const 62 │ │ i32.store16 offset=120 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.store8 offset=131 │ │ i32.const 130 │ │ local.get 2 │ │ i32.const 136 │ │ i32.add │ │ @@ -15644,38 +15648,38 @@ │ │ i32.sub │ │ local.get 4 │ │ local.get 5 │ │ i32.const 2 │ │ i32.const 131 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 132 │ │ local.get 6 │ │ local.get 2 │ │ i32.const 136 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@10;) │ │ block ;; label = @18 │ │ local.get 2 │ │ i32.load8_s offset=147 │ │ @@ -15703,15 +15707,15 @@ │ │ i32.const 31806 │ │ i32.store16 offset=64 │ │ local.get 2 │ │ i32.const 2 │ │ i32.store8 offset=75 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 130 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ local.get 2 │ │ i32.const 64 │ │ i32.add │ │ @@ -15721,38 +15725,38 @@ │ │ i32.sub │ │ local.get 4 │ │ local.get 5 │ │ i32.const 3 │ │ i32.const 131 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 132 │ │ local.get 6 │ │ local.get 2 │ │ i32.const 80 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 10 (;@7;) │ │ block ;; label = @18 │ │ local.get 2 │ │ i32.load8_s offset=91 │ │ @@ -15783,15 +15787,15 @@ │ │ i32.const 4 │ │ i32.store8 offset=19 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 130 │ │ local.get 2 │ │ i32.const 24 │ │ i32.add │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ @@ -15799,38 +15803,38 @@ │ │ local.get 1 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 4 │ │ i32.const 131 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 132 │ │ local.get 6 │ │ local.get 2 │ │ i32.const 24 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 13 (;@4;) │ │ block ;; label = @18 │ │ local.get 2 │ │ i32.load8_s offset=35 │ │ @@ -16081,15 +16085,15 @@ │ │ local.tee 5 │ │ i32.const 0 │ │ i32.store │ │ local.get 3 │ │ i64.const 0 │ │ i64.store offset=256 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.const 148 │ │ i32.add │ │ i32.load │ │ call $is_dark_mode_game_api_callbacks_const*_ │ │ local.set 6 │ │ local.get 3 │ │ i32.const 9 │ │ @@ -16097,36 +16101,36 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 6 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load8_u offset=16781 │ │ + i32.load8_u offset=17084 │ │ i32.store8 │ │ local.get 3 │ │ i32.const 0 │ │ - i64.load offset=16773 align=1 │ │ + i64.load offset=17076 align=1 │ │ i64.store offset=256 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load8_u offset=16771 │ │ + i32.load8_u offset=17074 │ │ i32.store8 │ │ local.get 3 │ │ i32.const 0 │ │ - i64.load offset=16763 align=1 │ │ + i64.load offset=17066 align=1 │ │ i64.store offset=256 │ │ end │ │ local.get 3 │ │ i32.const 0 │ │ i32.store8 offset=265 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ @@ -16137,16 +16141,16 @@ │ │ local.get 0 │ │ i32.load offset=88 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 19730 │ │ + i32.const 91636 │ │ + i32.const 20033 │ │ i32.const 23 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 0 │ │ i32.load offset=92 │ │ local.get 0 │ │ i32.load offset=88 │ │ i32.sub │ │ @@ -16159,52 +16163,52 @@ │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ local.get 6 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@6;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ @@ -16242,25 +16246,25 @@ │ │ local.get 5 │ │ i32.const 0 │ │ i32.store8 offset=24 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=17173 align=1 │ │ + i64.load offset=17476 align=1 │ │ i64.store align=1 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=17165 align=1 │ │ + i64.load offset=17468 align=1 │ │ i64.store align=1 │ │ local.get 5 │ │ i32.const 0 │ │ - i64.load offset=17157 align=1 │ │ + i64.load offset=17460 align=1 │ │ i64.store align=1 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 1 │ │ i32.load8_s offset=287 │ │ i32.const 0 │ │ i32.lt_s │ │ @@ -16292,28 +16296,28 @@ │ │ i32.load offset=280 │ │ local.set 5 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 224 │ │ i32.add │ │ local.get 6 │ │ local.get 5 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@3;) │ │ local.get 3 │ │ i32.load offset=244 │ │ local.set 8 │ │ @@ -16321,23 +16325,23 @@ │ │ i32.load offset=240 │ │ local.set 5 │ │ local.get 3 │ │ i32.load8_u offset=251 │ │ local.set 6 │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 9 │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ local.get 5 │ │ local.get 3 │ │ i32.const 240 │ │ i32.add │ │ local.get 6 │ │ i32.const 24 │ │ @@ -16381,19 +16385,19 @@ │ │ i32.const 240 │ │ i32.add │ │ i32.const 240 │ │ local.get 7 │ │ i32.const 0 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ block ;; label = @6 │ │ local.get 3 │ │ i32.load8_s offset=235 │ │ @@ -16482,42 +16486,42 @@ │ │ local.get 3 │ │ i64.load offset=256 │ │ i64.store offset=208 │ │ br 1 (;@20;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 208 │ │ i32.add │ │ local.get 3 │ │ i32.load offset=256 │ │ local.get 3 │ │ i32.load offset=260 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@18;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=20 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ local.get 3 │ │ i32.load offset=208 │ │ local.get 3 │ │ i32.const 208 │ │ i32.add │ │ local.get 3 │ │ @@ -16554,19 +16558,19 @@ │ │ i32.const 1 │ │ i32.shl │ │ i32.sub │ │ i32.const 480 │ │ i32.add │ │ call $invoke_viiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@17;) │ │ block ;; label = @20 │ │ local.get 3 │ │ i32.load8_s offset=219 │ │ @@ -16574,29 +16578,29 @@ │ │ i32.gt_s │ │ br_if 0 (;@20;) │ │ local.get 3 │ │ i32.load offset=208 │ │ call $operator_delete_void*_ │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=132 │ │ local.set 12 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 9 │ │ local.get 5 │ │ i32.load │ │ local.set 13 │ │ local.get 5 │ │ i32.load8_s offset=11 │ │ local.set 15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ local.get 13 │ │ local.get 5 │ │ local.get 15 │ │ i32.const 0 │ │ i32.lt_s │ │ select │ │ @@ -16606,19 +16610,19 @@ │ │ local.get 9 │ │ local.get 6 │ │ i32.add │ │ i32.const 200 │ │ i32.const 200 │ │ call $invoke_viiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@18;) │ │ local.get 5 │ │ i32.const 23 │ │ i32.add │ │ @@ -16641,41 +16645,41 @@ │ │ i32.lt_s │ │ select │ │ i32.store │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 18380 │ │ + i32.const 18683 │ │ local.get 3 │ │ call $snprintf │ │ drop │ │ block ;; label = @20 │ │ local.get 3 │ │ i32.const 80 │ │ i32.add │ │ call $strlen │ │ local.tee 6 │ │ i32.const -16 │ │ i32.lt_u │ │ br_if 0 (;@20;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 135 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@15;) │ │ unreachable │ │ end │ │ block ;; label = @20 │ │ @@ -16683,30 +16687,30 @@ │ │ block ;; label = @22 │ │ local.get 6 │ │ i32.const 11 │ │ i32.lt_u │ │ br_if 0 (;@22;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 123 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ i32.const -16 │ │ i32.and │ │ local.tee 11 │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@16;) │ │ local.get 3 │ │ local.get 8 │ │ i32.store offset=64 │ │ @@ -16771,46 +16775,46 @@ │ │ i32.load offset=280 │ │ local.set 6 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ local.get 8 │ │ local.get 6 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@14;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 9 │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 6 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ local.get 3 │ │ i32.load offset=64 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ local.get 3 │ │ @@ -16867,19 +16871,19 @@ │ │ i32.mul │ │ i32.const 200 │ │ i32.add │ │ local.get 6 │ │ i32.const 1 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@13;) │ │ block ;; label = @20 │ │ local.get 3 │ │ i32.load8_s offset=59 │ │ @@ -16934,28 +16938,28 @@ │ │ i32.load │ │ local.set 6 │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ local.get 5 │ │ local.get 6 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@16;) │ │ end │ │ block ;; label = @20 │ │ block ;; label = @21 │ │ @@ -16984,49 +16988,49 @@ │ │ i32.load offset=280 │ │ local.set 5 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ local.get 5 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@11;) │ │ end │ │ local.get 1 │ │ i32.load offset=296 │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 8 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 5 │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ local.get 3 │ │ i32.load offset=32 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ local.get 3 │ │ @@ -17078,19 +17082,19 @@ │ │ i32.mul │ │ i32.const 200 │ │ i32.add │ │ local.get 6 │ │ i32.const 1 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@10;) │ │ block ;; label = @20 │ │ local.get 3 │ │ i32.load8_s offset=27 │ │ @@ -17372,29 +17376,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 4 │ │ i32.ne │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 1 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 7404 │ │ + i32.const 7453 │ │ i32.const 4 │ │ call $invoke_iiiiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ local.get 3 │ │ i32.eqz │ │ local.set 2 │ │ @@ -17438,26 +17442,26 @@ │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ @@ -17487,71 +17491,71 @@ │ │ i32.load offset=76 │ │ local.tee 8 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 5 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@10;) │ │ local.get 8 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ local.get 8 │ │ i32.const 32 │ │ call $invoke_iii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@9;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -17572,15 +17576,15 @@ │ │ drop │ │ local.get 5 │ │ local.get 8 │ │ i32.store offset=76 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 139 │ │ local.get 7 │ │ local.get 1 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ local.tee 2 │ │ @@ -17597,19 +17601,19 @@ │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iiiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 1 │ │ br_if 0 (;@7;) │ │ local.get 0 │ │ @@ -17620,27 +17624,27 @@ │ │ i32.load │ │ i32.add │ │ local.tee 5 │ │ i32.load offset=16 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 140 │ │ local.get 5 │ │ local.get 1 │ │ i32.const 5 │ │ i32.or │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ local.set 5 │ │ @@ -17677,26 +17681,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 5 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 3 │ │ @@ -17708,23 +17712,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 3 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -17779,20 +17783,20 @@ │ │ i32.const 117 │ │ i32.store offset=452 │ │ i32.const 65536 │ │ call $operator_new___unsigned_long_ │ │ local.set 4 │ │ i32.const 1906 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=136 │ │ call_indirect (type 5) │ │ i32.const 1906 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=140 │ │ call_indirect (type 5) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ @@ -17851,51 +17855,51 @@ │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ i32.const 64 │ │ - i32.const 22077 │ │ + i32.const 22380 │ │ local.get 3 │ │ call $snprintf │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 1 (;@14;) │ │ end │ │ local.get 3 │ │ i32.const 448 │ │ i32.add │ │ local.get 7 │ │ call $init_lua_game │ │ local.tee 7 │ │ local.get 5 │ │ local.get 4 │ │ local.get 6 │ │ - i32.const 22744 │ │ + i32.const 23064 │ │ i32.load offset=56 │ │ call_indirect (type 0) │ │ local.get 7 │ │ i32.const 0 │ │ - i32.const 22744 │ │ + i32.const 23064 │ │ i32.load offset=8 │ │ call_indirect (type 1) │ │ local.get 4 │ │ call $dlfree │ │ local.get 7 │ │ call $destroy_lua_game │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=140 │ │ call_indirect (type 5) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ local.get 1 │ │ i32.load offset=304 │ │ local.set 6 │ │ local.get 3 │ │ i32.const 320 │ │ @@ -17988,46 +17992,46 @@ │ │ i32.load offset=280 │ │ local.set 4 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 224 │ │ i32.add │ │ local.get 7 │ │ local.get 4 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@13;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 7 │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 4 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 3 │ │ i32.load offset=240 │ │ local.get 3 │ │ i32.const 240 │ │ i32.add │ │ local.get 3 │ │ @@ -18071,19 +18075,19 @@ │ │ local.get 8 │ │ i32.add │ │ i32.const 240 │ │ local.get 4 │ │ i32.const 0 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@12;) │ │ block ;; label = @15 │ │ local.get 3 │ │ i32.load8_s offset=235 │ │ @@ -18191,49 +18195,49 @@ │ │ i32.load offset=280 │ │ local.set 4 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 192 │ │ i32.add │ │ local.get 7 │ │ local.get 4 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@10;) │ │ end │ │ local.get 1 │ │ i32.load offset=296 │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 7 │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 8 │ │ local.get 1 │ │ i32.load offset=288 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 3 │ │ i32.load offset=208 │ │ local.get 3 │ │ i32.const 208 │ │ i32.add │ │ local.get 3 │ │ @@ -18279,19 +18283,19 @@ │ │ i32.const 1 │ │ i32.shl │ │ i32.const 240 │ │ local.get 4 │ │ i32.const 0 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@9;) │ │ block ;; label = @15 │ │ local.get 3 │ │ i32.load8_s offset=203 │ │ @@ -18319,30 +18323,30 @@ │ │ local.get 6 │ │ i32.sub │ │ i32.const 2 │ │ i32.div_s │ │ local.get 6 │ │ local.get 6 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=132 │ │ call_indirect (type 3) │ │ local.get 3 │ │ local.get 1 │ │ i32.load offset=268 │ │ i32.store offset=16 │ │ local.get 3 │ │ local.get 3 │ │ i32.load offset=252 │ │ i32.store offset=20 │ │ local.get 3 │ │ i32.const 64 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 12764 │ │ + i32.const 13033 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 3 │ │ i32.const 64 │ │ @@ -18431,46 +18435,46 @@ │ │ i32.load offset=280 │ │ local.set 4 │ │ local.get 1 │ │ i32.load offset=276 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ local.get 5 │ │ local.get 4 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 8 (;@7;) │ │ end │ │ local.get 1 │ │ i32.load offset=292 │ │ local.set 4 │ │ local.get 1 │ │ i32.load offset=324 │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=16 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 3 │ │ i32.load offset=48 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ local.get 3 │ │ @@ -18512,19 +18516,19 @@ │ │ select │ │ local.get 1 │ │ i32.const 240 │ │ local.get 4 │ │ i32.const 0 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 8 (;@6;) │ │ block ;; label = @15 │ │ local.get 3 │ │ i32.load8_s offset=43 │ │ @@ -18545,15 +18549,15 @@ │ │ i32.load offset=48 │ │ call $operator_delete_void*_ │ │ end │ │ local.get 0 │ │ i32.const 48 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ call $ButtonHelper::draw_buttons_game_api_callbacks_const*_ │ │ end │ │ local.get 3 │ │ i32.const 608 │ │ i32.add │ │ global.set $__stack_pointer │ │ return │ │ @@ -18816,66 +18820,66 @@ │ │ i32.const 16 │ │ i32.sub │ │ local.tee 6 │ │ global.set $__stack_pointer │ │ local.get 6 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 7689 │ │ + i32.const 91636 │ │ + i32.const 7738 │ │ i32.const 34 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 7 │ │ local.get 7 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 6 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 8 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ local.get 8 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 7 │ │ @@ -19088,30 +19092,30 @@ │ │ i32.load │ │ local.get 2 │ │ i32.load offset=4 │ │ call $std::__2::basic_string__std::__2::allocator_>::__init_copy_ctor_external_char_const*__unsigned_long_ │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 143 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ local.get 5 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_viiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 5 │ │ @@ -19245,30 +19249,30 @@ │ │ i32.load │ │ local.get 2 │ │ i32.load offset=4 │ │ call $std::__2::basic_string__std::__2::allocator_>::__init_copy_ctor_external_char_const*__unsigned_long_ │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 143 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ local.get 5 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_viiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 5 │ │ @@ -19369,87 +19373,87 @@ │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 1 │ │ br_table 1 (;@2;) 0 (;@3;) 2 (;@1;) │ │ end │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23742 align=2 │ │ + i64.load offset=24062 align=2 │ │ i64.store offset=190 align=2 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23736 │ │ + i64.load offset=24056 │ │ i64.store offset=184 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23728 │ │ + i64.load offset=24048 │ │ i64.store offset=176 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.const 22 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=64 │ │ call_indirect (type 1) │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 10128 │ │ + i32.const 91636 │ │ + i32.const 10335 │ │ i32.const 9 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ local.get 3 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@3;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -19484,66 +19488,66 @@ │ │ local.set 4 │ │ i32.const 65536 │ │ call $operator_new___unsigned_long_ │ │ local.set 3 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 17386 │ │ + i32.const 91636 │ │ + i32.const 17689 │ │ i32.const 22 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@3;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -19581,66 +19585,66 @@ │ │ local.tee 7 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 8298 │ │ + i32.const 91636 │ │ + i32.const 8432 │ │ i32.const 35 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ local.get 4 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 4 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -19670,66 +19674,66 @@ │ │ i32.const 0 │ │ local.set 7 │ │ br 1 (;@3;) │ │ end │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 5439 │ │ + i32.const 91636 │ │ + i32.const 5488 │ │ i32.const 28 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 6 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@4;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -19755,66 +19759,66 @@ │ │ drop │ │ local.get 1 │ │ call $std::__2::basic_ostream_>::flush__ │ │ drop │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 17409 │ │ + i32.const 91636 │ │ + i32.const 17712 │ │ i32.const 22 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 6 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@4;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -19875,132 +19879,132 @@ │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 64 │ │ - i32.const 22077 │ │ + i32.const 22380 │ │ local.get 2 │ │ call $snprintf │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 1 (;@4;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=156 │ │ call_indirect (type 11) │ │ i32.const 0 │ │ call $set_game_api │ │ i32.const 0 │ │ - i32.const 2978 │ │ + i32.const 3027 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load │ │ call_indirect (type 1) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ local.get 1 │ │ call $start_lua_game │ │ local.set 6 │ │ local.get 2 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.store offset=16 │ │ - i32.const 22190 │ │ + i32.const 22493 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $iprintf │ │ drop │ │ local.get 6 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load │ │ call_indirect (type 1) │ │ local.get 6 │ │ local.get 4 │ │ local.get 3 │ │ local.get 7 │ │ - i32.const 22744 │ │ + i32.const 23064 │ │ i32.load offset=56 │ │ call_indirect (type 0) │ │ local.get 6 │ │ i32.const 0 │ │ - i32.const 22744 │ │ + i32.const 23064 │ │ i32.load offset=8 │ │ call_indirect (type 1) │ │ end │ │ local.get 1 │ │ i32.const 0 │ │ i32.ne │ │ local.set 7 │ │ end │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 5468 │ │ + i32.const 91636 │ │ + i32.const 5517 │ │ i32.const 26 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.tee 1 │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 4 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@3;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -20033,77 +20037,77 @@ │ │ local.get 7 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const 200 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23688 │ │ + i64.load offset=24008 │ │ i64.store │ │ local.get 2 │ │ i32.const 192 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23680 │ │ + i64.load offset=24000 │ │ i64.store │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23672 │ │ + i64.load offset=23992 │ │ i64.store offset=184 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23664 │ │ + i64.load offset=23984 │ │ i64.store offset=176 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.const 32 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=64 │ │ call_indirect (type 1) │ │ local.get 0 │ │ call $history_browse_state::~history_browse_state__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_ │ │ br 2 (;@1;) │ │ end │ │ local.get 2 │ │ i32.const 200 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=23720 │ │ + i32.load16_u offset=24040 │ │ i32.store16 │ │ local.get 2 │ │ i32.const 192 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=23712 │ │ + i64.load offset=24032 │ │ i64.store │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23704 │ │ + i64.load offset=24024 │ │ i64.store offset=184 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=23696 │ │ + i64.load offset=24016 │ │ i64.store offset=176 │ │ local.get 2 │ │ i32.const 176 │ │ i32.add │ │ i32.const 26 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=68 │ │ call_indirect (type 1) │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ local.get 0 │ │ i32.load offset=272 │ │ local.tee 1 │ │ local.get 0 │ │ i32.const 0 │ │ @@ -20139,15 +20143,15 @@ │ │ i32.gt_s │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.load offset=276 │ │ call $operator_delete_void*_ │ │ end │ │ local.get 0 │ │ - i32.const 23588 │ │ + i32.const 23908 │ │ i32.const 8 │ │ i32.add │ │ i32.store offset=128 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 248 │ │ i32.add │ │ @@ -20222,15 +20226,15 @@ │ │ i32.gt_s │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.load offset=176 │ │ call $operator_delete_void*_ │ │ end │ │ local.get 0 │ │ - i32.const 23492 │ │ + i32.const 23812 │ │ i32.const 8 │ │ i32.add │ │ i32.store offset=16 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 104 │ │ i32.add │ │ @@ -20244,33 +20248,33 @@ │ │ local.get 3 │ │ i32.store │ │ local.get 3 │ │ call $operator_delete_void*_ │ │ end │ │ local.get 0) │ │ (func $get_history_browse_api (type 9) (result i32) │ │ - i32.const 23420) │ │ + i32.const 23740) │ │ (func $MoveSelectState::handle_mousemove_history_browse_state*__int__int__int_ (type 3) (param i32 i32 i32 i32 i32)) │ │ (func $MoveSelectState::handle_mouse_evt_history_browse_state*__int__int__int__int_ (type 12) (param i32 i32 i32 i32 i32 i32)) │ │ (func $MoveSelectState::handle_wheel_changed_history_browse_state*__int__int_ (type 0) (param i32 i32 i32 i32)) │ │ (func $std::length_error::length_error_char_const*_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::logic_error::logic_error_char_const*_ │ │ drop │ │ local.get 0 │ │ - i32.const 74984 │ │ + i32.const 75352 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $update_void*__int_ (type 1) (param i32 i32) │ │ (local i32) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ local.get 0 │ │ i32.load offset=272 │ │ local.tee 2 │ │ local.get 0 │ │ local.get 1 │ │ @@ -20278,82 +20282,82 @@ │ │ i32.load │ │ i32.load │ │ call_indirect (type 2)) │ │ (func $init_lib_game_api_callbacks_const*__char_const*__int_ (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=87984 │ │ - i32.const 23750 │ │ + i32.store offset=88352 │ │ + i32.const 24070 │ │ i32.const 4 │ │ local.get 0 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ - i32.const 23754 │ │ + i32.const 24074 │ │ i32.const 6 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ - i32.const 23760 │ │ + i32.const 24080 │ │ i32.const 11 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ - i32.const 23771 │ │ + i32.const 24091 │ │ i32.const 13 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ - i32.const 23784 │ │ + i32.const 24104 │ │ i32.const 6 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=88 │ │ call_indirect (type 1) │ │ - i32.const 23420 │ │ + i32.const 23740 │ │ call $set_game_api │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=140 │ │ call_indirect (type 5) │ │ i32.const 344 │ │ call $operator_new_unsigned_long_ │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 144 │ │ local.get 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ call $invoke_iiii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.const 276 │ │ i32.add │ │ - i32.const 13806 │ │ - i32.const 17124 │ │ + i32.const 14075 │ │ + i32.const 17427 │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.const 148 │ │ i32.add │ │ i32.load │ │ call $is_dark_mode_game_api_callbacks_const*_ │ │ select │ │ call $std::__2::basic_string__std::__2::allocator_>::__assign_external_char_const*_ │ │ drop │ │ @@ -20412,15 +20416,15 @@ │ │ i32.store16 │ │ local.get 0 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 23492 │ │ + i32.const 23812 │ │ i32.const 8 │ │ i32.add │ │ local.tee 4 │ │ i32.store offset=16 │ │ local.get 0 │ │ i32.const 112 │ │ i32.add │ │ @@ -20438,34 +20442,34 @@ │ │ i32.store │ │ local.get 0 │ │ i32.const 136 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ - i32.const 23588 │ │ + i32.const 23908 │ │ i32.const 8 │ │ i32.add │ │ i32.store offset=128 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 145 │ │ local.get 0 │ │ i32.const 176 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ local.set 2 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ @@ -20502,21 +20506,21 @@ │ │ local.get 0 │ │ i32.const 287 │ │ i32.add │ │ i32.const 7 │ │ i32.store8 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=17124 align=1 │ │ + i32.load offset=17427 align=1 │ │ i32.store offset=276 align=1 │ │ local.get 0 │ │ i32.const 279 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=17127 align=1 │ │ + i32.load offset=17430 align=1 │ │ i32.store align=1 │ │ local.get 0 │ │ i32.const 339 │ │ i32.add │ │ i32.const 7 │ │ i32.store8 │ │ local.get 0 │ │ @@ -20537,21 +20541,21 @@ │ │ local.get 0 │ │ i32.const 283 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=15612 align=1 │ │ + i32.load offset=15915 align=1 │ │ i32.store offset=328 align=1 │ │ local.get 0 │ │ i32.const 331 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=15615 align=1 │ │ + i32.load offset=15918 align=1 │ │ i32.store align=1 │ │ local.get 0 │ │ i32.const 210 │ │ i32.store offset=340 │ │ local.get 0 │ │ i32.const 335 │ │ i32.add │ │ @@ -20612,15 +20616,15 @@ │ │ local.get 3 │ │ i32.load │ │ i32.load offset=16 │ │ call_indirect (type 0)) │ │ (func $handle_key_evt_void*__char_const*__char_const*_ (type 4) (param i32 i32 i32) (result i32) │ │ (local i32) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ local.get 0 │ │ i32.load offset=272 │ │ local.tee 3 │ │ local.get 0 │ │ i32.const 0 │ │ @@ -20696,29 +20700,29 @@ │ │ i32.store8 │ │ local.get 6 │ │ i32.load │ │ i32.load offset=20 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ local.get 0 │ │ local.get 5 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 5 │ │ @@ -20731,15 +20735,15 @@ │ │ call $operator_delete_void*_ │ │ end │ │ block ;; label = @3 │ │ local.get 9 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ - i32.load offset=87984 │ │ + i32.load offset=88352 │ │ i32.load offset=32 │ │ call_indirect (type 11) │ │ local.get 0 │ │ i32.load offset=272 │ │ local.tee 7 │ │ local.get 0 │ │ i32.const 0 │ │ @@ -20879,34 +20883,34 @@ │ │ i32.store8 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=48 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.load │ │ local.get 6 │ │ local.get 6 │ │ i32.load8_s offset=11 │ │ i32.const 0 │ │ i32.lt_s │ │ select │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ block ;; label = @4 │ │ local.get 6 │ │ i32.load8_s offset=11 │ │ @@ -21826,29 +21830,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 9 │ │ i32.ne │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 6 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 9183 │ │ + i32.const 9317 │ │ i32.const 9 │ │ call $invoke_iiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@6;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 7 (;@5;) │ │ @@ -21873,29 +21877,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 8 │ │ i32.ne │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 6 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 11333 │ │ + i32.const 11602 │ │ i32.const 8 │ │ call $invoke_iiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@4;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 1 (;@12;) │ │ @@ -21918,29 +21922,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 11 │ │ i32.ne │ │ br_if 1 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 6 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 7308 │ │ + i32.const 7357 │ │ i32.const 11 │ │ call $invoke_iiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@3;) │ │ local.get 2 │ │ br_if 1 (;@11;) │ │ end │ │ @@ -21975,29 +21979,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 10 │ │ i32.ne │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 6 │ │ i32.const 0 │ │ i32.const -1 │ │ i32.const 2408 │ │ i32.const 10 │ │ call $invoke_iiiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@2;) │ │ local.get 5 │ │ i32.const 1 │ │ i32.lt_s │ │ @@ -22183,15 +22187,15 @@ │ │ i32.const 1 │ │ i32.store8 offset=1 │ │ end) │ │ (func $set_game_handle_void_const*__char_const*_ (type 1) (param i32 i32)) │ │ (func $get_game_id_void_const*__char*__unsigned_long_ (type 2) (param i32 i32 i32)) │ │ (func $create_default_callbacks__ (type 5) (param i32) │ │ local.get 0 │ │ - i32.const 23792 │ │ + i32.const 24112 │ │ i32.const 160 │ │ call $__memcpy │ │ drop) │ │ (func $draw_graphic_char_const*__int__int__int__int__draw_graphic_params_const*_ (type 12) (param i32 i32 i32 i32 i32 i32)) │ │ (func $draw_line_char_const*__int__int__int__int__int_ (type 12) (param i32 i32 i32 i32 i32 i32)) │ │ (func $draw_text_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ (type 13) (param i32 i32 i32 i32 i32 i32 i32 i32)) │ │ (func $draw_rect_char_const*__unsigned_long__int__int__int__int_ (type 12) (param i32 i32 i32 i32 i32 i32)) │ │ @@ -22233,15 +22237,15 @@ │ │ (func $draw_extra_canvas_char_const*__int__int__int__int_ (type 3) (param i32 i32 i32 i32 i32)) │ │ (func $new_extra_canvas_char_const*_ (type 5) (param i32)) │ │ (func $set_active_canvas_char_const*_ (type 5) (param i32)) │ │ (func $delete_extra_canvases__ (type 11)) │ │ (func $get_user_colour_pref_char*__unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ i32.const 0 │ │ call $snprintf) │ │ (func $is_feature_supported_char_const*__unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ i32.const 0) │ │ (func $destroy_all__ (type 11)) │ │ (func $SavedStateDb::SavedStateDb_void*__game_api_callbacks_const*_ (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0 │ │ @@ -22255,23 +22259,23 @@ │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ local.get 0 │ │ - i32.const 12715 │ │ + i32.const 12984 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ call $SavedStateDb::read_uint32_char_const*__unsigned_int*__unsigned_int_ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 7283 │ │ + i32.const 7332 │ │ local.get 0 │ │ i32.const 12 │ │ i32.add │ │ i32.const 0 │ │ call $SavedStateDb::read_uint32_char_const*__unsigned_int*__unsigned_int_ │ │ local.set 3 │ │ block ;; label = @1 │ │ @@ -22303,15 +22307,15 @@ │ │ i32.const 24 │ │ i32.shr_u │ │ i32.or │ │ i32.or │ │ i32.store offset=8 align=1 │ │ local.get 0 │ │ i32.load │ │ - i32.const 12715 │ │ + i32.const 12984 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ i32.const 4 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ @@ -22337,15 +22341,15 @@ │ │ i32.const 24 │ │ i32.shr_u │ │ i32.or │ │ i32.or │ │ i32.store offset=12 align=1 │ │ local.get 0 │ │ i32.load │ │ - i32.const 7283 │ │ + i32.const 7332 │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ i32.const 4 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ @@ -22400,16 +22404,16 @@ │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 6 │ │ i32.store │ │ i32.const 0 │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ - i32.const 19919 │ │ + i32.load offset=60376 │ │ + i32.const 20222 │ │ local.get 4 │ │ call $fiprintf │ │ drop │ │ local.get 4 │ │ i32.const 48 │ │ call $operator_new_unsigned_long_ │ │ local.tee 1 │ │ @@ -22420,53 +22424,53 @@ │ │ local.get 1 │ │ i32.const 0 │ │ i32.store8 offset=36 │ │ local.get 1 │ │ i32.const 32 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=14023 align=1 │ │ + i32.load offset=14292 align=1 │ │ i32.store align=1 │ │ local.get 1 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=14015 align=1 │ │ + i64.load offset=14284 align=1 │ │ i64.store align=1 │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=14007 align=1 │ │ + i64.load offset=14276 align=1 │ │ i64.store align=1 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=13999 align=1 │ │ + i64.load offset=14268 align=1 │ │ i64.store align=1 │ │ local.get 1 │ │ i32.const 0 │ │ - i64.load offset=13991 align=1 │ │ + i64.load offset=14260 align=1 │ │ i64.store align=1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 214 │ │ local.get 0 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load8_s offset=27 │ │ @@ -22531,15 +22535,15 @@ │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 91436 │ │ + i32.const 91804 │ │ local.get 1 │ │ i32.load │ │ local.get 1 │ │ local.get 1 │ │ i32.load8_u offset=11 │ │ local.tee 3 │ │ i32.const 24 │ │ @@ -22562,52 +22566,52 @@ │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 4 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ @@ -22732,15 +22736,15 @@ │ │ i32.const 24 │ │ i32.shr_u │ │ i32.or │ │ i32.or │ │ i32.store offset=224 align=1 │ │ local.get 0 │ │ i32.load │ │ - i32.const 12715 │ │ + i32.const 12984 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 4 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ @@ -22755,15 +22759,15 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=64 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11718 │ │ + i32.const 11987 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 5 │ │ i32.const 224 │ │ @@ -22832,15 +22836,15 @@ │ │ i32.load offset=4 │ │ local.set 9 │ │ local.get 1 │ │ i32.load8_u offset=11 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ local.get 7 │ │ local.get 5 │ │ i32.load offset=128 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ @@ -22862,19 +22866,19 @@ │ │ select │ │ local.get 9 │ │ local.get 6 │ │ local.get 11 │ │ select │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@17;) │ │ local.get 5 │ │ i32.load8_s offset=139 │ │ i32.const -1 │ │ @@ -22890,15 +22894,15 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=48 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 5 │ │ i32.const 224 │ │ @@ -22948,27 +22952,27 @@ │ │ local.get 0 │ │ call $__resumeException │ │ unreachable │ │ end │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ - i32.const 91436 │ │ - i32.const 19689 │ │ + i32.const 91804 │ │ + i32.const 19992 │ │ i32.const 33 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 2 │ │ call $std::__2::basic_ostream_>::operator<<_int_ │ │ - i32.const 16617 │ │ + i32.const 16920 │ │ i32.const 7 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 0 │ │ i32.load offset=12 │ │ call $std::__2::basic_ostream_>::operator<<_unsigned_int_ │ │ - i32.const 16625 │ │ + i32.const 16928 │ │ i32.const 7 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 0 │ │ i32.load offset=8 │ │ call $std::__2::basic_ostream_>::operator<<_unsigned_int_ │ │ local.tee 2 │ │ local.get 2 │ │ @@ -22976,52 +22980,52 @@ │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @16 │ │ block ;; label = @17 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 6 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ local.get 6 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@16;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -23059,47 +23063,47 @@ │ │ local.get 2 │ │ i32.const 0 │ │ i32.store8 offset=30 │ │ local.get 2 │ │ i32.const 22 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=11685 align=1 │ │ + i64.load offset=11954 align=1 │ │ i64.store align=1 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=11679 align=1 │ │ + i64.load offset=11948 align=1 │ │ i64.store align=1 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=11671 align=1 │ │ + i64.load offset=11940 align=1 │ │ i64.store align=1 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=11663 align=1 │ │ + i64.load offset=11932 align=1 │ │ i64.store align=1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 214 │ │ local.get 0 │ │ local.get 5 │ │ i32.const 208 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @16 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@16;) │ │ local.get 5 │ │ i32.load8_s offset=219 │ │ @@ -23147,15 +23151,15 @@ │ │ local.get 10 │ │ local.get 6 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 215 │ │ local.get 0 │ │ local.get 5 │ │ i32.load offset=128 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ @@ -23167,19 +23171,19 @@ │ │ local.get 5 │ │ i32.const 204 │ │ i32.add │ │ i32.const -1 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@11;) │ │ block ;; label = @13 │ │ local.get 5 │ │ i32.load8_s offset=139 │ │ @@ -23223,15 +23227,15 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=32 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 12130 │ │ + i32.const 12399 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 5 │ │ i32.const 224 │ │ @@ -23291,15 +23295,15 @@ │ │ local.get 10 │ │ local.get 6 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 4 │ │ local.get 5 │ │ i32.load offset=112 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ @@ -23310,19 +23314,19 @@ │ │ select │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ local.get 3 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@10;) │ │ block ;; label = @13 │ │ local.get 5 │ │ i32.load8_s offset=123 │ │ @@ -23336,15 +23340,15 @@ │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=16 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ local.get 5 │ │ i32.const 224 │ │ @@ -23440,15 +23444,15 @@ │ │ local.set 4 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 4 │ │ local.get 10 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ local.get 3 │ │ @@ -23457,19 +23461,19 @@ │ │ select │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@9;) │ │ block ;; label = @13 │ │ local.get 5 │ │ i32.load8_s offset=123 │ │ @@ -23479,73 +23483,73 @@ │ │ local.get 5 │ │ i32.load offset=112 │ │ call $operator_delete_void*_ │ │ end │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ - i32.const 91268 │ │ - i32.const 19643 │ │ + i32.const 91636 │ │ + i32.const 19946 │ │ i32.const 33 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 2 │ │ call $std::__2::basic_ostream_>::operator<<_int_ │ │ - i32.const 19802 │ │ + i32.const 20105 │ │ i32.const 10 │ │ call $std::__2::basic_ostream_>&_std::__2::__put_character_sequence_>_std::__2::basic_ostream_>&__char_const*__unsigned_long_ │ │ local.get 6 │ │ call $std::__2::basic_ostream_>::operator<<_unsigned_int_ │ │ local.tee 6 │ │ local.get 6 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 133 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $invoke_iii │ │ local.set 10 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @13 │ │ block ;; label = @14 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@14;) │ │ local.get 10 │ │ i32.load │ │ i32.load offset=28 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ local.get 10 │ │ i32.const 10 │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@13;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -23616,41 +23620,41 @@ │ │ i32.lt_s │ │ select │ │ i32.store │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11603 │ │ + i32.const 11872 │ │ local.get 5 │ │ call $snprintf │ │ drop │ │ block ;; label = @13 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ call $strlen │ │ local.tee 6 │ │ i32.const -16 │ │ i32.lt_u │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 135 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@8;) │ │ unreachable │ │ end │ │ block ;; label = @13 │ │ @@ -23658,30 +23662,30 @@ │ │ block ;; label = @15 │ │ local.get 6 │ │ i32.const 11 │ │ i32.lt_u │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 123 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ i32.const -16 │ │ i32.and │ │ local.tee 3 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@8;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=96 │ │ @@ -23751,15 +23755,15 @@ │ │ local.set 2 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ local.get 6 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ local.get 1 │ │ @@ -23768,19 +23772,19 @@ │ │ select │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ i32.const 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@7;) │ │ block ;; label = @13 │ │ local.get 5 │ │ i32.load8_s offset=107 │ │ @@ -23999,15 +24003,15 @@ │ │ local.set 2 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ local.get 2 │ │ local.get 5 │ │ i32.load offset=16 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ @@ -24016,19 +24020,19 @@ │ │ i32.const 0 │ │ i32.lt_s │ │ select │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 5 │ │ @@ -24157,15 +24161,15 @@ │ │ local.get 2 │ │ local.get 0 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ i32.load offset=16 │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ @@ -24175,19 +24179,19 @@ │ │ i32.lt_s │ │ select │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 5 │ │ @@ -24239,15 +24243,15 @@ │ │ local.get 7 │ │ local.get 1 │ │ i32.store offset=16 │ │ local.get 7 │ │ i32.const 48 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11718 │ │ + i32.const 11987 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -24316,15 +24320,15 @@ │ │ local.set 8 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=108 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ local.get 8 │ │ local.get 7 │ │ i32.load offset=32 │ │ local.get 7 │ │ i32.const 32 │ │ i32.add │ │ @@ -24334,19 +24338,19 @@ │ │ i32.lt_s │ │ select │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ @@ -24373,15 +24377,15 @@ │ │ local.get 7 │ │ local.get 1 │ │ i32.store │ │ local.get 7 │ │ i32.const 48 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 12130 │ │ + i32.const 12399 │ │ local.get 7 │ │ call $snprintf │ │ drop │ │ local.get 7 │ │ i32.const 48 │ │ i32.add │ │ call $strlen │ │ @@ -24446,15 +24450,15 @@ │ │ local.set 8 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=108 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ local.get 8 │ │ local.get 7 │ │ i32.load offset=32 │ │ local.get 7 │ │ i32.const 32 │ │ i32.add │ │ @@ -24464,19 +24468,19 @@ │ │ i32.lt_s │ │ select │ │ local.get 4 │ │ local.get 5 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ local.get 4 │ │ i32.const 0 │ │ local.get 8 │ │ @@ -24562,15 +24566,15 @@ │ │ local.get 2 │ │ local.get 1 │ │ i32.store │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 2 │ │ call $snprintf │ │ drop │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ @@ -24629,15 +24633,15 @@ │ │ local.get 4 │ │ local.get 1 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 0 │ │ i32.store offset=32 │ │ i32.const 215 │ │ local.get 0 │ │ local.get 2 │ │ i32.load offset=16 │ │ @@ -24652,19 +24656,19 @@ │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 0 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ i32.load offset=32 │ │ @@ -24722,15 +24726,15 @@ │ │ local.get 3 │ │ local.get 1 │ │ i32.store offset=16 │ │ local.get 3 │ │ i32.const 48 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ drop │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -24793,15 +24797,15 @@ │ │ local.get 6 │ │ local.get 4 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 215 │ │ local.get 0 │ │ local.get 3 │ │ i32.load offset=32 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ @@ -24813,19 +24817,19 @@ │ │ local.get 3 │ │ i32.const 44 │ │ i32.add │ │ i32.const -1 │ │ call $invoke_iiiii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ @@ -24947,15 +24951,15 @@ │ │ local.get 6 │ │ local.get 4 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ local.get 3 │ │ i32.load offset=32 │ │ local.get 3 │ │ i32.const 32 │ │ i32.add │ │ @@ -24965,19 +24969,19 @@ │ │ i32.lt_s │ │ select │ │ i32.const 0 │ │ i32.const 0 │ │ call $invoke_iiiii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ block ;; label = @6 │ │ local.get 3 │ │ @@ -25042,15 +25046,15 @@ │ │ local.get 5 │ │ local.get 1 │ │ i32.store offset=32 │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 5 │ │ i32.const 32 │ │ i32.add │ │ call $snprintf │ │ drop │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -25114,15 +25118,15 @@ │ │ local.get 8 │ │ local.get 6 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 215 │ │ local.get 0 │ │ local.get 5 │ │ i32.load offset=48 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ @@ -25134,19 +25138,19 @@ │ │ local.get 5 │ │ i32.const 60 │ │ i32.add │ │ i32.const -1 │ │ call $invoke_iiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ @@ -25270,15 +25274,15 @@ │ │ local.get 8 │ │ local.get 6 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ local.get 7 │ │ local.get 5 │ │ i32.load offset=48 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ @@ -25288,19 +25292,19 @@ │ │ i32.lt_s │ │ select │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ block ;; label = @8 │ │ @@ -25316,15 +25320,15 @@ │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11694 │ │ + i32.const 11963 │ │ local.get 5 │ │ call $snprintf │ │ drop │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ call $strlen │ │ @@ -25418,15 +25422,15 @@ │ │ local.set 6 │ │ local.get 0 │ │ i32.load offset=4 │ │ i32.load offset=104 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 6 │ │ local.get 1 │ │ local.get 5 │ │ i32.const 48 │ │ i32.add │ │ local.get 7 │ │ @@ -25435,19 +25439,19 @@ │ │ select │ │ local.get 5 │ │ i32.const 64 │ │ i32.add │ │ i32.const 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 5 │ │ i32.load8_s offset=59 │ │ i32.const -1 │ │ @@ -25527,15 +25531,15 @@ │ │ local.get 2 │ │ local.get 1 │ │ i32.store │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i32.const 128 │ │ - i32.const 11603 │ │ + i32.const 11872 │ │ local.get 2 │ │ call $snprintf │ │ drop │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ @@ -25594,15 +25598,15 @@ │ │ local.get 4 │ │ local.get 1 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 215 │ │ local.get 0 │ │ local.get 2 │ │ i32.load offset=16 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -25614,19 +25618,19 @@ │ │ local.get 2 │ │ i32.const 28 │ │ i32.add │ │ i32.const -1 │ │ call $invoke_iiiii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ @@ -25677,27 +25681,27 @@ │ │ (func $saved_state_db_init (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ i32.const 16 │ │ call $operator_new_unsigned_long_ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 216 │ │ local.get 2 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ call $SavedStateDb::refresh_internal_state__ │ │ @@ -25781,28 +25785,28 @@ │ │ local.get 8 │ │ local.get 6 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 217 │ │ local.get 0 │ │ local.get 5 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_viiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 5 │ │ @@ -25855,39 +25859,39 @@ │ │ call $SavedStateDb::adjust_saved_state_offset_int__int__unsigned_char*__unsigned_long_) │ │ (func $ButtonHelper::ButtonHelper_void*_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ i32.const 9 │ │ i32.store8 offset=11 │ │ local.get 0 │ │ i32.const 0 │ │ - i64.load offset=15602 align=1 │ │ + i64.load offset=15905 align=1 │ │ i64.store align=1 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ i32.const 0 │ │ - i32.load8_u offset=15610 │ │ + i32.load8_u offset=15913 │ │ i32.store8 │ │ local.get 0 │ │ i32.const 23 │ │ i32.add │ │ i32.const 7 │ │ i32.store8 │ │ local.get 0 │ │ i32.const 0 │ │ i32.store8 offset=9 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=17124 align=1 │ │ + i32.load offset=17427 align=1 │ │ i32.store offset=12 align=1 │ │ local.get 0 │ │ i32.const 15 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=17127 align=1 │ │ + i32.load offset=17430 align=1 │ │ i32.store align=1 │ │ local.get 0 │ │ i32.const 80 │ │ i32.add │ │ i32.const 0 │ │ i32.store │ │ local.get 0 │ │ @@ -25952,27 +25956,27 @@ │ │ i32.load offset=4 │ │ local.set 8 │ │ local.get 1 │ │ i32.load │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 124 │ │ local.get 0 │ │ local.get 1 │ │ local.get 8 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ @@ -26053,26 +26057,26 @@ │ │ i32.load offset=4 │ │ local.set 3 │ │ local.get 1 │ │ i32.load │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 2 │ │ local.get 4 │ │ local.get 3 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ end │ │ local.get 2 │ │ local.get 1 │ │ @@ -26236,26 +26240,26 @@ │ │ i32.load offset=4 │ │ local.set 3 │ │ local.get 1 │ │ i32.load │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 134 │ │ local.get 6 │ │ local.get 4 │ │ local.get 3 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@3;) │ │ local.get 0 │ │ i32.load offset=4 │ │ local.set 3 │ │ @@ -26435,15 +26439,15 @@ │ │ call $__resumeException │ │ unreachable │ │ end │ │ local.get 0 │ │ call $std::__2::__vector_base_>::__throw_length_error___const │ │ unreachable │ │ end │ │ - i32.const 9115 │ │ + i32.const 9249 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable) │ │ (func $ButtonHelper::handle_user_pressed_int__int_ (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 48 │ │ i32.sub │ │ @@ -26548,27 +26552,27 @@ │ │ i32.lt_s │ │ br_if 0 (;@4;) │ │ local.get 0 │ │ i32.load offset=68 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.load offset=40 │ │ local.get 4 │ │ local.get 3 │ │ i32.load offset=36 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@2;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 4 │ │ call $getTempRet0 │ │ @@ -26722,15 +26726,15 @@ │ │ i32.load offset=4 │ │ local.set 11 │ │ local.get 0 │ │ i32.load8_s offset=11 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ local.get 10 │ │ local.get 0 │ │ local.get 12 │ │ i32.const 0 │ │ i32.lt_s │ │ local.tee 13 │ │ @@ -26751,19 +26755,19 @@ │ │ i32.load offset=28 │ │ local.tee 13 │ │ local.get 2 │ │ i32.load offset=32 │ │ local.tee 14 │ │ call $invoke_viiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ local.get 1 │ │ i32.load offset=16 │ │ local.set 15 │ │ @@ -26777,15 +26781,15 @@ │ │ i32.load8_u offset=23 │ │ local.set 9 │ │ local.get 0 │ │ i32.load offset=64 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 15 │ │ local.get 2 │ │ i32.load offset=8 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ local.get 2 │ │ @@ -26837,19 +26841,19 @@ │ │ i32.div_s │ │ local.get 10 │ │ i32.add │ │ local.get 11 │ │ i32.const 0 │ │ call $invoke_viiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.load8_s offset=19 │ │ @@ -26998,29 +27002,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 11 │ │ i32.ne │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 2 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 7308 │ │ + i32.const 7357 │ │ i32.const 11 │ │ call $invoke_iiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@4;) │ │ local.get 8 │ │ i32.eqz │ │ br_if 1 (;@10;) │ │ @@ -27043,29 +27047,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 9 │ │ i32.ne │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 2 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 9183 │ │ + i32.const 9317 │ │ i32.const 9 │ │ call $invoke_iiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@3;) │ │ local.get 8 │ │ br_if 1 (;@9;) │ │ local.get 7 │ │ @@ -27111,29 +27115,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 8 │ │ i32.ne │ │ br_if 1 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 2 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.const 11333 │ │ + i32.const 11602 │ │ i32.const 8 │ │ call $invoke_iiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@2;) │ │ local.get 8 │ │ br_if 1 (;@7;) │ │ local.get 1 │ │ @@ -27191,29 +27195,29 @@ │ │ i32.lt_s │ │ select │ │ i32.const 10 │ │ i32.ne │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 136 │ │ local.get 2 │ │ i32.const 0 │ │ i32.const -1 │ │ i32.const 2408 │ │ i32.const 10 │ │ call $invoke_iiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@1;) │ │ local.get 8 │ │ br_if 0 (;@7;) │ │ local.get 1 │ │ @@ -27547,15 +27551,15 @@ │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i64.store offset=1184 │ │ local.get 3 │ │ i32.load offset=1192 │ │ local.set 5 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ call $fopen │ │ local.set 7 │ │ local.get 3 │ │ local.get 7 │ │ @@ -27586,15 +27590,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=1192 │ │ local.set 15 │ │ local.get 3 │ │ local.get 15 │ │ i32.store │ │ - i32.const 20823 │ │ + i32.const 21126 │ │ local.set 16 │ │ local.get 16 │ │ local.get 3 │ │ call $alex_log_err │ │ i32.const 0 │ │ local.set 17 │ │ local.get 3 │ │ @@ -27791,21 +27795,21 @@ │ │ local.get 67 │ │ local.get 68 │ │ i32.and │ │ local.set 69 │ │ block ;; label = @4 │ │ local.get 69 │ │ br_if 0 (;@4;) │ │ - i32.const 16987 │ │ + i32.const 17290 │ │ local.set 70 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 71 │ │ i32.const 218 │ │ local.set 72 │ │ - i32.const 10188 │ │ + i32.const 10395 │ │ local.set 73 │ │ local.get 70 │ │ local.get 71 │ │ local.get 72 │ │ local.get 73 │ │ call $__assert_fail │ │ unreachable │ │ @@ -27828,21 +27832,21 @@ │ │ local.get 78 │ │ local.get 79 │ │ i32.and │ │ local.set 80 │ │ block ;; label = @4 │ │ local.get 80 │ │ br_if 0 (;@4;) │ │ - i32.const 17003 │ │ + i32.const 17306 │ │ local.set 81 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 82 │ │ i32.const 219 │ │ local.set 83 │ │ - i32.const 10188 │ │ + i32.const 10395 │ │ local.set 84 │ │ local.get 81 │ │ local.get 82 │ │ local.get 83 │ │ local.get 84 │ │ call $__assert_fail │ │ unreachable │ │ @@ -28051,21 +28055,21 @@ │ │ local.get 140 │ │ local.get 141 │ │ i32.and │ │ local.set 142 │ │ block ;; label = @5 │ │ local.get 142 │ │ br_if 0 (;@5;) │ │ - i32.const 17018 │ │ + i32.const 17321 │ │ local.set 143 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 144 │ │ i32.const 235 │ │ local.set 145 │ │ - i32.const 10188 │ │ + i32.const 10395 │ │ local.set 146 │ │ local.get 143 │ │ local.get 144 │ │ local.get 145 │ │ local.get 146 │ │ call $__assert_fail │ │ unreachable │ │ @@ -28143,21 +28147,21 @@ │ │ local.get 167 │ │ local.get 168 │ │ i32.and │ │ local.set 169 │ │ block ;; label = @5 │ │ local.get 169 │ │ br_if 0 (;@5;) │ │ - i32.const 16347 │ │ + i32.const 16650 │ │ local.set 170 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 171 │ │ i32.const 243 │ │ local.set 172 │ │ - i32.const 10188 │ │ + i32.const 10395 │ │ local.set 173 │ │ local.get 170 │ │ local.get 171 │ │ local.get 172 │ │ local.get 173 │ │ call $__assert_fail │ │ unreachable │ │ @@ -28181,15 +28185,15 @@ │ │ local.get 177 │ │ local.get 178 │ │ i32.add │ │ local.set 179 │ │ local.get 3 │ │ local.get 179 │ │ i32.store offset=92 │ │ - i32.const 83427 │ │ + i32.const 83795 │ │ local.set 180 │ │ local.get 3 │ │ local.get 180 │ │ i32.store offset=84 │ │ local.get 3 │ │ i32.load offset=84 │ │ local.set 181 │ │ @@ -28432,15 +28436,15 @@ │ │ f64.store │ │ local.get 3 │ │ local.get 232 │ │ i32.store offset=24 │ │ local.get 3 │ │ local.get 231 │ │ i64.store offset=16 │ │ - i32.const 21578 │ │ + i32.const 21881 │ │ local.set 243 │ │ i32.const 16 │ │ local.set 244 │ │ local.get 3 │ │ local.get 244 │ │ i32.add │ │ local.set 245 │ │ @@ -28505,21 +28509,21 @@ │ │ local.get 9 │ │ local.get 10 │ │ i32.and │ │ local.set 11 │ │ block ;; label = @1 │ │ local.get 11 │ │ br_if 0 (;@1;) │ │ - i32.const 16173 │ │ + i32.const 16476 │ │ local.set 12 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 13 │ │ i32.const 48 │ │ local.set 14 │ │ - i32.const 10006 │ │ + i32.const 10140 │ │ local.set 15 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $__assert_fail │ │ unreachable │ │ @@ -28760,21 +28764,21 @@ │ │ local.get 54 │ │ local.get 55 │ │ i32.and │ │ local.set 56 │ │ block ;; label = @3 │ │ local.get 56 │ │ br_if 0 (;@3;) │ │ - i32.const 17139 │ │ + i32.const 17442 │ │ local.set 57 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 58 │ │ i32.const 102 │ │ local.set 59 │ │ - i32.const 4087 │ │ + i32.const 4136 │ │ local.set 60 │ │ local.get 57 │ │ local.get 58 │ │ local.get 59 │ │ local.get 60 │ │ call $__assert_fail │ │ unreachable │ │ @@ -29205,21 +29209,21 @@ │ │ local.get 85 │ │ local.get 86 │ │ i32.and │ │ local.set 87 │ │ block ;; label = @2 │ │ local.get 87 │ │ br_if 0 (;@2;) │ │ - i32.const 18395 │ │ + i32.const 18698 │ │ local.set 88 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 89 │ │ i32.const 85 │ │ local.set 90 │ │ - i32.const 9988 │ │ + i32.const 10122 │ │ local.set 91 │ │ local.get 88 │ │ local.get 89 │ │ local.get 90 │ │ local.get 91 │ │ call $__assert_fail │ │ unreachable │ │ @@ -29249,15 +29253,15 @@ │ │ local.set 97 │ │ local.get 97 │ │ global.set $__stack_pointer │ │ local.get 95 │ │ return) │ │ (func $get_c_dictionary_api (type 9) (result i32) │ │ (local i32) │ │ - i32.const 23952 │ │ + i32.const 24272 │ │ local.set 0 │ │ local.get 0 │ │ return) │ │ (func $dict_is_ready (type 9) (result i32) │ │ (local i32 i32 i32) │ │ i32.const 1 │ │ local.set 0 │ │ @@ -29280,15 +29284,15 @@ │ │ i32.sub │ │ local.set 3 │ │ local.get 3 │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=8 │ │ - i32.const 20866 │ │ + i32.const 21169 │ │ local.set 4 │ │ i32.const 0 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ call $alex_log │ │ i32.const 0 │ │ @@ -29302,15 +29306,15 @@ │ │ local.set 8 │ │ local.get 3 │ │ local.get 8 │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 9 │ │ - i32.const 6855 │ │ + i32.const 6904 │ │ local.set 10 │ │ local.get 9 │ │ local.get 10 │ │ call $strcmp │ │ local.set 11 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -29396,21 +29400,21 @@ │ │ local.get 9 │ │ local.get 10 │ │ i32.and │ │ local.set 11 │ │ block ;; label = @1 │ │ local.get 11 │ │ br_if 0 (;@1;) │ │ - i32.const 16187 │ │ + i32.const 16490 │ │ local.set 12 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 13 │ │ i32.const 376 │ │ local.set 14 │ │ - i32.const 11193 │ │ + i32.const 11462 │ │ local.set 15 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $__assert_fail │ │ unreachable │ │ @@ -29578,21 +29582,21 @@ │ │ local.get 9 │ │ local.get 10 │ │ i32.and │ │ local.set 11 │ │ block ;; label = @1 │ │ local.get 11 │ │ br_if 0 (;@1;) │ │ - i32.const 16187 │ │ + i32.const 16490 │ │ local.set 12 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 13 │ │ i32.const 382 │ │ local.set 14 │ │ - i32.const 5767 │ │ + i32.const 5816 │ │ local.set 15 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $__assert_fail │ │ unreachable │ │ @@ -29652,20 +29656,20 @@ │ │ i32.store offset=76 │ │ local.get 7 │ │ i32.load offset=92 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ i32.store offset=36 │ │ - i32.const 11172 │ │ + i32.const 11441 │ │ local.set 9 │ │ local.get 7 │ │ local.get 9 │ │ i32.store offset=32 │ │ - i32.const 21922 │ │ + i32.const 22225 │ │ local.set 10 │ │ i32.const 32 │ │ local.set 11 │ │ local.get 7 │ │ local.get 11 │ │ i32.add │ │ local.set 12 │ │ @@ -29690,21 +29694,21 @@ │ │ local.get 17 │ │ local.get 18 │ │ i32.and │ │ local.set 19 │ │ block ;; label = @1 │ │ local.get 19 │ │ br_if 0 (;@1;) │ │ - i32.const 16187 │ │ + i32.const 16490 │ │ local.set 20 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 21 │ │ i32.const 497 │ │ local.set 22 │ │ - i32.const 11172 │ │ + i32.const 11441 │ │ local.set 23 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ local.get 23 │ │ call $__assert_fail │ │ unreachable │ │ @@ -29730,15 +29734,15 @@ │ │ i32.store offset=68 │ │ local.get 7 │ │ i32.load offset=68 │ │ local.set 28 │ │ local.get 7 │ │ local.get 28 │ │ i32.store │ │ - i32.const 21225 │ │ + i32.const 21528 │ │ local.set 29 │ │ local.get 29 │ │ local.get 7 │ │ call $alex_log │ │ call $random │ │ local.set 30 │ │ local.get 7 │ │ @@ -29753,15 +29757,15 @@ │ │ i32.store offset=64 │ │ local.get 7 │ │ i32.load offset=64 │ │ local.set 33 │ │ local.get 7 │ │ local.get 33 │ │ i32.store offset=16 │ │ - i32.const 21095 │ │ + i32.const 21398 │ │ local.set 34 │ │ i32.const 16 │ │ local.set 35 │ │ local.get 7 │ │ local.get 35 │ │ i32.add │ │ local.set 36 │ │ @@ -29813,21 +29817,21 @@ │ │ local.get 48 │ │ local.get 49 │ │ i32.and │ │ local.set 50 │ │ block ;; label = @1 │ │ local.get 50 │ │ br_if 0 (;@1;) │ │ - i32.const 16207 │ │ + i32.const 16510 │ │ local.set 51 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 52 │ │ i32.const 511 │ │ local.set 53 │ │ - i32.const 11172 │ │ + i32.const 11441 │ │ local.set 54 │ │ local.get 51 │ │ local.get 52 │ │ local.get 53 │ │ local.get 54 │ │ call $__assert_fail │ │ unreachable │ │ @@ -30257,17 +30261,17 @@ │ │ local.set 55 │ │ local.get 6 │ │ local.get 55 │ │ i32.store offset=44 │ │ br 0 (;@2;) │ │ end │ │ end │ │ - i32.const 9638 │ │ + i32.const 9772 │ │ local.set 56 │ │ - i32.const 13814 │ │ + i32.const 14083 │ │ local.set 57 │ │ i32.const 489 │ │ local.set 58 │ │ i32.const 1725 │ │ local.set 59 │ │ local.get 56 │ │ local.get 57 │ │ @@ -33445,15 +33449,15 @@ │ │ local.set 5 │ │ i32.const 1 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.add │ │ local.set 7 │ │ - i32.const 26736 │ │ + i32.const 27056 │ │ local.set 8 │ │ i32.const 2 │ │ local.set 9 │ │ local.get 7 │ │ local.get 9 │ │ i32.shl │ │ local.set 10 │ │ @@ -36115,15 +36119,15 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 6 │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 7 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ call $luaS_new │ │ local.set 9 │ │ local.get 9 │ │ local.set 10 │ │ @@ -42247,15 +42251,15 @@ │ │ local.get 12 │ │ local.get 13 │ │ i32.and │ │ local.set 14 │ │ block ;; label = @1 │ │ local.get 14 │ │ br_if 0 (;@1;) │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 15 │ │ local.get 7 │ │ local.get 15 │ │ i32.store offset=48 │ │ end │ │ local.get 7 │ │ i32.load offset=60 │ │ @@ -44010,15 +44014,15 @@ │ │ local.set 15 │ │ local.get 4 │ │ local.get 15 │ │ i32.store offset=4 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 16 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 17 │ │ i32.const 0 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaS_newlstr │ │ @@ -44856,15 +44860,15 @@ │ │ local.get 6 │ │ i32.load offset=28 │ │ local.set 48 │ │ local.get 48 │ │ local.get 47 │ │ i32.store │ │ end │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 49 │ │ local.get 6 │ │ local.get 49 │ │ i32.store offset=44 │ │ br 2 (;@1;) │ │ end │ │ local.get 6 │ │ @@ -45076,15 +45080,15 @@ │ │ i32.and │ │ local.set 110 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 110 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - i32.const 18227 │ │ + i32.const 18530 │ │ local.set 111 │ │ local.get 111 │ │ local.set 112 │ │ br 1 (;@3;) │ │ end │ │ local.get 6 │ │ i32.load offset=16 │ │ @@ -45761,15 +45765,15 @@ │ │ i32.add │ │ local.set 45 │ │ local.get 6 │ │ local.get 45 │ │ i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 23976 │ │ + i32.const 24296 │ │ local.set 46 │ │ local.get 6 │ │ local.get 46 │ │ i32.store offset=28 │ │ end │ │ local.get 6 │ │ i32.load offset=28 │ │ @@ -46151,15 +46155,15 @@ │ │ local.set 60 │ │ local.get 6 │ │ local.get 60 │ │ i32.add │ │ local.set 61 │ │ local.get 61 │ │ local.set 62 │ │ - i32.const 16648 │ │ + i32.const 16951 │ │ local.set 63 │ │ local.get 62 │ │ local.get 63 │ │ call $luaL_addstring │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ local.get 6 │ │ @@ -46239,15 +46243,15 @@ │ │ local.set 82 │ │ local.get 6 │ │ i32.load offset=52 │ │ local.set 83 │ │ local.get 6 │ │ local.get 83 │ │ i32.store │ │ - i32.const 17505 │ │ + i32.const 17808 │ │ local.set 84 │ │ local.get 82 │ │ local.get 84 │ │ local.get 6 │ │ call $lua_pushfstring │ │ drop │ │ i32.const 176 │ │ @@ -46333,15 +46337,15 @@ │ │ local.get 106 │ │ local.get 107 │ │ i32.add │ │ local.set 108 │ │ local.get 6 │ │ local.get 108 │ │ i32.store offset=16 │ │ - i32.const 19620 │ │ + i32.const 19923 │ │ local.set 109 │ │ i32.const 16 │ │ local.set 110 │ │ local.get 6 │ │ local.get 110 │ │ i32.add │ │ local.set 111 │ │ @@ -46374,15 +46378,15 @@ │ │ local.set 118 │ │ local.get 6 │ │ local.get 118 │ │ i32.store offset=36 │ │ local.get 6 │ │ local.get 117 │ │ i32.store offset=32 │ │ - i32.const 19630 │ │ + i32.const 19933 │ │ local.set 119 │ │ i32.const 32 │ │ local.set 120 │ │ local.get 6 │ │ local.get 120 │ │ i32.add │ │ local.set 121 │ │ @@ -46461,15 +46465,15 @@ │ │ local.set 141 │ │ local.get 6 │ │ local.get 141 │ │ i32.add │ │ local.set 142 │ │ local.get 142 │ │ local.set 143 │ │ - i32.const 18471 │ │ + i32.const 18774 │ │ local.set 144 │ │ local.get 143 │ │ local.get 144 │ │ call $luaL_addstring │ │ end │ │ end │ │ br 0 (;@2;) │ │ @@ -46996,15 +47000,15 @@ │ │ local.get 10 │ │ local.get 11 │ │ call $lua_tolstring │ │ local.set 12 │ │ local.get 4 │ │ local.get 12 │ │ i32.store │ │ - i32.const 18896 │ │ + i32.const 19199 │ │ local.set 13 │ │ local.get 8 │ │ local.get 13 │ │ local.get 4 │ │ call $lua_pushfstring │ │ drop │ │ local.get 4 │ │ @@ -47069,15 +47073,15 @@ │ │ local.set 29 │ │ local.get 4 │ │ local.get 29 │ │ i32.store offset=20 │ │ local.get 4 │ │ local.get 27 │ │ i32.store offset=16 │ │ - i32.const 18868 │ │ + i32.const 19171 │ │ local.set 30 │ │ i32.const 16 │ │ local.set 31 │ │ local.get 4 │ │ local.get 31 │ │ i32.add │ │ local.set 32 │ │ @@ -47127,15 +47131,15 @@ │ │ block ;; label = @4 │ │ local.get 44 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 45 │ │ - i32.const 7458 │ │ + i32.const 7507 │ │ local.set 46 │ │ local.get 45 │ │ local.get 46 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@3;) │ │ end │ │ @@ -47199,15 +47203,15 @@ │ │ local.set 64 │ │ local.get 4 │ │ local.get 64 │ │ i32.store offset=36 │ │ local.get 4 │ │ local.get 62 │ │ i32.store offset=32 │ │ - i32.const 16594 │ │ + i32.const 16897 │ │ local.set 65 │ │ i32.const 32 │ │ local.set 66 │ │ local.get 4 │ │ local.get 66 │ │ i32.add │ │ local.set 67 │ │ @@ -47217,15 +47221,15 @@ │ │ call $lua_pushfstring │ │ drop │ │ br 1 (;@4;) │ │ end │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 68 │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 69 │ │ local.get 68 │ │ local.get 69 │ │ call $lua_pushstring │ │ drop │ │ end │ │ end │ │ @@ -47782,27 +47786,27 @@ │ │ i32.store offset=16 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 7 │ │ local.get 4 │ │ i32.load offset=20 │ │ local.set 8 │ │ - i32.const 9003 │ │ + i32.const 9137 │ │ local.set 9 │ │ local.get 7 │ │ local.get 9 │ │ local.get 8 │ │ call $lua_getinfo │ │ drop │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 10 │ │ i32.const -1001000 │ │ local.set 11 │ │ - i32.const 16394 │ │ + i32.const 16697 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $lua_getfield │ │ drop │ │ local.get 4 │ │ @@ -47843,15 +47847,15 @@ │ │ local.set 22 │ │ local.get 4 │ │ local.get 22 │ │ i32.store offset=12 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 23 │ │ - i32.const 17366 │ │ + i32.const 17669 │ │ local.set 24 │ │ i32.const 3 │ │ local.set 25 │ │ local.get 23 │ │ local.get 24 │ │ local.get 25 │ │ call $strncmp │ │ @@ -48017,15 +48021,15 @@ │ │ local.set 14 │ │ local.get 5 │ │ local.get 14 │ │ i32.store offset=36 │ │ local.get 5 │ │ local.get 13 │ │ i32.store offset=32 │ │ - i32.const 17609 │ │ + i32.const 17912 │ │ local.set 15 │ │ i32.const 32 │ │ local.set 16 │ │ local.get 5 │ │ local.get 16 │ │ i32.add │ │ local.set 17 │ │ @@ -48038,15 +48042,15 @@ │ │ local.get 18 │ │ i32.store offset=172 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=168 │ │ local.set 19 │ │ - i32.const 6880 │ │ + i32.const 6929 │ │ local.set 20 │ │ i32.const 48 │ │ local.set 21 │ │ local.get 5 │ │ local.get 21 │ │ i32.add │ │ local.set 22 │ │ @@ -48056,15 +48060,15 @@ │ │ local.get 20 │ │ local.get 23 │ │ call $lua_getinfo │ │ drop │ │ local.get 5 │ │ i32.load offset=56 │ │ local.set 24 │ │ - i32.const 11254 │ │ + i32.const 11523 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ call $strcmp │ │ local.set 26 │ │ block ;; label = @2 │ │ local.get 26 │ │ @@ -48098,15 +48102,15 @@ │ │ local.set 33 │ │ local.get 5 │ │ local.get 33 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 32 │ │ i32.store │ │ - i32.const 17579 │ │ + i32.const 17882 │ │ local.set 34 │ │ local.get 31 │ │ local.get 34 │ │ local.get 5 │ │ call $luaL_error │ │ local.set 35 │ │ local.get 5 │ │ @@ -48170,15 +48174,15 @@ │ │ local.get 50 │ │ call $lua_tolstring │ │ local.set 51 │ │ local.get 51 │ │ local.set 52 │ │ br 1 (;@3;) │ │ end │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 53 │ │ local.get 53 │ │ local.set 52 │ │ end │ │ local.get 52 │ │ local.set 54 │ │ local.get 5 │ │ @@ -48202,15 +48206,15 @@ │ │ i32.store offset=24 │ │ local.get 5 │ │ local.get 57 │ │ i32.store offset=20 │ │ local.get 5 │ │ local.get 56 │ │ i32.store offset=16 │ │ - i32.const 17814 │ │ + i32.const 18117 │ │ local.set 59 │ │ i32.const 16 │ │ local.set 60 │ │ local.get 5 │ │ local.get 60 │ │ i32.add │ │ local.set 61 │ │ @@ -48360,15 +48364,15 @@ │ │ block ;; label = @2 │ │ local.get 10 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=124 │ │ local.set 11 │ │ - i32.const 7401 │ │ + i32.const 7450 │ │ local.set 12 │ │ i32.const 8 │ │ local.set 13 │ │ local.get 4 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ @@ -48424,28 +48428,28 @@ │ │ local.set 29 │ │ local.get 4 │ │ local.get 29 │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 28 │ │ i32.store │ │ - i32.const 19813 │ │ + i32.const 20116 │ │ local.set 30 │ │ local.get 23 │ │ local.get 30 │ │ local.get 4 │ │ call $lua_pushfstring │ │ drop │ │ br 2 (;@1;) │ │ end │ │ end │ │ local.get 4 │ │ i32.load offset=124 │ │ local.set 31 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 32 │ │ i32.const 0 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $lua_pushfstring │ │ @@ -48628,15 +48632,15 @@ │ │ block ;; label = @5 │ │ local.get 42 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 43 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ local.set 44 │ │ local.get 43 │ │ local.get 44 │ │ call $lua_pushstring │ │ drop │ │ local.get 5 │ │ i32.load offset=8 │ │ @@ -48726,15 +48730,15 @@ │ │ i32.store offset=20 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 6 │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 7 │ │ - i32.const 10097 │ │ + i32.const 10282 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_getmetafield │ │ local.set 9 │ │ i32.const 4 │ │ @@ -48802,15 +48806,15 @@ │ │ i32.and │ │ local.set 28 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 28 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - i32.const 15529 │ │ + i32.const 15798 │ │ local.set 29 │ │ local.get 5 │ │ local.get 29 │ │ i32.store offset=12 │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ @@ -48846,15 +48850,15 @@ │ │ local.set 37 │ │ local.get 5 │ │ local.get 37 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 36 │ │ i32.store │ │ - i32.const 4418 │ │ + i32.const 4467 │ │ local.set 38 │ │ local.get 35 │ │ local.get 38 │ │ local.get 5 │ │ call $lua_pushfstring │ │ local.set 39 │ │ local.get 5 │ │ @@ -49100,15 +49104,15 @@ │ │ local.set 23 │ │ local.get 5 │ │ local.get 23 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 21 │ │ i32.store │ │ - i32.const 4548 │ │ + i32.const 4597 │ │ local.set 24 │ │ local.get 20 │ │ local.get 24 │ │ local.get 5 │ │ call $lua_pushfstring │ │ drop │ │ br 1 (;@2;) │ │ @@ -49205,15 +49209,15 @@ │ │ call $luaL_fileresult │ │ local.set 10 │ │ local.get 4 │ │ local.get 10 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 2939 │ │ + i32.const 2988 │ │ local.set 11 │ │ local.get 4 │ │ local.get 11 │ │ i32.store │ │ local.get 4 │ │ i32.load │ │ local.set 12 │ │ @@ -49388,15 +49392,15 @@ │ │ call $lua_pushstring │ │ drop │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 17 │ │ i32.const -2 │ │ local.set 18 │ │ - i32.const 10097 │ │ + i32.const 10282 │ │ local.set 19 │ │ local.get 17 │ │ local.get 18 │ │ local.get 19 │ │ call $lua_setfield │ │ local.get 4 │ │ i32.load offset=8 │ │ @@ -49933,15 +49937,15 @@ │ │ local.set 52 │ │ local.get 6 │ │ i32.load offset=8 │ │ local.set 53 │ │ local.get 6 │ │ local.get 53 │ │ i32.store │ │ - i32.const 18876 │ │ + i32.const 19179 │ │ local.set 54 │ │ local.get 52 │ │ local.get 54 │ │ local.get 6 │ │ call $lua_pushfstring │ │ local.set 55 │ │ local.get 50 │ │ @@ -50361,15 +50365,15 @@ │ │ local.set 24 │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 25 │ │ local.get 5 │ │ local.get 25 │ │ i32.store │ │ - i32.const 17532 │ │ + i32.const 17835 │ │ local.set 26 │ │ local.get 24 │ │ local.get 26 │ │ local.get 5 │ │ call $luaL_error │ │ drop │ │ br 1 (;@2;) │ │ @@ -50522,15 +50526,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 14 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 15 │ │ - i32.const 12060 │ │ + i32.const 12329 │ │ local.set 16 │ │ local.get 14 │ │ local.get 15 │ │ local.get 16 │ │ call $luaL_argerror │ │ drop │ │ end │ │ @@ -50849,15 +50853,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 8 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 9 │ │ - i32.const 6452 │ │ + i32.const 6501 │ │ local.set 10 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ call $luaL_argerror │ │ drop │ │ br 1 (;@1;) │ │ @@ -51043,15 +51047,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 21 │ │ local.get 21 │ │ i32.load offset=12 │ │ local.set 22 │ │ - i32.const 10795 │ │ + i32.const 11064 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaL_error │ │ @@ -51362,28 +51366,28 @@ │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ - i32.const 17466 │ │ + i32.const 17769 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ call $luaL_newmetatable │ │ local.set 14 │ │ block ;; label = @1 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 15 │ │ - i32.const 23984 │ │ + i32.const 24304 │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ call $luaL_setfuncs │ │ @@ -51567,24 +51571,24 @@ │ │ block ;; label = @3 │ │ local.get 16 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=1064 │ │ local.set 17 │ │ - i32.const 6815 │ │ + i32.const 6864 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ call $lua_pushstring │ │ drop │ │ i32.const 0 │ │ local.set 19 │ │ local.get 19 │ │ - i32.load offset=60012 │ │ + i32.load offset=60380 │ │ local.set 20 │ │ local.get 5 │ │ local.get 20 │ │ i32.store offset=28 │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ @@ -51592,25 +51596,25 @@ │ │ local.set 21 │ │ local.get 5 │ │ i32.load offset=1060 │ │ local.set 22 │ │ local.get 5 │ │ local.get 22 │ │ i32.store │ │ - i32.const 4379 │ │ + i32.const 4428 │ │ local.set 23 │ │ local.get 21 │ │ local.get 23 │ │ local.get 5 │ │ call $lua_pushfstring │ │ drop │ │ local.get 5 │ │ i32.load offset=1060 │ │ local.set 24 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ call $fopen │ │ local.set 26 │ │ local.get 5 │ │ local.get 26 │ │ @@ -51640,15 +51644,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=1064 │ │ local.set 34 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 35 │ │ - i32.const 6835 │ │ + i32.const 6884 │ │ local.set 36 │ │ local.get 34 │ │ local.get 36 │ │ local.get 35 │ │ call $errfile │ │ local.set 37 │ │ local.get 5 │ │ @@ -51719,15 +51723,15 @@ │ │ end │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 54 │ │ i32.const 0 │ │ local.set 55 │ │ local.get 55 │ │ - i32.load8_u offset=15524 │ │ + i32.load8_u offset=15793 │ │ local.set 56 │ │ i32.const 24 │ │ local.set 57 │ │ local.get 56 │ │ local.get 57 │ │ i32.shl │ │ local.set 58 │ │ @@ -51783,15 +51787,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=1060 │ │ local.set 73 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 74 │ │ - i32.const 13971 │ │ + i32.const 14240 │ │ local.set 75 │ │ local.get 73 │ │ local.get 75 │ │ local.get 74 │ │ call $freopen │ │ local.set 76 │ │ local.get 5 │ │ @@ -51822,15 +51826,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=1064 │ │ local.set 84 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 85 │ │ - i32.const 6833 │ │ + i32.const 6882 │ │ local.set 86 │ │ local.get 84 │ │ local.get 86 │ │ local.get 85 │ │ call $errfile │ │ local.set 87 │ │ local.get 5 │ │ @@ -52010,15 +52014,15 @@ │ │ call $lua_settop │ │ local.get 5 │ │ i32.load offset=1064 │ │ local.set 133 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 134 │ │ - i32.const 12710 │ │ + i32.const 12979 │ │ local.set 135 │ │ local.get 133 │ │ local.get 135 │ │ local.get 134 │ │ call $errfile │ │ local.set 136 │ │ local.get 5 │ │ @@ -52137,15 +52141,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 17 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 16 │ │ i32.store │ │ - i32.const 4538 │ │ + i32.const 4587 │ │ local.set 19 │ │ local.get 15 │ │ local.get 19 │ │ local.get 5 │ │ call $lua_pushfstring │ │ drop │ │ local.get 5 │ │ @@ -52997,15 +53001,15 @@ │ │ block ;; label = @1 │ │ local.get 21 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 22 │ │ - i32.const 5250 │ │ + i32.const 5299 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaL_error │ │ @@ -53068,15 +53072,15 @@ │ │ i32.store offset=56 │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 9 │ │ local.get 5 │ │ i32.load offset=56 │ │ local.set 10 │ │ - i32.const 8334 │ │ + i32.const 8468 │ │ local.set 11 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $luaL_callmeta │ │ local.set 12 │ │ block ;; label = @1 │ │ @@ -53095,15 +53099,15 @@ │ │ local.set 15 │ │ block ;; label = @3 │ │ local.get 15 │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 16 │ │ - i32.const 8705 │ │ + i32.const 8839 │ │ local.set 17 │ │ i32.const 0 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_error │ │ @@ -53166,15 +53170,15 @@ │ │ local.get 28 │ │ local.get 29 │ │ call $lua_tointegerx │ │ local.set 30 │ │ local.get 5 │ │ local.get 30 │ │ i64.store offset=16 │ │ - i32.const 16237 │ │ + i32.const 16540 │ │ local.set 31 │ │ i32.const 16 │ │ local.set 32 │ │ local.get 5 │ │ local.get 32 │ │ i32.add │ │ local.set 33 │ │ @@ -53200,15 +53204,15 @@ │ │ local.get 36 │ │ local.get 37 │ │ call $lua_tonumberx │ │ local.set 38 │ │ local.get 5 │ │ local.get 38 │ │ f64.store offset=32 │ │ - i32.const 9002 │ │ + i32.const 9136 │ │ local.set 39 │ │ i32.const 32 │ │ local.set 40 │ │ local.get 5 │ │ local.get 40 │ │ i32.add │ │ local.set 41 │ │ @@ -53240,17 +53244,17 @@ │ │ local.get 5 │ │ i32.load offset=56 │ │ local.set 46 │ │ local.get 45 │ │ local.get 46 │ │ call $lua_toboolean │ │ local.set 47 │ │ - i32.const 9323 │ │ + i32.const 9457 │ │ local.set 48 │ │ - i32.const 9638 │ │ + i32.const 9772 │ │ local.set 49 │ │ local.get 48 │ │ local.get 49 │ │ local.get 47 │ │ select │ │ local.set 50 │ │ local.get 44 │ │ @@ -53258,29 +53262,29 @@ │ │ call $lua_pushstring │ │ drop │ │ br 2 (;@2;) │ │ end │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 51 │ │ - i32.const 7264 │ │ + i32.const 7313 │ │ local.set 52 │ │ local.get 51 │ │ local.get 52 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 53 │ │ local.get 5 │ │ i32.load offset=56 │ │ local.set 54 │ │ - i32.const 10097 │ │ + i32.const 10282 │ │ local.set 55 │ │ local.get 53 │ │ local.get 54 │ │ local.get 55 │ │ call $luaL_getmetafield │ │ local.set 56 │ │ local.get 5 │ │ @@ -53369,15 +53373,15 @@ │ │ local.set 79 │ │ local.get 5 │ │ local.get 79 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 76 │ │ i32.store │ │ - i32.const 5973 │ │ + i32.const 6022 │ │ local.set 80 │ │ local.get 75 │ │ local.get 80 │ │ local.get 5 │ │ call $lua_pushfstring │ │ drop │ │ local.get 5 │ │ @@ -53455,15 +53459,15 @@ │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 6 │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 7 │ │ - i32.const 3910 │ │ + i32.const 3959 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_checkstack │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ @@ -53837,15 +53841,15 @@ │ │ local.get 3 │ │ i32.store │ │ local.get 6 │ │ i32.load offset=12 │ │ local.set 7 │ │ i32.const -1001000 │ │ local.set 8 │ │ - i32.const 16394 │ │ + i32.const 16697 │ │ local.set 9 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_getsubtable │ │ drop │ │ local.get 6 │ │ @@ -54394,42 +54398,42 @@ │ │ local.get 13 │ │ i32.and │ │ local.set 14 │ │ block ;; label = @1 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 8639 │ │ + i32.const 8773 │ │ local.set 15 │ │ local.get 3 │ │ local.get 15 │ │ i32.store offset=8 │ │ end │ │ i32.const 0 │ │ local.set 16 │ │ local.get 16 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 17 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 18 │ │ local.get 3 │ │ local.get 18 │ │ i32.store │ │ - i32.const 21872 │ │ + i32.const 22175 │ │ local.set 19 │ │ local.get 17 │ │ local.get 19 │ │ local.get 3 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 20 │ │ local.get 20 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 21 │ │ local.get 21 │ │ call $fflush │ │ drop │ │ i32.const 0 │ │ local.set 22 │ │ i32.const 16 │ │ @@ -54566,15 +54570,15 @@ │ │ local.get 20 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 21 │ │ - i32.const 8911 │ │ + i32.const 9045 │ │ local.set 22 │ │ local.get 21 │ │ local.get 22 │ │ call $strcmp │ │ local.set 23 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ @@ -54593,15 +54597,15 @@ │ │ local.get 25 │ │ call $lua_setwarnf │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 27 │ │ - i32.const 6791 │ │ + i32.const 6840 │ │ local.set 28 │ │ local.get 27 │ │ local.get 28 │ │ call $strcmp │ │ local.set 29 │ │ block ;; label = @3 │ │ local.get 29 │ │ @@ -54692,15 +54696,15 @@ │ │ block ;; label = @2 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=44 │ │ local.set 15 │ │ - i32.const 4001 │ │ + i32.const 4050 │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ call $luaL_error │ │ @@ -54738,15 +54742,15 @@ │ │ local.set 25 │ │ local.get 5 │ │ local.get 25 │ │ f64.store offset=8 │ │ local.get 5 │ │ local.get 24 │ │ f64.store │ │ - i32.const 8951 │ │ + i32.const 9085 │ │ local.set 26 │ │ local.get 23 │ │ local.get 26 │ │ local.get 5 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -54840,32 +54844,32 @@ │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 10 │ │ local.get 10 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 11 │ │ - i32.const 19754 │ │ + i32.const 20057 │ │ local.set 12 │ │ local.get 5 │ │ local.get 12 │ │ i32.store │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 13 │ │ local.get 11 │ │ local.get 13 │ │ local.get 5 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 14 │ │ local.get 14 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 15 │ │ local.get 15 │ │ call $fflush │ │ drop │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 16 │ │ @@ -54915,23 +54919,23 @@ │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.store offset=32 │ │ i32.const 0 │ │ local.set 7 │ │ local.get 7 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 8 │ │ local.get 5 │ │ i32.load offset=40 │ │ local.set 9 │ │ local.get 5 │ │ local.get 9 │ │ i32.store offset=16 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 10 │ │ i32.const 16 │ │ local.set 11 │ │ local.get 5 │ │ local.get 11 │ │ i32.add │ │ local.set 12 │ │ @@ -54939,15 +54943,15 @@ │ │ local.get 10 │ │ local.get 12 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 13 │ │ local.get 13 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 14 │ │ local.get 14 │ │ call $fflush │ │ drop │ │ local.get 5 │ │ i32.load offset=36 │ │ local.set 15 │ │ @@ -54969,32 +54973,32 @@ │ │ local.get 17 │ │ call $lua_setwarnf │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 19 │ │ local.get 19 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 20 │ │ - i32.const 22644 │ │ + i32.const 22947 │ │ local.set 21 │ │ local.get 5 │ │ local.get 21 │ │ i32.store │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 22 │ │ local.get 20 │ │ local.get 22 │ │ local.get 5 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 23 │ │ local.get 23 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 24 │ │ local.get 24 │ │ call $fflush │ │ drop │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 25 │ │ @@ -56247,17 +56251,17 @@ │ │ local.set 86 │ │ i32.const -1 │ │ local.set 87 │ │ local.get 86 │ │ local.get 87 │ │ i32.xor │ │ local.set 88 │ │ - i32.const 17479 │ │ + i32.const 17782 │ │ local.set 89 │ │ - i32.const 17491 │ │ + i32.const 17794 │ │ local.set 90 │ │ i32.const 1 │ │ local.set 91 │ │ local.get 88 │ │ local.get 91 │ │ i32.and │ │ local.set 92 │ │ @@ -56505,15 +56509,15 @@ │ │ local.set 45 │ │ local.get 5 │ │ i32.load offset=16 │ │ local.set 46 │ │ local.get 46 │ │ local.get 45 │ │ i32.store │ │ - i32.const 18137 │ │ + i32.const 18440 │ │ local.set 47 │ │ local.get 5 │ │ local.get 47 │ │ i32.store offset=28 │ │ br 2 (;@1;) │ │ end │ │ end │ │ @@ -57806,15 +57810,15 @@ │ │ block ;; label = @7 │ │ local.get 120 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 121 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 122 │ │ local.get 121 │ │ local.get 122 │ │ i32.store offset=8 │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 123 │ │ @@ -58366,15 +58370,15 @@ │ │ local.get 21 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 22 │ │ - i32.const 15665 │ │ + i32.const 15968 │ │ local.set 23 │ │ local.get 22 │ │ local.get 23 │ │ i32.store offset=16 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 24 │ │ @@ -58398,15 +58402,15 @@ │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ i32.store offset=32 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 30 │ │ - i32.const 16411 │ │ + i32.const 16714 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ @@ -58539,15 +58543,15 @@ │ │ local.get 67 │ │ i32.store offset=20 │ │ br 1 (;@2;) │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 69 │ │ - i32.const 16550 │ │ + i32.const 16853 │ │ local.set 70 │ │ local.get 69 │ │ local.get 70 │ │ i32.store offset=16 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 71 │ │ @@ -58583,17 +58587,17 @@ │ │ i32.store offset=32 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 79 │ │ local.get 79 │ │ i32.load offset=28 │ │ local.set 80 │ │ - i32.const 6822 │ │ + i32.const 6871 │ │ local.set 81 │ │ - i32.const 15525 │ │ + i32.const 15794 │ │ local.set 82 │ │ local.get 82 │ │ local.get 81 │ │ local.get 80 │ │ select │ │ local.set 83 │ │ local.get 4 │ │ @@ -59226,15 +59230,15 @@ │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 12 │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 11 │ │ i32.store │ │ - i32.const 4341 │ │ + i32.const 4390 │ │ local.set 14 │ │ local.get 10 │ │ local.get 14 │ │ local.get 6 │ │ call $luaG_runerror │ │ unreachable) │ │ (func $luaG_runerror (type 2) (param i32 i32 i32) │ │ @@ -59602,15 +59606,15 @@ │ │ local.set 38 │ │ local.get 5 │ │ i32.load offset=16 │ │ local.set 39 │ │ local.get 39 │ │ local.get 38 │ │ i32.store │ │ - i32.const 9373 │ │ + i32.const 9507 │ │ local.set 40 │ │ local.get 5 │ │ local.get 40 │ │ i32.store offset=28 │ │ br 3 (;@1;) │ │ end │ │ local.get 5 │ │ @@ -59869,15 +59873,15 @@ │ │ i32.and │ │ local.set 21 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 21 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 7388 │ │ + i32.const 7437 │ │ local.set 22 │ │ local.get 6 │ │ local.get 22 │ │ i32.store offset=60 │ │ br 1 (;@1;) │ │ end │ │ local.get 6 │ │ @@ -60172,15 +60176,15 @@ │ │ i32.load offset=44 │ │ local.set 94 │ │ i32.const 1689 │ │ local.set 95 │ │ local.get 94 │ │ local.get 95 │ │ i32.store │ │ - i32.const 11477 │ │ + i32.const 11746 │ │ local.set 96 │ │ local.get 6 │ │ local.get 96 │ │ i32.store offset=60 │ │ br 7 (;@1;) │ │ end │ │ local.get 6 │ │ @@ -60260,15 +60264,15 @@ │ │ local.set 116 │ │ local.get 6 │ │ i32.load offset=44 │ │ local.set 117 │ │ local.get 117 │ │ local.get 116 │ │ i32.store │ │ - i32.const 9373 │ │ + i32.const 9507 │ │ local.set 118 │ │ local.get 6 │ │ local.get 118 │ │ i32.store offset=60 │ │ br 5 (;@1;) │ │ end │ │ local.get 6 │ │ @@ -60446,15 +60450,15 @@ │ │ local.set 171 │ │ local.get 6 │ │ i32.load offset=44 │ │ local.set 172 │ │ local.get 172 │ │ local.get 171 │ │ i32.store │ │ - i32.const 2921 │ │ + i32.const 2970 │ │ local.set 173 │ │ local.get 6 │ │ local.get 173 │ │ i32.store offset=60 │ │ br 5 (;@1;) │ │ end │ │ br 2 (;@3;) │ │ @@ -60472,15 +60476,15 @@ │ │ i32.load offset=44 │ │ local.set 177 │ │ local.get 174 │ │ local.get 175 │ │ local.get 176 │ │ local.get 177 │ │ call $rkname │ │ - i32.const 11254 │ │ + i32.const 11523 │ │ local.set 178 │ │ local.get 6 │ │ local.get 178 │ │ i32.store offset=60 │ │ br 3 (;@1;) │ │ end │ │ end │ │ @@ -60545,15 +60549,15 @@ │ │ i32.and │ │ local.set 12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 12 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 13 │ │ local.get 5 │ │ local.get 13 │ │ i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ @@ -60567,15 +60571,15 @@ │ │ local.set 16 │ │ local.get 5 │ │ local.get 16 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 15 │ │ i32.store │ │ - i32.const 18534 │ │ + i32.const 18837 │ │ local.set 17 │ │ local.get 14 │ │ local.get 17 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ local.set 18 │ │ local.get 5 │ │ @@ -60714,15 +60718,15 @@ │ │ local.set 30 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 31 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 32 │ │ - i32.const 7142 │ │ + i32.const 7191 │ │ local.set 33 │ │ local.get 30 │ │ local.get 31 │ │ local.get 33 │ │ local.get 32 │ │ call $typeerror │ │ unreachable) │ │ @@ -60769,20 +60773,20 @@ │ │ block ;; label = @2 │ │ local.get 11 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load │ │ local.set 12 │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ i32.store │ │ - i32.const 7434 │ │ + i32.const 7483 │ │ local.set 14 │ │ local.get 5 │ │ local.get 14 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ @@ -60806,20 +60810,20 @@ │ │ block ;; label = @2 │ │ local.get 20 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load │ │ local.set 21 │ │ - i32.const 13793 │ │ + i32.const 14062 │ │ local.set 22 │ │ local.get 21 │ │ local.get 22 │ │ i32.store │ │ - i32.const 11223 │ │ + i32.const 11492 │ │ local.set 23 │ │ local.get 5 │ │ local.get 23 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ @@ -61025,20 +61029,20 @@ │ │ local.get 29 │ │ i32.store offset=28 │ │ br 14 (;@1;) │ │ end │ │ local.get 6 │ │ i32.load offset=12 │ │ local.set 30 │ │ - i32.const 4758 │ │ + i32.const 4807 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ i32.store │ │ - i32.const 4758 │ │ + i32.const 4807 │ │ local.set 32 │ │ local.get 6 │ │ local.get 32 │ │ i32.store offset=28 │ │ br 13 (;@1;) │ │ end │ │ i32.const 0 │ │ @@ -61180,15 +61184,15 @@ │ │ local.set 61 │ │ local.get 6 │ │ i32.load offset=12 │ │ local.set 62 │ │ local.get 62 │ │ local.get 61 │ │ i32.store │ │ - i32.const 11223 │ │ + i32.const 11492 │ │ local.set 63 │ │ local.get 6 │ │ local.get 63 │ │ i32.store offset=28 │ │ end │ │ local.get 6 │ │ i32.load offset=28 │ │ @@ -61242,15 +61246,15 @@ │ │ local.set 10 │ │ local.get 5 │ │ local.get 10 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 7 │ │ i32.store │ │ - i32.const 17871 │ │ + i32.const 18174 │ │ local.set 11 │ │ local.get 6 │ │ local.get 11 │ │ local.get 5 │ │ call $luaG_runerror │ │ unreachable) │ │ (func $luaG_addinfo (type 14) (param i32 i32 i32 i32) (result i32) │ │ @@ -61417,15 +61421,15 @@ │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 44 │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 43 │ │ i32.store │ │ - i32.const 4555 │ │ + i32.const 4604 │ │ local.set 46 │ │ local.get 40 │ │ local.get 46 │ │ local.get 6 │ │ call $luaO_pushfstring │ │ local.set 47 │ │ i32.const 96 │ │ @@ -61727,15 +61731,15 @@ │ │ end │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 31 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 32 │ │ - i32.const 9537 │ │ + i32.const 9671 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $luaG_typeerror │ │ unreachable) │ │ (func $luaG_opinterror (type 0) (param i32 i32 i32 i32) │ │ @@ -61881,15 +61885,15 @@ │ │ local.get 14 │ │ local.get 15 │ │ call $varinfo │ │ local.set 16 │ │ local.get 5 │ │ local.get 16 │ │ i32.store │ │ - i32.const 6413 │ │ + i32.const 6462 │ │ local.set 17 │ │ local.get 13 │ │ local.get 17 │ │ local.get 5 │ │ call $luaG_runerror │ │ unreachable) │ │ (func $luaG_ordererror (type 2) (param i32 i32 i32) │ │ @@ -61957,15 +61961,15 @@ │ │ local.set 15 │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 16 │ │ local.get 5 │ │ local.get 16 │ │ i32.store │ │ - i32.const 3928 │ │ + i32.const 3977 │ │ local.set 17 │ │ local.get 15 │ │ local.get 17 │ │ local.get 5 │ │ call $luaG_runerror │ │ unreachable │ │ end │ │ @@ -61980,15 +61984,15 @@ │ │ local.set 20 │ │ local.get 5 │ │ local.get 20 │ │ i32.store offset=20 │ │ local.get 5 │ │ local.get 19 │ │ i32.store offset=16 │ │ - i32.const 4481 │ │ + i32.const 4530 │ │ local.set 21 │ │ i32.const 16 │ │ local.set 22 │ │ local.get 5 │ │ local.get 22 │ │ i32.add │ │ local.set 23 │ │ @@ -62286,15 +62290,15 @@ │ │ i32.const 127 │ │ local.set 74 │ │ local.get 73 │ │ local.get 74 │ │ i32.and │ │ local.set 75 │ │ local.get 75 │ │ - i32.load8_u offset=25856 │ │ + i32.load8_u offset=26176 │ │ local.set 76 │ │ i32.const 255 │ │ local.set 77 │ │ local.get 76 │ │ local.get 77 │ │ i32.and │ │ local.set 78 │ │ @@ -63007,15 +63011,15 @@ │ │ i32.and │ │ local.set 18 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 18 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 19 │ │ local.get 4 │ │ local.get 19 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ @@ -63098,15 +63102,15 @@ │ │ i32.const 127 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ i32.and │ │ local.set 18 │ │ local.get 18 │ │ - i32.load8_u offset=25856 │ │ + i32.load8_u offset=26176 │ │ local.set 19 │ │ i32.const 255 │ │ local.set 20 │ │ local.get 19 │ │ local.get 20 │ │ i32.and │ │ local.set 21 │ │ @@ -63510,15 +63514,15 @@ │ │ i32.store offset=24 │ │ br 1 (;@3;) │ │ end │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 129 │ │ local.get 129 │ │ - i32.load8_u offset=25856 │ │ + i32.load8_u offset=26176 │ │ local.set 130 │ │ i32.const 255 │ │ local.set 131 │ │ local.get 130 │ │ local.get 131 │ │ i32.and │ │ local.set 132 │ │ @@ -63706,15 +63710,15 @@ │ │ local.get 26 │ │ i32.add │ │ local.set 27 │ │ local.get 27 │ │ local.set 28 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 29 │ │ local.get 29 │ │ local.set 28 │ │ end │ │ local.get 28 │ │ local.set 30 │ │ local.get 5 │ │ @@ -63839,15 +63843,15 @@ │ │ block ;; label = @1 │ │ local.get 29 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ i32.load offset=8 │ │ local.set 31 │ │ - i32.const 15770 │ │ + i32.const 16073 │ │ local.set 32 │ │ local.get 31 │ │ local.get 32 │ │ call $strcmp │ │ local.set 33 │ │ i32.const 0 │ │ local.set 34 │ │ @@ -63860,17 +63864,17 @@ │ │ i32.eq │ │ local.set 37 │ │ local.get 37 │ │ local.set 30 │ │ end │ │ local.get 30 │ │ local.set 38 │ │ - i32.const 7394 │ │ + i32.const 7443 │ │ local.set 39 │ │ - i32.const 11477 │ │ + i32.const 11746 │ │ local.set 40 │ │ i32.const 1 │ │ local.set 41 │ │ local.get 38 │ │ local.get 41 │ │ i32.and │ │ local.set 42 │ │ @@ -63992,15 +63996,15 @@ │ │ local.set 29 │ │ local.get 29 │ │ br_if 1 (;@1;) │ │ end │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 30 │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ i32.store │ │ end │ │ i32.const 32 │ │ local.set 32 │ │ @@ -64271,15 +64275,15 @@ │ │ local.set 21 │ │ local.get 5 │ │ local.get 21 │ │ i32.store offset=24 │ │ local.get 5 │ │ i32.load offset=44 │ │ local.set 22 │ │ - i32.const 8779 │ │ + i32.const 8913 │ │ local.set 23 │ │ i32.const 23 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaS_newlstr │ │ @@ -64799,45 +64803,45 @@ │ │ local.set 40 │ │ i32.const 0 │ │ local.set 41 │ │ i32.const 0 │ │ local.set 42 │ │ local.get 42 │ │ local.get 41 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 38 │ │ local.get 39 │ │ local.get 40 │ │ call $invoke_vii │ │ i32.const 0 │ │ local.set 43 │ │ local.get 43 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 44 │ │ i32.const 0 │ │ local.set 45 │ │ i32.const 0 │ │ local.set 46 │ │ local.get 46 │ │ local.get 45 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 0 │ │ local.set 47 │ │ local.get 44 │ │ local.set 48 │ │ local.get 47 │ │ local.set 49 │ │ local.get 48 │ │ local.get 49 │ │ i32.ne │ │ local.set 50 │ │ i32.const 0 │ │ local.set 51 │ │ local.get 51 │ │ - i32.load offset=91080 │ │ + i32.load offset=91448 │ │ local.set 52 │ │ i32.const 0 │ │ local.set 53 │ │ local.get 52 │ │ local.set 54 │ │ local.get 53 │ │ local.set 55 │ │ @@ -70621,15 +70625,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 21 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 22 │ │ - i32.const 9788 │ │ + i32.const 9922 │ │ local.set 23 │ │ local.get 21 │ │ local.get 23 │ │ local.get 22 │ │ call $resume_error │ │ local.set 24 │ │ local.get 6 │ │ @@ -70691,15 +70695,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 41 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 42 │ │ - i32.const 9826 │ │ + i32.const 9960 │ │ local.set 43 │ │ local.get 41 │ │ local.get 43 │ │ local.get 42 │ │ call $resume_error │ │ local.set 44 │ │ local.get 6 │ │ @@ -70743,15 +70747,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 55 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 56 │ │ - i32.const 9826 │ │ + i32.const 9960 │ │ local.set 57 │ │ local.get 55 │ │ local.get 57 │ │ local.get 56 │ │ call $resume_error │ │ local.set 58 │ │ local.get 6 │ │ @@ -71982,15 +71986,15 @@ │ │ local.get 32 │ │ call $luaG_runerror │ │ unreachable │ │ end │ │ local.get 6 │ │ i32.load offset=28 │ │ local.set 33 │ │ - i32.const 9855 │ │ + i32.const 9989 │ │ local.set 34 │ │ i32.const 0 │ │ local.set 35 │ │ local.get 33 │ │ local.get 34 │ │ local.get 35 │ │ call $luaG_runerror │ │ @@ -72848,15 +72852,15 @@ │ │ i32.store offset=12 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 30 │ │ i32.const 0 │ │ local.set 31 │ │ local.get 31 │ │ - i32.load8_u offset=15524 │ │ + i32.load8_u offset=15793 │ │ local.set 32 │ │ i32.const 24 │ │ local.set 33 │ │ local.get 32 │ │ local.get 33 │ │ i32.shl │ │ local.set 34 │ │ @@ -73101,15 +73105,15 @@ │ │ local.set 28 │ │ local.get 5 │ │ local.get 28 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 27 │ │ i32.store │ │ - i32.const 18492 │ │ + i32.const 18795 │ │ local.set 29 │ │ local.get 26 │ │ local.get 29 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ drop │ │ local.get 5 │ │ @@ -73684,29 +73688,29 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 15524 │ │ + i32.const 15793 │ │ local.set 5 │ │ i32.const 4 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $dumpBlock │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 7 │ │ i32.const 0 │ │ local.set 8 │ │ local.get 8 │ │ - i32.load8_u offset=16846 │ │ + i32.load8_u offset=17149 │ │ local.set 9 │ │ i32.const 24 │ │ local.set 10 │ │ local.get 9 │ │ local.get 10 │ │ i32.shl │ │ local.set 11 │ │ @@ -73725,15 +73729,15 @@ │ │ local.get 14 │ │ local.get 15 │ │ i32.shl │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ local.get 17 │ │ - i32.load8_u offset=16900 │ │ + i32.load8_u offset=17203 │ │ local.set 18 │ │ i32.const 24 │ │ local.set 19 │ │ local.get 18 │ │ local.get 19 │ │ i32.shl │ │ local.set 20 │ │ @@ -73761,15 +73765,15 @@ │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ call $dumpByte │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 27 │ │ - i32.const 22639 │ │ + i32.const 22942 │ │ local.set 28 │ │ i32.const 6 │ │ local.set 29 │ │ local.get 27 │ │ local.get 28 │ │ local.get 29 │ │ call $dumpBlock │ │ @@ -76825,30 +76829,30 @@ │ │ local.get 33 │ │ i32.and │ │ local.set 34 │ │ block ;; label = @2 │ │ local.get 34 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 35 │ │ local.get 4 │ │ local.get 35 │ │ i32.store offset=12 │ │ end │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 36 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 37 │ │ local.get 4 │ │ local.get 37 │ │ i32.store │ │ - i32.const 9404 │ │ + i32.const 9538 │ │ local.set 38 │ │ local.get 36 │ │ local.get 38 │ │ local.get 4 │ │ call $luaG_runerror │ │ unreachable │ │ end │ │ @@ -82983,15 +82987,15 @@ │ │ block ;; label = @2 │ │ local.get 105 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=76 │ │ local.set 106 │ │ - i32.const 13793 │ │ + i32.const 14062 │ │ local.set 107 │ │ local.get 106 │ │ local.get 107 │ │ call $luaE_warnerror │ │ local.get 3 │ │ i32.load offset=76 │ │ local.set 108 │ │ @@ -93981,15 +93985,15 @@ │ │ i32.const 7 │ │ local.set 63 │ │ local.get 62 │ │ local.get 63 │ │ i32.and │ │ local.set 64 │ │ local.get 64 │ │ - i32.load8_u offset=24008 │ │ + i32.load8_u offset=24328 │ │ local.set 65 │ │ i32.const 255 │ │ local.set 66 │ │ local.get 65 │ │ local.get 66 │ │ i32.and │ │ local.set 67 │ │ @@ -94126,15 +94130,15 @@ │ │ local.get 5 │ │ local.get 6 │ │ call $lua_rawgeti │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 7 │ │ - i32.const 24016 │ │ + i32.const 24336 │ │ local.set 8 │ │ i32.const 0 │ │ local.set 9 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_setfuncs │ │ @@ -94147,35 +94151,35 @@ │ │ local.get 11 │ │ call $lua_pushvalue │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ i32.const -2 │ │ local.set 13 │ │ - i32.const 16259 │ │ + i32.const 16562 │ │ local.set 14 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 15 │ │ - i32.const 16894 │ │ + i32.const 17197 │ │ local.set 16 │ │ local.get 15 │ │ local.get 16 │ │ call $lua_pushstring │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 17 │ │ i32.const -2 │ │ local.set 18 │ │ - i32.const 16050 │ │ + i32.const 16353 │ │ local.set 19 │ │ local.get 17 │ │ local.get 18 │ │ local.get 19 │ │ call $lua_setfield │ │ i32.const 1 │ │ local.set 20 │ │ @@ -94255,15 +94259,15 @@ │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ call $lua_settop │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 16 │ │ - i32.const 19545 │ │ + i32.const 19848 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ call $lua_pushstring │ │ drop │ │ local.get 3 │ │ i32.load offset=8 │ │ @@ -94444,17 +94448,17 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=120 │ │ local.get 3 │ │ i32.load offset=120 │ │ local.set 4 │ │ - i32.const 24224 │ │ + i32.const 24544 │ │ local.set 5 │ │ - i32.const 3292 │ │ + i32.const 3341 │ │ local.set 6 │ │ i32.const 1 │ │ local.set 7 │ │ local.get 4 │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ @@ -94462,15 +94466,15 @@ │ │ local.set 8 │ │ i32.const 2 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.shl │ │ local.set 10 │ │ - i32.const 24272 │ │ + i32.const 24592 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.add │ │ local.set 12 │ │ local.get 12 │ │ i32.load │ │ @@ -95147,17 +95151,17 @@ │ │ local.set 16 │ │ local.get 15 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ i32.eq │ │ local.set 18 │ │ - i32.const 7335 │ │ + i32.const 7384 │ │ local.set 19 │ │ - i32.const 7356 │ │ + i32.const 7405 │ │ local.set 20 │ │ i32.const 1 │ │ local.set 21 │ │ local.get 18 │ │ local.get 21 │ │ i32.and │ │ local.set 22 │ │ @@ -95401,15 +95405,15 @@ │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 11 │ │ i32.const 1 │ │ local.set 12 │ │ - i32.const 10448 │ │ + i32.const 10717 │ │ local.set 13 │ │ local.get 11 │ │ local.get 12 │ │ local.get 13 │ │ call $luaL_getmetafield │ │ drop │ │ i32.const 1 │ │ @@ -95885,15 +95889,15 @@ │ │ local.get 9 │ │ i32.store offset=16 │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 10 │ │ i32.const 3 │ │ local.set 11 │ │ - i32.const 3311 │ │ + i32.const 3360 │ │ local.set 12 │ │ i32.const 0 │ │ local.set 13 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ local.get 13 │ │ @@ -96016,15 +96020,15 @@ │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 47 │ │ i32.const 2 │ │ local.set 48 │ │ - i32.const 18268 │ │ + i32.const 18571 │ │ local.set 49 │ │ i32.const 0 │ │ local.set 50 │ │ local.get 47 │ │ local.get 48 │ │ local.get 49 │ │ local.get 50 │ │ @@ -96122,15 +96126,15 @@ │ │ local.get 2 │ │ i32.store │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 6 │ │ i32.const 2 │ │ local.set 7 │ │ - i32.const 3752 │ │ + i32.const 3801 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_checkstack │ │ local.get 5 │ │ i32.load offset=8 │ │ @@ -96223,15 +96227,15 @@ │ │ block ;; label = @2 │ │ local.get 32 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 33 │ │ - i32.const 8668 │ │ + i32.const 8802 │ │ local.set 34 │ │ i32.const 0 │ │ local.set 35 │ │ local.get 33 │ │ local.get 34 │ │ local.get 35 │ │ call $luaL_error │ │ @@ -96389,15 +96393,15 @@ │ │ local.get 5 │ │ call $luaL_checkany │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 6 │ │ i32.const 1 │ │ local.set 7 │ │ - i32.const 3528 │ │ + i32.const 3577 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_getmetafield │ │ local.set 9 │ │ block ;; label = @1 │ │ @@ -96798,17 +96802,17 @@ │ │ block ;; label = @3 │ │ local.get 26 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ local.set 27 │ │ local.get 27 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.set 28 │ │ - i32.const 22647 │ │ + i32.const 22950 │ │ local.set 29 │ │ i32.const 1 │ │ local.set 30 │ │ local.get 29 │ │ local.get 30 │ │ local.get 30 │ │ local.get 28 │ │ @@ -96820,15 +96824,15 @@ │ │ local.set 31 │ │ local.get 3 │ │ i32.load offset=16 │ │ local.set 32 │ │ i32.const 0 │ │ local.set 33 │ │ local.get 33 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.set 34 │ │ i32.const 1 │ │ local.set 35 │ │ local.get 31 │ │ local.get 35 │ │ local.get 32 │ │ local.get 34 │ │ @@ -96856,30 +96860,30 @@ │ │ i32.store offset=20 │ │ br 0 (;@2;) │ │ end │ │ end │ │ i32.const 0 │ │ local.set 41 │ │ local.get 41 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.set 42 │ │ - i32.const 22644 │ │ + i32.const 22947 │ │ local.set 43 │ │ i32.const 1 │ │ local.set 44 │ │ local.get 43 │ │ local.get 44 │ │ local.get 44 │ │ local.get 42 │ │ call $fwrite │ │ drop │ │ i32.const 0 │ │ local.set 45 │ │ local.get 45 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.set 46 │ │ local.get 46 │ │ call $fflush │ │ drop │ │ i32.const 0 │ │ local.set 47 │ │ i32.const 32 │ │ @@ -97233,15 +97237,15 @@ │ │ local.get 23 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 26 │ │ i32.const 1 │ │ local.set 27 │ │ - i32.const 8534 │ │ + i32.const 8668 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $luaL_typeerror │ │ local.set 29 │ │ i32.const 0 │ │ @@ -97669,15 +97673,15 @@ │ │ local.get 69 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 72 │ │ i32.const 1 │ │ local.set 73 │ │ - i32.const 10917 │ │ + i32.const 11186 │ │ local.set 74 │ │ local.get 72 │ │ local.get 73 │ │ local.get 74 │ │ call $luaL_argerror │ │ local.set 75 │ │ i32.const 0 │ │ @@ -97806,15 +97810,15 @@ │ │ local.get 20 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 23 │ │ i32.const 2 │ │ local.set 24 │ │ - i32.const 10518 │ │ + i32.const 10787 │ │ local.set 25 │ │ local.get 23 │ │ local.get 24 │ │ local.get 25 │ │ call $luaL_typeerror │ │ local.set 26 │ │ i32.const 0 │ │ @@ -97833,15 +97837,15 @@ │ │ local.get 22 │ │ drop │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 31 │ │ i32.const 1 │ │ local.set 32 │ │ - i32.const 10448 │ │ + i32.const 10717 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $luaL_getmetafield │ │ local.set 34 │ │ i32.const 0 │ │ @@ -97864,15 +97868,15 @@ │ │ block ;; label = @2 │ │ local.get 40 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 41 │ │ - i32.const 10460 │ │ + i32.const 10729 │ │ local.set 42 │ │ i32.const 0 │ │ local.set 43 │ │ local.get 41 │ │ local.get 42 │ │ local.get 43 │ │ call $luaL_error │ │ @@ -98213,15 +98217,15 @@ │ │ local.get 81 │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 84 │ │ i32.const 2 │ │ local.set 85 │ │ - i32.const 10974 │ │ + i32.const 11243 │ │ local.set 86 │ │ local.get 84 │ │ local.get 85 │ │ local.get 86 │ │ call $luaL_argerror │ │ local.set 87 │ │ i32.const 0 │ │ @@ -98360,15 +98364,15 @@ │ │ local.set 7 │ │ local.get 5 │ │ local.get 7 │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 8 │ │ - i32.const 19857 │ │ + i32.const 20160 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ call $strspn │ │ local.set 10 │ │ local.get 5 │ │ i32.load offset=24 │ │ @@ -98684,15 +98688,15 @@ │ │ local.set 95 │ │ local.get 95 │ │ br_if 0 (;@2;) │ │ end │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 96 │ │ - i32.const 19857 │ │ + i32.const 20160 │ │ local.set 97 │ │ local.get 96 │ │ local.get 97 │ │ call $strspn │ │ local.set 98 │ │ local.get 5 │ │ i32.load offset=24 │ │ @@ -98860,15 +98864,15 @@ │ │ local.get 13 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ i32.const 1 │ │ local.set 17 │ │ - i32.const 12060 │ │ + i32.const 12329 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_argerror │ │ local.set 19 │ │ i32.const 0 │ │ @@ -99065,15 +99069,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 24320 │ │ + i32.const 24640 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -99368,15 +99372,15 @@ │ │ local.get 14 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ i32.const 1 │ │ local.set 17 │ │ - i32.const 12708 │ │ + i32.const 12977 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_typeerror │ │ local.set 19 │ │ i32.const 0 │ │ @@ -99464,15 +99468,15 @@ │ │ block ;; label = @2 │ │ local.get 16 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 17 │ │ - i32.const 9923 │ │ + i32.const 10057 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ call $lua_pushstring │ │ drop │ │ i32.const -1 │ │ local.set 19 │ │ @@ -99621,15 +99625,15 @@ │ │ local.set 59 │ │ local.get 54 │ │ local.get 59 │ │ call $lua_settop │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 60 │ │ - i32.const 9952 │ │ + i32.const 10086 │ │ local.set 61 │ │ local.get 60 │ │ local.get 61 │ │ call $lua_pushstring │ │ drop │ │ i32.const -1 │ │ local.set 62 │ │ @@ -99768,15 +99772,15 @@ │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ call $auxstatus │ │ local.set 9 │ │ - i32.const 24400 │ │ + i32.const 24720 │ │ local.set 10 │ │ i32.const 2 │ │ local.set 11 │ │ local.get 9 │ │ local.get 11 │ │ i32.shl │ │ local.set 12 │ │ @@ -100489,15 +100493,15 @@ │ │ end │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 27 │ │ local.get 3 │ │ i32.load offset=16 │ │ local.set 28 │ │ - i32.const 24400 │ │ + i32.const 24720 │ │ local.set 29 │ │ i32.const 2 │ │ local.set 30 │ │ local.get 28 │ │ local.get 30 │ │ i32.shl │ │ local.set 31 │ │ @@ -100507,15 +100511,15 @@ │ │ local.set 32 │ │ local.get 32 │ │ i32.load │ │ local.set 33 │ │ local.get 3 │ │ local.get 33 │ │ i32.store │ │ - i32.const 9760 │ │ + i32.const 9894 │ │ local.set 34 │ │ local.get 27 │ │ local.get 34 │ │ local.get 3 │ │ call $luaL_error │ │ local.set 35 │ │ local.get 3 │ │ @@ -100571,15 +100575,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 24416 │ │ + i32.const 24736 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -100610,22 +100614,22 @@ │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=284 │ │ loop (result i32) ;; label = @1 │ │ i32.const 0 │ │ local.set 4 │ │ local.get 4 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 5 │ │ - i32.const 19677 │ │ + i32.const 19980 │ │ local.set 6 │ │ local.get 3 │ │ local.get 6 │ │ i32.store offset=16 │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 7 │ │ i32.const 16 │ │ local.set 8 │ │ local.get 3 │ │ local.get 8 │ │ i32.add │ │ local.set 9 │ │ @@ -100633,15 +100637,15 @@ │ │ local.get 7 │ │ local.get 9 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 10 │ │ local.get 10 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 11 │ │ local.get 11 │ │ call $fflush │ │ drop │ │ i32.const 32 │ │ local.set 12 │ │ local.get 3 │ │ @@ -100649,15 +100653,15 @@ │ │ i32.add │ │ local.set 13 │ │ local.get 13 │ │ local.set 14 │ │ i32.const 0 │ │ local.set 15 │ │ local.get 15 │ │ - i32.load offset=60012 │ │ + i32.load offset=60380 │ │ local.set 16 │ │ i32.const 250 │ │ local.set 17 │ │ local.get 14 │ │ local.get 17 │ │ local.get 16 │ │ call $fgets │ │ @@ -100686,15 +100690,15 @@ │ │ local.set 25 │ │ local.get 3 │ │ local.get 25 │ │ i32.add │ │ local.set 26 │ │ local.get 26 │ │ local.set 27 │ │ - i32.const 19999 │ │ + i32.const 20302 │ │ local.set 28 │ │ local.get 27 │ │ local.get 28 │ │ call $strcmp │ │ local.set 29 │ │ local.get 29 │ │ br_if 1 (;@2;) │ │ @@ -100730,15 +100734,15 @@ │ │ i32.add │ │ local.set 38 │ │ local.get 38 │ │ local.set 39 │ │ local.get 39 │ │ call $strlen │ │ local.set 40 │ │ - i32.const 18237 │ │ + i32.const 18540 │ │ local.set 41 │ │ i32.const 0 │ │ local.set 42 │ │ local.get 33 │ │ local.get 36 │ │ local.get 40 │ │ local.get 41 │ │ @@ -100765,15 +100769,15 @@ │ │ local.get 46 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 47 │ │ local.get 47 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 48 │ │ local.get 3 │ │ i32.load offset=284 │ │ local.set 49 │ │ i32.const -1 │ │ local.set 50 │ │ i32.const 0 │ │ @@ -100782,25 +100786,25 @@ │ │ local.get 50 │ │ local.get 51 │ │ call $luaL_tolstring │ │ local.set 52 │ │ local.get 3 │ │ local.get 52 │ │ i32.store │ │ - i32.const 20300 │ │ + i32.const 20603 │ │ local.set 53 │ │ local.get 48 │ │ local.get 53 │ │ local.get 3 │ │ call $fprintf │ │ drop │ │ i32.const 0 │ │ local.set 54 │ │ local.get 54 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 55 │ │ local.get 55 │ │ call $fflush │ │ drop │ │ end │ │ local.get 3 │ │ i32.load offset=284 │ │ @@ -101061,28 +101065,28 @@ │ │ block ;; label = @3 │ │ local.get 28 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 29 │ │ - i32.const 7425 │ │ + i32.const 7474 │ │ local.set 30 │ │ local.get 29 │ │ local.get 30 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 31 │ │ i32.const -1001000 │ │ local.set 32 │ │ - i32.const 15731 │ │ + i32.const 16034 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $lua_getfield │ │ drop │ │ local.get 3 │ │ @@ -101319,15 +101323,15 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 5 │ │ i32.const -1001000 │ │ local.set 6 │ │ - i32.const 15731 │ │ + i32.const 16034 │ │ local.set 7 │ │ local.get 5 │ │ local.get 6 │ │ local.get 7 │ │ call $lua_getfield │ │ drop │ │ local.get 4 │ │ @@ -101370,15 +101374,15 @@ │ │ local.set 18 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 19 │ │ local.get 19 │ │ i32.load │ │ local.set 20 │ │ - i32.const 24560 │ │ + i32.const 24880 │ │ local.set 21 │ │ i32.const 2 │ │ local.set 22 │ │ local.get 20 │ │ local.get 22 │ │ i32.shl │ │ local.set 23 │ │ @@ -101852,15 +101856,15 @@ │ │ local.set 33 │ │ i32.const 2 │ │ local.set 34 │ │ local.get 33 │ │ local.get 34 │ │ i32.add │ │ local.set 35 │ │ - i32.const 19324 │ │ + i32.const 19627 │ │ local.set 36 │ │ local.get 32 │ │ local.get 35 │ │ local.get 36 │ │ call $luaL_argerror │ │ local.set 37 │ │ i32.const 0 │ │ @@ -101921,15 +101925,15 @@ │ │ local.set 53 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 54 │ │ local.get 3 │ │ local.get 54 │ │ i32.store │ │ - i32.const 4383 │ │ + i32.const 4432 │ │ local.set 55 │ │ local.get 53 │ │ local.get 55 │ │ local.get 3 │ │ call $lua_pushfstring │ │ local.set 56 │ │ local.get 3 │ │ @@ -102045,15 +102049,15 @@ │ │ local.set 84 │ │ i32.const 2 │ │ local.set 85 │ │ local.get 84 │ │ local.get 85 │ │ i32.add │ │ local.set 86 │ │ - i32.const 6234 │ │ + i32.const 6283 │ │ local.set 87 │ │ local.get 83 │ │ local.get 86 │ │ local.get 87 │ │ call $luaL_argerror │ │ local.set 88 │ │ local.get 3 │ │ @@ -102114,15 +102118,15 @@ │ │ call $lua_pushlstring │ │ drop │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 103 │ │ i32.const -2 │ │ local.set 104 │ │ - i32.const 11134 │ │ + i32.const 11403 │ │ local.set 105 │ │ local.get 103 │ │ local.get 104 │ │ local.get 105 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=136 │ │ @@ -102137,51 +102141,51 @@ │ │ local.set 109 │ │ i32.const 44 │ │ local.set 110 │ │ local.get 109 │ │ local.get 110 │ │ i32.add │ │ local.set 111 │ │ - i32.const 13717 │ │ + i32.const 13986 │ │ local.set 112 │ │ local.get 106 │ │ local.get 112 │ │ local.get 111 │ │ call $settabss │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 113 │ │ local.get 3 │ │ i32.load offset=52 │ │ local.set 114 │ │ - i32.const 12281 │ │ + i32.const 12550 │ │ local.set 115 │ │ local.get 113 │ │ local.get 115 │ │ local.get 114 │ │ call $settabsi │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 116 │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 117 │ │ - i32.const 12277 │ │ + i32.const 12546 │ │ local.set 118 │ │ local.get 116 │ │ local.get 118 │ │ local.get 117 │ │ call $settabsi │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 119 │ │ local.get 3 │ │ i32.load offset=36 │ │ local.set 120 │ │ - i32.const 3362 │ │ + i32.const 3411 │ │ local.set 121 │ │ local.get 119 │ │ local.get 121 │ │ local.get 120 │ │ call $settabss │ │ end │ │ local.get 3 │ │ @@ -102215,15 +102219,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 131 │ │ local.get 3 │ │ i32.load offset=48 │ │ local.set 132 │ │ - i32.const 9897 │ │ + i32.const 10031 │ │ local.set 133 │ │ local.get 131 │ │ local.get 133 │ │ local.get 132 │ │ call $settabsi │ │ end │ │ local.get 3 │ │ @@ -102263,15 +102267,15 @@ │ │ local.set 144 │ │ i32.const 255 │ │ local.set 145 │ │ local.get 144 │ │ local.get 145 │ │ i32.and │ │ local.set 146 │ │ - i32.const 3687 │ │ + i32.const 3736 │ │ local.set 147 │ │ local.get 143 │ │ local.get 147 │ │ local.get 146 │ │ call $settabsi │ │ local.get 3 │ │ i32.load offset=136 │ │ @@ -102281,15 +102285,15 @@ │ │ local.set 149 │ │ i32.const 255 │ │ local.set 150 │ │ local.get 149 │ │ local.get 150 │ │ i32.and │ │ local.set 151 │ │ - i32.const 3784 │ │ + i32.const 3833 │ │ local.set 152 │ │ local.get 148 │ │ local.get 152 │ │ local.get 151 │ │ call $settabsi │ │ local.get 3 │ │ i32.load offset=136 │ │ @@ -102303,15 +102307,15 @@ │ │ local.get 155 │ │ i32.shl │ │ local.set 156 │ │ local.get 156 │ │ local.get 155 │ │ i32.shr_s │ │ local.set 157 │ │ - i32.const 8163 │ │ + i32.const 8297 │ │ local.set 158 │ │ local.get 153 │ │ local.get 158 │ │ local.get 157 │ │ call $settabsb │ │ end │ │ local.get 3 │ │ @@ -102345,27 +102349,27 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 168 │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 169 │ │ - i32.const 10099 │ │ + i32.const 10306 │ │ local.set 170 │ │ local.get 168 │ │ local.get 170 │ │ local.get 169 │ │ call $settabss │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 171 │ │ local.get 3 │ │ i32.load offset=32 │ │ local.set 172 │ │ - i32.const 3358 │ │ + i32.const 3407 │ │ local.set 173 │ │ local.get 171 │ │ local.get 173 │ │ local.get 172 │ │ call $settabss │ │ end │ │ local.get 3 │ │ @@ -102405,15 +102409,15 @@ │ │ local.set 184 │ │ i32.const 65535 │ │ local.set 185 │ │ local.get 184 │ │ local.get 185 │ │ i32.and │ │ local.set 186 │ │ - i32.const 5429 │ │ + i32.const 5478 │ │ local.set 187 │ │ local.get 183 │ │ local.get 187 │ │ local.get 186 │ │ call $settabsi │ │ local.get 3 │ │ i32.load offset=136 │ │ @@ -102423,15 +102427,15 @@ │ │ local.set 189 │ │ i32.const 65535 │ │ local.set 190 │ │ local.get 189 │ │ local.get 190 │ │ i32.and │ │ local.set 191 │ │ - i32.const 5419 │ │ + i32.const 5468 │ │ local.set 192 │ │ local.get 188 │ │ local.get 192 │ │ local.get 191 │ │ call $settabsi │ │ end │ │ local.get 3 │ │ @@ -102475,15 +102479,15 @@ │ │ local.get 204 │ │ i32.shl │ │ local.set 205 │ │ local.get 205 │ │ local.get 204 │ │ i32.shr_s │ │ local.set 206 │ │ - i32.const 7119 │ │ + i32.const 7168 │ │ local.set 207 │ │ local.get 202 │ │ local.get 207 │ │ local.get 206 │ │ call $settabsb │ │ end │ │ local.get 3 │ │ @@ -102517,15 +102521,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 217 │ │ local.get 3 │ │ i32.load offset=16 │ │ local.set 218 │ │ - i32.const 4050 │ │ + i32.const 4099 │ │ local.set 219 │ │ local.get 217 │ │ local.get 218 │ │ local.get 219 │ │ call $treatstackoption │ │ end │ │ local.get 3 │ │ @@ -102559,15 +102563,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 229 │ │ local.get 3 │ │ i32.load offset=16 │ │ local.set 230 │ │ - i32.const 13763 │ │ + i32.const 14032 │ │ local.set 231 │ │ local.get 229 │ │ local.get 230 │ │ local.get 231 │ │ call $treatstackoption │ │ end │ │ i32.const 1 │ │ @@ -103050,15 +103054,15 @@ │ │ local.set 57 │ │ i32.const 1 │ │ local.set 58 │ │ local.get 57 │ │ local.get 58 │ │ i32.add │ │ local.set 59 │ │ - i32.const 10936 │ │ + i32.const 11205 │ │ local.set 60 │ │ local.get 56 │ │ local.get 59 │ │ local.get 60 │ │ call $luaL_argerror │ │ local.set 61 │ │ local.get 3 │ │ @@ -103586,15 +103590,15 @@ │ │ local.get 26 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 29 │ │ i32.const 1 │ │ local.set 30 │ │ - i32.const 12038 │ │ + i32.const 12307 │ │ local.set 31 │ │ local.get 29 │ │ local.get 30 │ │ local.get 31 │ │ call $luaL_argerror │ │ local.set 32 │ │ i32.const 0 │ │ @@ -103651,15 +103655,15 @@ │ │ local.get 47 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 50 │ │ i32.const 3 │ │ local.set 51 │ │ - i32.const 12038 │ │ + i32.const 12307 │ │ local.set 52 │ │ local.get 50 │ │ local.get 51 │ │ local.get 52 │ │ call $luaL_argerror │ │ local.set 53 │ │ i32.const 0 │ │ @@ -104244,39 +104248,39 @@ │ │ i32.store offset=20 │ │ end │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 49 │ │ i32.const -1001000 │ │ local.set 50 │ │ - i32.const 15731 │ │ + i32.const 16034 │ │ local.set 51 │ │ local.get 49 │ │ local.get 50 │ │ local.get 51 │ │ call $luaL_getsubtable │ │ local.set 52 │ │ block ;; label = @1 │ │ local.get 52 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 53 │ │ - i32.const 7687 │ │ + i32.const 7736 │ │ local.set 54 │ │ local.get 53 │ │ local.get 54 │ │ call $lua_pushstring │ │ drop │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 55 │ │ i32.const -2 │ │ local.set 56 │ │ - i32.const 11045 │ │ + i32.const 11314 │ │ local.set 57 │ │ local.get 55 │ │ local.get 56 │ │ local.get 57 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=28 │ │ @@ -104707,15 +104711,15 @@ │ │ local.set 36 │ │ i32.const 1 │ │ local.set 37 │ │ local.get 36 │ │ local.get 37 │ │ i32.add │ │ local.set 38 │ │ - i32.const 10936 │ │ + i32.const 11205 │ │ local.set 39 │ │ local.get 35 │ │ local.get 38 │ │ local.get 39 │ │ call $luaL_argerror │ │ local.set 40 │ │ local.get 3 │ │ @@ -104930,15 +104934,15 @@ │ │ local.get 17 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 20 │ │ i32.const 2 │ │ local.set 21 │ │ - i32.const 10518 │ │ + i32.const 10787 │ │ local.set 22 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $luaL_typeerror │ │ local.set 23 │ │ i32.const 0 │ │ @@ -105324,15 +105328,15 @@ │ │ i32.sub │ │ local.set 3 │ │ local.get 3 │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ - i32.const 24592 │ │ + i32.const 24912 │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=8 │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ local.get 3 │ │ @@ -105450,15 +105454,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 24688 │ │ + i32.const 25008 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -105469,32 +105473,32 @@ │ │ call $createmeta │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 14 │ │ i32.const 0 │ │ local.set 15 │ │ local.get 15 │ │ - i32.load offset=60012 │ │ + i32.load offset=60380 │ │ local.set 16 │ │ i32.const 2147 │ │ local.set 17 │ │ - i32.const 6816 │ │ + i32.const 6865 │ │ local.set 18 │ │ local.get 14 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $createstdfile │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 19 │ │ i32.const 0 │ │ local.set 20 │ │ local.get 20 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.set 21 │ │ i32.const 2111 │ │ local.set 22 │ │ i32.const 2195 │ │ local.set 23 │ │ local.get 19 │ │ local.get 21 │ │ @@ -105503,19 +105507,19 @@ │ │ call $createstdfile │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 24 │ │ i32.const 0 │ │ local.set 25 │ │ local.get 25 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.set 26 │ │ i32.const 0 │ │ local.set 27 │ │ - i32.const 4680 │ │ + i32.const 4729 │ │ local.set 28 │ │ local.get 24 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $createstdfile │ │ i32.const 1 │ │ @@ -105544,24 +105548,24 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ call $luaL_newmetatable │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 6 │ │ - i32.const 24784 │ │ + i32.const 25104 │ │ local.set 7 │ │ i32.const 0 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_setfuncs │ │ @@ -105575,15 +105579,15 @@ │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ - i32.const 24832 │ │ + i32.const 25152 │ │ local.set 13 │ │ i32.const 0 │ │ local.set 14 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ call $luaL_setfuncs │ │ @@ -105767,15 +105771,15 @@ │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ call $luaL_setmetatable │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 12 │ │ @@ -105805,15 +105809,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -105831,15 +105835,15 @@ │ │ i32.load offset=12 │ │ local.set 10 │ │ local.get 10 │ │ call $lua_pushnil │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 11 │ │ - i32.const 10316 │ │ + i32.const 10523 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ call $lua_pushstring │ │ drop │ │ i32.const 2 │ │ local.set 13 │ │ @@ -106106,15 +106110,15 @@ │ │ local.get 20 │ │ local.get 21 │ │ i32.add │ │ local.set 22 │ │ local.get 4 │ │ local.get 22 │ │ i32.store │ │ - i32.const 12177 │ │ + i32.const 12446 │ │ local.set 23 │ │ local.get 19 │ │ local.get 23 │ │ local.get 4 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -106150,15 +106154,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 2147 │ │ local.set 5 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $g_iofile │ │ local.set 7 │ │ i32.const 16 │ │ @@ -106451,15 +106455,15 @@ │ │ i32.store │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 31 │ │ local.get 3 │ │ i32.load │ │ local.set 32 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $opencheck │ │ local.get 3 │ │ i32.load offset=8 │ │ @@ -106563,15 +106567,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -106602,15 +106606,15 @@ │ │ block ;; label = @1 │ │ local.get 15 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ - i32.const 10343 │ │ + i32.const 10550 │ │ local.set 17 │ │ i32.const 0 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_error │ │ @@ -106720,15 +106724,15 @@ │ │ local.set 24 │ │ local.get 5 │ │ local.get 24 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 21 │ │ i32.store │ │ - i32.const 17844 │ │ + i32.const 18147 │ │ local.set 25 │ │ local.get 20 │ │ local.get 25 │ │ local.get 5 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -106801,15 +106805,15 @@ │ │ local.get 15 │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 18 │ │ i32.const 252 │ │ local.set 19 │ │ - i32.const 3443 │ │ + i32.const 3492 │ │ local.set 20 │ │ local.get 18 │ │ local.get 19 │ │ local.get 20 │ │ call $luaL_argerror │ │ local.set 21 │ │ i32.const 0 │ │ @@ -106927,15 +106931,15 @@ │ │ local.get 7 │ │ i32.store offset=24 │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 8 │ │ i32.const 2 │ │ local.set 9 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 10 │ │ i32.const 0 │ │ local.set 11 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ @@ -106973,15 +106977,15 @@ │ │ local.get 17 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 20 │ │ i32.const 2 │ │ local.set 21 │ │ - i32.const 11052 │ │ + i32.const 11321 │ │ local.set 22 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $luaL_argerror │ │ local.set 23 │ │ i32.const 0 │ │ @@ -107189,15 +107193,15 @@ │ │ local.get 15 │ │ i32.shl │ │ local.set 16 │ │ local.get 16 │ │ local.get 15 │ │ i32.shr_s │ │ local.set 17 │ │ - i32.const 14032 │ │ + i32.const 14301 │ │ local.set 18 │ │ local.get 18 │ │ local.get 17 │ │ call $strchr │ │ local.set 19 │ │ i32.const 0 │ │ local.set 20 │ │ @@ -107284,15 +107288,15 @@ │ │ local.get 44 │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 45 │ │ - i32.const 14030 │ │ + i32.const 14299 │ │ local.set 46 │ │ local.get 45 │ │ local.get 46 │ │ call $strspn │ │ local.set 47 │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -107397,15 +107401,15 @@ │ │ local.get 7 │ │ i32.store offset=8 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 8 │ │ i32.const 2 │ │ local.set 9 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 10 │ │ i32.const 0 │ │ local.set 11 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ @@ -107544,15 +107548,15 @@ │ │ local.get 50 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 53 │ │ i32.const 2 │ │ local.set 54 │ │ - i32.const 11052 │ │ + i32.const 11321 │ │ local.set 55 │ │ local.get 53 │ │ local.get 54 │ │ local.get 55 │ │ call $luaL_argerror │ │ local.set 56 │ │ i32.const 0 │ │ @@ -107569,15 +107573,15 @@ │ │ local.set 52 │ │ end │ │ local.get 52 │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 61 │ │ - i32.const 11926 │ │ + i32.const 12195 │ │ local.set 62 │ │ i32.const 0 │ │ local.set 63 │ │ local.get 61 │ │ local.get 62 │ │ local.get 63 │ │ call $luaL_error │ │ @@ -107675,15 +107679,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -107846,15 +107850,15 @@ │ │ local.set 20 │ │ i32.const 20 │ │ local.set 21 │ │ local.get 20 │ │ local.get 21 │ │ i32.add │ │ local.set 22 │ │ - i32.const 3443 │ │ + i32.const 3492 │ │ local.set 23 │ │ local.get 19 │ │ local.get 22 │ │ local.get 23 │ │ call $luaL_checkstack │ │ i32.const 1 │ │ local.set 24 │ │ @@ -108169,15 +108173,15 @@ │ │ end │ │ local.get 5 │ │ i32.load offset=40 │ │ local.set 99 │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 100 │ │ - i32.const 3343 │ │ + i32.const 3392 │ │ local.set 101 │ │ local.get 99 │ │ local.get 100 │ │ local.get 101 │ │ call $luaL_argerror │ │ local.set 102 │ │ local.get 5 │ │ @@ -108388,15 +108392,15 @@ │ │ local.get 5 │ │ call $luaL_checkany │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 6 │ │ i32.const 1 │ │ local.set 7 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $luaL_testudata │ │ local.set 9 │ │ local.get 3 │ │ @@ -108459,26 +108463,26 @@ │ │ block ;; label = @3 │ │ local.get 25 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 26 │ │ - i32.const 10360 │ │ + i32.const 10567 │ │ local.set 27 │ │ local.get 26 │ │ local.get 27 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 28 │ │ - i32.const 10367 │ │ + i32.const 10636 │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ call $lua_pushstring │ │ drop │ │ end │ │ end │ │ @@ -108658,15 +108662,15 @@ │ │ local.get 28 │ │ local.get 29 │ │ call $lua_tointegerx │ │ local.set 30 │ │ local.get 5 │ │ local.get 30 │ │ i64.store │ │ - i32.const 11415 │ │ + i32.const 11684 │ │ local.set 31 │ │ local.get 26 │ │ local.get 31 │ │ local.get 5 │ │ call $fprintf │ │ local.set 32 │ │ local.get 32 │ │ @@ -108688,15 +108692,15 @@ │ │ local.get 36 │ │ local.get 37 │ │ call $lua_tonumberx │ │ local.set 38 │ │ local.get 5 │ │ local.get 38 │ │ f64.store offset=16 │ │ - i32.const 8867 │ │ + i32.const 9001 │ │ local.set 39 │ │ i32.const 16 │ │ local.set 40 │ │ local.get 5 │ │ local.get 40 │ │ i32.add │ │ local.set 41 │ │ @@ -108905,15 +108909,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -108972,15 +108976,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -109108,15 +109112,15 @@ │ │ block ;; label = @2 │ │ local.get 19 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 20 │ │ - i32.const 12154 │ │ + i32.const 12423 │ │ local.set 21 │ │ i32.const 0 │ │ local.set 22 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $luaL_error │ │ @@ -109136,15 +109140,15 @@ │ │ call $lua_settop │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 26 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 27 │ │ - i32.const 3443 │ │ + i32.const 3492 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $luaL_checkstack │ │ i32.const 1 │ │ local.set 29 │ │ @@ -109309,15 +109313,15 @@ │ │ local.get 70 │ │ local.get 71 │ │ call $lua_tolstring │ │ local.set 72 │ │ local.get 3 │ │ local.get 72 │ │ i32.store │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 73 │ │ local.get 64 │ │ local.get 73 │ │ local.get 3 │ │ call $luaL_error │ │ local.set 74 │ │ local.get 3 │ │ @@ -109843,15 +109847,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ call $ungetc │ │ drop │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 9 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 10 │ │ local.get 9 │ │ local.get 10 │ │ call $lua_pushstring │ │ drop │ │ local.get 4 │ │ i32.load offset=4 │ │ @@ -110085,29 +110089,29 @@ │ │ local.set 17 │ │ local.get 4 │ │ local.get 17 │ │ i32.add │ │ local.set 18 │ │ local.get 18 │ │ local.set 19 │ │ - i32.const 17463 │ │ + i32.const 17766 │ │ local.set 20 │ │ local.get 19 │ │ local.get 20 │ │ call $test2 │ │ drop │ │ i32.const 24 │ │ local.set 21 │ │ local.get 4 │ │ local.get 21 │ │ i32.add │ │ local.set 22 │ │ local.get 22 │ │ local.set 23 │ │ - i32.const 17129 │ │ + i32.const 17432 │ │ local.set 24 │ │ local.get 23 │ │ local.get 24 │ │ call $test2 │ │ local.set 25 │ │ block ;; label = @1 │ │ local.get 25 │ │ @@ -110117,15 +110121,15 @@ │ │ local.set 26 │ │ local.get 4 │ │ local.get 26 │ │ i32.add │ │ local.set 27 │ │ local.get 27 │ │ local.set 28 │ │ - i32.const 15761 │ │ + i32.const 16064 │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ call $test2 │ │ local.set 30 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ @@ -110243,17 +110247,17 @@ │ │ block ;; label = @1 │ │ local.get 60 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=16 │ │ local.set 61 │ │ - i32.const 15859 │ │ + i32.const 16162 │ │ local.set 62 │ │ - i32.const 16291 │ │ + i32.const 16594 │ │ local.set 63 │ │ local.get 62 │ │ local.get 63 │ │ local.get 61 │ │ select │ │ local.set 64 │ │ i32.const 24 │ │ @@ -110275,15 +110279,15 @@ │ │ local.set 69 │ │ local.get 4 │ │ local.get 69 │ │ i32.add │ │ local.set 70 │ │ local.get 70 │ │ local.set 71 │ │ - i32.const 17463 │ │ + i32.const 17766 │ │ local.set 72 │ │ local.get 71 │ │ local.get 72 │ │ call $test2 │ │ drop │ │ i32.const 24 │ │ local.set 73 │ │ @@ -110915,15 +110919,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -111014,15 +111018,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 17473 │ │ + i32.const 17776 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_checkudata │ │ local.set 7 │ │ local.get 3 │ │ @@ -111054,15 +111058,15 @@ │ │ block ;; label = @2 │ │ local.get 15 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ - i32.const 18254 │ │ + i32.const 18557 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@1;) │ │ end │ │ @@ -111074,15 +111078,15 @@ │ │ local.set 19 │ │ local.get 19 │ │ i32.load │ │ local.set 20 │ │ local.get 3 │ │ local.get 20 │ │ i32.store │ │ - i32.const 17943 │ │ + i32.const 18246 │ │ local.set 21 │ │ local.get 18 │ │ local.get 21 │ │ local.get 3 │ │ call $lua_pushfstring │ │ drop │ │ end │ │ @@ -111320,17 +111324,17 @@ │ │ local.get 5 │ │ i32.store offset=20 │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 6 │ │ i32.const 2 │ │ local.set 7 │ │ - i32.const 4629 │ │ + i32.const 4678 │ │ local.set 8 │ │ - i32.const 24912 │ │ + i32.const 25232 │ │ local.set 9 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_checkoption │ │ local.set 10 │ │ @@ -111394,15 +111398,15 @@ │ │ local.get 25 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 28 │ │ i32.const 3 │ │ local.set 29 │ │ - i32.const 10886 │ │ + i32.const 11155 │ │ local.set 30 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $luaL_argerror │ │ local.set 31 │ │ i32.const 0 │ │ @@ -111425,15 +111429,15 @@ │ │ local.set 36 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 37 │ │ local.get 3 │ │ i32.load offset=16 │ │ local.set 38 │ │ - i32.const 24896 │ │ + i32.const 25216 │ │ local.set 39 │ │ i32.const 2 │ │ local.set 40 │ │ local.get 38 │ │ local.get 40 │ │ i32.shl │ │ local.set 41 │ │ @@ -111538,15 +111542,15 @@ │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 6 │ │ i32.const 2 │ │ local.set 7 │ │ i32.const 0 │ │ local.set 8 │ │ - i32.const 24944 │ │ + i32.const 25264 │ │ local.set 9 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_checkoption │ │ local.set 10 │ │ @@ -111570,15 +111574,15 @@ │ │ i64.store offset=8 │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 15 │ │ local.get 3 │ │ i32.load offset=20 │ │ local.set 16 │ │ - i32.const 24928 │ │ + i32.const 25248 │ │ local.set 17 │ │ i32.const 2 │ │ local.set 18 │ │ local.get 16 │ │ local.get 18 │ │ i32.shl │ │ local.set 19 │ │ @@ -111681,15 +111685,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 24960 │ │ + i32.const 25280 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -111702,15 +111706,15 @@ │ │ local.get 14 │ │ call $lua_pushnumber │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 15 │ │ i32.const -2 │ │ local.set 16 │ │ - i32.const 7798 │ │ + i32.const 7847 │ │ local.set 17 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -111721,15 +111725,15 @@ │ │ local.get 19 │ │ call $lua_pushnumber │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 20 │ │ i32.const -2 │ │ local.set 21 │ │ - i32.const 10766 │ │ + i32.const 11035 │ │ local.set 22 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -111740,15 +111744,15 @@ │ │ local.get 24 │ │ call $lua_pushinteger │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 25 │ │ i32.const -2 │ │ local.set 26 │ │ - i32.const 5218 │ │ + i32.const 5267 │ │ local.set 27 │ │ local.get 25 │ │ local.get 26 │ │ local.get 27 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -111759,15 +111763,15 @@ │ │ local.get 29 │ │ call $lua_pushinteger │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 30 │ │ i32.const -2 │ │ local.set 31 │ │ - i32.const 5239 │ │ + i32.const 5288 │ │ local.set 32 │ │ local.get 30 │ │ local.get 31 │ │ local.get 32 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -111832,15 +111836,15 @@ │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ call $lua_settop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ - i32.const 25184 │ │ + i32.const 25504 │ │ local.set 13 │ │ i32.const 1 │ │ local.set 14 │ │ local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ call $luaL_setfuncs │ │ @@ -112820,15 +112824,15 @@ │ │ local.get 29 │ │ br_if 0 (;@5;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 32 │ │ i32.const 2 │ │ local.set 33 │ │ - i32.const 6100 │ │ + i32.const 6149 │ │ local.set 34 │ │ local.get 32 │ │ local.get 33 │ │ local.get 34 │ │ call $luaL_argerror │ │ local.set 35 │ │ i32.const 0 │ │ @@ -113240,15 +113244,15 @@ │ │ local.get 13 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ i32.const 1 │ │ local.set 17 │ │ - i32.const 12060 │ │ + i32.const 12329 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_argerror │ │ local.set 19 │ │ i32.const 0 │ │ @@ -113416,15 +113420,15 @@ │ │ local.get 13 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ i32.const 1 │ │ local.set 17 │ │ - i32.const 12060 │ │ + i32.const 12329 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_argerror │ │ local.set 19 │ │ i32.const 0 │ │ @@ -113954,17 +113958,17 @@ │ │ local.set 14 │ │ i32.const 1 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ call $lua_isinteger │ │ local.set 16 │ │ - i32.const 5353 │ │ + i32.const 5402 │ │ local.set 17 │ │ - i32.const 3314 │ │ + i32.const 3363 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ local.get 16 │ │ select │ │ local.set 19 │ │ local.get 13 │ │ @@ -114534,15 +114538,15 @@ │ │ local.get 37 │ │ i64.store offset=24 │ │ br 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 38 │ │ - i32.const 3462 │ │ + i32.const 3511 │ │ local.set 39 │ │ i32.const 0 │ │ local.set 40 │ │ local.get 38 │ │ local.get 39 │ │ local.get 40 │ │ call $luaL_error │ │ @@ -115242,15 +115246,15 @@ │ │ local.set 40 │ │ local.get 9 │ │ local.get 40 │ │ i32.store offset=4 │ │ local.get 9 │ │ local.get 39 │ │ i32.store │ │ - i32.const 18276 │ │ + i32.const 18579 │ │ local.set 41 │ │ local.get 38 │ │ local.get 41 │ │ local.get 9 │ │ call $luaG_runerror │ │ unreachable │ │ end │ │ @@ -115825,15 +115829,15 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 8824 │ │ + i32.const 8958 │ │ local.set 5 │ │ i32.const 0 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaG_runerror │ │ @@ -116295,15 +116299,15 @@ │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 11 │ │ - i32.const 25216 │ │ + i32.const 25536 │ │ local.set 12 │ │ i32.const 0 │ │ local.set 13 │ │ local.get 11 │ │ local.get 12 │ │ local.get 13 │ │ call $luaL_setfuncs │ │ @@ -116311,100 +116315,100 @@ │ │ i32.load offset=12 │ │ local.set 14 │ │ local.get 14 │ │ call $createsearcherstable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 15 │ │ - i32.const 7928 │ │ + i32.const 7977 │ │ local.set 16 │ │ - i32.const 16240 │ │ + i32.const 16543 │ │ local.set 17 │ │ - i32.const 14225 │ │ + i32.const 14494 │ │ local.set 18 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $setpath │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 19 │ │ - i32.const 7927 │ │ + i32.const 7976 │ │ local.set 20 │ │ - i32.const 16249 │ │ + i32.const 16552 │ │ local.set 21 │ │ - i32.const 5991 │ │ + i32.const 6040 │ │ local.set 22 │ │ local.get 19 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $setpath │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 23 │ │ - i32.const 21828 │ │ + i32.const 22131 │ │ local.set 24 │ │ local.get 23 │ │ local.get 24 │ │ call $lua_pushstring │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 25 │ │ i32.const -2 │ │ local.set 26 │ │ - i32.const 8803 │ │ + i32.const 8937 │ │ local.set 27 │ │ local.get 25 │ │ local.get 26 │ │ local.get 27 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 28 │ │ i32.const -1001000 │ │ local.set 29 │ │ - i32.const 16394 │ │ + i32.const 16697 │ │ local.set 30 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $luaL_getsubtable │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 31 │ │ i32.const -2 │ │ local.set 32 │ │ - i32.const 12672 │ │ + i32.const 12941 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 34 │ │ i32.const -1001000 │ │ local.set 35 │ │ - i32.const 16402 │ │ + i32.const 16705 │ │ local.set 36 │ │ local.get 34 │ │ local.get 35 │ │ local.get 36 │ │ call $luaL_getsubtable │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 37 │ │ i32.const -2 │ │ local.set 38 │ │ - i32.const 12700 │ │ + i32.const 12969 │ │ local.set 39 │ │ local.get 37 │ │ local.get 38 │ │ local.get 39 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -116425,15 +116429,15 @@ │ │ local.set 44 │ │ local.get 43 │ │ local.get 44 │ │ call $lua_pushvalue │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 45 │ │ - i32.const 25280 │ │ + i32.const 25600 │ │ local.set 46 │ │ i32.const 1 │ │ local.set 47 │ │ local.get 45 │ │ local.get 46 │ │ local.get 47 │ │ call $luaL_setfuncs │ │ @@ -116473,15 +116477,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const -1001000 │ │ local.set 5 │ │ - i32.const 15825 │ │ + i32.const 16128 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaL_getsubtable │ │ drop │ │ local.get 3 │ │ @@ -116507,15 +116511,15 @@ │ │ local.get 12 │ │ call $lua_pushcclosure │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 13 │ │ i32.const -2 │ │ local.set 14 │ │ - i32.const 13793 │ │ + i32.const 14062 │ │ local.set 15 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $lua_setfield │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -116567,15 +116571,15 @@ │ │ local.get 7 │ │ i32.store offset=8 │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ - i32.const 25296 │ │ + i32.const 25616 │ │ local.set 9 │ │ i32.const 2 │ │ local.set 10 │ │ local.get 8 │ │ local.get 10 │ │ i32.shl │ │ local.set 11 │ │ @@ -116615,15 +116619,15 @@ │ │ call $lua_pushvalue │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 22 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 23 │ │ - i32.const 25296 │ │ + i32.const 25616 │ │ local.set 24 │ │ i32.const 2 │ │ local.set 25 │ │ local.get 23 │ │ local.get 25 │ │ i32.shl │ │ local.set 26 │ │ @@ -116679,15 +116683,15 @@ │ │ end │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 40 │ │ i32.const -2 │ │ local.set 41 │ │ - i32.const 3677 │ │ + i32.const 3726 │ │ local.set 42 │ │ local.get 40 │ │ local.get 41 │ │ local.get 42 │ │ call $lua_setfield │ │ i32.const 16 │ │ local.set 43 │ │ @@ -116724,23 +116728,23 @@ │ │ i32.store offset=560 │ │ local.get 6 │ │ i32.load offset=572 │ │ local.set 7 │ │ local.get 6 │ │ i32.load offset=564 │ │ local.set 8 │ │ - i32.const 16848 │ │ + i32.const 17151 │ │ local.set 9 │ │ local.get 6 │ │ local.get 9 │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 8 │ │ i32.store │ │ - i32.const 4336 │ │ + i32.const 4385 │ │ local.set 10 │ │ local.get 7 │ │ local.get 10 │ │ local.get 6 │ │ call $lua_pushfstring │ │ local.set 11 │ │ local.get 6 │ │ @@ -116833,15 +116837,15 @@ │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 6 │ │ i32.load offset=548 │ │ local.set 34 │ │ - i32.const 16645 │ │ + i32.const 16948 │ │ local.set 35 │ │ local.get 34 │ │ local.get 35 │ │ call $strstr │ │ local.set 36 │ │ local.get 6 │ │ local.get 36 │ │ @@ -117006,15 +117010,15 @@ │ │ local.set 73 │ │ end │ │ local.get 73 │ │ drop │ │ i32.const 0 │ │ local.set 83 │ │ local.get 83 │ │ - i32.load8_u offset=16646 │ │ + i32.load8_u offset=16949 │ │ local.set 84 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 85 │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 86 │ │ @@ -117141,15 +117145,15 @@ │ │ local.set 113 │ │ end │ │ local.get 113 │ │ drop │ │ i32.const 0 │ │ local.set 123 │ │ local.get 123 │ │ - i32.load8_u offset=16646 │ │ + i32.load8_u offset=16949 │ │ local.set 124 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 125 │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 126 │ │ @@ -117381,15 +117385,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const -1001000 │ │ local.set 5 │ │ - i32.const 15775 │ │ + i32.const 16078 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $lua_getfield │ │ drop │ │ local.get 3 │ │ @@ -117562,15 +117566,15 @@ │ │ local.set 32 │ │ local.get 31 │ │ local.get 32 │ │ i32.eq │ │ local.set 33 │ │ i32.const 2853 │ │ local.set 34 │ │ - i32.const 2944 │ │ + i32.const 2993 │ │ local.set 35 │ │ i32.const 1 │ │ local.set 36 │ │ local.get 33 │ │ local.get 36 │ │ i32.and │ │ local.set 37 │ │ @@ -117922,30 +117926,30 @@ │ │ call $luaL_checklstring │ │ local.set 12 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 13 │ │ i32.const 3 │ │ local.set 14 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ local.set 15 │ │ i32.const 0 │ │ local.set 16 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ local.get 16 │ │ call $luaL_optlstring │ │ local.set 17 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 18 │ │ i32.const 4 │ │ local.set 19 │ │ - i32.const 17215 │ │ + i32.const 17518 │ │ local.set 20 │ │ i32.const 0 │ │ local.set 21 │ │ local.get 18 │ │ local.get 19 │ │ local.get 20 │ │ local.get 21 │ │ @@ -118162,15 +118166,15 @@ │ │ local.set 37 │ │ local.get 7 │ │ local.get 37 │ │ i32.add │ │ local.set 38 │ │ local.get 38 │ │ local.set 39 │ │ - i32.const 16551 │ │ + i32.const 16854 │ │ local.set 40 │ │ local.get 39 │ │ local.get 35 │ │ local.get 40 │ │ local.get 36 │ │ call $luaL_addgsub │ │ local.get 7 │ │ @@ -118412,15 +118416,15 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 5 │ │ i32.const -1001000 │ │ local.set 6 │ │ - i32.const 15825 │ │ + i32.const 16128 │ │ local.set 7 │ │ local.get 5 │ │ local.get 6 │ │ local.get 7 │ │ call $lua_getfield │ │ drop │ │ local.get 4 │ │ @@ -118489,15 +118493,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 6 │ │ - i32.const 6659 │ │ + i32.const 6708 │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ call $lua_pushstring │ │ drop │ │ i32.const 0 │ │ local.set 8 │ │ @@ -118533,15 +118537,15 @@ │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 6 │ │ i32.const -1001000 │ │ local.set 7 │ │ - i32.const 15825 │ │ + i32.const 16128 │ │ local.set 8 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ call $lua_getfield │ │ drop │ │ local.get 5 │ │ @@ -118634,15 +118638,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 6 │ │ - i32.const 6659 │ │ + i32.const 6708 │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ call $lua_pushstring │ │ drop │ │ i32.const 0 │ │ local.set 8 │ │ @@ -118733,15 +118737,15 @@ │ │ local.set 19 │ │ block ;; label = @2 │ │ local.get 19 │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 20 │ │ local.get 20 │ │ - i32.load8_u offset=16646 │ │ + i32.load8_u offset=16949 │ │ local.set 21 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 22 │ │ local.get 22 │ │ local.get 21 │ │ i32.store8 │ │ @@ -118760,15 +118764,15 @@ │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 26 │ │ i32.const 0 │ │ local.set 27 │ │ local.get 27 │ │ - i32.load8_u offset=16646 │ │ + i32.load8_u offset=16949 │ │ local.set 28 │ │ i32.const 24 │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ i32.shl │ │ local.set 30 │ │ @@ -118864,15 +118868,15 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=8 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 4 │ │ - i32.const 5756 │ │ + i32.const 5805 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ call $fopen │ │ local.set 6 │ │ local.get 3 │ │ local.get 6 │ │ @@ -118969,15 +118973,15 @@ │ │ local.set 9 │ │ local.get 4 │ │ local.get 9 │ │ i32.add │ │ local.set 10 │ │ local.get 10 │ │ local.set 11 │ │ - i32.const 19372 │ │ + i32.const 19675 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_addstring │ │ local.get 4 │ │ i32.load offset=536 │ │ local.set 13 │ │ @@ -118985,32 +118989,32 @@ │ │ local.set 14 │ │ local.get 4 │ │ local.get 14 │ │ i32.add │ │ local.set 15 │ │ local.get 15 │ │ local.set 16 │ │ - i32.const 16646 │ │ + i32.const 16949 │ │ local.set 17 │ │ - i32.const 19369 │ │ + i32.const 19672 │ │ local.set 18 │ │ local.get 16 │ │ local.get 13 │ │ local.get 17 │ │ local.get 18 │ │ call $luaL_addgsub │ │ i32.const 8 │ │ local.set 19 │ │ local.get 4 │ │ local.get 19 │ │ i32.add │ │ local.set 20 │ │ local.get 20 │ │ local.set 21 │ │ - i32.const 19380 │ │ + i32.const 19683 │ │ local.set 22 │ │ local.get 21 │ │ local.get 22 │ │ call $luaL_addstring │ │ i32.const 8 │ │ local.set 23 │ │ local.get 4 │ │ @@ -119061,15 +119065,15 @@ │ │ local.get 7 │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ i32.const -1001000 │ │ local.set 9 │ │ - i32.const 16402 │ │ + i32.const 16705 │ │ local.set 10 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ call $lua_getfield │ │ drop │ │ local.get 3 │ │ @@ -119094,15 +119098,15 @@ │ │ local.set 15 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 16 │ │ local.get 3 │ │ local.get 16 │ │ i32.store │ │ - i32.const 15670 │ │ + i32.const 15973 │ │ local.set 17 │ │ local.get 15 │ │ local.get 17 │ │ local.get 3 │ │ call $lua_pushfstring │ │ drop │ │ i32.const 1 │ │ @@ -119111,15 +119115,15 @@ │ │ local.get 18 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 19 │ │ - i32.const 16665 │ │ + i32.const 16968 │ │ local.set 20 │ │ local.get 19 │ │ local.get 20 │ │ call $lua_pushstring │ │ drop │ │ i32.const 2 │ │ local.set 21 │ │ @@ -119172,17 +119176,17 @@ │ │ i32.store │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ local.get 3 │ │ i32.load │ │ local.set 9 │ │ - i32.const 7928 │ │ + i32.const 7977 │ │ local.set 10 │ │ - i32.const 17215 │ │ + i32.const 17518 │ │ local.set 11 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $findfile │ │ local.set 12 │ │ @@ -119357,15 +119361,15 @@ │ │ local.set 21 │ │ local.get 6 │ │ i32.load offset=20 │ │ local.set 22 │ │ local.get 6 │ │ local.get 22 │ │ i32.store │ │ - i32.const 8739 │ │ + i32.const 8873 │ │ local.set 23 │ │ local.get 21 │ │ local.get 23 │ │ local.get 6 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -119377,15 +119381,15 @@ │ │ local.set 25 │ │ local.get 6 │ │ i32.load offset=12 │ │ local.set 26 │ │ local.get 6 │ │ i32.load offset=16 │ │ local.set 27 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ local.set 28 │ │ local.get 24 │ │ local.get 25 │ │ local.get 26 │ │ local.get 28 │ │ local.get 27 │ │ call $searchpath │ │ @@ -119481,15 +119485,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 15 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 14 │ │ i32.store │ │ - i32.const 4578 │ │ + i32.const 4627 │ │ local.set 20 │ │ local.get 10 │ │ local.get 20 │ │ local.get 5 │ │ call $luaL_error │ │ local.set 21 │ │ local.get 5 │ │ @@ -119541,17 +119545,17 @@ │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 9 │ │ - i32.const 7927 │ │ + i32.const 7976 │ │ local.set 10 │ │ - i32.const 17215 │ │ + i32.const 17518 │ │ local.set 11 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $findfile │ │ local.set 12 │ │ @@ -119670,17 +119674,17 @@ │ │ i32.store offset=32 │ │ local.get 5 │ │ i32.load offset=40 │ │ local.set 6 │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 7 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ local.set 8 │ │ - i32.const 15623 │ │ + i32.const 15926 │ │ local.set 9 │ │ local.get 6 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_gsub │ │ local.set 10 │ │ @@ -119689,15 +119693,15 @@ │ │ i32.store offset=32 │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 12 │ │ - i32.load8_u offset=17456 │ │ + i32.load8_u offset=17759 │ │ local.set 13 │ │ i32.const 24 │ │ local.set 14 │ │ local.get 13 │ │ local.get 14 │ │ i32.shl │ │ local.set 15 │ │ @@ -119765,15 +119769,15 @@ │ │ local.set 31 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 32 │ │ local.get 5 │ │ local.get 32 │ │ i32.store offset=16 │ │ - i32.const 4368 │ │ + i32.const 4417 │ │ local.set 33 │ │ i32.const 16 │ │ local.set 34 │ │ local.get 5 │ │ local.get 34 │ │ i32.add │ │ local.set 35 │ │ @@ -119851,15 +119855,15 @@ │ │ local.set 52 │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 53 │ │ local.get 5 │ │ local.get 53 │ │ i32.store │ │ - i32.const 4368 │ │ + i32.const 4417 │ │ local.set 54 │ │ local.get 52 │ │ local.get 54 │ │ local.get 5 │ │ call $lua_pushfstring │ │ local.set 55 │ │ local.get 5 │ │ @@ -120001,17 +120005,17 @@ │ │ i32.const 0 │ │ local.set 27 │ │ local.get 25 │ │ local.get 26 │ │ local.get 27 │ │ call $lua_tolstring │ │ local.set 28 │ │ - i32.const 7927 │ │ + i32.const 7976 │ │ local.set 29 │ │ - i32.const 17215 │ │ + i32.const 17518 │ │ local.set 30 │ │ local.get 24 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $findfile │ │ local.set 31 │ │ @@ -120121,15 +120125,15 @@ │ │ local.set 57 │ │ local.get 3 │ │ local.get 57 │ │ i32.store offset=4 │ │ local.get 3 │ │ local.get 56 │ │ i32.store │ │ - i32.const 18989 │ │ + i32.const 19292 │ │ local.set 58 │ │ local.get 55 │ │ local.get 58 │ │ local.get 3 │ │ call $lua_pushfstring │ │ drop │ │ i32.const 1 │ │ @@ -120207,15 +120211,15 @@ │ │ local.get 9 │ │ call $lua_settop │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 10 │ │ i32.const -1001000 │ │ local.set 11 │ │ - i32.const 16394 │ │ + i32.const 16697 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $lua_getfield │ │ drop │ │ local.get 3 │ │ @@ -120445,15 +120449,15 @@ │ │ local.get 1 │ │ i32.store offset=552 │ │ local.get 4 │ │ i32.load offset=556 │ │ local.set 5 │ │ i32.const -1001001 │ │ local.set 6 │ │ - i32.const 3677 │ │ + i32.const 3726 │ │ local.set 7 │ │ local.get 5 │ │ local.get 6 │ │ local.get 7 │ │ call $lua_getfield │ │ local.set 8 │ │ i32.const 5 │ │ @@ -120475,15 +120479,15 @@ │ │ block ;; label = @1 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=556 │ │ local.set 15 │ │ - i32.const 10697 │ │ + i32.const 10966 │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ call $luaL_error │ │ @@ -120513,15 +120517,15 @@ │ │ local.set 23 │ │ local.get 4 │ │ local.get 23 │ │ i32.add │ │ local.set 24 │ │ local.get 24 │ │ local.set 25 │ │ - i32.const 22646 │ │ + i32.const 22949 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ call $luaL_addstring │ │ local.get 4 │ │ i32.load offset=556 │ │ local.set 27 │ │ @@ -120610,15 +120614,15 @@ │ │ local.set 52 │ │ local.get 4 │ │ local.get 52 │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 48 │ │ i32.store │ │ - i32.const 4387 │ │ + i32.const 4436 │ │ local.set 53 │ │ local.get 47 │ │ local.get 53 │ │ local.get 4 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -120839,15 +120843,15 @@ │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 21 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 22 │ │ local.get 22 │ │ - i32.load8_u offset=25600 │ │ + i32.load8_u offset=25920 │ │ local.set 23 │ │ i32.const 255 │ │ local.set 24 │ │ local.get 23 │ │ local.get 24 │ │ i32.and │ │ local.set 25 │ │ @@ -122458,15 +122462,15 @@ │ │ i32.const 1 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ i32.add │ │ local.set 6 │ │ local.get 6 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 7 │ │ i32.const 255 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ i32.and │ │ local.set 9 │ │ @@ -122758,15 +122762,15 @@ │ │ i32.const 1 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.add │ │ local.set 12 │ │ local.get 12 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 13 │ │ i32.const 255 │ │ local.set 14 │ │ local.get 13 │ │ local.get 14 │ │ i32.and │ │ local.set 15 │ │ @@ -122946,15 +122950,15 @@ │ │ i32.const 1 │ │ local.set 65 │ │ local.get 64 │ │ local.get 65 │ │ i32.add │ │ local.set 66 │ │ local.get 66 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 67 │ │ i32.const 255 │ │ local.set 68 │ │ local.get 67 │ │ local.get 68 │ │ i32.and │ │ local.set 69 │ │ @@ -123046,15 +123050,15 @@ │ │ i32.const 1 │ │ local.set 92 │ │ local.get 91 │ │ local.get 92 │ │ i32.add │ │ local.set 93 │ │ local.get 93 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 94 │ │ i32.const 255 │ │ local.set 95 │ │ local.get 94 │ │ local.get 95 │ │ i32.and │ │ local.set 96 │ │ @@ -123236,15 +123240,15 @@ │ │ i32.const 1 │ │ local.set 145 │ │ local.get 144 │ │ local.get 145 │ │ i32.add │ │ local.set 146 │ │ local.get 146 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 147 │ │ i32.const 255 │ │ local.set 148 │ │ local.get 147 │ │ local.get 148 │ │ i32.and │ │ local.set 149 │ │ @@ -123378,15 +123382,15 @@ │ │ i32.store offset=248 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=244 │ │ local.get 4 │ │ i32.load offset=248 │ │ local.set 5 │ │ - i32.const 15910 │ │ + i32.const 16213 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ call $strpbrk │ │ local.set 7 │ │ local.get 4 │ │ local.get 7 │ │ @@ -124006,15 +124010,15 @@ │ │ i32.const 1 │ │ local.set 38 │ │ local.get 37 │ │ local.get 38 │ │ i32.add │ │ local.set 39 │ │ local.get 39 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 40 │ │ i32.const 255 │ │ local.set 41 │ │ local.get 40 │ │ local.get 41 │ │ i32.and │ │ local.set 42 │ │ @@ -124457,15 +124461,15 @@ │ │ local.set 16 │ │ local.get 16 │ │ i64.load │ │ local.set 17 │ │ local.get 4 │ │ local.get 17 │ │ i64.store │ │ - i32.const 11415 │ │ + i32.const 11684 │ │ local.set 18 │ │ i32.const 44 │ │ local.set 19 │ │ local.get 15 │ │ local.get 19 │ │ local.get 18 │ │ local.get 4 │ │ @@ -124484,15 +124488,15 @@ │ │ local.set 22 │ │ local.get 22 │ │ f64.load │ │ local.set 23 │ │ local.get 4 │ │ local.get 23 │ │ f64.store offset=16 │ │ - i32.const 8867 │ │ + i32.const 9001 │ │ local.set 24 │ │ i32.const 44 │ │ local.set 25 │ │ i32.const 16 │ │ local.set 26 │ │ local.get 4 │ │ local.get 26 │ │ @@ -124509,15 +124513,15 @@ │ │ i32.store offset=36 │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 29 │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 30 │ │ - i32.const 16712 │ │ + i32.const 17015 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ call $strspn │ │ local.set 32 │ │ local.get 29 │ │ local.get 32 │ │ @@ -124766,15 +124770,15 @@ │ │ local.get 37 │ │ i32.and │ │ local.set 38 │ │ block ;; label = @12 │ │ local.get 38 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ - i32.const 17953 │ │ + i32.const 18256 │ │ local.set 39 │ │ local.get 5 │ │ local.get 39 │ │ i32.store offset=136 │ │ end │ │ local.get 5 │ │ i32.load offset=136 │ │ @@ -125098,15 +125102,15 @@ │ │ local.set 125 │ │ local.get 5 │ │ i32.load offset=48 │ │ local.set 126 │ │ local.get 5 │ │ local.get 126 │ │ i32.store offset=16 │ │ - i32.const 5977 │ │ + i32.const 6026 │ │ local.set 127 │ │ i32.const 20 │ │ local.set 128 │ │ i32.const 16 │ │ local.set 129 │ │ local.get 5 │ │ local.get 129 │ │ @@ -125214,15 +125218,15 @@ │ │ local.set 156 │ │ local.get 5 │ │ local.get 156 │ │ i32.add │ │ local.set 157 │ │ local.get 157 │ │ local.set 158 │ │ - i32.const 19382 │ │ + i32.const 19685 │ │ local.set 159 │ │ i32.const 1 │ │ local.set 160 │ │ local.get 158 │ │ local.get 159 │ │ local.get 160 │ │ call $addstr2buff │ │ @@ -125246,15 +125250,15 @@ │ │ local.get 165 │ │ local.get 164 │ │ i32.shr_s │ │ local.set 166 │ │ local.get 5 │ │ local.get 166 │ │ i32.store │ │ - i32.const 19166 │ │ + i32.const 19469 │ │ local.set 167 │ │ local.get 161 │ │ local.get 167 │ │ local.get 5 │ │ call $luaG_runerror │ │ unreachable │ │ end │ │ @@ -126134,21 +126138,21 @@ │ │ local.get 73 │ │ local.get 74 │ │ i32.add │ │ local.set 75 │ │ i32.const 0 │ │ local.set 76 │ │ local.get 76 │ │ - i32.load8_u offset=17430 │ │ + i32.load8_u offset=17733 │ │ local.set 77 │ │ local.get 75 │ │ local.get 77 │ │ i32.store8 │ │ local.get 76 │ │ - i32.load16_u offset=17428 align=1 │ │ + i32.load16_u offset=17731 align=1 │ │ local.set 78 │ │ local.get 73 │ │ local.get 78 │ │ i32.store16 align=1 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 79 │ │ @@ -126242,21 +126246,21 @@ │ │ local.get 101 │ │ local.get 102 │ │ i32.add │ │ local.set 103 │ │ i32.const 0 │ │ local.set 104 │ │ local.get 104 │ │ - i32.load8_u offset=19480 │ │ + i32.load8_u offset=19783 │ │ local.set 105 │ │ local.get 103 │ │ local.get 105 │ │ i32.store8 │ │ local.get 104 │ │ - i64.load offset=19472 align=1 │ │ + i64.load offset=19775 align=1 │ │ local.set 106 │ │ local.get 101 │ │ local.get 106 │ │ i64.store align=1 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 107 │ │ @@ -126472,21 +126476,21 @@ │ │ local.get 161 │ │ local.get 162 │ │ i32.add │ │ local.set 163 │ │ i32.const 0 │ │ local.set 164 │ │ local.get 164 │ │ - i32.load8_u offset=17430 │ │ + i32.load8_u offset=17733 │ │ local.set 165 │ │ local.get 163 │ │ local.get 165 │ │ i32.store8 │ │ local.get 164 │ │ - i32.load16_u offset=17428 align=1 │ │ + i32.load16_u offset=17731 align=1 │ │ local.set 166 │ │ local.get 161 │ │ local.get 166 │ │ i32.store16 align=1 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 167 │ │ @@ -126508,21 +126512,21 @@ │ │ local.get 170 │ │ local.get 171 │ │ i32.add │ │ local.set 172 │ │ i32.const 0 │ │ local.set 173 │ │ local.get 173 │ │ - i32.load8_u offset=15703 │ │ + i32.load8_u offset=16006 │ │ local.set 174 │ │ local.get 172 │ │ local.get 174 │ │ i32.store8 │ │ local.get 173 │ │ - i32.load16_u offset=15701 align=1 │ │ + i32.load16_u offset=16004 align=1 │ │ local.set 175 │ │ local.get 170 │ │ local.get 175 │ │ i32.store16 align=1 │ │ end │ │ end │ │ i32.const 32 │ │ @@ -126570,15 +126574,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 25952 │ │ + i32.const 26272 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -126654,15 +126658,15 @@ │ │ local.get 0 │ │ i32.store offset=616 │ │ local.get 3 │ │ i32.load offset=616 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 13954 │ │ + i32.const 14223 │ │ local.set 6 │ │ i32.const 612 │ │ local.set 7 │ │ local.get 3 │ │ local.get 7 │ │ i32.add │ │ local.set 8 │ │ @@ -126849,15 +126853,15 @@ │ │ block ;; label = @2 │ │ local.get 58 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=616 │ │ local.set 59 │ │ - i32.const 6549 │ │ + i32.const 6598 │ │ local.set 60 │ │ i32.const 0 │ │ local.set 61 │ │ local.get 59 │ │ local.get 60 │ │ local.get 61 │ │ call $luaL_error │ │ @@ -126866,15 +126870,15 @@ │ │ local.get 62 │ │ i32.store offset=620 │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=608 │ │ local.set 63 │ │ - i32.const 3406 │ │ + i32.const 3455 │ │ local.set 64 │ │ local.get 63 │ │ local.get 64 │ │ call $strcmp │ │ local.set 65 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ @@ -127286,15 +127290,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 20 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 21 │ │ - i32.const 4154 │ │ + i32.const 4203 │ │ local.set 22 │ │ local.get 20 │ │ local.get 21 │ │ local.get 22 │ │ call $luaL_argerror │ │ local.set 23 │ │ i32.const 0 │ │ @@ -127351,15 +127355,15 @@ │ │ local.set 5 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 6 │ │ local.get 6 │ │ i32.load offset=20 │ │ local.set 7 │ │ - i32.const 5722 │ │ + i32.const 5771 │ │ local.set 8 │ │ i32.const 1900 │ │ local.set 9 │ │ local.get 5 │ │ local.get 8 │ │ local.get 7 │ │ local.get 9 │ │ @@ -127369,15 +127373,15 @@ │ │ local.set 10 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 11 │ │ local.get 11 │ │ i32.load offset=16 │ │ local.set 12 │ │ - i32.const 7801 │ │ + i32.const 7850 │ │ local.set 13 │ │ i32.const 1 │ │ local.set 14 │ │ local.get 10 │ │ local.get 13 │ │ local.get 12 │ │ local.get 14 │ │ @@ -127405,15 +127409,15 @@ │ │ local.set 20 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 21 │ │ local.get 21 │ │ i32.load offset=8 │ │ local.set 22 │ │ - i32.const 4624 │ │ + i32.const 4673 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 20 │ │ local.get 23 │ │ local.get 22 │ │ local.get 24 │ │ @@ -127423,15 +127427,15 @@ │ │ local.set 25 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 26 │ │ local.get 26 │ │ i32.load offset=4 │ │ local.set 27 │ │ - i32.const 6811 │ │ + i32.const 6860 │ │ local.set 28 │ │ i32.const 0 │ │ local.set 29 │ │ local.get 25 │ │ local.get 28 │ │ local.get 27 │ │ local.get 29 │ │ @@ -127441,15 +127445,15 @@ │ │ local.set 30 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 31 │ │ local.get 31 │ │ i32.load │ │ local.set 32 │ │ - i32.const 13798 │ │ + i32.const 14067 │ │ local.set 33 │ │ i32.const 0 │ │ local.set 34 │ │ local.get 30 │ │ local.get 33 │ │ local.get 32 │ │ local.get 34 │ │ @@ -127740,15 +127744,15 @@ │ │ local.set 56 │ │ local.get 6 │ │ i32.load offset=20 │ │ local.set 57 │ │ local.get 6 │ │ local.get 57 │ │ i32.store │ │ - i32.const 19130 │ │ + i32.const 19433 │ │ local.set 58 │ │ local.get 56 │ │ local.get 58 │ │ local.get 6 │ │ call $lua_pushfstring │ │ local.set 59 │ │ i32.const 1 │ │ @@ -128352,17 +128356,17 @@ │ │ local.get 7 │ │ i32.store offset=8 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 8 │ │ i32.const 2 │ │ local.set 9 │ │ - i32.const 7155 │ │ + i32.const 7204 │ │ local.set 10 │ │ - i32.const 26080 │ │ + i32.const 26400 │ │ local.set 11 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $luaL_checkoption │ │ local.set 12 │ │ @@ -128371,15 +128375,15 @@ │ │ i32.store offset=4 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 13 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 14 │ │ - i32.const 26048 │ │ + i32.const 26368 │ │ local.set 15 │ │ i32.const 2 │ │ local.set 16 │ │ local.get 14 │ │ local.get 16 │ │ i32.shl │ │ local.set 17 │ │ @@ -128486,15 +128490,15 @@ │ │ local.set 19 │ │ local.get 18 │ │ local.get 19 │ │ call $lua_settop │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 20 │ │ - i32.const 5722 │ │ + i32.const 5771 │ │ local.set 21 │ │ i32.const -1 │ │ local.set 22 │ │ i32.const 1900 │ │ local.set 23 │ │ local.get 20 │ │ local.get 21 │ │ @@ -128504,15 +128508,15 @@ │ │ local.set 24 │ │ local.get 3 │ │ local.get 24 │ │ i32.store offset=28 │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 25 │ │ - i32.const 7801 │ │ + i32.const 7850 │ │ local.set 26 │ │ i32.const -1 │ │ local.set 27 │ │ i32.const 1 │ │ local.set 28 │ │ local.get 25 │ │ local.get 26 │ │ @@ -128540,15 +128544,15 @@ │ │ local.set 34 │ │ local.get 3 │ │ local.get 34 │ │ i32.store offset=20 │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 35 │ │ - i32.const 4624 │ │ + i32.const 4673 │ │ local.set 36 │ │ i32.const 12 │ │ local.set 37 │ │ i32.const 0 │ │ local.set 38 │ │ local.get 35 │ │ local.get 36 │ │ @@ -128558,15 +128562,15 @@ │ │ local.set 39 │ │ local.get 3 │ │ local.get 39 │ │ i32.store offset=16 │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 40 │ │ - i32.const 6811 │ │ + i32.const 6860 │ │ local.set 41 │ │ i32.const 0 │ │ local.set 42 │ │ local.get 40 │ │ local.get 41 │ │ local.get 42 │ │ local.get 42 │ │ @@ -128574,15 +128578,15 @@ │ │ local.set 43 │ │ local.get 3 │ │ local.get 43 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 44 │ │ - i32.const 13798 │ │ + i32.const 14067 │ │ local.set 45 │ │ i32.const 0 │ │ local.set 46 │ │ local.get 44 │ │ local.get 45 │ │ local.get 46 │ │ local.get 46 │ │ @@ -128687,15 +128691,15 @@ │ │ local.get 75 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.load offset=56 │ │ local.set 76 │ │ - i32.const 6604 │ │ + i32.const 6653 │ │ local.set 77 │ │ i32.const 0 │ │ local.set 78 │ │ local.get 76 │ │ local.get 77 │ │ local.get 78 │ │ call $luaL_error │ │ @@ -128835,15 +128839,15 @@ │ │ local.set 25 │ │ local.get 6 │ │ i32.load offset=68 │ │ local.set 26 │ │ local.get 6 │ │ local.get 26 │ │ i32.store offset=16 │ │ - i32.const 5282 │ │ + i32.const 5331 │ │ local.set 27 │ │ i32.const 16 │ │ local.set 28 │ │ local.get 6 │ │ local.get 28 │ │ i32.add │ │ local.set 29 │ │ @@ -128885,15 +128889,15 @@ │ │ local.set 38 │ │ local.get 6 │ │ i32.load offset=68 │ │ local.set 39 │ │ local.get 6 │ │ local.get 39 │ │ i32.store offset=32 │ │ - i32.const 10531 │ │ + i32.const 10800 │ │ local.set 40 │ │ i32.const 32 │ │ local.set 41 │ │ local.get 6 │ │ local.get 41 │ │ i32.add │ │ local.set 42 │ │ @@ -129019,15 +129023,15 @@ │ │ local.set 76 │ │ local.get 6 │ │ i32.load offset=68 │ │ local.set 77 │ │ local.get 6 │ │ local.get 77 │ │ i32.store │ │ - i32.const 11285 │ │ + i32.const 11554 │ │ local.set 78 │ │ local.get 76 │ │ local.get 78 │ │ local.get 6 │ │ call $luaL_error │ │ local.set 79 │ │ local.get 6 │ │ @@ -129216,15 +129220,15 @@ │ │ block ;; label = @2 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 15 │ │ - i32.const 10060 │ │ + i32.const 10245 │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ call $luaL_error │ │ @@ -129431,15 +129435,15 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 15770 │ │ + i32.const 16073 │ │ local.set 5 │ │ i32.const 4 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $luaS_newlstr │ │ @@ -129487,15 +129491,15 @@ │ │ br_if 1 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 18 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 19 │ │ - i32.const 26112 │ │ + i32.const 26432 │ │ local.set 20 │ │ i32.const 2 │ │ local.set 21 │ │ local.get 19 │ │ local.get 21 │ │ i32.shl │ │ local.set 22 │ │ @@ -129609,15 +129613,15 @@ │ │ i32.const 1 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ local.get 14 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 15 │ │ i32.const 255 │ │ local.set 16 │ │ local.get 15 │ │ local.get 16 │ │ i32.and │ │ local.set 17 │ │ @@ -129639,15 +129643,15 @@ │ │ local.set 21 │ │ local.get 4 │ │ i32.load offset=52 │ │ local.set 22 │ │ local.get 4 │ │ local.get 22 │ │ i32.store │ │ - i32.const 19276 │ │ + i32.const 19579 │ │ local.set 23 │ │ local.get 21 │ │ local.get 23 │ │ local.get 4 │ │ call $luaO_pushfstring │ │ local.set 24 │ │ local.get 4 │ │ @@ -129663,15 +129667,15 @@ │ │ local.set 26 │ │ local.get 4 │ │ i32.load offset=52 │ │ local.set 27 │ │ local.get 4 │ │ local.get 27 │ │ i32.store offset=16 │ │ - i32.const 19316 │ │ + i32.const 19619 │ │ local.set 28 │ │ i32.const 16 │ │ local.set 29 │ │ local.get 4 │ │ local.get 29 │ │ i32.add │ │ local.set 30 │ │ @@ -129690,15 +129694,15 @@ │ │ local.set 32 │ │ i32.const 256 │ │ local.set 33 │ │ local.get 32 │ │ local.get 33 │ │ i32.sub │ │ local.set 34 │ │ - i32.const 26112 │ │ + i32.const 26432 │ │ local.set 35 │ │ i32.const 2 │ │ local.set 36 │ │ local.get 34 │ │ local.get 36 │ │ i32.shl │ │ local.set 37 │ │ @@ -129743,15 +129747,15 @@ │ │ local.set 48 │ │ local.get 4 │ │ i32.load offset=48 │ │ local.set 49 │ │ local.get 4 │ │ local.get 49 │ │ i32.store offset=32 │ │ - i32.const 19125 │ │ + i32.const 19428 │ │ local.set 50 │ │ i32.const 32 │ │ local.set 51 │ │ local.get 4 │ │ local.get 51 │ │ i32.add │ │ local.set 52 │ │ @@ -129899,15 +129903,15 @@ │ │ local.set 20 │ │ local.get 5 │ │ local.get 20 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 17 │ │ i32.store │ │ - i32.const 4438 │ │ + i32.const 4487 │ │ local.set 21 │ │ local.get 16 │ │ local.get 21 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ drop │ │ end │ │ @@ -129982,15 +129986,15 @@ │ │ local.set 15 │ │ local.get 15 │ │ i32.load │ │ local.set 16 │ │ local.get 4 │ │ local.get 16 │ │ i32.store │ │ - i32.const 19125 │ │ + i32.const 19428 │ │ local.set 17 │ │ local.get 13 │ │ local.get 17 │ │ local.get 4 │ │ call $luaO_pushfstring │ │ local.set 18 │ │ local.get 4 │ │ @@ -130375,15 +130379,15 @@ │ │ local.set 25 │ │ local.get 25 │ │ local.get 24 │ │ i32.store offset=72 │ │ local.get 7 │ │ i32.load offset=28 │ │ local.set 26 │ │ - i32.const 15770 │ │ + i32.const 16073 │ │ local.set 27 │ │ i32.const 4 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $luaS_newlstr │ │ @@ -131319,15 +131323,15 @@ │ │ local.set 190 │ │ block ;; label = @15 │ │ local.get 190 │ │ br_if 0 (;@15;) │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 191 │ │ - i32.const 5100 │ │ + i32.const 5149 │ │ local.set 192 │ │ i32.const 292 │ │ local.set 193 │ │ local.get 191 │ │ local.get 192 │ │ local.get 193 │ │ call $lexerror │ │ @@ -132256,15 +132260,15 @@ │ │ i32.const 1 │ │ local.set 426 │ │ local.get 425 │ │ local.get 426 │ │ i32.add │ │ local.set 427 │ │ local.get 427 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 428 │ │ i32.const 255 │ │ local.set 429 │ │ local.get 428 │ │ local.get 429 │ │ i32.and │ │ local.set 430 │ │ @@ -132330,15 +132334,15 @@ │ │ i32.const 1 │ │ local.set 443 │ │ local.get 442 │ │ local.get 443 │ │ i32.add │ │ local.set 444 │ │ local.get 444 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 445 │ │ i32.const 255 │ │ local.set 446 │ │ local.get 445 │ │ local.get 446 │ │ i32.and │ │ local.set 447 │ │ @@ -132464,15 +132468,15 @@ │ │ i32.const 1 │ │ local.set 480 │ │ local.get 479 │ │ local.get 480 │ │ i32.add │ │ local.set 481 │ │ local.get 481 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 482 │ │ i32.const 255 │ │ local.set 483 │ │ local.get 482 │ │ local.get 483 │ │ i32.and │ │ local.set 484 │ │ @@ -133062,15 +133066,15 @@ │ │ block ;; label = @1 │ │ local.get 89 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 90 │ │ - i32.const 4062 │ │ + i32.const 4111 │ │ local.set 91 │ │ i32.const 0 │ │ local.set 92 │ │ local.get 90 │ │ local.get 91 │ │ local.get 92 │ │ call $lexerror │ │ @@ -133674,17 +133678,17 @@ │ │ local.set 65 │ │ local.get 64 │ │ local.set 66 │ │ local.get 65 │ │ local.get 66 │ │ i32.ne │ │ local.set 67 │ │ - i32.const 8762 │ │ + i32.const 8896 │ │ local.set 68 │ │ - i32.const 2894 │ │ + i32.const 2943 │ │ local.set 69 │ │ i32.const 1 │ │ local.set 70 │ │ local.get 67 │ │ local.get 70 │ │ i32.and │ │ local.set 71 │ │ @@ -133710,15 +133714,15 @@ │ │ local.set 76 │ │ local.get 5 │ │ local.get 76 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 75 │ │ i32.store │ │ - i32.const 18339 │ │ + i32.const 18642 │ │ local.set 77 │ │ local.get 74 │ │ local.get 77 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ local.set 78 │ │ local.get 5 │ │ @@ -134585,28 +134589,28 @@ │ │ local.get 51 │ │ br_if 2 (;@5;) │ │ br 3 (;@4;) │ │ end │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 52 │ │ - i32.const 8621 │ │ + i32.const 8755 │ │ local.set 53 │ │ i32.const 288 │ │ local.set 54 │ │ local.get 52 │ │ local.get 53 │ │ local.get 54 │ │ call $lexerror │ │ unreachable │ │ end │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 55 │ │ - i32.const 8621 │ │ + i32.const 8755 │ │ local.set 56 │ │ i32.const 292 │ │ local.set 57 │ │ local.get 55 │ │ local.get 56 │ │ local.get 57 │ │ call $lexerror │ │ @@ -134963,15 +134967,15 @@ │ │ i32.const 1 │ │ local.set 137 │ │ local.get 136 │ │ local.get 137 │ │ i32.add │ │ local.set 138 │ │ local.get 138 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 139 │ │ i32.const 255 │ │ local.set 140 │ │ local.get 139 │ │ local.get 140 │ │ i32.and │ │ local.set 141 │ │ @@ -135152,29 +135156,29 @@ │ │ i32.const 1 │ │ local.set 189 │ │ local.get 188 │ │ local.get 189 │ │ i32.add │ │ local.set 190 │ │ local.get 190 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 191 │ │ i32.const 255 │ │ local.set 192 │ │ local.get 191 │ │ local.get 192 │ │ i32.and │ │ local.set 193 │ │ i32.const 2 │ │ local.set 194 │ │ local.get 193 │ │ local.get 194 │ │ i32.and │ │ local.set 195 │ │ - i32.const 11141 │ │ + i32.const 11410 │ │ local.set 196 │ │ local.get 186 │ │ local.get 195 │ │ local.get 196 │ │ call $esccheck │ │ local.get 5 │ │ i32.load offset=12 │ │ @@ -135657,15 +135661,15 @@ │ │ block ;; label = @2 │ │ local.get 25 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 26 │ │ - i32.const 8176 │ │ + i32.const 8310 │ │ local.set 27 │ │ i32.const 0 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $lexerror │ │ @@ -135795,15 +135799,15 @@ │ │ global.set $__stack_pointer │ │ local.get 4 │ │ local.get 0 │ │ i32.store offset=40 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=36 │ │ - i32.const 11165 │ │ + i32.const 11434 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=12 │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 6 │ │ @@ -135937,24 +135941,24 @@ │ │ block ;; label = @1 │ │ local.get 42 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 43 │ │ - i32.const 15761 │ │ + i32.const 16064 │ │ local.set 44 │ │ local.get 43 │ │ local.get 44 │ │ call $check_next2 │ │ local.set 45 │ │ local.get 45 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 5958 │ │ + i32.const 6007 │ │ local.set 46 │ │ local.get 4 │ │ local.get 46 │ │ i32.store offset=12 │ │ end │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ @@ -135972,15 +135976,15 @@ │ │ block ;; label = @4 │ │ local.get 49 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 50 │ │ - i32.const 17463 │ │ + i32.const 17766 │ │ local.set 51 │ │ local.get 50 │ │ local.get 51 │ │ call $check_next2 │ │ drop │ │ br 1 (;@3;) │ │ end │ │ @@ -135993,15 +135997,15 @@ │ │ i32.const 1 │ │ local.set 54 │ │ local.get 53 │ │ local.get 54 │ │ i32.add │ │ local.set 55 │ │ local.get 55 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 56 │ │ i32.const 255 │ │ local.set 57 │ │ local.get 56 │ │ local.get 57 │ │ i32.and │ │ local.set 58 │ │ @@ -136161,15 +136165,15 @@ │ │ i32.const 1 │ │ local.set 99 │ │ local.get 98 │ │ local.get 99 │ │ i32.add │ │ local.set 100 │ │ local.get 100 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 101 │ │ i32.const 255 │ │ local.set 102 │ │ local.get 101 │ │ local.get 102 │ │ i32.and │ │ local.set 103 │ │ @@ -136317,15 +136321,15 @@ │ │ local.set 142 │ │ block ;; label = @1 │ │ local.get 142 │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 143 │ │ - i32.const 5661 │ │ + i32.const 5710 │ │ local.set 144 │ │ i32.const 289 │ │ local.set 145 │ │ local.get 143 │ │ local.get 144 │ │ local.get 145 │ │ call $lexerror │ │ @@ -136906,15 +136910,15 @@ │ │ i32.const 1 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ i32.add │ │ local.set 18 │ │ local.get 18 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 19 │ │ i32.const 255 │ │ local.set 20 │ │ local.get 19 │ │ local.get 20 │ │ i32.and │ │ local.set 21 │ │ @@ -137112,15 +137116,15 @@ │ │ local.set 75 │ │ i32.const 1 │ │ local.set 76 │ │ local.get 75 │ │ local.get 76 │ │ i32.and │ │ local.set 77 │ │ - i32.const 10861 │ │ + i32.const 11130 │ │ local.set 78 │ │ local.get 70 │ │ local.get 77 │ │ local.get 78 │ │ call $esccheck │ │ local.get 3 │ │ i32.load offset=8 │ │ @@ -137510,29 +137514,29 @@ │ │ i32.const 1 │ │ local.set 35 │ │ local.get 34 │ │ local.get 35 │ │ i32.add │ │ local.set 36 │ │ local.get 36 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 37 │ │ i32.const 255 │ │ local.set 38 │ │ local.get 37 │ │ local.get 38 │ │ i32.and │ │ local.set 39 │ │ i32.const 16 │ │ local.set 40 │ │ local.get 39 │ │ local.get 40 │ │ i32.and │ │ local.set 41 │ │ - i32.const 11971 │ │ + i32.const 12240 │ │ local.set 42 │ │ local.get 32 │ │ local.get 41 │ │ local.get 42 │ │ call $esccheck │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -137696,15 +137700,15 @@ │ │ local.set 39 │ │ i32.const 1 │ │ local.set 40 │ │ local.get 39 │ │ local.get 40 │ │ i32.and │ │ local.set 41 │ │ - i32.const 18674 │ │ + i32.const 18977 │ │ local.set 42 │ │ local.get 33 │ │ local.get 41 │ │ local.get 42 │ │ call $esccheck │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -137827,15 +137831,15 @@ │ │ i32.const 1 │ │ local.set 75 │ │ local.get 74 │ │ local.get 75 │ │ i32.add │ │ local.set 76 │ │ local.get 76 │ │ - i32.load8_u offset=25328 │ │ + i32.load8_u offset=25648 │ │ local.set 77 │ │ i32.const 255 │ │ local.set 78 │ │ local.get 77 │ │ local.get 78 │ │ i32.and │ │ local.set 79 │ │ @@ -137879,15 +137883,15 @@ │ │ local.set 90 │ │ i32.const 1 │ │ local.set 91 │ │ local.get 90 │ │ local.get 91 │ │ i32.and │ │ local.set 92 │ │ - i32.const 10839 │ │ + i32.const 11108 │ │ local.set 93 │ │ local.get 85 │ │ local.get 92 │ │ local.get 93 │ │ call $esccheck │ │ local.get 3 │ │ i32.load offset=8 │ │ @@ -137938,15 +137942,15 @@ │ │ local.set 107 │ │ i32.const 1 │ │ local.set 108 │ │ local.get 107 │ │ local.get 108 │ │ i32.and │ │ local.set 109 │ │ - i32.const 18662 │ │ + i32.const 18965 │ │ local.set 110 │ │ local.get 101 │ │ local.get 109 │ │ local.get 110 │ │ call $esccheck │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -139122,15 +139126,15 @@ │ │ i32.add │ │ local.set 22 │ │ local.get 3 │ │ local.get 22 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 26288 │ │ + i32.const 26608 │ │ local.set 23 │ │ local.get 3 │ │ local.get 23 │ │ i32.store offset=12 │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -139302,15 +139306,15 @@ │ │ local.get 15 │ │ i32.add │ │ local.set 16 │ │ i32.const 4 │ │ local.set 17 │ │ i32.const 1073741823 │ │ local.set 18 │ │ - i32.const 4146 │ │ + i32.const 4195 │ │ local.set 19 │ │ local.get 9 │ │ local.get 11 │ │ local.get 13 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ @@ -139793,15 +139797,15 @@ │ │ end │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 32 │ │ local.get 32 │ │ i32.load offset=8 │ │ local.set 33 │ │ - i32.const 8201 │ │ + i32.const 8335 │ │ local.set 34 │ │ local.get 33 │ │ local.get 34 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 5 │ │ @@ -140766,15 +140770,15 @@ │ │ local.get 42 │ │ i32.add │ │ local.set 43 │ │ i32.const 8 │ │ local.set 44 │ │ i32.const 536870911 │ │ local.set 45 │ │ - i32.const 4081 │ │ + i32.const 4130 │ │ local.set 46 │ │ local.get 36 │ │ local.get 38 │ │ local.get 40 │ │ local.get 43 │ │ local.get 44 │ │ local.get 45 │ │ @@ -140893,15 +140897,15 @@ │ │ local.get 77 │ │ i32.add │ │ local.set 78 │ │ i32.const 1 │ │ local.set 79 │ │ i32.const 2147483647 │ │ local.set 80 │ │ - i32.const 4146 │ │ + i32.const 4195 │ │ local.set 81 │ │ local.get 72 │ │ local.get 74 │ │ local.get 75 │ │ local.get 78 │ │ local.get 79 │ │ local.get 80 │ │ @@ -141216,15 +141220,15 @@ │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 29 │ │ local.get 29 │ │ i32.load offset=8 │ │ local.set 30 │ │ - i32.const 3582 │ │ + i32.const 3631 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 4 │ │ @@ -142043,15 +142047,15 @@ │ │ local.get 96 │ │ i32.add │ │ local.set 97 │ │ i32.const 16 │ │ local.set 98 │ │ i32.const 33554431 │ │ local.set 99 │ │ - i32.const 3488 │ │ + i32.const 3537 │ │ local.set 100 │ │ local.get 91 │ │ local.get 93 │ │ local.get 94 │ │ local.get 97 │ │ local.get 98 │ │ local.get 99 │ │ @@ -146801,15 +146805,15 @@ │ │ i32.const 127 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ i32.and │ │ local.set 26 │ │ local.get 26 │ │ - i32.load8_u offset=25856 │ │ + i32.load8_u offset=26176 │ │ local.set 27 │ │ i32.const 255 │ │ local.set 28 │ │ local.get 27 │ │ local.get 28 │ │ i32.and │ │ local.set 29 │ │ @@ -147952,15 +147956,15 @@ │ │ local.get 12 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ local.get 6 │ │ i32.load offset=4 │ │ local.set 15 │ │ - i32.const 26264 │ │ + i32.const 26584 │ │ local.set 16 │ │ local.get 11 │ │ local.get 14 │ │ local.get 15 │ │ local.get 16 │ │ call $constfolding │ │ local.set 17 │ │ @@ -154912,15 +154916,15 @@ │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ i32.const 255 │ │ local.set 15 │ │ - i32.const 3919 │ │ + i32.const 3968 │ │ local.set 16 │ │ local.get 8 │ │ local.get 14 │ │ local.get 15 │ │ local.get 16 │ │ call $checklimit │ │ local.get 3 │ │ @@ -154959,15 +154963,15 @@ │ │ local.get 27 │ │ i32.add │ │ local.set 28 │ │ i32.const 8 │ │ local.set 29 │ │ i32.const 255 │ │ local.set 30 │ │ - i32.const 3919 │ │ + i32.const 3968 │ │ local.set 31 │ │ local.get 19 │ │ local.get 21 │ │ local.get 25 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ @@ -156400,15 +156404,15 @@ │ │ local.get 8 │ │ local.get 9 │ │ call $luaX_token2str │ │ local.set 10 │ │ local.get 4 │ │ local.get 10 │ │ i32.store │ │ - i32.const 12026 │ │ + i32.const 12295 │ │ local.set 11 │ │ local.get 7 │ │ local.get 11 │ │ local.get 4 │ │ call $luaO_pushfstring │ │ local.set 12 │ │ local.get 5 │ │ @@ -156532,15 +156536,15 @@ │ │ local.set 30 │ │ local.get 3 │ │ i32.load offset=20 │ │ local.set 31 │ │ local.get 31 │ │ i32.load offset=52 │ │ local.set 32 │ │ - i32.const 7683 │ │ + i32.const 7732 │ │ local.set 33 │ │ i32.const 5 │ │ local.set 34 │ │ local.get 32 │ │ local.get 33 │ │ local.get 34 │ │ call $luaS_newlstr │ │ @@ -156820,30 +156824,30 @@ │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 12 │ │ br_if 0 (;@2;) │ │ - i32.const 6326 │ │ + i32.const 6375 │ │ local.set 13 │ │ local.get 13 │ │ local.set 14 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=32 │ │ local.set 15 │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 16 │ │ local.get 5 │ │ local.get 16 │ │ i32.store offset=16 │ │ - i32.const 13572 │ │ + i32.const 13841 │ │ local.set 17 │ │ i32.const 16 │ │ local.set 18 │ │ local.get 5 │ │ local.get 18 │ │ i32.add │ │ local.set 19 │ │ @@ -156877,15 +156881,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 24 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 23 │ │ i32.store │ │ - i32.const 4449 │ │ + i32.const 4498 │ │ local.set 26 │ │ local.get 22 │ │ local.get 26 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ local.set 27 │ │ local.get 5 │ │ @@ -157375,15 +157379,15 @@ │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 36 │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 33 │ │ i32.store │ │ - i32.const 18302 │ │ + i32.const 18605 │ │ local.set 38 │ │ local.get 30 │ │ local.get 38 │ │ local.get 6 │ │ call $luaO_pushfstring │ │ local.set 39 │ │ local.get 28 │ │ @@ -157511,15 +157515,15 @@ │ │ local.get 24 │ │ call $forlist │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 25 │ │ - i32.const 12075 │ │ + i32.const 12344 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 4 │ │ @@ -159132,15 +159136,15 @@ │ │ local.set 7 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 8 │ │ local.get 8 │ │ i32.load offset=52 │ │ local.set 9 │ │ - i32.const 7683 │ │ + i32.const 7732 │ │ local.set 10 │ │ i32.const 5 │ │ local.set 11 │ │ local.get 9 │ │ local.get 10 │ │ local.get 11 │ │ call $luaS_newlstr │ │ @@ -159513,15 +159517,15 @@ │ │ local.set 40 │ │ block ;; label = @2 │ │ local.get 40 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=44 │ │ local.set 41 │ │ - i32.const 4859 │ │ + i32.const 4908 │ │ local.set 42 │ │ local.get 41 │ │ local.get 42 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 3 │ │ @@ -159724,15 +159728,15 @@ │ │ local.set 37 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 38 │ │ local.get 38 │ │ i32.load offset=52 │ │ local.set 39 │ │ - i32.const 7683 │ │ + i32.const 7732 │ │ local.set 40 │ │ i32.const 5 │ │ local.set 41 │ │ local.get 39 │ │ local.get 40 │ │ local.get 41 │ │ call $luaS_newlstr │ │ @@ -160106,15 +160110,15 @@ │ │ i32.store offset=12 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 12 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 13 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 14 │ │ i32.const 11 │ │ local.set 15 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $luaX_newstring │ │ @@ -160125,15 +160129,15 @@ │ │ drop │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 17 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 18 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 19 │ │ i32.const 11 │ │ local.set 20 │ │ local.get 18 │ │ local.get 19 │ │ local.get 20 │ │ call $luaX_newstring │ │ @@ -160144,15 +160148,15 @@ │ │ drop │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 22 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 23 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 24 │ │ i32.const 11 │ │ local.set 25 │ │ local.get 23 │ │ local.get 24 │ │ local.get 25 │ │ call $luaX_newstring │ │ @@ -160333,15 +160337,15 @@ │ │ i32.store offset=12 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 12 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 13 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 14 │ │ i32.const 11 │ │ local.set 15 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $luaX_newstring │ │ @@ -160352,15 +160356,15 @@ │ │ drop │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 17 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 18 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 19 │ │ i32.const 11 │ │ local.set 20 │ │ local.get 18 │ │ local.get 19 │ │ local.get 20 │ │ call $luaX_newstring │ │ @@ -160371,15 +160375,15 @@ │ │ drop │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 22 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 23 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 24 │ │ i32.const 11 │ │ local.set 25 │ │ local.get 23 │ │ local.get 24 │ │ local.get 25 │ │ call $luaX_newstring │ │ @@ -160390,15 +160394,15 @@ │ │ drop │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 27 │ │ local.get 4 │ │ i32.load offset=60 │ │ local.set 28 │ │ - i32.const 18215 │ │ + i32.const 18518 │ │ local.set 29 │ │ i32.const 11 │ │ local.set 30 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $luaX_newstring │ │ @@ -160772,15 +160776,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ i32.load offset=92 │ │ local.set 21 │ │ local.get 6 │ │ i32.load offset=92 │ │ local.set 22 │ │ - i32.const 8899 │ │ + i32.const 9033 │ │ local.set 23 │ │ i32.const 4 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaX_newstring │ │ @@ -161102,15 +161106,15 @@ │ │ local.get 57 │ │ local.get 58 │ │ i32.add │ │ local.set 59 │ │ local.get 4 │ │ local.get 59 │ │ i32.store │ │ - i32.const 19017 │ │ + i32.const 19320 │ │ local.set 60 │ │ local.get 56 │ │ local.get 60 │ │ local.get 4 │ │ call $luaO_pushfstring │ │ local.set 61 │ │ local.get 4 │ │ @@ -161204,15 +161208,15 @@ │ │ local.set 17 │ │ local.get 15 │ │ local.get 17 │ │ i32.sub │ │ local.set 18 │ │ i32.const 200 │ │ local.set 19 │ │ - i32.const 4116 │ │ + i32.const 4165 │ │ local.set 20 │ │ local.get 11 │ │ local.get 18 │ │ local.get 19 │ │ local.get 20 │ │ call $checklimit │ │ local.get 4 │ │ @@ -161245,15 +161249,15 @@ │ │ local.get 29 │ │ i32.add │ │ local.set 30 │ │ i32.const 24 │ │ local.set 31 │ │ i32.const 65535 │ │ local.set 32 │ │ - i32.const 4116 │ │ + i32.const 4165 │ │ local.set 33 │ │ local.get 21 │ │ local.get 23 │ │ local.get 27 │ │ local.get 30 │ │ local.get 31 │ │ local.get 32 │ │ @@ -161716,15 +161720,15 @@ │ │ local.get 16 │ │ i32.store offset=12 │ │ br 2 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 17 │ │ - i32.const 9627 │ │ + i32.const 9761 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ call $strcmp │ │ local.set 19 │ │ block ;; label = @3 │ │ local.get 19 │ │ @@ -161747,15 +161751,15 @@ │ │ local.set 23 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 24 │ │ local.get 3 │ │ local.get 24 │ │ i32.store │ │ - i32.const 18966 │ │ + i32.const 19269 │ │ local.set 25 │ │ local.get 23 │ │ local.get 25 │ │ local.get 3 │ │ call $luaO_pushfstring │ │ local.set 26 │ │ local.get 21 │ │ @@ -162297,15 +162301,15 @@ │ │ local.get 13 │ │ i32.and │ │ local.set 14 │ │ block ;; label = @1 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 13636 │ │ + i32.const 13905 │ │ local.set 15 │ │ local.get 4 │ │ local.get 15 │ │ i32.store offset=16 │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 16 │ │ @@ -163081,15 +163085,15 @@ │ │ local.set 21 │ │ local.get 21 │ │ br_if 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=76 │ │ local.set 22 │ │ - i32.const 4859 │ │ + i32.const 4908 │ │ local.set 23 │ │ local.get 22 │ │ local.get 23 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 5 │ │ @@ -163668,15 +163672,15 @@ │ │ block ;; label = @2 │ │ local.get 41 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=48 │ │ local.set 43 │ │ - i32.const 26304 │ │ + i32.const 26624 │ │ local.set 44 │ │ i32.const 1 │ │ local.set 45 │ │ local.get 43 │ │ local.get 45 │ │ i32.shl │ │ local.set 46 │ │ @@ -163751,15 +163755,15 @@ │ │ call $luaK_infix │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 65 │ │ local.get 5 │ │ i32.load offset=48 │ │ local.set 66 │ │ - i32.const 26304 │ │ + i32.const 26624 │ │ local.set 67 │ │ i32.const 1 │ │ local.set 68 │ │ local.get 66 │ │ local.get 68 │ │ i32.shl │ │ local.set 69 │ │ @@ -163921,15 +163925,15 @@ │ │ local.get 16 │ │ i32.add │ │ local.set 17 │ │ i32.const 16 │ │ local.set 18 │ │ i32.const 32767 │ │ local.set 19 │ │ - i32.const 3704 │ │ + i32.const 3753 │ │ local.set 20 │ │ local.get 11 │ │ local.get 13 │ │ local.get 14 │ │ local.get 17 │ │ local.get 18 │ │ local.get 19 │ │ @@ -164513,15 +164517,15 @@ │ │ local.set 6 │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 7 │ │ local.get 7 │ │ i32.load offset=52 │ │ local.set 8 │ │ - i32.const 7683 │ │ + i32.const 7732 │ │ local.set 9 │ │ i32.const 5 │ │ local.set 10 │ │ local.get 8 │ │ local.get 9 │ │ local.get 10 │ │ call $luaS_newlstr │ │ @@ -164541,15 +164545,15 @@ │ │ i32.and │ │ local.set 16 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 16 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - i32.const 13542 │ │ + i32.const 13811 │ │ local.set 17 │ │ local.get 4 │ │ local.get 17 │ │ i32.store offset=36 │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 18 │ │ @@ -164574,15 +164578,15 @@ │ │ call $luaO_pushfstring │ │ local.set 23 │ │ local.get 4 │ │ local.get 23 │ │ i32.store offset=36 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 13592 │ │ + i32.const 13861 │ │ local.set 24 │ │ local.get 4 │ │ local.get 24 │ │ i32.store offset=36 │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 25 │ │ @@ -164990,15 +164994,15 @@ │ │ local.set 61 │ │ block ;; label = @6 │ │ local.get 61 │ │ br_if 0 (;@6;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 62 │ │ - i32.const 6370 │ │ + i32.const 6419 │ │ local.set 63 │ │ local.get 62 │ │ local.get 63 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 4 │ │ @@ -166426,15 +166430,15 @@ │ │ local.get 27 │ │ i32.add │ │ local.set 28 │ │ i32.const 4 │ │ local.set 29 │ │ i32.const 131071 │ │ local.set 30 │ │ - i32.const 3768 │ │ + i32.const 3817 │ │ local.set 31 │ │ local.get 21 │ │ local.get 23 │ │ local.get 25 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ @@ -166761,15 +166765,15 @@ │ │ local.get 30 │ │ i32.store offset=12 │ │ br 1 (;@3;) │ │ end │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 31 │ │ - i32.const 12096 │ │ + i32.const 12365 │ │ local.set 32 │ │ local.get 31 │ │ local.get 32 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 3 │ │ @@ -167080,15 +167084,15 @@ │ │ local.get 24 │ │ call $singlevar │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 25 │ │ - i32.const 7089 │ │ + i32.const 7138 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ i32.const 16 │ │ @@ -167524,15 +167528,15 @@ │ │ local.get 62 │ │ call $luaX_next │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=44 │ │ local.set 63 │ │ - i32.const 11998 │ │ + i32.const 12267 │ │ local.set 64 │ │ local.get 63 │ │ local.get 64 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 5 │ │ @@ -167850,15 +167854,15 @@ │ │ i32.load offset=88 │ │ local.set 21 │ │ local.get 21 │ │ i32.load offset=28 │ │ local.set 22 │ │ i32.const 2147483647 │ │ local.set 23 │ │ - i32.const 4728 │ │ + i32.const 4777 │ │ local.set 24 │ │ local.get 20 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $checklimit │ │ local.get 4 │ │ @@ -168121,15 +168125,15 @@ │ │ local.get 20 │ │ i32.add │ │ local.set 21 │ │ i32.const 12 │ │ local.set 22 │ │ i32.const 32767 │ │ local.set 23 │ │ - i32.const 4116 │ │ + i32.const 4165 │ │ local.set 24 │ │ local.get 11 │ │ local.get 13 │ │ local.get 18 │ │ local.get 21 │ │ local.get 22 │ │ local.get 23 │ │ @@ -170167,15 +170171,15 @@ │ │ local.get 12 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ local.get 4 │ │ local.get 14 │ │ i32.store offset=20 │ │ - i32.const 18910 │ │ + i32.const 19213 │ │ local.set 15 │ │ local.get 4 │ │ local.get 15 │ │ i32.store offset=16 │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 16 │ │ @@ -170322,15 +170326,15 @@ │ │ call $checknext │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 12 │ │ local.get 7 │ │ i32.load offset=44 │ │ local.set 13 │ │ - i32.const 26348 │ │ + i32.const 26668 │ │ local.set 14 │ │ i32.const 2 │ │ local.set 15 │ │ local.get 13 │ │ local.get 15 │ │ i32.shl │ │ local.set 16 │ │ @@ -170465,15 +170469,15 @@ │ │ end │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 48 │ │ local.get 7 │ │ i32.load offset=44 │ │ local.set 49 │ │ - i32.const 26356 │ │ + i32.const 26676 │ │ local.set 50 │ │ i32.const 2 │ │ local.set 51 │ │ local.get 49 │ │ local.get 51 │ │ i32.shl │ │ local.set 52 │ │ @@ -170698,15 +170702,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ i32.load offset=28 │ │ local.set 30 │ │ local.get 30 │ │ i32.load offset=8 │ │ local.set 31 │ │ - i32.const 8201 │ │ + i32.const 8335 │ │ local.set 32 │ │ local.get 31 │ │ local.get 32 │ │ call $luaX_syntaxerror │ │ unreachable │ │ end │ │ local.get 6 │ │ @@ -174683,28 +174687,28 @@ │ │ local.get 23 │ │ i32.add │ │ local.set 24 │ │ local.get 24 │ │ local.set 25 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 8639 │ │ + i32.const 8773 │ │ local.set 26 │ │ local.get 26 │ │ local.set 25 │ │ end │ │ local.get 25 │ │ local.set 27 │ │ local.get 4 │ │ local.get 27 │ │ i32.store │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 28 │ │ - i32.const 19610 │ │ + i32.const 19913 │ │ local.set 29 │ │ i32.const 1 │ │ local.set 30 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $luaE_warning │ │ @@ -174719,15 +174723,15 @@ │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $luaE_warning │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 34 │ │ - i32.const 18659 │ │ + i32.const 18962 │ │ local.set 35 │ │ i32.const 1 │ │ local.set 36 │ │ local.get 34 │ │ local.get 35 │ │ local.get 36 │ │ call $luaE_warning │ │ @@ -174742,15 +174746,15 @@ │ │ local.get 37 │ │ local.get 38 │ │ local.get 39 │ │ call $luaE_warning │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 40 │ │ - i32.const 18657 │ │ + i32.const 18960 │ │ local.set 41 │ │ i32.const 0 │ │ local.set 42 │ │ local.get 40 │ │ local.get 41 │ │ local.get 42 │ │ call $luaE_warning │ │ @@ -177825,15 +177829,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 26368 │ │ + i32.const 26688 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -177879,26 +177883,26 @@ │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 7 │ │ - i32.const 26528 │ │ + i32.const 26848 │ │ local.set 8 │ │ i32.const 0 │ │ local.set 9 │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $luaL_setfuncs │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ call $lua_pushstring │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -178106,15 +178110,15 @@ │ │ block ;; label = @2 │ │ local.get 38 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 39 │ │ - i32.const 8228 │ │ + i32.const 8362 │ │ local.set 40 │ │ i32.const 0 │ │ local.set 41 │ │ local.get 39 │ │ local.get 40 │ │ local.get 41 │ │ call $luaL_error │ │ @@ -178145,15 +178149,15 @@ │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 48 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 49 │ │ - i32.const 8228 │ │ + i32.const 8362 │ │ local.set 50 │ │ local.get 48 │ │ local.get 49 │ │ local.get 50 │ │ call $luaL_checkstack │ │ i32.const 0 │ │ local.set 51 │ │ @@ -178720,15 +178724,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=556 │ │ local.set 32 │ │ local.get 3 │ │ i32.load offset=548 │ │ local.set 33 │ │ - i32.const 10955 │ │ + i32.const 11224 │ │ local.set 34 │ │ local.get 32 │ │ local.get 33 │ │ local.get 34 │ │ call $luaL_argerror │ │ local.set 35 │ │ i32.const 0 │ │ @@ -178905,15 +178909,15 @@ │ │ block ;; label = @2 │ │ local.get 25 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=552 │ │ local.set 26 │ │ - i32.const 6340 │ │ + i32.const 6389 │ │ local.set 27 │ │ i32.const 0 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $luaL_error │ │ @@ -180170,15 +180174,15 @@ │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ i32.load offset=728 │ │ local.set 121 │ │ local.get 3 │ │ i32.load offset=720 │ │ local.set 122 │ │ - i32.const 9381 │ │ + i32.const 9515 │ │ local.set 123 │ │ local.get 121 │ │ local.get 122 │ │ local.get 123 │ │ call $luaL_argerror │ │ local.set 124 │ │ local.get 3 │ │ @@ -180256,15 +180260,15 @@ │ │ local.set 138 │ │ local.get 3 │ │ local.get 138 │ │ i32.add │ │ local.set 139 │ │ local.get 139 │ │ local.set 140 │ │ - i32.const 17456 │ │ + i32.const 17759 │ │ local.set 141 │ │ i32.const 0 │ │ local.set 142 │ │ local.get 137 │ │ local.get 140 │ │ local.get 141 │ │ local.get 142 │ │ @@ -180312,29 +180316,29 @@ │ │ call $snprintf │ │ local.set 154 │ │ local.get 3 │ │ local.get 154 │ │ i32.store offset=132 │ │ br 11 (;@6;) │ │ end │ │ - i32.const 19821 │ │ + i32.const 20124 │ │ local.set 155 │ │ local.get 3 │ │ local.get 155 │ │ i32.store offset=704 │ │ br 2 (;@14;) │ │ end │ │ - i32.const 17132 │ │ + i32.const 17435 │ │ local.set 156 │ │ local.get 3 │ │ local.get 156 │ │ i32.store offset=704 │ │ br 1 (;@14;) │ │ end │ │ - i32.const 17135 │ │ + i32.const 17438 │ │ local.set 157 │ │ local.get 3 │ │ local.get 157 │ │ i32.store offset=704 │ │ end │ │ local.get 3 │ │ i32.load offset=728 │ │ @@ -180374,15 +180378,15 @@ │ │ local.set 167 │ │ local.get 3 │ │ local.get 167 │ │ i32.add │ │ local.set 168 │ │ local.get 168 │ │ local.set 169 │ │ - i32.const 7156 │ │ + i32.const 7205 │ │ local.set 170 │ │ local.get 169 │ │ local.get 170 │ │ call $addlenmod │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 171 │ │ @@ -180427,15 +180431,15 @@ │ │ local.set 181 │ │ local.get 3 │ │ local.get 181 │ │ i32.add │ │ local.set 182 │ │ local.get 182 │ │ local.set 183 │ │ - i32.const 19826 │ │ + i32.const 20129 │ │ local.set 184 │ │ i32.const 1 │ │ local.set 185 │ │ local.get 180 │ │ local.get 183 │ │ local.get 184 │ │ local.get 185 │ │ @@ -180444,15 +180448,15 @@ │ │ local.set 186 │ │ local.get 3 │ │ local.get 186 │ │ i32.add │ │ local.set 187 │ │ local.get 187 │ │ local.set 188 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 189 │ │ local.get 188 │ │ local.get 189 │ │ call $addlenmod │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 190 │ │ @@ -180541,15 +180545,15 @@ │ │ local.set 211 │ │ local.get 3 │ │ local.get 211 │ │ i32.add │ │ local.set 212 │ │ local.get 212 │ │ local.set 213 │ │ - i32.const 19826 │ │ + i32.const 20129 │ │ local.set 214 │ │ i32.const 1 │ │ local.set 215 │ │ local.get 210 │ │ local.get 213 │ │ local.get 214 │ │ local.get 215 │ │ @@ -180558,15 +180562,15 @@ │ │ local.set 216 │ │ local.get 3 │ │ local.get 216 │ │ i32.add │ │ local.set 217 │ │ local.get 217 │ │ local.set 218 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 219 │ │ local.get 218 │ │ local.get 219 │ │ call $addlenmod │ │ local.get 3 │ │ i32.load offset=136 │ │ local.set 220 │ │ @@ -180624,15 +180628,15 @@ │ │ local.set 233 │ │ local.get 3 │ │ local.get 233 │ │ i32.add │ │ local.set 234 │ │ local.get 234 │ │ local.set 235 │ │ - i32.const 17456 │ │ + i32.const 17759 │ │ local.set 236 │ │ i32.const 0 │ │ local.set 237 │ │ local.get 232 │ │ local.get 235 │ │ local.get 236 │ │ local.get 237 │ │ @@ -180656,15 +180660,15 @@ │ │ local.get 243 │ │ i32.and │ │ local.set 244 │ │ block ;; label = @10 │ │ local.get 244 │ │ i32.eqz │ │ br_if 0 (;@10;) │ │ - i32.const 17953 │ │ + i32.const 18256 │ │ local.set 245 │ │ local.get 3 │ │ local.get 245 │ │ i32.store offset=108 │ │ i32.const 144 │ │ local.set 246 │ │ local.get 3 │ │ @@ -180753,15 +180757,15 @@ │ │ block ;; label = @9 │ │ local.get 269 │ │ i32.eqz │ │ br_if 0 (;@9;) │ │ local.get 3 │ │ i32.load offset=728 │ │ local.set 270 │ │ - i32.const 3639 │ │ + i32.const 3688 │ │ local.set 271 │ │ i32.const 0 │ │ local.set 272 │ │ local.get 270 │ │ local.get 271 │ │ local.get 272 │ │ call $luaL_error │ │ @@ -180874,15 +180878,15 @@ │ │ br_if 0 (;@9;) │ │ local.get 3 │ │ i32.load offset=728 │ │ local.set 302 │ │ local.get 3 │ │ i32.load offset=720 │ │ local.set 303 │ │ - i32.const 3717 │ │ + i32.const 3766 │ │ local.set 304 │ │ local.get 302 │ │ local.get 303 │ │ local.get 304 │ │ call $luaL_argerror │ │ local.set 305 │ │ i32.const 0 │ │ @@ -180907,15 +180911,15 @@ │ │ local.set 311 │ │ local.get 3 │ │ local.get 311 │ │ i32.add │ │ local.set 312 │ │ local.get 312 │ │ local.set 313 │ │ - i32.const 17456 │ │ + i32.const 17759 │ │ local.set 314 │ │ i32.const 1 │ │ local.set 315 │ │ local.get 310 │ │ local.get 313 │ │ local.get 314 │ │ local.get 315 │ │ @@ -181046,15 +181050,15 @@ │ │ i32.add │ │ local.set 350 │ │ local.get 350 │ │ local.set 351 │ │ local.get 3 │ │ local.get 351 │ │ i32.store │ │ - i32.const 18779 │ │ + i32.const 19082 │ │ local.set 352 │ │ local.get 348 │ │ local.get 352 │ │ local.get 3 │ │ call $luaL_error │ │ local.set 353 │ │ local.get 3 │ │ @@ -181129,15 +181133,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 6 │ │ - i32.const 17370 │ │ + i32.const 17673 │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ call $strspn │ │ local.set 8 │ │ local.get 5 │ │ local.get 8 │ │ @@ -181176,15 +181180,15 @@ │ │ block ;; label = @1 │ │ local.get 18 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 19 │ │ - i32.const 18146 │ │ + i32.const 18449 │ │ local.set 20 │ │ i32.const 0 │ │ local.set 21 │ │ local.get 19 │ │ local.get 20 │ │ local.get 21 │ │ call $luaL_error │ │ @@ -181457,15 +181461,15 @@ │ │ local.set 50 │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 51 │ │ local.get 6 │ │ local.get 51 │ │ i32.store │ │ - i32.const 19091 │ │ + i32.const 19394 │ │ local.set 52 │ │ local.get 50 │ │ local.get 52 │ │ local.get 6 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -181783,15 +181787,15 @@ │ │ local.set 39 │ │ local.get 38 │ │ local.get 39 │ │ i64.eq │ │ local.set 40 │ │ i32.const 1633 │ │ local.set 41 │ │ - i32.const 11415 │ │ + i32.const 11684 │ │ local.set 42 │ │ i32.const 1 │ │ local.set 43 │ │ local.get 40 │ │ local.get 43 │ │ i32.and │ │ local.set 44 │ │ @@ -181867,15 +181871,15 @@ │ │ end │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 59 │ │ local.get 5 │ │ i32.load offset=52 │ │ local.set 60 │ │ - i32.const 6882 │ │ + i32.const 6931 │ │ local.set 61 │ │ local.get 59 │ │ local.get 60 │ │ local.get 61 │ │ call $luaL_argerror │ │ drop │ │ end │ │ @@ -182692,15 +182696,15 @@ │ │ local.get 73 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=876 │ │ local.set 76 │ │ i32.const 3 │ │ local.set 77 │ │ - i32.const 10496 │ │ + i32.const 10765 │ │ local.set 78 │ │ local.get 76 │ │ local.get 77 │ │ local.get 78 │ │ call $luaL_typeerror │ │ local.set 79 │ │ i32.const 0 │ │ @@ -183659,15 +183663,15 @@ │ │ br_if 0 (;@10;) │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 121 │ │ local.get 121 │ │ i32.load offset=12 │ │ local.set 122 │ │ - i32.const 6163 │ │ + i32.const 6212 │ │ local.set 123 │ │ i32.const 0 │ │ local.set 124 │ │ local.get 122 │ │ local.get 123 │ │ local.get 124 │ │ call $luaL_error │ │ @@ -184522,15 +184526,15 @@ │ │ local.get 58 │ │ local.get 61 │ │ call $lua_typename │ │ local.set 62 │ │ local.get 7 │ │ local.get 62 │ │ i32.store │ │ - i32.const 17910 │ │ + i32.const 18213 │ │ local.set 63 │ │ local.get 57 │ │ local.get 63 │ │ local.get 7 │ │ call $luaL_error │ │ local.set 64 │ │ local.get 7 │ │ @@ -184868,15 +184872,15 @@ │ │ local.get 12 │ │ i64.store offset=544 │ │ local.get 3 │ │ i32.load offset=568 │ │ local.set 13 │ │ i32.const 3 │ │ local.set 14 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 15 │ │ i32.const 560 │ │ local.set 16 │ │ local.get 3 │ │ local.get 16 │ │ i32.add │ │ local.set 17 │ │ @@ -184915,15 +184919,15 @@ │ │ block ;; label = @3 │ │ local.get 26 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=568 │ │ local.set 27 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 28 │ │ local.get 27 │ │ local.get 28 │ │ call $lua_pushstring │ │ drop │ │ br 1 (;@2;) │ │ end │ │ @@ -185007,15 +185011,15 @@ │ │ block ;; label = @3 │ │ local.get 53 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=568 │ │ local.set 54 │ │ - i32.const 10812 │ │ + i32.const 11081 │ │ local.set 55 │ │ i32.const 0 │ │ local.set 56 │ │ local.get 54 │ │ local.get 55 │ │ local.get 56 │ │ call $luaL_error │ │ @@ -185574,15 +185578,15 @@ │ │ call $lua_pushlstring │ │ drop │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 38 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 39 │ │ local.get 38 │ │ local.get 39 │ │ call $lua_pushstring │ │ drop │ │ end │ │ i32.const 1 │ │ @@ -186663,15 +186667,15 @@ │ │ br_if 0 (;@8;) │ │ local.get 3 │ │ i32.load offset=668 │ │ local.set 249 │ │ local.get 3 │ │ i32.load offset=112 │ │ local.set 250 │ │ - i32.const 9085 │ │ + i32.const 9219 │ │ local.set 251 │ │ local.get 249 │ │ local.get 250 │ │ local.get 251 │ │ call $luaL_argerror │ │ local.set 252 │ │ i32.const 0 │ │ @@ -186920,15 +186924,15 @@ │ │ br_if 0 (;@7;) │ │ local.get 3 │ │ i32.load offset=668 │ │ local.set 324 │ │ local.get 3 │ │ i32.load offset=112 │ │ local.set 325 │ │ - i32.const 9044 │ │ + i32.const 9178 │ │ local.set 326 │ │ local.get 324 │ │ local.get 325 │ │ local.get 326 │ │ call $luaL_argerror │ │ local.set 327 │ │ i32.const 0 │ │ @@ -187063,15 +187067,15 @@ │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ i32.load offset=668 │ │ local.set 365 │ │ local.get 3 │ │ i32.load offset=112 │ │ local.set 366 │ │ - i32.const 3717 │ │ + i32.const 3766 │ │ local.set 367 │ │ local.get 365 │ │ local.get 366 │ │ local.get 367 │ │ call $luaL_argerror │ │ local.set 368 │ │ i32.const 0 │ │ @@ -187351,15 +187355,15 @@ │ │ local.set 6 │ │ local.get 6 │ │ local.get 5 │ │ i32.store │ │ i32.const 0 │ │ local.set 7 │ │ local.get 7 │ │ - i32.load8_u offset=26512 │ │ + i32.load8_u offset=26832 │ │ local.set 8 │ │ i32.const 24 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.shl │ │ local.set 10 │ │ @@ -187529,15 +187533,15 @@ │ │ i32.load offset=28 │ │ local.set 40 │ │ local.get 40 │ │ i32.load │ │ local.set 41 │ │ i32.const 1 │ │ local.set 42 │ │ - i32.const 19281 │ │ + i32.const 19584 │ │ local.set 43 │ │ local.get 41 │ │ local.get 42 │ │ local.get 43 │ │ call $luaL_argerror │ │ drop │ │ end │ │ @@ -187676,15 +187680,15 @@ │ │ i32.load offset=28 │ │ local.set 81 │ │ local.get 81 │ │ i32.load │ │ local.set 82 │ │ i32.const 1 │ │ local.set 83 │ │ - i32.const 16914 │ │ + i32.const 17217 │ │ local.set 84 │ │ local.get 82 │ │ local.get 83 │ │ local.get 84 │ │ call $luaL_argerror │ │ drop │ │ end │ │ @@ -188123,15 +188127,15 @@ │ │ i32.store │ │ local.get 6 │ │ i32.load │ │ local.set 7 │ │ i32.const 0 │ │ local.set 8 │ │ local.get 8 │ │ - i32.load8_u offset=26512 │ │ + i32.load8_u offset=26832 │ │ local.set 9 │ │ i32.const 24 │ │ local.set 10 │ │ local.get 9 │ │ local.get 10 │ │ i32.shl │ │ local.set 11 │ │ @@ -188427,15 +188431,15 @@ │ │ local.get 48 │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=44 │ │ local.set 51 │ │ i32.const 1 │ │ local.set 52 │ │ - i32.const 3320 │ │ + i32.const 3369 │ │ local.set 53 │ │ local.get 51 │ │ local.get 52 │ │ local.get 53 │ │ call $luaL_argerror │ │ local.set 54 │ │ i32.const 0 │ │ @@ -188500,15 +188504,15 @@ │ │ local.get 70 │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=44 │ │ local.set 73 │ │ i32.const 1 │ │ local.set 74 │ │ - i32.const 10771 │ │ + i32.const 11040 │ │ local.set 75 │ │ local.get 73 │ │ local.get 74 │ │ local.get 75 │ │ call $luaL_argerror │ │ local.set 76 │ │ i32.const 0 │ │ @@ -188680,15 +188684,15 @@ │ │ local.get 29 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=92 │ │ local.set 32 │ │ i32.const 3 │ │ local.set 33 │ │ - i32.const 8550 │ │ + i32.const 8684 │ │ local.set 34 │ │ local.get 32 │ │ local.get 33 │ │ local.get 34 │ │ call $luaL_argerror │ │ local.set 35 │ │ i32.const 0 │ │ @@ -188866,15 +188870,15 @@ │ │ local.set 86 │ │ local.get 3 │ │ local.get 86 │ │ i32.store offset=64 │ │ local.get 3 │ │ i32.load offset=92 │ │ local.set 87 │ │ - i32.const 3498 │ │ + i32.const 3547 │ │ local.set 88 │ │ i32.const 2 │ │ local.set 89 │ │ local.get 87 │ │ local.get 89 │ │ local.get 88 │ │ call $luaL_checkstack │ │ @@ -189307,15 +189311,15 @@ │ │ local.get 198 │ │ br_if 0 (;@5;) │ │ local.get 3 │ │ i32.load offset=92 │ │ local.set 201 │ │ i32.const 2 │ │ local.set 202 │ │ - i32.const 18686 │ │ + i32.const 18989 │ │ local.set 203 │ │ local.get 201 │ │ local.get 202 │ │ local.get 203 │ │ call $luaL_argerror │ │ local.set 204 │ │ i32.const 0 │ │ @@ -189906,15 +189910,15 @@ │ │ local.set 124 │ │ local.get 7 │ │ i32.load offset=48 │ │ local.set 125 │ │ local.get 7 │ │ local.get 125 │ │ i32.store │ │ - i32.const 5373 │ │ + i32.const 5422 │ │ local.set 126 │ │ local.get 124 │ │ local.get 126 │ │ local.get 7 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -189979,15 +189983,15 @@ │ │ local.get 4 │ │ i32.load │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ i32.add │ │ local.set 8 │ │ - i32.const 17447 │ │ + i32.const 17750 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ call $strpbrk │ │ local.set 10 │ │ i32.const 0 │ │ local.set 11 │ │ @@ -190452,15 +190456,15 @@ │ │ local.set 24 │ │ local.get 24 │ │ i32.load offset=12 │ │ local.set 25 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 26 │ │ - i32.const 3983 │ │ + i32.const 4032 │ │ local.set 27 │ │ local.get 25 │ │ local.get 26 │ │ local.get 27 │ │ call $luaL_checkstack │ │ i32.const 0 │ │ local.set 28 │ │ @@ -190601,15 +190605,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ i32.load offset=28 │ │ local.set 18 │ │ local.get 18 │ │ i32.load offset=12 │ │ local.set 19 │ │ - i32.const 3983 │ │ + i32.const 4032 │ │ local.set 20 │ │ i32.const 0 │ │ local.set 21 │ │ local.get 19 │ │ local.get 20 │ │ local.get 21 │ │ call $luaL_error │ │ @@ -190973,15 +190977,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 16 │ │ local.get 16 │ │ i32.load offset=12 │ │ local.set 17 │ │ - i32.const 18545 │ │ + i32.const 18848 │ │ local.set 18 │ │ i32.const 0 │ │ local.set 19 │ │ local.get 17 │ │ local.get 18 │ │ local.get 19 │ │ call $luaL_error │ │ @@ -191351,15 +191355,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 21 │ │ local.get 21 │ │ i32.load offset=12 │ │ local.set 22 │ │ - i32.const 18624 │ │ + i32.const 18927 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaL_error │ │ @@ -191458,15 +191462,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load offset=8 │ │ local.set 50 │ │ local.get 50 │ │ i32.load offset=12 │ │ local.set 51 │ │ - i32.const 18592 │ │ + i32.const 18895 │ │ local.set 52 │ │ i32.const 0 │ │ local.set 53 │ │ local.get 51 │ │ local.get 52 │ │ local.get 53 │ │ call $luaL_error │ │ @@ -193019,15 +193023,15 @@ │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 36 │ │ local.get 36 │ │ i32.load offset=12 │ │ local.set 37 │ │ - i32.const 9644 │ │ + i32.const 9778 │ │ local.set 38 │ │ i32.const 0 │ │ local.set 39 │ │ local.get 37 │ │ local.get 38 │ │ local.get 39 │ │ call $luaL_error │ │ @@ -193482,15 +193486,15 @@ │ │ local.get 45 │ │ local.get 46 │ │ i32.add │ │ local.set 47 │ │ local.get 4 │ │ local.get 47 │ │ i32.store │ │ - i32.const 12776 │ │ + i32.const 13045 │ │ local.set 48 │ │ local.get 44 │ │ local.get 48 │ │ local.get 4 │ │ call $luaL_error │ │ local.set 49 │ │ local.get 4 │ │ @@ -193616,15 +193620,15 @@ │ │ local.get 27 │ │ local.get 28 │ │ i32.add │ │ local.set 29 │ │ local.get 7 │ │ local.get 29 │ │ i32.store │ │ - i32.const 12776 │ │ + i32.const 13045 │ │ local.set 30 │ │ local.get 26 │ │ local.get 30 │ │ local.get 7 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -193737,15 +193741,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 7 │ │ i32.load offset=24 │ │ local.set 60 │ │ local.get 60 │ │ i32.load offset=12 │ │ local.set 61 │ │ - i32.const 9668 │ │ + i32.const 9802 │ │ local.set 62 │ │ i32.const 0 │ │ local.set 63 │ │ local.get 61 │ │ local.get 62 │ │ local.get 63 │ │ call $luaL_error │ │ @@ -194414,15 +194418,15 @@ │ │ local.get 135 │ │ local.get 136 │ │ i32.and │ │ local.set 137 │ │ local.get 5 │ │ local.get 137 │ │ i32.store offset=16 │ │ - i32.const 12772 │ │ + i32.const 13041 │ │ local.set 138 │ │ i32.const 10 │ │ local.set 139 │ │ i32.const 16 │ │ local.set 140 │ │ local.get 5 │ │ local.get 140 │ │ @@ -194455,15 +194459,15 @@ │ │ local.get 146 │ │ local.get 147 │ │ i32.and │ │ local.set 148 │ │ local.get 5 │ │ local.get 148 │ │ i32.store │ │ - i32.const 12758 │ │ + i32.const 13027 │ │ local.set 149 │ │ i32.const 10 │ │ local.set 150 │ │ local.get 144 │ │ local.get 150 │ │ local.get 149 │ │ local.get 5 │ │ @@ -194728,15 +194732,15 @@ │ │ local.set 10 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 10 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - i32.const 16705 │ │ + i32.const 17008 │ │ local.set 11 │ │ local.get 5 │ │ local.get 11 │ │ i32.store offset=36 │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ @@ -194755,15 +194759,15 @@ │ │ i32.and │ │ local.set 16 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 16 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - i32.const 16704 │ │ + i32.const 17007 │ │ local.set 17 │ │ local.get 5 │ │ local.get 17 │ │ i32.store offset=36 │ │ br 1 (;@3;) │ │ end │ │ local.get 5 │ │ @@ -194783,15 +194787,15 @@ │ │ i32.and │ │ local.set 22 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 22 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ - i32.const 18465 │ │ + i32.const 18768 │ │ local.set 23 │ │ local.get 5 │ │ local.get 23 │ │ i32.store offset=36 │ │ br 1 (;@4;) │ │ end │ │ local.get 5 │ │ @@ -194799,15 +194803,15 @@ │ │ local.set 24 │ │ local.get 5 │ │ f64.load offset=40 │ │ local.set 25 │ │ local.get 5 │ │ local.get 25 │ │ f64.store offset=16 │ │ - i32.const 15620 │ │ + i32.const 15923 │ │ local.set 26 │ │ i32.const 120 │ │ local.set 27 │ │ i32.const 16 │ │ local.set 28 │ │ local.get 5 │ │ local.get 28 │ │ @@ -194941,15 +194945,15 @@ │ │ local.set 61 │ │ local.get 5 │ │ i32.load offset=36 │ │ local.set 62 │ │ local.get 5 │ │ local.get 62 │ │ i32.store │ │ - i32.const 4621 │ │ + i32.const 4670 │ │ local.set 63 │ │ i32.const 120 │ │ local.set 64 │ │ local.get 61 │ │ local.get 64 │ │ local.get 63 │ │ local.get 5 │ │ @@ -195404,15 +195408,15 @@ │ │ i32.load offset=24 │ │ local.set 117 │ │ i32.const 37 │ │ local.set 118 │ │ local.get 6 │ │ local.get 118 │ │ i32.store │ │ - i32.const 8427 │ │ + i32.const 8561 │ │ local.set 119 │ │ local.get 117 │ │ local.get 119 │ │ local.get 6 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -195877,15 +195881,15 @@ │ │ br_if 0 (;@12;) │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 83 │ │ local.get 83 │ │ i32.load │ │ local.set 84 │ │ - i32.const 19219 │ │ + i32.const 19522 │ │ local.set 85 │ │ i32.const 0 │ │ local.set 86 │ │ local.get 84 │ │ local.get 85 │ │ local.get 86 │ │ call $luaL_error │ │ @@ -195948,15 +195952,15 @@ │ │ local.get 96 │ │ i32.store offset=4 │ │ br 3 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 97 │ │ local.get 97 │ │ - i32.load8_u offset=26512 │ │ + i32.load8_u offset=26832 │ │ local.set 98 │ │ i32.const 24 │ │ local.set 99 │ │ local.get 98 │ │ local.get 99 │ │ i32.shl │ │ local.set 100 │ │ @@ -196006,15 +196010,15 @@ │ │ local.set 110 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 111 │ │ local.get 5 │ │ local.get 111 │ │ i32.store │ │ - i32.const 19254 │ │ + i32.const 19557 │ │ local.set 112 │ │ local.get 110 │ │ local.get 112 │ │ local.get 5 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -196139,15 +196143,15 @@ │ │ local.set 29 │ │ local.get 5 │ │ local.get 29 │ │ i32.store offset=4 │ │ local.get 5 │ │ local.get 28 │ │ i32.store │ │ - i32.const 15625 │ │ + i32.const 15928 │ │ local.set 30 │ │ local.get 27 │ │ local.get 30 │ │ local.get 5 │ │ call $luaL_error │ │ local.set 31 │ │ local.get 5 │ │ @@ -196442,15 +196446,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 0 │ │ local.set 5 │ │ - i32.const 12683 │ │ + i32.const 12952 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $arith │ │ local.set 7 │ │ i32.const 16 │ │ @@ -196559,15 +196563,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 1 │ │ local.set 5 │ │ - i32.const 13965 │ │ + i32.const 14234 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $arith │ │ local.set 7 │ │ i32.const 16 │ │ @@ -196596,15 +196600,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 2 │ │ local.set 5 │ │ - i32.const 7079 │ │ + i32.const 7128 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $arith │ │ local.set 7 │ │ i32.const 16 │ │ @@ -196633,15 +196637,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 3 │ │ local.set 5 │ │ - i32.const 11217 │ │ + i32.const 11486 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $arith │ │ local.set 7 │ │ i32.const 16 │ │ @@ -196781,15 +196785,15 @@ │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ i32.const 12 │ │ local.set 5 │ │ - i32.const 6927 │ │ + i32.const 6976 │ │ local.set 6 │ │ local.get 4 │ │ local.get 5 │ │ local.get 6 │ │ call $arith │ │ local.set 7 │ │ i32.const 16 │ │ @@ -197122,15 +197126,15 @@ │ │ i32.store offset=8 │ │ local.get 4 │ │ local.get 39 │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 34 │ │ i32.store │ │ - i32.const 19058 │ │ + i32.const 19361 │ │ local.set 45 │ │ local.get 31 │ │ local.get 45 │ │ local.get 4 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -198031,15 +198035,15 @@ │ │ block ;; label = @2 │ │ local.get 53 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 54 │ │ - i32.const 18719 │ │ + i32.const 19022 │ │ local.set 55 │ │ i32.const 0 │ │ local.set 56 │ │ local.get 54 │ │ local.get 55 │ │ local.get 56 │ │ call $luaG_runerror │ │ @@ -198238,15 +198242,15 @@ │ │ i32.store offset=8 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 16 │ │ block ;; label = @3 │ │ local.get 16 │ │ br_if 0 (;@3;) │ │ - i32.const 26632 │ │ + i32.const 26952 │ │ local.set 17 │ │ local.get 17 │ │ local.set 18 │ │ local.get 5 │ │ local.get 18 │ │ i32.store offset=28 │ │ br 2 (;@1;) │ │ @@ -198886,15 +198890,15 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 6 │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=24 │ │ local.set 7 │ │ - i32.const 26608 │ │ + i32.const 26928 │ │ local.set 8 │ │ local.get 8 │ │ local.set 9 │ │ local.get 7 │ │ local.get 9 │ │ i32.store offset=16 │ │ local.get 5 │ │ @@ -200109,15 +200113,15 @@ │ │ local.set 104 │ │ local.get 4 │ │ local.get 104 │ │ i32.store offset=12 │ │ br 1 (;@2;) │ │ end │ │ end │ │ - i32.const 26632 │ │ + i32.const 26952 │ │ local.set 105 │ │ local.get 105 │ │ local.set 106 │ │ local.get 4 │ │ local.get 106 │ │ i32.store offset=28 │ │ end │ │ @@ -200195,15 +200199,15 @@ │ │ block ;; label = @1 │ │ local.get 18 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ i32.load offset=92 │ │ local.set 19 │ │ - i32.const 7229 │ │ + i32.const 7278 │ │ local.set 20 │ │ i32.const 0 │ │ local.set 21 │ │ local.get 19 │ │ local.get 20 │ │ local.get 21 │ │ call $luaG_runerror │ │ @@ -200339,15 +200343,15 @@ │ │ block ;; label = @3 │ │ local.get 56 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ i32.load offset=92 │ │ local.set 57 │ │ - i32.const 15916 │ │ + i32.const 16219 │ │ local.set 58 │ │ i32.const 0 │ │ local.set 59 │ │ local.get 57 │ │ local.get 58 │ │ local.get 59 │ │ call $luaG_runerror │ │ @@ -203737,15 +203741,15 @@ │ │ call $luaH_getint │ │ local.set 17 │ │ local.get 4 │ │ local.get 17 │ │ i32.store offset=28 │ │ br 3 (;@1;) │ │ end │ │ - i32.const 26632 │ │ + i32.const 26952 │ │ local.set 18 │ │ local.get 18 │ │ local.set 19 │ │ local.get 4 │ │ local.get 19 │ │ i32.store offset=28 │ │ br 2 (;@1;) │ │ @@ -204094,15 +204098,15 @@ │ │ i32.store offset=12 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 42 │ │ block ;; label = @3 │ │ local.get 42 │ │ br_if 0 (;@3;) │ │ - i32.const 26632 │ │ + i32.const 26952 │ │ local.set 43 │ │ local.get 43 │ │ local.set 44 │ │ local.get 4 │ │ local.get 44 │ │ i32.store offset=28 │ │ br 2 (;@1;) │ │ @@ -205904,15 +205908,15 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 26656 │ │ + i32.const 26976 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ @@ -205967,15 +205971,15 @@ │ │ local.get 9 │ │ i64.store offset=16 │ │ local.get 3 │ │ i32.load offset=556 │ │ local.set 10 │ │ i32.const 2 │ │ local.set 11 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 12 │ │ i32.const 12 │ │ local.set 13 │ │ local.get 3 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ @@ -206349,15 +206353,15 @@ │ │ local.get 41 │ │ local.get 42 │ │ i32.add │ │ local.set 43 │ │ local.get 5 │ │ local.get 43 │ │ i32.store │ │ - i32.const 6847 │ │ + i32.const 6896 │ │ local.set 44 │ │ local.get 40 │ │ local.get 44 │ │ local.get 43 │ │ call $checkfield │ │ local.set 45 │ │ local.get 45 │ │ @@ -206503,15 +206507,15 @@ │ │ local.set 26 │ │ local.get 5 │ │ local.get 26 │ │ i64.store offset=8 │ │ local.get 5 │ │ local.get 25 │ │ i32.store │ │ - i32.const 18815 │ │ + i32.const 19118 │ │ local.set 27 │ │ local.get 20 │ │ local.get 27 │ │ local.get 5 │ │ call $luaL_error │ │ drop │ │ end │ │ @@ -206655,15 +206659,15 @@ │ │ local.get 28 │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 31 │ │ i32.const 2 │ │ local.set 32 │ │ - i32.const 4210 │ │ + i32.const 4259 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $luaL_argerror │ │ local.set 34 │ │ i32.const 0 │ │ @@ -206759,15 +206763,15 @@ │ │ end │ │ end │ │ br 1 (;@2;) │ │ end │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 58 │ │ - i32.const 18741 │ │ + i32.const 19044 │ │ local.set 59 │ │ i32.const 0 │ │ local.set 60 │ │ local.get 58 │ │ local.get 59 │ │ local.get 60 │ │ call $luaL_error │ │ @@ -206930,15 +206934,15 @@ │ │ local.get 30 │ │ call $lua_pushinteger │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 31 │ │ i32.const 1 │ │ local.set 32 │ │ - i32.const 6880 │ │ + i32.const 6929 │ │ local.set 33 │ │ local.get 31 │ │ local.get 32 │ │ local.get 33 │ │ call $lua_setfield │ │ i32.const 1 │ │ local.set 34 │ │ @@ -207165,15 +207169,15 @@ │ │ block ;; label = @2 │ │ local.get 59 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 60 │ │ - i32.const 7616 │ │ + i32.const 7665 │ │ local.set 61 │ │ i32.const 0 │ │ local.set 62 │ │ local.get 60 │ │ local.get 61 │ │ local.get 62 │ │ call $luaL_error │ │ @@ -207384,15 +207388,15 @@ │ │ local.get 29 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 32 │ │ i32.const 2 │ │ local.set 33 │ │ - i32.const 4210 │ │ + i32.const 4259 │ │ local.set 34 │ │ local.get 32 │ │ local.get 33 │ │ local.get 34 │ │ call $luaL_argerror │ │ local.set 35 │ │ i32.const 0 │ │ @@ -207728,15 +207732,15 @@ │ │ local.get 57 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=60 │ │ local.set 60 │ │ i32.const 3 │ │ local.set 61 │ │ - i32.const 9217 │ │ + i32.const 9351 │ │ local.set 62 │ │ local.get 60 │ │ local.get 61 │ │ local.get 62 │ │ call $luaL_argerror │ │ local.set 63 │ │ i32.const 0 │ │ @@ -207813,15 +207817,15 @@ │ │ local.get 83 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=60 │ │ local.set 86 │ │ i32.const 4 │ │ local.set 87 │ │ - i32.const 11261 │ │ + i32.const 11530 │ │ local.set 88 │ │ local.get 86 │ │ local.get 87 │ │ local.get 88 │ │ call $luaL_argerror │ │ local.set 89 │ │ i32.const 0 │ │ @@ -208216,15 +208220,15 @@ │ │ local.get 23 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 26 │ │ i32.const 1 │ │ local.set 27 │ │ - i32.const 8810 │ │ + i32.const 8944 │ │ local.set 28 │ │ local.get 26 │ │ local.get 27 │ │ local.get 28 │ │ call $luaL_argerror │ │ local.set 29 │ │ i32.const 0 │ │ @@ -209477,15 +209481,15 @@ │ │ block ;; label = @4 │ │ local.get 29 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 30 │ │ - i32.const 8263 │ │ + i32.const 8397 │ │ local.set 31 │ │ i32.const 0 │ │ local.set 32 │ │ local.get 30 │ │ local.get 31 │ │ local.get 32 │ │ call $luaL_error │ │ @@ -209569,15 +209573,15 @@ │ │ block ;; label = @4 │ │ local.get 52 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 53 │ │ - i32.const 8263 │ │ + i32.const 8397 │ │ local.set 54 │ │ i32.const 0 │ │ local.set 55 │ │ local.get 53 │ │ local.get 54 │ │ local.get 55 │ │ call $luaL_error │ │ @@ -209891,15 +209895,15 @@ │ │ br_if 1 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 13 │ │ - i32.const 26784 │ │ + i32.const 27104 │ │ local.set 14 │ │ i32.const 2 │ │ local.set 15 │ │ local.get 13 │ │ local.get 15 │ │ i32.shl │ │ local.set 16 │ │ @@ -210483,15 +210487,15 @@ │ │ end │ │ local.get 4 │ │ i32.load offset=16 │ │ local.set 43 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 44 │ │ - i32.const 10097 │ │ + i32.const 10282 │ │ local.set 45 │ │ local.get 44 │ │ local.get 45 │ │ call $luaS_new │ │ local.set 46 │ │ local.get 43 │ │ local.get 46 │ │ @@ -210576,15 +210580,15 @@ │ │ local.set 69 │ │ i32.const 1 │ │ local.set 70 │ │ local.get 69 │ │ local.get 70 │ │ i32.add │ │ local.set 71 │ │ - i32.const 26736 │ │ + i32.const 27056 │ │ local.set 72 │ │ i32.const 2 │ │ local.set 73 │ │ local.get 71 │ │ local.get 73 │ │ i32.shl │ │ local.set 74 │ │ @@ -211396,15 +211400,15 @@ │ │ local.set 56 │ │ local.get 7 │ │ i32.load offset=24 │ │ local.set 57 │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 58 │ │ - i32.const 6743 │ │ + i32.const 6792 │ │ local.set 59 │ │ local.get 56 │ │ local.get 57 │ │ local.get 58 │ │ local.get 59 │ │ call $luaG_opinterror │ │ unreachable │ │ @@ -211414,15 +211418,15 @@ │ │ local.set 60 │ │ local.get 7 │ │ i32.load offset=24 │ │ local.set 61 │ │ local.get 7 │ │ i32.load offset=20 │ │ local.set 62 │ │ - i32.const 6772 │ │ + i32.const 6821 │ │ local.set 63 │ │ local.get 60 │ │ local.get 61 │ │ local.get 62 │ │ local.get 63 │ │ call $luaG_opinterror │ │ unreachable │ │ @@ -213221,15 +213225,15 @@ │ │ local.get 34 │ │ local.get 33 │ │ i32.shr_s │ │ local.set 35 │ │ i32.const 0 │ │ local.set 36 │ │ local.get 36 │ │ - i32.load8_u offset=15524 │ │ + i32.load8_u offset=15793 │ │ local.set 37 │ │ i32.const 24 │ │ local.set 38 │ │ local.get 37 │ │ local.get 38 │ │ i32.shl │ │ local.set 39 │ │ @@ -213252,15 +213256,15 @@ │ │ i32.and │ │ local.set 45 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 45 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - i32.const 8413 │ │ + i32.const 8547 │ │ local.set 46 │ │ local.get 5 │ │ local.get 46 │ │ i32.store offset=32 │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ @@ -213482,23 +213486,23 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 15524 │ │ + i32.const 15793 │ │ local.set 5 │ │ i32.const 1 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.add │ │ local.set 7 │ │ - i32.const 7439 │ │ + i32.const 7488 │ │ local.set 8 │ │ local.get 4 │ │ local.get 7 │ │ local.get 8 │ │ call $checkliteral │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -213511,15 +213515,15 @@ │ │ local.get 10 │ │ local.get 11 │ │ i32.and │ │ local.set 12 │ │ i32.const 0 │ │ local.set 13 │ │ local.get 13 │ │ - i32.load8_u offset=16846 │ │ + i32.load8_u offset=17149 │ │ local.set 14 │ │ i32.const 24 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ i32.shl │ │ local.set 16 │ │ @@ -213538,15 +213542,15 @@ │ │ local.get 19 │ │ local.get 20 │ │ i32.shl │ │ local.set 21 │ │ i32.const 0 │ │ local.set 22 │ │ local.get 22 │ │ - i32.load8_u offset=16900 │ │ + i32.load8_u offset=17203 │ │ local.set 23 │ │ i32.const 24 │ │ local.set 24 │ │ local.get 23 │ │ local.get 24 │ │ i32.shl │ │ local.set 25 │ │ @@ -213581,15 +213585,15 @@ │ │ block ;; label = @1 │ │ local.get 34 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 35 │ │ - i32.const 8003 │ │ + i32.const 8052 │ │ local.set 36 │ │ local.get 35 │ │ local.get 36 │ │ call $error │ │ unreachable │ │ end │ │ local.get 3 │ │ @@ -213607,60 +213611,60 @@ │ │ block ;; label = @1 │ │ local.get 40 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 41 │ │ - i32.const 7987 │ │ + i32.const 8036 │ │ local.set 42 │ │ local.get 41 │ │ local.get 42 │ │ call $error │ │ unreachable │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 43 │ │ - i32.const 22639 │ │ + i32.const 22942 │ │ local.set 44 │ │ - i32.const 7469 │ │ + i32.const 7518 │ │ local.set 45 │ │ local.get 43 │ │ local.get 44 │ │ local.get 45 │ │ call $checkliteral │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 46 │ │ i32.const 4 │ │ local.set 47 │ │ - i32.const 6314 │ │ + i32.const 6363 │ │ local.set 48 │ │ local.get 46 │ │ local.get 47 │ │ local.get 48 │ │ call $fchecksize │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 49 │ │ i32.const 8 │ │ local.set 50 │ │ - i32.const 5361 │ │ + i32.const 5410 │ │ local.set 51 │ │ local.get 49 │ │ local.get 50 │ │ local.get 51 │ │ call $fchecksize │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 52 │ │ i32.const 8 │ │ local.set 53 │ │ - i32.const 5678 │ │ + i32.const 5727 │ │ local.set 54 │ │ local.get 52 │ │ local.get 53 │ │ local.get 54 │ │ call $fchecksize │ │ local.get 3 │ │ i32.load offset=12 │ │ @@ -213687,15 +213691,15 @@ │ │ block ;; label = @1 │ │ local.get 62 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 63 │ │ - i32.const 7979 │ │ + i32.const 8028 │ │ local.set 64 │ │ local.get 63 │ │ local.get 64 │ │ call $error │ │ unreachable │ │ end │ │ local.get 3 │ │ @@ -213719,15 +213723,15 @@ │ │ block ;; label = @1 │ │ local.get 70 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 71 │ │ - i32.const 7957 │ │ + i32.const 8006 │ │ local.set 72 │ │ local.get 71 │ │ local.get 72 │ │ call $error │ │ unreachable │ │ end │ │ i32.const 16 │ │ @@ -213863,15 +213867,15 @@ │ │ block ;; label = @1 │ │ local.get 34 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 35 │ │ - i32.const 7485 │ │ + i32.const 7534 │ │ local.set 36 │ │ local.get 35 │ │ local.get 36 │ │ call $error │ │ unreachable │ │ end │ │ local.get 3 │ │ @@ -214212,15 +214216,15 @@ │ │ local.set 9 │ │ local.get 4 │ │ local.get 9 │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 8 │ │ i32.store │ │ - i32.const 17552 │ │ + i32.const 17855 │ │ local.set 10 │ │ local.get 6 │ │ local.get 10 │ │ local.get 4 │ │ call $luaO_pushfstring │ │ drop │ │ local.get 4 │ │ @@ -214300,15 +214304,15 @@ │ │ local.set 18 │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 19 │ │ local.get 5 │ │ local.get 19 │ │ i32.store │ │ - i32.const 8020 │ │ + i32.const 8069 │ │ local.set 20 │ │ local.get 18 │ │ local.get 20 │ │ local.get 5 │ │ call $luaO_pushfstring │ │ local.set 21 │ │ local.get 16 │ │ @@ -216761,15 +216765,15 @@ │ │ block ;; label = @1 │ │ local.get 10 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 11 │ │ - i32.const 7485 │ │ + i32.const 7534 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ call $error │ │ unreachable │ │ end │ │ i32.const 16 │ │ @@ -217004,15 +217008,15 @@ │ │ block ;; label = @1 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 15 │ │ - i32.const 8469 │ │ + i32.const 8603 │ │ local.set 16 │ │ local.get 15 │ │ local.get 16 │ │ call $error │ │ unreachable │ │ end │ │ local.get 4 │ │ @@ -217064,40 +217068,40 @@ │ │ local.get 7 │ │ local.get 8 │ │ local.get 9 │ │ call $lua_createtable │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ - i32.const 26896 │ │ + i32.const 27216 │ │ local.set 11 │ │ i32.const 0 │ │ local.set 12 │ │ local.get 10 │ │ local.get 11 │ │ local.get 12 │ │ call $luaL_setfuncs │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 13 │ │ - i32.const 26952 │ │ + i32.const 27272 │ │ local.set 14 │ │ i32.const 14 │ │ local.set 15 │ │ local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ call $lua_pushlstring │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ i32.const -2 │ │ local.set 17 │ │ - i32.const 6151 │ │ + i32.const 6200 │ │ local.set 18 │ │ local.get 16 │ │ local.get 17 │ │ local.get 18 │ │ call $lua_setfield │ │ i32.const 1 │ │ local.set 19 │ │ @@ -217308,15 +217312,15 @@ │ │ local.get 54 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 57 │ │ i32.const 3 │ │ local.set 58 │ │ - i32.const 4210 │ │ + i32.const 4259 │ │ local.set 59 │ │ local.get 57 │ │ local.get 58 │ │ local.get 59 │ │ call $luaL_argerror │ │ local.set 60 │ │ i32.const 0 │ │ @@ -217512,15 +217516,15 @@ │ │ block ;; label = @3 │ │ local.get 116 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ i32.load offset=24 │ │ local.set 117 │ │ - i32.const 9447 │ │ + i32.const 9581 │ │ local.set 118 │ │ i32.const 0 │ │ local.set 119 │ │ local.get 117 │ │ local.get 118 │ │ local.get 119 │ │ call $luaL_error │ │ @@ -218182,15 +218186,15 @@ │ │ local.get 31 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 34 │ │ i32.const 2 │ │ local.set 35 │ │ - i32.const 4219 │ │ + i32.const 4268 │ │ local.set 36 │ │ local.get 34 │ │ local.get 35 │ │ local.get 36 │ │ call $luaL_argerror │ │ local.set 37 │ │ i32.const 0 │ │ @@ -218241,15 +218245,15 @@ │ │ local.get 50 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 53 │ │ i32.const 3 │ │ local.set 54 │ │ - i32.const 4219 │ │ + i32.const 4268 │ │ local.set 55 │ │ local.get 53 │ │ local.get 54 │ │ local.get 55 │ │ call $luaL_argerror │ │ local.set 56 │ │ i32.const 0 │ │ @@ -218328,15 +218332,15 @@ │ │ block ;; label = @2 │ │ local.get 77 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 78 │ │ - i32.const 8228 │ │ + i32.const 8362 │ │ local.set 79 │ │ i32.const 0 │ │ local.set 80 │ │ local.get 78 │ │ local.get 79 │ │ local.get 80 │ │ call $luaL_error │ │ @@ -218370,15 +218374,15 @@ │ │ i32.store offset=8 │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 88 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 89 │ │ - i32.const 8228 │ │ + i32.const 8362 │ │ local.set 90 │ │ local.get 88 │ │ local.get 89 │ │ local.get 90 │ │ call $luaL_checkstack │ │ i32.const 0 │ │ local.set 91 │ │ @@ -218508,15 +218512,15 @@ │ │ block ;; label = @4 │ │ local.get 127 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 128 │ │ - i32.const 11115 │ │ + i32.const 11384 │ │ local.set 129 │ │ i32.const 0 │ │ local.set 130 │ │ local.get 128 │ │ local.get 129 │ │ local.get 130 │ │ call $luaL_error │ │ @@ -218850,15 +218854,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=8 │ │ local.set 74 │ │ local.get 5 │ │ i32.load offset=4 │ │ local.set 75 │ │ - i32.const 26976 │ │ + i32.const 27296 │ │ local.set 76 │ │ i32.const 2 │ │ local.set 77 │ │ local.get 75 │ │ local.get 77 │ │ i32.shl │ │ local.set 78 │ │ @@ -219242,15 +219246,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ i32.load offset=28 │ │ local.set 17 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 18 │ │ - i32.const 10955 │ │ + i32.const 11224 │ │ local.set 19 │ │ local.get 17 │ │ local.get 18 │ │ local.get 19 │ │ call $luaL_argerror │ │ local.set 20 │ │ i32.const 0 │ │ @@ -219276,15 +219280,15 @@ │ │ local.set 26 │ │ local.get 26 │ │ i32.wrap_i64 │ │ local.set 27 │ │ local.get 4 │ │ local.get 27 │ │ i32.store │ │ - i32.const 15785 │ │ + i32.const 16088 │ │ local.set 28 │ │ local.get 25 │ │ local.get 28 │ │ local.get 4 │ │ call $lua_pushfstring │ │ drop │ │ i32.const 32 │ │ @@ -219467,15 +219471,15 @@ │ │ local.get 46 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 49 │ │ i32.const 2 │ │ local.set 50 │ │ - i32.const 4202 │ │ + i32.const 4251 │ │ local.set 51 │ │ local.get 49 │ │ local.get 50 │ │ local.get 51 │ │ call $luaL_argerror │ │ local.set 52 │ │ i32.const 0 │ │ @@ -219535,15 +219539,15 @@ │ │ local.get 67 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=40 │ │ local.set 70 │ │ i32.const 3 │ │ local.set 71 │ │ - i32.const 4173 │ │ + i32.const 4222 │ │ local.set 72 │ │ local.get 70 │ │ local.get 71 │ │ local.get 72 │ │ call $luaL_argerror │ │ local.set 73 │ │ i32.const 0 │ │ @@ -219840,15 +219844,15 @@ │ │ local.get 25 │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 28 │ │ i32.const 1 │ │ local.set 29 │ │ - i32.const 11115 │ │ + i32.const 11384 │ │ local.set 30 │ │ local.get 28 │ │ local.get 29 │ │ local.get 30 │ │ call $luaL_argerror │ │ local.set 31 │ │ i32.const 0 │ │ @@ -220268,15 +220272,15 @@ │ │ local.get 81 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 82 │ │ - i32.const 11115 │ │ + i32.const 11384 │ │ local.set 83 │ │ i32.const 0 │ │ local.set 84 │ │ local.get 82 │ │ local.get 83 │ │ local.get 84 │ │ call $luaL_error │ │ @@ -221626,15 +221630,15 @@ │ │ i32.store offset=24 │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 7 │ │ i32.load offset=44 │ │ local.set 143 │ │ - i32.const 5869 │ │ + i32.const 5918 │ │ local.set 144 │ │ i32.const 0 │ │ local.set 145 │ │ local.get 143 │ │ local.get 144 │ │ local.get 145 │ │ call $luaG_runerror │ │ @@ -222382,15 +222386,15 @@ │ │ i32.store offset=24 │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 7 │ │ i32.load offset=44 │ │ local.set 195 │ │ - i32.const 5826 │ │ + i32.const 5875 │ │ local.set 196 │ │ i32.const 0 │ │ local.set 197 │ │ local.get 195 │ │ local.get 196 │ │ local.get 197 │ │ call $luaG_runerror │ │ @@ -227730,15 +227734,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=28 │ │ local.set 91 │ │ local.get 5 │ │ i32.load offset=20 │ │ local.set 92 │ │ - i32.const 8881 │ │ + i32.const 9015 │ │ local.set 93 │ │ local.get 91 │ │ local.get 92 │ │ local.get 93 │ │ call $luaG_typeerror │ │ unreachable │ │ end │ │ @@ -227847,15 +227851,15 @@ │ │ block ;; label = @3 │ │ local.get 21 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=36 │ │ local.set 22 │ │ - i32.const 6060 │ │ + i32.const 6109 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaG_runerror │ │ @@ -228053,15 +228057,15 @@ │ │ block ;; label = @3 │ │ local.get 21 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=36 │ │ local.set 22 │ │ - i32.const 19343 │ │ + i32.const 19646 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 22 │ │ local.get 23 │ │ local.get 24 │ │ call $luaG_runerror │ │ @@ -229373,15 +229377,15 @@ │ │ local.set 59 │ │ i32.const 127 │ │ local.set 60 │ │ local.get 59 │ │ local.get 60 │ │ i32.and │ │ local.set 61 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 62 │ │ i32.const 2 │ │ local.set 63 │ │ local.get 61 │ │ local.get 63 │ │ i32.shl │ │ local.set 64 │ │ @@ -229655,15 +229659,15 @@ │ │ local.set 111 │ │ i32.const 127 │ │ local.set 112 │ │ local.get 111 │ │ local.get 112 │ │ i32.and │ │ local.set 113 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 114 │ │ i32.const 2 │ │ local.set 115 │ │ local.get 113 │ │ local.get 115 │ │ i32.shl │ │ local.set 116 │ │ @@ -229826,15 +229830,15 @@ │ │ local.set 156 │ │ i32.const 127 │ │ local.set 157 │ │ local.get 156 │ │ local.get 157 │ │ i32.and │ │ local.set 158 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 159 │ │ i32.const 2 │ │ local.set 160 │ │ local.get 158 │ │ local.get 160 │ │ i32.shl │ │ local.set 161 │ │ @@ -229995,15 +229999,15 @@ │ │ local.set 200 │ │ i32.const 127 │ │ local.set 201 │ │ local.get 200 │ │ local.get 201 │ │ i32.and │ │ local.set 202 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 203 │ │ i32.const 2 │ │ local.set 204 │ │ local.get 202 │ │ local.get 204 │ │ i32.shl │ │ local.set 205 │ │ @@ -230181,15 +230185,15 @@ │ │ local.set 248 │ │ i32.const 127 │ │ local.set 249 │ │ local.get 248 │ │ local.get 249 │ │ i32.and │ │ local.set 250 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 251 │ │ i32.const 2 │ │ local.set 252 │ │ local.get 250 │ │ local.get 252 │ │ i32.shl │ │ local.set 253 │ │ @@ -230382,15 +230386,15 @@ │ │ local.set 300 │ │ i32.const 127 │ │ local.set 301 │ │ local.get 300 │ │ local.get 301 │ │ i32.and │ │ local.set 302 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 303 │ │ i32.const 2 │ │ local.set 304 │ │ local.get 302 │ │ local.get 304 │ │ i32.shl │ │ local.set 305 │ │ @@ -230509,15 +230513,15 @@ │ │ local.set 333 │ │ i32.const 127 │ │ local.set 334 │ │ local.get 333 │ │ local.get 334 │ │ i32.and │ │ local.set 335 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 336 │ │ i32.const 2 │ │ local.set 337 │ │ local.get 335 │ │ local.get 337 │ │ i32.shl │ │ local.set 338 │ │ @@ -230648,15 +230652,15 @@ │ │ local.set 369 │ │ i32.const 127 │ │ local.set 370 │ │ local.get 369 │ │ local.get 370 │ │ i32.and │ │ local.set 371 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 372 │ │ i32.const 2 │ │ local.set 373 │ │ local.get 371 │ │ local.get 373 │ │ i32.shl │ │ local.set 374 │ │ @@ -230775,15 +230779,15 @@ │ │ local.set 402 │ │ i32.const 127 │ │ local.set 403 │ │ local.get 402 │ │ local.get 403 │ │ i32.and │ │ local.set 404 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 405 │ │ i32.const 2 │ │ local.set 406 │ │ local.get 404 │ │ local.get 406 │ │ i32.shl │ │ local.set 407 │ │ @@ -230945,15 +230949,15 @@ │ │ local.set 445 │ │ i32.const 127 │ │ local.set 446 │ │ local.get 445 │ │ local.get 446 │ │ i32.and │ │ local.set 447 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 448 │ │ i32.const 2 │ │ local.set 449 │ │ local.get 447 │ │ local.get 449 │ │ i32.shl │ │ local.set 450 │ │ @@ -231143,15 +231147,15 @@ │ │ local.set 497 │ │ i32.const 127 │ │ local.set 498 │ │ local.get 497 │ │ local.get 498 │ │ i32.and │ │ local.set 499 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 500 │ │ i32.const 2 │ │ local.set 501 │ │ local.get 499 │ │ local.get 501 │ │ i32.shl │ │ local.set 502 │ │ @@ -231433,15 +231437,15 @@ │ │ local.set 572 │ │ i32.const 127 │ │ local.set 573 │ │ local.get 572 │ │ local.get 573 │ │ i32.and │ │ local.set 574 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 575 │ │ i32.const 2 │ │ local.set 576 │ │ local.get 574 │ │ local.get 576 │ │ i32.shl │ │ local.set 577 │ │ @@ -231836,15 +231840,15 @@ │ │ local.set 679 │ │ i32.const 127 │ │ local.set 680 │ │ local.get 679 │ │ local.get 680 │ │ i32.and │ │ local.set 681 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 682 │ │ i32.const 2 │ │ local.set 683 │ │ local.get 681 │ │ local.get 683 │ │ i32.shl │ │ local.set 684 │ │ @@ -232449,15 +232453,15 @@ │ │ local.set 849 │ │ i32.const 127 │ │ local.set 850 │ │ local.get 849 │ │ local.get 850 │ │ i32.and │ │ local.set 851 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 852 │ │ i32.const 2 │ │ local.set 853 │ │ local.get 851 │ │ local.get 853 │ │ i32.shl │ │ local.set 854 │ │ @@ -232945,15 +232949,15 @@ │ │ local.set 985 │ │ i32.const 127 │ │ local.set 986 │ │ local.get 985 │ │ local.get 986 │ │ i32.and │ │ local.set 987 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 988 │ │ i32.const 2 │ │ local.set 989 │ │ local.get 987 │ │ local.get 989 │ │ i32.shl │ │ local.set 990 │ │ @@ -233336,15 +233340,15 @@ │ │ local.set 1088 │ │ i32.const 127 │ │ local.set 1089 │ │ local.get 1088 │ │ local.get 1089 │ │ i32.and │ │ local.set 1090 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1091 │ │ i32.const 2 │ │ local.set 1092 │ │ local.get 1090 │ │ local.get 1092 │ │ i32.shl │ │ local.set 1093 │ │ @@ -233881,15 +233885,15 @@ │ │ local.set 1232 │ │ i32.const 127 │ │ local.set 1233 │ │ local.get 1232 │ │ local.get 1233 │ │ i32.and │ │ local.set 1234 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1235 │ │ i32.const 2 │ │ local.set 1236 │ │ local.get 1234 │ │ local.get 1236 │ │ i32.shl │ │ local.set 1237 │ │ @@ -234636,15 +234640,15 @@ │ │ local.set 1439 │ │ i32.const 127 │ │ local.set 1440 │ │ local.get 1439 │ │ local.get 1440 │ │ i32.and │ │ local.set 1441 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1442 │ │ i32.const 2 │ │ local.set 1443 │ │ local.get 1441 │ │ local.get 1443 │ │ i32.shl │ │ local.set 1444 │ │ @@ -235274,15 +235278,15 @@ │ │ local.set 1612 │ │ i32.const 127 │ │ local.set 1613 │ │ local.get 1612 │ │ local.get 1613 │ │ i32.and │ │ local.set 1614 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1615 │ │ i32.const 2 │ │ local.set 1616 │ │ local.get 1614 │ │ local.get 1616 │ │ i32.shl │ │ local.set 1617 │ │ @@ -235807,15 +235811,15 @@ │ │ local.set 1752 │ │ i32.const 127 │ │ local.set 1753 │ │ local.get 1752 │ │ local.get 1753 │ │ i32.and │ │ local.set 1754 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1755 │ │ i32.const 2 │ │ local.set 1756 │ │ local.get 1754 │ │ local.get 1756 │ │ i32.shl │ │ local.set 1757 │ │ @@ -236217,15 +236221,15 @@ │ │ local.set 1857 │ │ i32.const 127 │ │ local.set 1858 │ │ local.get 1857 │ │ local.get 1858 │ │ i32.and │ │ local.set 1859 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1860 │ │ i32.const 2 │ │ local.set 1861 │ │ local.get 1859 │ │ local.get 1861 │ │ i32.shl │ │ local.set 1862 │ │ @@ -236701,15 +236705,15 @@ │ │ local.set 1984 │ │ i32.const 127 │ │ local.set 1985 │ │ local.get 1984 │ │ local.get 1985 │ │ i32.and │ │ local.set 1986 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 1987 │ │ i32.const 2 │ │ local.set 1988 │ │ local.get 1986 │ │ local.get 1988 │ │ i32.shl │ │ local.set 1989 │ │ @@ -237060,15 +237064,15 @@ │ │ local.set 2079 │ │ i32.const 127 │ │ local.set 2080 │ │ local.get 2079 │ │ local.get 2080 │ │ i32.and │ │ local.set 2081 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2082 │ │ i32.const 2 │ │ local.set 2083 │ │ local.get 2081 │ │ local.get 2083 │ │ i32.shl │ │ local.set 2084 │ │ @@ -237656,15 +237660,15 @@ │ │ local.set 2240 │ │ i32.const 127 │ │ local.set 2241 │ │ local.get 2240 │ │ local.get 2241 │ │ i32.and │ │ local.set 2242 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2243 │ │ i32.const 2 │ │ local.set 2244 │ │ local.get 2242 │ │ local.get 2244 │ │ i32.shl │ │ local.set 2245 │ │ @@ -238252,15 +238256,15 @@ │ │ local.set 2401 │ │ i32.const 127 │ │ local.set 2402 │ │ local.get 2401 │ │ local.get 2402 │ │ i32.and │ │ local.set 2403 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2404 │ │ i32.const 2 │ │ local.set 2405 │ │ local.get 2403 │ │ local.get 2405 │ │ i32.shl │ │ local.set 2406 │ │ @@ -238848,15 +238852,15 @@ │ │ local.set 2562 │ │ i32.const 127 │ │ local.set 2563 │ │ local.get 2562 │ │ local.get 2563 │ │ i32.and │ │ local.set 2564 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2565 │ │ i32.const 2 │ │ local.set 2566 │ │ local.get 2564 │ │ local.get 2566 │ │ i32.shl │ │ local.set 2567 │ │ @@ -239473,15 +239477,15 @@ │ │ local.set 2730 │ │ i32.const 127 │ │ local.set 2731 │ │ local.get 2730 │ │ local.get 2731 │ │ i32.and │ │ local.set 2732 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2733 │ │ i32.const 2 │ │ local.set 2734 │ │ local.get 2732 │ │ local.get 2734 │ │ i32.shl │ │ local.set 2735 │ │ @@ -239981,15 +239985,15 @@ │ │ local.set 2867 │ │ i32.const 127 │ │ local.set 2868 │ │ local.get 2867 │ │ local.get 2868 │ │ i32.and │ │ local.set 2869 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2870 │ │ i32.const 2 │ │ local.set 2871 │ │ local.get 2869 │ │ local.get 2871 │ │ i32.shl │ │ local.set 2872 │ │ @@ -240450,15 +240454,15 @@ │ │ local.set 2994 │ │ i32.const 127 │ │ local.set 2995 │ │ local.get 2994 │ │ local.get 2995 │ │ i32.and │ │ local.set 2996 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 2997 │ │ i32.const 2 │ │ local.set 2998 │ │ local.get 2996 │ │ local.get 2998 │ │ i32.shl │ │ local.set 2999 │ │ @@ -241074,15 +241078,15 @@ │ │ local.set 3162 │ │ i32.const 127 │ │ local.set 3163 │ │ local.get 3162 │ │ local.get 3163 │ │ i32.and │ │ local.set 3164 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3165 │ │ i32.const 2 │ │ local.set 3166 │ │ local.get 3164 │ │ local.get 3166 │ │ i32.shl │ │ local.set 3167 │ │ @@ -241384,15 +241388,15 @@ │ │ local.set 3244 │ │ i32.const 127 │ │ local.set 3245 │ │ local.get 3244 │ │ local.get 3245 │ │ i32.and │ │ local.set 3246 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3247 │ │ i32.const 2 │ │ local.set 3248 │ │ local.get 3246 │ │ local.get 3248 │ │ i32.shl │ │ local.set 3249 │ │ @@ -241694,15 +241698,15 @@ │ │ local.set 3326 │ │ i32.const 127 │ │ local.set 3327 │ │ local.get 3326 │ │ local.get 3327 │ │ i32.and │ │ local.set 3328 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3329 │ │ i32.const 2 │ │ local.set 3330 │ │ local.get 3328 │ │ local.get 3330 │ │ i32.shl │ │ local.set 3331 │ │ @@ -242004,15 +242008,15 @@ │ │ local.set 3408 │ │ i32.const 127 │ │ local.set 3409 │ │ local.get 3408 │ │ local.get 3409 │ │ i32.and │ │ local.set 3410 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3411 │ │ i32.const 2 │ │ local.set 3412 │ │ local.get 3410 │ │ local.get 3412 │ │ i32.shl │ │ local.set 3413 │ │ @@ -242309,15 +242313,15 @@ │ │ local.set 3490 │ │ i32.const 127 │ │ local.set 3491 │ │ local.get 3490 │ │ local.get 3491 │ │ i32.and │ │ local.set 3492 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3493 │ │ i32.const 2 │ │ local.set 3494 │ │ local.get 3492 │ │ local.get 3494 │ │ i32.shl │ │ local.set 3495 │ │ @@ -242608,15 +242612,15 @@ │ │ local.set 3570 │ │ i32.const 127 │ │ local.set 3571 │ │ local.get 3570 │ │ local.get 3571 │ │ i32.and │ │ local.set 3572 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3573 │ │ i32.const 2 │ │ local.set 3574 │ │ local.get 3572 │ │ local.get 3574 │ │ i32.shl │ │ local.set 3575 │ │ @@ -243204,15 +243208,15 @@ │ │ local.set 3731 │ │ i32.const 127 │ │ local.set 3732 │ │ local.get 3731 │ │ local.get 3732 │ │ i32.and │ │ local.set 3733 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3734 │ │ i32.const 2 │ │ local.set 3735 │ │ local.get 3733 │ │ local.get 3735 │ │ i32.shl │ │ local.set 3736 │ │ @@ -243800,15 +243804,15 @@ │ │ local.set 3892 │ │ i32.const 127 │ │ local.set 3893 │ │ local.get 3892 │ │ local.get 3893 │ │ i32.and │ │ local.set 3894 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 3895 │ │ i32.const 2 │ │ local.set 3896 │ │ local.get 3894 │ │ local.get 3896 │ │ i32.shl │ │ local.set 3897 │ │ @@ -244396,15 +244400,15 @@ │ │ local.set 4053 │ │ i32.const 127 │ │ local.set 4054 │ │ local.get 4053 │ │ local.get 4054 │ │ i32.and │ │ local.set 4055 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4056 │ │ i32.const 2 │ │ local.set 4057 │ │ local.get 4055 │ │ local.get 4057 │ │ i32.shl │ │ local.set 4058 │ │ @@ -245021,15 +245025,15 @@ │ │ local.set 4221 │ │ i32.const 127 │ │ local.set 4222 │ │ local.get 4221 │ │ local.get 4222 │ │ i32.and │ │ local.set 4223 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4224 │ │ i32.const 2 │ │ local.set 4225 │ │ local.get 4223 │ │ local.get 4225 │ │ i32.shl │ │ local.set 4226 │ │ @@ -245529,15 +245533,15 @@ │ │ local.set 4358 │ │ i32.const 127 │ │ local.set 4359 │ │ local.get 4358 │ │ local.get 4359 │ │ i32.and │ │ local.set 4360 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4361 │ │ i32.const 2 │ │ local.set 4362 │ │ local.get 4360 │ │ local.get 4362 │ │ i32.shl │ │ local.set 4363 │ │ @@ -245998,15 +246002,15 @@ │ │ local.set 4485 │ │ i32.const 127 │ │ local.set 4486 │ │ local.get 4485 │ │ local.get 4486 │ │ i32.and │ │ local.set 4487 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4488 │ │ i32.const 2 │ │ local.set 4489 │ │ local.get 4487 │ │ local.get 4489 │ │ i32.shl │ │ local.set 4490 │ │ @@ -246622,15 +246626,15 @@ │ │ local.set 4653 │ │ i32.const 127 │ │ local.set 4654 │ │ local.get 4653 │ │ local.get 4654 │ │ i32.and │ │ local.set 4655 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4656 │ │ i32.const 2 │ │ local.set 4657 │ │ local.get 4655 │ │ local.get 4657 │ │ i32.shl │ │ local.set 4658 │ │ @@ -246999,15 +247003,15 @@ │ │ local.set 4754 │ │ i32.const 127 │ │ local.set 4755 │ │ local.get 4754 │ │ local.get 4755 │ │ i32.and │ │ local.set 4756 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4757 │ │ i32.const 2 │ │ local.set 4758 │ │ local.get 4756 │ │ local.get 4758 │ │ i32.shl │ │ local.set 4759 │ │ @@ -247376,15 +247380,15 @@ │ │ local.set 4855 │ │ i32.const 127 │ │ local.set 4856 │ │ local.get 4855 │ │ local.get 4856 │ │ i32.and │ │ local.set 4857 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4858 │ │ i32.const 2 │ │ local.set 4859 │ │ local.get 4857 │ │ local.get 4859 │ │ i32.shl │ │ local.set 4860 │ │ @@ -247753,15 +247757,15 @@ │ │ local.set 4956 │ │ i32.const 127 │ │ local.set 4957 │ │ local.get 4956 │ │ local.get 4957 │ │ i32.and │ │ local.set 4958 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 4959 │ │ i32.const 2 │ │ local.set 4960 │ │ local.get 4958 │ │ local.get 4960 │ │ i32.shl │ │ local.set 4961 │ │ @@ -248136,15 +248140,15 @@ │ │ local.set 5059 │ │ i32.const 127 │ │ local.set 5060 │ │ local.get 5059 │ │ local.get 5060 │ │ i32.and │ │ local.set 5061 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5062 │ │ i32.const 2 │ │ local.set 5063 │ │ local.get 5061 │ │ local.get 5063 │ │ i32.shl │ │ local.set 5064 │ │ @@ -248513,15 +248517,15 @@ │ │ local.set 5160 │ │ i32.const 127 │ │ local.set 5161 │ │ local.get 5160 │ │ local.get 5161 │ │ i32.and │ │ local.set 5162 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5163 │ │ i32.const 2 │ │ local.set 5164 │ │ local.get 5162 │ │ local.get 5164 │ │ i32.shl │ │ local.set 5165 │ │ @@ -248778,15 +248782,15 @@ │ │ local.set 5230 │ │ i32.const 127 │ │ local.set 5231 │ │ local.get 5230 │ │ local.get 5231 │ │ i32.and │ │ local.set 5232 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5233 │ │ i32.const 2 │ │ local.set 5234 │ │ local.get 5232 │ │ local.get 5234 │ │ i32.shl │ │ local.set 5235 │ │ @@ -249063,15 +249067,15 @@ │ │ local.set 5306 │ │ i32.const 127 │ │ local.set 5307 │ │ local.get 5306 │ │ local.get 5307 │ │ i32.and │ │ local.set 5308 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5309 │ │ i32.const 2 │ │ local.set 5310 │ │ local.get 5308 │ │ local.get 5310 │ │ i32.shl │ │ local.set 5311 │ │ @@ -249350,15 +249354,15 @@ │ │ local.set 5382 │ │ i32.const 127 │ │ local.set 5383 │ │ local.get 5382 │ │ local.get 5383 │ │ i32.and │ │ local.set 5384 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5385 │ │ i32.const 2 │ │ local.set 5386 │ │ local.get 5384 │ │ local.get 5386 │ │ i32.shl │ │ local.set 5387 │ │ @@ -249777,15 +249781,15 @@ │ │ local.set 5493 │ │ i32.const 127 │ │ local.set 5494 │ │ local.get 5493 │ │ local.get 5494 │ │ i32.and │ │ local.set 5495 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5496 │ │ i32.const 2 │ │ local.set 5497 │ │ local.get 5495 │ │ local.get 5497 │ │ i32.shl │ │ local.set 5498 │ │ @@ -250087,15 +250091,15 @@ │ │ local.set 5573 │ │ i32.const 127 │ │ local.set 5574 │ │ local.get 5573 │ │ local.get 5574 │ │ i32.and │ │ local.set 5575 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5576 │ │ i32.const 2 │ │ local.set 5577 │ │ local.get 5575 │ │ local.get 5577 │ │ i32.shl │ │ local.set 5578 │ │ @@ -250310,15 +250314,15 @@ │ │ local.set 5633 │ │ i32.const 127 │ │ local.set 5634 │ │ local.get 5633 │ │ local.get 5634 │ │ i32.and │ │ local.set 5635 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5636 │ │ i32.const 2 │ │ local.set 5637 │ │ local.get 5635 │ │ local.get 5637 │ │ i32.shl │ │ local.set 5638 │ │ @@ -250497,15 +250501,15 @@ │ │ local.set 5682 │ │ i32.const 127 │ │ local.set 5683 │ │ local.get 5682 │ │ local.get 5683 │ │ i32.and │ │ local.set 5684 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5685 │ │ i32.const 2 │ │ local.set 5686 │ │ local.get 5684 │ │ local.get 5686 │ │ i32.shl │ │ local.set 5687 │ │ @@ -250748,15 +250752,15 @@ │ │ local.set 5747 │ │ i32.const 127 │ │ local.set 5748 │ │ local.get 5747 │ │ local.get 5748 │ │ i32.and │ │ local.set 5749 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5750 │ │ i32.const 2 │ │ local.set 5751 │ │ local.get 5749 │ │ local.get 5751 │ │ i32.shl │ │ local.set 5752 │ │ @@ -250913,15 +250917,15 @@ │ │ local.set 5789 │ │ i32.const 127 │ │ local.set 5790 │ │ local.get 5789 │ │ local.get 5790 │ │ i32.and │ │ local.set 5791 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5792 │ │ i32.const 2 │ │ local.set 5793 │ │ local.get 5791 │ │ local.get 5793 │ │ i32.shl │ │ local.set 5794 │ │ @@ -251062,15 +251066,15 @@ │ │ local.set 5827 │ │ i32.const 127 │ │ local.set 5828 │ │ local.get 5827 │ │ local.get 5828 │ │ i32.and │ │ local.set 5829 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5830 │ │ i32.const 2 │ │ local.set 5831 │ │ local.get 5829 │ │ local.get 5831 │ │ i32.shl │ │ local.set 5832 │ │ @@ -251202,15 +251206,15 @@ │ │ local.set 5864 │ │ i32.const 127 │ │ local.set 5865 │ │ local.get 5864 │ │ local.get 5865 │ │ i32.and │ │ local.set 5866 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5867 │ │ i32.const 2 │ │ local.set 5868 │ │ local.get 5866 │ │ local.get 5868 │ │ i32.shl │ │ local.set 5869 │ │ @@ -251512,15 +251516,15 @@ │ │ local.set 5946 │ │ i32.const 127 │ │ local.set 5947 │ │ local.get 5946 │ │ local.get 5947 │ │ i32.and │ │ local.set 5948 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 5949 │ │ i32.const 2 │ │ local.set 5950 │ │ local.get 5948 │ │ local.get 5950 │ │ i32.shl │ │ local.set 5951 │ │ @@ -252022,15 +252026,15 @@ │ │ local.set 6086 │ │ i32.const 127 │ │ local.set 6087 │ │ local.get 6086 │ │ local.get 6087 │ │ i32.and │ │ local.set 6088 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6089 │ │ i32.const 2 │ │ local.set 6090 │ │ local.get 6088 │ │ local.get 6090 │ │ i32.shl │ │ local.set 6091 │ │ @@ -252532,15 +252536,15 @@ │ │ local.set 6226 │ │ i32.const 127 │ │ local.set 6227 │ │ local.get 6226 │ │ local.get 6227 │ │ i32.and │ │ local.set 6228 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6229 │ │ i32.const 2 │ │ local.set 6230 │ │ local.get 6228 │ │ local.get 6230 │ │ i32.shl │ │ local.set 6231 │ │ @@ -252811,15 +252815,15 @@ │ │ local.set 6301 │ │ i32.const 127 │ │ local.set 6302 │ │ local.get 6301 │ │ local.get 6302 │ │ i32.and │ │ local.set 6303 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6304 │ │ i32.const 2 │ │ local.set 6305 │ │ local.get 6303 │ │ local.get 6305 │ │ i32.shl │ │ local.set 6306 │ │ @@ -253200,15 +253204,15 @@ │ │ local.set 6408 │ │ i32.const 127 │ │ local.set 6409 │ │ local.get 6408 │ │ local.get 6409 │ │ i32.and │ │ local.set 6410 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6411 │ │ i32.const 2 │ │ local.set 6412 │ │ local.get 6410 │ │ local.get 6412 │ │ i32.shl │ │ local.set 6413 │ │ @@ -253671,15 +253675,15 @@ │ │ local.set 6535 │ │ i32.const 127 │ │ local.set 6536 │ │ local.get 6535 │ │ local.get 6536 │ │ i32.and │ │ local.set 6537 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6538 │ │ i32.const 2 │ │ local.set 6539 │ │ local.get 6537 │ │ local.get 6539 │ │ i32.shl │ │ local.set 6540 │ │ @@ -254142,15 +254146,15 @@ │ │ local.set 6662 │ │ i32.const 127 │ │ local.set 6663 │ │ local.get 6662 │ │ local.get 6663 │ │ i32.and │ │ local.set 6664 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6665 │ │ i32.const 2 │ │ local.set 6666 │ │ local.get 6664 │ │ local.get 6666 │ │ i32.shl │ │ local.set 6667 │ │ @@ -254613,15 +254617,15 @@ │ │ local.set 6789 │ │ i32.const 127 │ │ local.set 6790 │ │ local.get 6789 │ │ local.get 6790 │ │ i32.and │ │ local.set 6791 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6792 │ │ i32.const 2 │ │ local.set 6793 │ │ local.get 6791 │ │ local.get 6793 │ │ i32.shl │ │ local.set 6794 │ │ @@ -255084,15 +255088,15 @@ │ │ local.set 6916 │ │ i32.const 127 │ │ local.set 6917 │ │ local.get 6916 │ │ local.get 6917 │ │ i32.and │ │ local.set 6918 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 6919 │ │ i32.const 2 │ │ local.set 6920 │ │ local.get 6918 │ │ local.get 6920 │ │ i32.shl │ │ local.set 6921 │ │ @@ -255399,15 +255403,15 @@ │ │ local.set 7005 │ │ i32.const 127 │ │ local.set 7006 │ │ local.get 7005 │ │ local.get 7006 │ │ i32.and │ │ local.set 7007 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7008 │ │ i32.const 2 │ │ local.set 7009 │ │ local.get 7007 │ │ local.get 7009 │ │ i32.shl │ │ local.set 7010 │ │ @@ -255769,15 +255773,15 @@ │ │ local.set 7108 │ │ i32.const 127 │ │ local.set 7109 │ │ local.get 7108 │ │ local.get 7109 │ │ i32.and │ │ local.set 7110 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7111 │ │ i32.const 2 │ │ local.set 7112 │ │ local.get 7110 │ │ local.get 7112 │ │ i32.shl │ │ local.set 7113 │ │ @@ -256026,15 +256030,15 @@ │ │ local.set 7173 │ │ i32.const 127 │ │ local.set 7174 │ │ local.get 7173 │ │ local.get 7174 │ │ i32.and │ │ local.set 7175 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7176 │ │ i32.const 2 │ │ local.set 7177 │ │ local.get 7175 │ │ local.get 7177 │ │ i32.shl │ │ local.set 7178 │ │ @@ -257577,15 +257581,15 @@ │ │ local.set 7567 │ │ i32.const 127 │ │ local.set 7568 │ │ local.get 7567 │ │ local.get 7568 │ │ i32.and │ │ local.set 7569 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7570 │ │ i32.const 2 │ │ local.set 7571 │ │ local.get 7569 │ │ local.get 7571 │ │ i32.shl │ │ local.set 7572 │ │ @@ -257769,15 +257773,15 @@ │ │ local.set 7617 │ │ i32.const 127 │ │ local.set 7618 │ │ local.get 7617 │ │ local.get 7618 │ │ i32.and │ │ local.set 7619 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7620 │ │ i32.const 2 │ │ local.set 7621 │ │ local.get 7619 │ │ local.get 7621 │ │ i32.shl │ │ local.set 7622 │ │ @@ -258389,15 +258393,15 @@ │ │ local.set 7779 │ │ i32.const 127 │ │ local.set 7780 │ │ local.get 7779 │ │ local.get 7780 │ │ i32.and │ │ local.set 7781 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7782 │ │ i32.const 2 │ │ local.set 7783 │ │ local.get 7781 │ │ local.get 7783 │ │ i32.shl │ │ local.set 7784 │ │ @@ -258930,15 +258934,15 @@ │ │ local.set 7918 │ │ i32.const 127 │ │ local.set 7919 │ │ local.get 7918 │ │ local.get 7919 │ │ i32.and │ │ local.set 7920 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7921 │ │ i32.const 2 │ │ local.set 7922 │ │ local.get 7920 │ │ local.get 7922 │ │ i32.shl │ │ local.set 7923 │ │ @@ -259205,15 +259209,15 @@ │ │ local.set 7991 │ │ i32.const 127 │ │ local.set 7992 │ │ local.get 7991 │ │ local.get 7992 │ │ i32.and │ │ local.set 7993 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 7994 │ │ i32.const 2 │ │ local.set 7995 │ │ local.get 7993 │ │ local.get 7995 │ │ i32.shl │ │ local.set 7996 │ │ @@ -259395,15 +259399,15 @@ │ │ local.set 8040 │ │ i32.const 127 │ │ local.set 8041 │ │ local.get 8040 │ │ local.get 8041 │ │ i32.and │ │ local.set 8042 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 8043 │ │ i32.const 2 │ │ local.set 8044 │ │ local.get 8042 │ │ local.get 8044 │ │ i32.shl │ │ local.set 8045 │ │ @@ -259573,15 +259577,15 @@ │ │ local.set 8084 │ │ i32.const 127 │ │ local.set 8085 │ │ local.get 8084 │ │ local.get 8085 │ │ i32.and │ │ local.set 8086 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 8087 │ │ i32.const 2 │ │ local.set 8088 │ │ local.get 8086 │ │ local.get 8088 │ │ i32.shl │ │ local.set 8089 │ │ @@ -259661,15 +259665,15 @@ │ │ local.set 8106 │ │ i32.const 127 │ │ local.set 8107 │ │ local.get 8106 │ │ local.get 8107 │ │ i32.and │ │ local.set 8108 │ │ - i32.const 27008 │ │ + i32.const 27328 │ │ local.set 8109 │ │ i32.const 2 │ │ local.set 8110 │ │ local.get 8108 │ │ local.get 8110 │ │ i32.shl │ │ local.set 8111 │ │ @@ -260019,15 +260023,15 @@ │ │ block ;; label = @4 │ │ local.get 42 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load offset=104 │ │ local.set 43 │ │ - i32.const 6086 │ │ + i32.const 6135 │ │ local.set 44 │ │ i32.const 0 │ │ local.set 45 │ │ local.get 43 │ │ local.get 44 │ │ local.get 45 │ │ call $luaG_runerror │ │ @@ -260342,15 +260346,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=104 │ │ local.set 127 │ │ local.get 4 │ │ i32.load offset=92 │ │ local.set 128 │ │ - i32.const 2958 │ │ + i32.const 3007 │ │ local.set 129 │ │ local.get 127 │ │ local.get 128 │ │ local.get 129 │ │ call $luaG_forerror │ │ unreachable │ │ end │ │ @@ -260450,15 +260454,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=104 │ │ local.set 158 │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 159 │ │ - i32.const 5940 │ │ + i32.const 5989 │ │ local.set 160 │ │ local.get 158 │ │ local.get 159 │ │ local.get 160 │ │ call $luaG_forerror │ │ unreachable │ │ end │ │ @@ -260558,15 +260562,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=104 │ │ local.set 189 │ │ local.get 4 │ │ i32.load offset=96 │ │ local.set 190 │ │ - i32.const 9390 │ │ + i32.const 9524 │ │ local.set 191 │ │ local.get 189 │ │ local.get 190 │ │ local.get 191 │ │ call $luaG_forerror │ │ unreachable │ │ end │ │ @@ -260591,15 +260595,15 @@ │ │ block ;; label = @3 │ │ local.get 197 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=104 │ │ local.set 198 │ │ - i32.const 6086 │ │ + i32.const 6135 │ │ local.set 199 │ │ i32.const 0 │ │ local.set 200 │ │ local.get 198 │ │ local.get 199 │ │ local.get 200 │ │ call $luaG_runerror │ │ @@ -261380,15 +261384,15 @@ │ │ end │ │ local.get 7 │ │ i32.load offset=40 │ │ local.set 41 │ │ local.get 7 │ │ i32.load offset=28 │ │ local.set 42 │ │ - i32.const 2958 │ │ + i32.const 3007 │ │ local.set 43 │ │ local.get 41 │ │ local.get 42 │ │ local.get 43 │ │ call $luaG_forerror │ │ unreachable │ │ end │ │ @@ -262317,15 +262321,15 @@ │ │ local.set 12 │ │ local.get 12 │ │ i32.load │ │ local.set 13 │ │ i32.const 0 │ │ local.set 14 │ │ local.get 14 │ │ - i32.load offset=28160 │ │ + i32.load offset=28480 │ │ local.set 15 │ │ local.get 13 │ │ local.set 16 │ │ local.get 15 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ @@ -262350,15 +262354,15 @@ │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 22 │ │ local.get 22 │ │ i32.load │ │ local.set 23 │ │ - i32.const 27872 │ │ + i32.const 28192 │ │ local.set 24 │ │ i32.const 3 │ │ local.set 25 │ │ local.get 23 │ │ local.get 25 │ │ i32.shl │ │ local.set 26 │ │ @@ -262801,15 +262805,15 @@ │ │ local.set 14 │ │ local.get 14 │ │ i32.load │ │ local.set 15 │ │ i32.const 0 │ │ local.set 16 │ │ local.get 16 │ │ - i32.load offset=28160 │ │ + i32.load offset=28480 │ │ local.set 17 │ │ local.get 15 │ │ local.set 18 │ │ local.get 17 │ │ local.set 19 │ │ local.get 18 │ │ local.get 19 │ │ @@ -262855,15 +262859,15 @@ │ │ block ;; label = @4 │ │ local.get 31 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.set 32 │ │ local.get 32 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 33 │ │ local.get 3 │ │ local.get 33 │ │ i32.store offset=108 │ │ br 3 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -262874,15 +262878,15 @@ │ │ local.set 35 │ │ local.get 35 │ │ i32.load │ │ local.set 36 │ │ local.get 3 │ │ local.get 36 │ │ i32.store offset=16 │ │ - i32.const 13318 │ │ + i32.const 13587 │ │ local.set 37 │ │ i32.const 128 │ │ local.set 38 │ │ i32.const 16 │ │ local.set 39 │ │ local.get 3 │ │ local.get 39 │ │ @@ -262923,15 +262927,15 @@ │ │ local.set 46 │ │ i32.const 3 │ │ local.set 47 │ │ local.get 46 │ │ local.get 47 │ │ i32.shl │ │ local.set 48 │ │ - i32.const 27872 │ │ + i32.const 28192 │ │ local.set 49 │ │ local.get 49 │ │ local.get 48 │ │ i32.add │ │ local.set 50 │ │ local.get 50 │ │ i32.load offset=4 │ │ @@ -263028,15 +263032,15 @@ │ │ block ;; label = @7 │ │ local.get 74 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ local.set 75 │ │ local.get 75 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 76 │ │ local.get 3 │ │ local.get 76 │ │ i32.store offset=108 │ │ br 6 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -263178,15 +263182,15 @@ │ │ local.get 109 │ │ local.get 110 │ │ i32.and │ │ local.set 111 │ │ i32.const 0 │ │ local.set 112 │ │ local.get 112 │ │ - i32.load offset=28336 │ │ + i32.load offset=28712 │ │ local.set 113 │ │ local.get 111 │ │ local.set 114 │ │ local.get 113 │ │ local.set 115 │ │ local.get 114 │ │ local.get 115 │ │ @@ -263233,15 +263237,15 @@ │ │ block ;; label = @8 │ │ local.get 127 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ local.set 128 │ │ local.get 128 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 129 │ │ local.get 3 │ │ local.get 129 │ │ i32.store offset=108 │ │ br 7 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -263296,15 +263300,15 @@ │ │ local.set 141 │ │ i32.const 255 │ │ local.set 142 │ │ local.get 141 │ │ local.get 142 │ │ i32.and │ │ local.set 143 │ │ - i32.const 28176 │ │ + i32.const 28496 │ │ local.set 144 │ │ i32.const 3 │ │ local.set 145 │ │ local.get 143 │ │ local.get 145 │ │ i32.shl │ │ local.set 146 │ │ @@ -263388,15 +263392,15 @@ │ │ block ;; label = @9 │ │ local.get 170 │ │ i32.eqz │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ local.set 171 │ │ local.get 171 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 172 │ │ local.get 3 │ │ local.get 172 │ │ i32.store offset=108 │ │ br 8 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -263410,15 +263414,15 @@ │ │ local.set 175 │ │ i32.const 255 │ │ local.set 176 │ │ local.get 175 │ │ local.get 176 │ │ i32.and │ │ local.set 177 │ │ - i32.const 28176 │ │ + i32.const 28496 │ │ local.set 178 │ │ i32.const 3 │ │ local.set 179 │ │ local.get 177 │ │ local.get 179 │ │ i32.shl │ │ local.set 180 │ │ @@ -263431,15 +263435,15 @@ │ │ local.set 182 │ │ local.get 3 │ │ local.get 182 │ │ i32.store offset=52 │ │ local.get 3 │ │ local.get 174 │ │ i32.store offset=48 │ │ - i32.const 4565 │ │ + i32.const 4614 │ │ local.set 183 │ │ i32.const 128 │ │ local.set 184 │ │ i32.const 48 │ │ local.set 185 │ │ local.get 3 │ │ local.get 185 │ │ @@ -263472,15 +263476,15 @@ │ │ local.set 190 │ │ i32.const 255 │ │ local.set 191 │ │ local.get 190 │ │ local.get 191 │ │ i32.and │ │ local.set 192 │ │ - i32.const 28176 │ │ + i32.const 28496 │ │ local.set 193 │ │ i32.const 3 │ │ local.set 194 │ │ local.get 192 │ │ local.get 194 │ │ i32.shl │ │ local.set 195 │ │ @@ -263624,15 +263628,15 @@ │ │ i32.load offset=88 │ │ local.set 230 │ │ local.get 230 │ │ call $dlfree │ │ i32.const 0 │ │ local.set 231 │ │ local.get 231 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 232 │ │ local.get 3 │ │ local.get 232 │ │ i32.store offset=108 │ │ br 2 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -263717,15 +263721,15 @@ │ │ i32.load offset=88 │ │ local.set 255 │ │ local.get 255 │ │ call $dlfree │ │ i32.const 0 │ │ local.set 256 │ │ local.get 256 │ │ - i32.load offset=27988 │ │ + i32.load offset=28308 │ │ local.set 257 │ │ local.get 3 │ │ local.get 257 │ │ i32.store offset=108 │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ @@ -263767,15 +263771,15 @@ │ │ local.get 3 │ │ i32.load offset=100 │ │ local.set 269 │ │ local.get 269 │ │ local.set 270 │ │ br 1 (;@2;) │ │ end │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 271 │ │ local.get 271 │ │ local.set 270 │ │ end │ │ local.get 270 │ │ local.set 272 │ │ local.get 3 │ │ @@ -263787,17 +263791,17 @@ │ │ local.set 275 │ │ local.get 274 │ │ local.set 276 │ │ local.get 275 │ │ local.get 276 │ │ i32.ne │ │ local.set 277 │ │ - i32.const 19818 │ │ + i32.const 20121 │ │ local.set 278 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 279 │ │ i32.const 1 │ │ local.set 280 │ │ local.get 277 │ │ local.get 280 │ │ i32.and │ │ local.set 281 │ │ @@ -263814,15 +263818,15 @@ │ │ i32.store offset=8 │ │ local.get 3 │ │ local.get 282 │ │ i32.store offset=4 │ │ local.get 3 │ │ local.get 272 │ │ i32.store │ │ - i32.const 4334 │ │ + i32.const 4383 │ │ local.set 284 │ │ local.get 258 │ │ local.get 261 │ │ local.get 284 │ │ local.get 3 │ │ call $snprintf │ │ drop │ │ @@ -264300,25 +264304,26 @@ │ │ local.set 7 │ │ local.get 6 │ │ local.set 8 │ │ local.get 7 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ - i32.ne │ │ + i32.eq │ │ local.set 10 │ │ i32.const 1 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.and │ │ local.set 12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 12 │ │ + i32.eqz │ │ br_if 0 (;@2;) │ │ i64.const -1 │ │ local.set 13 │ │ local.get 5 │ │ local.get 13 │ │ i64.store offset=24 │ │ br 1 (;@1;) │ │ @@ -266730,29 +266735,29 @@ │ │ end │ │ local.get 3 │ │ i32.load offset=28 │ │ local.set 65 │ │ local.get 65 │ │ return) │ │ (func $_zip_new (type 10) (param i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ i32.sub │ │ local.set 3 │ │ local.get 3 │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=8 │ │ - i32.const 96 │ │ + i32.const 112 │ │ local.set 4 │ │ local.get 4 │ │ call $dlmalloc │ │ local.set 5 │ │ local.get 3 │ │ local.get 5 │ │ i32.store offset=4 │ │ @@ -266763,25 +266768,26 @@ │ │ local.set 7 │ │ local.get 6 │ │ local.set 8 │ │ local.get 7 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ - i32.ne │ │ + i32.eq │ │ local.set 10 │ │ i32.const 1 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.and │ │ local.set 12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 12 │ │ + i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 13 │ │ i32.const 14 │ │ local.set 14 │ │ i32.const 0 │ │ @@ -266804,15 +266810,15 @@ │ │ call $_zip_hash_new │ │ local.set 18 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 19 │ │ local.get 19 │ │ local.get 18 │ │ - i32.store offset=80 │ │ + i32.store offset=92 │ │ i32.const 0 │ │ local.set 20 │ │ local.get 18 │ │ local.set 21 │ │ local.get 20 │ │ local.set 22 │ │ local.get 21 │ │ @@ -266939,62 +266945,70 @@ │ │ local.set 52 │ │ local.get 51 │ │ local.get 52 │ │ i32.store offset=64 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 53 │ │ - i32.const 0 │ │ + i64.const 0 │ │ local.set 54 │ │ local.get 53 │ │ local.get 54 │ │ - i32.store offset=72 │ │ + i64.store offset=80 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 55 │ │ - i32.const 0 │ │ + i64.const 0 │ │ local.set 56 │ │ local.get 55 │ │ local.get 56 │ │ - i32.store offset=68 │ │ + i64.store offset=72 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 57 │ │ i32.const 0 │ │ local.set 58 │ │ local.get 57 │ │ local.get 58 │ │ - i32.store offset=76 │ │ + i32.store offset=88 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 59 │ │ i32.const 0 │ │ local.set 60 │ │ local.get 59 │ │ local.get 60 │ │ - i32.store offset=84 │ │ + i32.store offset=96 │ │ local.get 3 │ │ i32.load offset=4 │ │ local.set 61 │ │ - local.get 3 │ │ + i32.const 0 │ │ + local.set 62 │ │ local.get 61 │ │ + local.get 62 │ │ + i32.store offset=104 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 63 │ │ + local.get 3 │ │ + local.get 63 │ │ i32.store offset=12 │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ - local.set 62 │ │ + local.set 64 │ │ i32.const 16 │ │ - local.set 63 │ │ + local.set 65 │ │ local.get 3 │ │ - local.get 63 │ │ + local.get 65 │ │ i32.add │ │ - local.set 64 │ │ - local.get 64 │ │ + local.set 66 │ │ + local.get 66 │ │ global.set $__stack_pointer │ │ - local.get 62 │ │ + local.get 64 │ │ return) │ │ (func $_zip_read (type 20) (param i32 i32 i64 i32) (result i32) │ │ (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 48 │ │ local.set 5 │ │ @@ -267169,72 +267183,72 @@ │ │ i32.add │ │ local.set 45 │ │ local.get 45 │ │ global.set $__stack_pointer │ │ local.get 43 │ │ return) │ │ (func $_zip_read_data (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ - i32.const 48 │ │ + i32.const 32 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.sub │ │ local.set 7 │ │ local.get 7 │ │ global.set $__stack_pointer │ │ local.get 7 │ │ local.get 0 │ │ - i32.store offset=40 │ │ + i32.store offset=24 │ │ local.get 7 │ │ local.get 1 │ │ - i32.store offset=36 │ │ + i32.store offset=20 │ │ local.get 7 │ │ local.get 2 │ │ - i32.store offset=32 │ │ + i32.store offset=16 │ │ local.get 3 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ - i32.store8 offset=31 │ │ + i32.store8 offset=15 │ │ local.get 7 │ │ local.get 4 │ │ - i32.store offset=24 │ │ + i32.store offset=8 │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 9 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 9 │ │ br_if 0 (;@2;) │ │ local.get 7 │ │ - i32.load8_u offset=31 │ │ + i32.load8_u offset=15 │ │ local.set 10 │ │ i32.const 1 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.and │ │ local.set 12 │ │ local.get 12 │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 13 │ │ local.get 7 │ │ local.get 13 │ │ - i32.store offset=44 │ │ + i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 14 │ │ local.get 7 │ │ - i32.load8_u offset=31 │ │ + i32.load8_u offset=15 │ │ local.set 15 │ │ i32.const 1 │ │ local.set 16 │ │ i32.const 0 │ │ local.set 17 │ │ i32.const 1 │ │ local.set 18 │ │ @@ -267252,57 +267266,58 @@ │ │ i32.add │ │ local.set 21 │ │ local.get 21 │ │ call $dlmalloc │ │ local.set 22 │ │ local.get 7 │ │ local.get 22 │ │ - i32.store offset=20 │ │ + i32.store offset=4 │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 23 │ │ local.set 25 │ │ local.get 24 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ - i32.ne │ │ + i32.eq │ │ local.set 27 │ │ i32.const 1 │ │ local.set 28 │ │ local.get 27 │ │ local.get 28 │ │ i32.and │ │ local.set 29 │ │ block ;; label = @2 │ │ local.get 29 │ │ + i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 7 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 30 │ │ i32.const 14 │ │ local.set 31 │ │ i32.const 0 │ │ local.set 32 │ │ local.get 30 │ │ local.get 31 │ │ local.get 32 │ │ call $zip_error_set │ │ i32.const 0 │ │ local.set 33 │ │ local.get 7 │ │ local.get 33 │ │ - i32.store offset=44 │ │ + i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ - i32.load offset=40 │ │ + i32.load offset=24 │ │ local.set 34 │ │ i32.const 0 │ │ local.set 35 │ │ local.get 34 │ │ local.set 36 │ │ local.get 35 │ │ local.set 37 │ │ @@ -267318,33 +267333,33 @@ │ │ local.set 40 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 40 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 7 │ │ - i32.load offset=40 │ │ + i32.load offset=24 │ │ local.set 41 │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 42 │ │ local.get 42 │ │ local.set 43 │ │ local.get 43 │ │ i64.extend_i32_u │ │ local.set 44 │ │ local.get 41 │ │ local.get 44 │ │ call $_zip_buffer_get │ │ local.set 45 │ │ local.get 7 │ │ local.get 45 │ │ - i32.store offset=16 │ │ + i32.store │ │ local.get 7 │ │ - i32.load offset=16 │ │ + i32.load │ │ local.set 46 │ │ i32.const 0 │ │ local.set 47 │ │ local.get 46 │ │ local.set 48 │ │ local.get 47 │ │ local.set 49 │ │ @@ -267359,68 +267374,68 @@ │ │ i32.and │ │ local.set 52 │ │ block ;; label = @4 │ │ local.get 52 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 7 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 53 │ │ i32.const 14 │ │ local.set 54 │ │ i32.const 0 │ │ local.set 55 │ │ local.get 53 │ │ local.get 54 │ │ local.get 55 │ │ call $zip_error_set │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 56 │ │ local.get 56 │ │ call $dlfree │ │ i32.const 0 │ │ local.set 57 │ │ local.get 7 │ │ local.get 57 │ │ - i32.store offset=44 │ │ + i32.store offset=28 │ │ br 3 (;@1;) │ │ end │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 58 │ │ local.get 7 │ │ - i32.load offset=16 │ │ + i32.load │ │ local.set 59 │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 60 │ │ local.get 58 │ │ local.get 59 │ │ local.get 60 │ │ call $__memcpy │ │ drop │ │ br 1 (;@2;) │ │ end │ │ local.get 7 │ │ - i32.load offset=36 │ │ + i32.load offset=20 │ │ local.set 61 │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 62 │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 63 │ │ local.get 63 │ │ local.set 64 │ │ local.get 64 │ │ i64.extend_i32_u │ │ local.set 65 │ │ local.get 7 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 66 │ │ local.get 61 │ │ local.get 62 │ │ local.get 65 │ │ local.get 66 │ │ call $_zip_read │ │ local.set 67 │ │ @@ -267441,151 +267456,74 @@ │ │ i32.and │ │ local.set 73 │ │ block ;; label = @3 │ │ local.get 73 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 74 │ │ local.get 74 │ │ call $dlfree │ │ i32.const 0 │ │ local.set 75 │ │ local.get 7 │ │ local.get 75 │ │ - i32.store offset=44 │ │ + i32.store offset=28 │ │ br 2 (;@1;) │ │ end │ │ end │ │ local.get 7 │ │ - i32.load8_u offset=31 │ │ + i32.load8_u offset=15 │ │ local.set 76 │ │ i32.const 1 │ │ local.set 77 │ │ local.get 76 │ │ local.get 77 │ │ i32.and │ │ local.set 78 │ │ block ;; label = @2 │ │ local.get 78 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 7 │ │ - i32.load offset=20 │ │ + i32.load offset=4 │ │ local.set 79 │ │ local.get 7 │ │ - i32.load offset=32 │ │ + i32.load offset=16 │ │ local.set 80 │ │ local.get 79 │ │ local.get 80 │ │ i32.add │ │ local.set 81 │ │ i32.const 0 │ │ local.set 82 │ │ local.get 81 │ │ local.get 82 │ │ i32.store8 │ │ - local.get 7 │ │ - i32.load offset=20 │ │ - local.set 83 │ │ - local.get 7 │ │ - local.get 83 │ │ - i32.store offset=12 │ │ - block ;; label = @3 │ │ - loop ;; label = @4 │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 84 │ │ - local.get 7 │ │ - i32.load offset=20 │ │ - local.set 85 │ │ - local.get 7 │ │ - i32.load offset=32 │ │ - local.set 86 │ │ - local.get 85 │ │ - local.get 86 │ │ - i32.add │ │ - local.set 87 │ │ - local.get 84 │ │ - local.set 88 │ │ - local.get 87 │ │ - local.set 89 │ │ - local.get 88 │ │ - local.get 89 │ │ - i32.lt_u │ │ - local.set 90 │ │ - i32.const 1 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.get 91 │ │ - i32.and │ │ - local.set 92 │ │ - local.get 92 │ │ - i32.eqz │ │ - br_if 1 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 93 │ │ - local.get 93 │ │ - i32.load8_u │ │ - local.set 94 │ │ - i32.const 255 │ │ - local.set 95 │ │ - local.get 94 │ │ - local.get 95 │ │ - i32.and │ │ - local.set 96 │ │ - block ;; label = @5 │ │ - local.get 96 │ │ - br_if 0 (;@5;) │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 97 │ │ - i32.const 32 │ │ - local.set 98 │ │ - local.get 97 │ │ - local.get 98 │ │ - i32.store8 │ │ - end │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 99 │ │ - i32.const 1 │ │ - local.set 100 │ │ - local.get 99 │ │ - local.get 100 │ │ - i32.add │ │ - local.set 101 │ │ - local.get 7 │ │ - local.get 101 │ │ - i32.store offset=12 │ │ - br 0 (;@4;) │ │ - end │ │ - end │ │ end │ │ local.get 7 │ │ - i32.load offset=20 │ │ - local.set 102 │ │ + i32.load offset=4 │ │ + local.set 83 │ │ local.get 7 │ │ - local.get 102 │ │ - i32.store offset=44 │ │ + local.get 83 │ │ + i32.store offset=28 │ │ end │ │ local.get 7 │ │ - i32.load offset=44 │ │ - local.set 103 │ │ - i32.const 48 │ │ - local.set 104 │ │ + i32.load offset=28 │ │ + local.set 84 │ │ + i32.const 32 │ │ + local.set 85 │ │ local.get 7 │ │ - local.get 104 │ │ + local.get 85 │ │ i32.add │ │ - local.set 105 │ │ - local.get 105 │ │ + local.set 86 │ │ + local.get 86 │ │ global.set $__stack_pointer │ │ - local.get 103 │ │ + local.get 84 │ │ return) │ │ (func $_zip_read_string (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 32 │ │ local.set 6 │ │ @@ -269772,24 +269710,25 @@ │ │ local.set 11 │ │ local.get 10 │ │ local.set 12 │ │ local.get 11 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ - i32.ne │ │ + i32.eq │ │ local.set 14 │ │ i32.const 1 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ i32.and │ │ local.set 16 │ │ block ;; label = @2 │ │ local.get 16 │ │ + i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ i32.load offset=16 │ │ local.set 17 │ │ i32.const 14 │ │ local.set 18 │ │ i32.const 0 │ │ @@ -270372,15 +270311,15 @@ │ │ i32.load offset=12 │ │ local.set 68 │ │ local.get 8 │ │ local.get 68 │ │ i32.store offset=28 │ │ br 5 (;@1;) │ │ end │ │ - i32.const 27340 │ │ + i32.const 27660 │ │ local.set 69 │ │ local.get 8 │ │ local.get 69 │ │ i32.store offset=28 │ │ br 4 (;@1;) │ │ end │ │ end │ │ @@ -271049,15 +270988,15 @@ │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 7 │ │ i32.load offset=40 │ │ local.set 60 │ │ i32.const 21 │ │ local.set 61 │ │ - i32.const 16 │ │ + i32.const 18 │ │ local.set 62 │ │ local.get 60 │ │ local.get 61 │ │ local.get 62 │ │ call $zip_error_set │ │ local.get 7 │ │ i32.load offset=36 │ │ @@ -271314,15 +271253,15 @@ │ │ br_if 0 (;@4;) │ │ local.get 7 │ │ i32.load offset=8 │ │ local.set 128 │ │ local.get 7 │ │ i32.load offset=12 │ │ local.set 129 │ │ - i32.const 27341 │ │ + i32.const 27661 │ │ local.set 130 │ │ local.get 128 │ │ local.get 130 │ │ local.get 129 │ │ call $memcmp │ │ local.set 131 │ │ local.get 131 │ │ @@ -271330,15 +271269,15 @@ │ │ br_if 1 (;@3;) │ │ end │ │ local.get 7 │ │ i32.load offset=40 │ │ local.set 132 │ │ i32.const 21 │ │ local.set 133 │ │ - i32.const 15 │ │ + i32.const 17 │ │ local.set 134 │ │ local.get 132 │ │ local.get 133 │ │ local.get 134 │ │ call $zip_error_set │ │ local.get 7 │ │ i32.load offset=36 │ │ @@ -271764,25 +271703,26 @@ │ │ local.set 5 │ │ local.get 4 │ │ local.set 6 │ │ local.get 5 │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ - i32.ne │ │ + i32.eq │ │ local.set 8 │ │ i32.const 1 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.and │ │ local.set 10 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 10 │ │ + i32.eqz │ │ br_if 0 (;@2;) │ │ br 1 (;@1;) │ │ end │ │ i64.const 0 │ │ local.set 11 │ │ local.get 3 │ │ local.get 11 │ │ @@ -271862,15 +271802,15 @@ │ │ local.set 31 │ │ local.get 31 │ │ call $dlfree │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 32 │ │ local.get 32 │ │ - i32.load offset=40 │ │ + i32.load offset=72 │ │ local.set 33 │ │ local.get 33 │ │ call $_zip_string_free │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 34 │ │ local.get 34 │ │ @@ -271881,213 +271821,175 @@ │ │ local.get 3 │ │ local.get 35 │ │ i32.add │ │ local.set 36 │ │ local.get 36 │ │ global.set $__stack_pointer │ │ return) │ │ - (func $_zip_cdir_new (type 63) (param i64 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $_zip_cdir_new (type 10) (param i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ + local.set 1 │ │ + i32.const 16 │ │ local.set 2 │ │ - i32.const 32 │ │ - local.set 3 │ │ + local.get 1 │ │ local.get 2 │ │ - local.get 3 │ │ i32.sub │ │ - local.set 4 │ │ - local.get 4 │ │ + local.set 3 │ │ + local.get 3 │ │ global.set $__stack_pointer │ │ - local.get 4 │ │ + local.get 3 │ │ local.get 0 │ │ - i64.store offset=16 │ │ + i32.store offset=8 │ │ + i32.const 80 │ │ + local.set 4 │ │ local.get 4 │ │ - local.get 1 │ │ - i32.store offset=12 │ │ - i32.const 48 │ │ + call $dlmalloc │ │ local.set 5 │ │ + local.get 3 │ │ local.get 5 │ │ - call $dlmalloc │ │ - local.set 6 │ │ - local.get 4 │ │ - local.get 6 │ │ - i32.store offset=8 │ │ + i32.store offset=4 │ │ i32.const 0 │ │ + local.set 6 │ │ + local.get 5 │ │ local.set 7 │ │ local.get 6 │ │ local.set 8 │ │ local.get 7 │ │ - local.set 9 │ │ local.get 8 │ │ - local.get 9 │ │ i32.eq │ │ - local.set 10 │ │ + local.set 9 │ │ i32.const 1 │ │ - local.set 11 │ │ + local.set 10 │ │ + local.get 9 │ │ local.get 10 │ │ - local.get 11 │ │ i32.and │ │ - local.set 12 │ │ + local.set 11 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 12 │ │ + local.get 11 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 13 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 12 │ │ i32.const 14 │ │ - local.set 14 │ │ + local.set 13 │ │ i32.const 0 │ │ - local.set 15 │ │ + local.set 14 │ │ + local.get 12 │ │ local.get 13 │ │ local.get 14 │ │ - local.get 15 │ │ call $zip_error_set │ │ i32.const 0 │ │ - local.set 16 │ │ - local.get 4 │ │ - local.get 16 │ │ - i32.store offset=28 │ │ + local.set 15 │ │ + local.get 3 │ │ + local.get 15 │ │ + i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 17 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 16 │ │ i32.const 0 │ │ - local.set 18 │ │ + local.set 17 │ │ + local.get 16 │ │ local.get 17 │ │ - local.get 18 │ │ i32.store │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 19 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 18 │ │ i64.const 0 │ │ - local.set 20 │ │ + local.set 19 │ │ + local.get 18 │ │ local.get 19 │ │ - local.get 20 │ │ i64.store offset=16 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 21 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 20 │ │ i64.const 0 │ │ - local.set 22 │ │ + local.set 21 │ │ + local.get 20 │ │ local.get 21 │ │ - local.get 22 │ │ i64.store offset=8 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 23 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 22 │ │ i64.const 0 │ │ - local.set 24 │ │ + local.set 23 │ │ + local.get 22 │ │ local.get 23 │ │ - local.get 24 │ │ - i64.store offset=32 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 25 │ │ + i64.store offset=56 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 24 │ │ i64.const 0 │ │ - local.set 26 │ │ + local.set 25 │ │ + local.get 24 │ │ local.get 25 │ │ - local.get 26 │ │ - i64.store offset=24 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 27 │ │ + i64.store offset=48 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 26 │ │ i32.const 0 │ │ - local.set 28 │ │ + local.set 27 │ │ + local.get 26 │ │ local.get 27 │ │ - local.get 28 │ │ - i32.store offset=40 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 29 │ │ + i32.store offset=72 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 28 │ │ i32.const 0 │ │ - local.set 30 │ │ + local.set 29 │ │ + local.get 28 │ │ local.get 29 │ │ + i32.store8 offset=76 │ │ + local.get 3 │ │ + i32.load offset=4 │ │ + local.set 30 │ │ + local.get 3 │ │ local.get 30 │ │ - i32.store8 offset=44 │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 31 │ │ - local.get 4 │ │ - i64.load offset=16 │ │ - local.set 32 │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 33 │ │ - local.get 31 │ │ - local.get 32 │ │ - local.get 33 │ │ - call $_zip_cdir_grow │ │ - local.set 34 │ │ - i32.const 1 │ │ - local.set 35 │ │ - local.get 34 │ │ - local.get 35 │ │ - i32.and │ │ - local.set 36 │ │ - block ;; label = @2 │ │ - local.get 36 │ │ - br_if 0 (;@2;) │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 37 │ │ - local.get 37 │ │ - call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 38 │ │ - local.get 4 │ │ - local.get 38 │ │ - i32.store offset=28 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 4 │ │ - i32.load offset=8 │ │ - local.set 39 │ │ - local.get 4 │ │ - local.get 39 │ │ - i32.store offset=28 │ │ + i32.store offset=12 │ │ end │ │ - local.get 4 │ │ - i32.load offset=28 │ │ - local.set 40 │ │ - i32.const 32 │ │ - local.set 41 │ │ - local.get 4 │ │ - local.get 41 │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 31 │ │ + i32.const 16 │ │ + local.set 32 │ │ + local.get 3 │ │ + local.get 32 │ │ i32.add │ │ - local.set 42 │ │ - local.get 42 │ │ + local.set 33 │ │ + local.get 33 │ │ global.set $__stack_pointer │ │ - local.get 40 │ │ + local.get 31 │ │ return) │ │ (func $_zip_cdir_grow (type 76) (param i32 i64 i32) (result i32) │ │ - (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ - i32.const 48 │ │ + i32.const 32 │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i32.sub │ │ local.set 5 │ │ local.get 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ local.get 0 │ │ - i32.store offset=40 │ │ + i32.store offset=24 │ │ local.get 5 │ │ local.get 1 │ │ - i64.store offset=32 │ │ + i64.store offset=16 │ │ local.get 5 │ │ local.get 2 │ │ - i32.store offset=28 │ │ + i32.store offset=12 │ │ local.get 5 │ │ - i64.load offset=32 │ │ + i64.load offset=16 │ │ local.set 6 │ │ i64.const 0 │ │ local.set 7 │ │ local.get 6 │ │ local.set 8 │ │ local.get 7 │ │ local.set 9 │ │ @@ -272112,303 +272014,187 @@ │ │ local.set 14 │ │ local.get 13 │ │ local.get 14 │ │ i32.and │ │ local.set 15 │ │ local.get 5 │ │ local.get 15 │ │ - i32.store8 offset=47 │ │ + i32.store8 offset=31 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ - i32.load offset=40 │ │ + i32.load offset=24 │ │ local.set 16 │ │ - local.get 16 │ │ - i64.load offset=16 │ │ - local.set 17 │ │ local.get 5 │ │ - i64.load offset=32 │ │ + i32.load offset=24 │ │ + local.set 17 │ │ + i32.const 16 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ - i64.add │ │ + i32.add │ │ local.set 19 │ │ local.get 5 │ │ - local.get 19 │ │ - i64.store offset=8 │ │ - local.get 5 │ │ - i64.load offset=8 │ │ + i64.load offset=16 │ │ local.set 20 │ │ local.get 5 │ │ - i64.load offset=32 │ │ + i32.load offset=12 │ │ local.set 21 │ │ - local.get 20 │ │ + i64.const 16 │ │ local.set 22 │ │ + local.get 16 │ │ + local.get 19 │ │ + local.get 22 │ │ + local.get 20 │ │ local.get 21 │ │ + call $zip_realloc │ │ local.set 23 │ │ - local.get 22 │ │ - local.get 23 │ │ - i64.lt_u │ │ - local.set 24 │ │ i32.const 1 │ │ - local.set 25 │ │ + local.set 24 │ │ + local.get 23 │ │ local.get 24 │ │ - local.get 25 │ │ - i32.and │ │ - local.set 26 │ │ - block ;; label = @2 │ │ - block ;; label = @3 │ │ - local.get 26 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i64.load offset=8 │ │ - local.set 27 │ │ - i64.const 268435455 │ │ - local.set 28 │ │ - local.get 27 │ │ - local.set 29 │ │ - local.get 28 │ │ - local.set 30 │ │ - local.get 29 │ │ - local.get 30 │ │ - i64.gt_u │ │ - local.set 31 │ │ - i32.const 1 │ │ - local.set 32 │ │ - local.get 31 │ │ - local.get 32 │ │ - i32.and │ │ - local.set 33 │ │ - local.get 33 │ │ - i32.eqz │ │ - br_if 1 (;@2;) │ │ - end │ │ - local.get 5 │ │ - i32.load offset=28 │ │ - local.set 34 │ │ - i32.const 14 │ │ - local.set 35 │ │ - i32.const 0 │ │ - local.set 36 │ │ - local.get 34 │ │ - local.get 35 │ │ - local.get 36 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 37 │ │ - i32.const 1 │ │ - local.set 38 │ │ - local.get 37 │ │ - local.get 38 │ │ - i32.and │ │ - local.set 39 │ │ - local.get 5 │ │ - local.get 39 │ │ - i32.store8 offset=47 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 40 │ │ - local.get 40 │ │ - i32.load │ │ - local.set 41 │ │ - local.get 5 │ │ - i64.load offset=8 │ │ - local.set 42 │ │ - local.get 42 │ │ - i32.wrap_i64 │ │ - local.set 43 │ │ - i32.const 4 │ │ - local.set 44 │ │ - local.get 43 │ │ - local.get 44 │ │ - i32.shl │ │ - local.set 45 │ │ - local.get 41 │ │ - local.get 45 │ │ - call $dlrealloc │ │ - local.set 46 │ │ - local.get 5 │ │ - local.get 46 │ │ - i32.store offset=4 │ │ - i32.const 0 │ │ - local.set 47 │ │ - local.get 46 │ │ - local.set 48 │ │ - local.get 47 │ │ - local.set 49 │ │ - local.get 48 │ │ - local.get 49 │ │ - i32.eq │ │ - local.set 50 │ │ - i32.const 1 │ │ - local.set 51 │ │ - local.get 50 │ │ - local.get 51 │ │ i32.and │ │ - local.set 52 │ │ + local.set 25 │ │ block ;; label = @2 │ │ - local.get 52 │ │ - i32.eqz │ │ + local.get 25 │ │ br_if 0 (;@2;) │ │ - local.get 5 │ │ - i32.load offset=28 │ │ - local.set 53 │ │ - i32.const 14 │ │ - local.set 54 │ │ - i32.const 0 │ │ - local.set 55 │ │ - local.get 53 │ │ - local.get 54 │ │ - local.get 55 │ │ - call $zip_error_set │ │ i32.const 0 │ │ - local.set 56 │ │ + local.set 26 │ │ i32.const 1 │ │ - local.set 57 │ │ - local.get 56 │ │ - local.get 57 │ │ + local.set 27 │ │ + local.get 26 │ │ + local.get 27 │ │ i32.and │ │ - local.set 58 │ │ + local.set 28 │ │ local.get 5 │ │ - local.get 58 │ │ - i32.store8 offset=47 │ │ + local.get 28 │ │ + i32.store8 offset=31 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ - i32.load offset=4 │ │ - local.set 59 │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 60 │ │ - local.get 60 │ │ - local.get 59 │ │ - i32.store │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 61 │ │ - local.get 61 │ │ + i32.load offset=24 │ │ + local.set 29 │ │ + local.get 29 │ │ i64.load offset=8 │ │ - local.set 62 │ │ + local.set 30 │ │ local.get 5 │ │ - local.get 62 │ │ - i64.store offset=16 │ │ + local.get 30 │ │ + i64.store │ │ block ;; label = @2 │ │ loop ;; label = @3 │ │ local.get 5 │ │ - i64.load offset=16 │ │ - local.set 63 │ │ + i64.load │ │ + local.set 31 │ │ local.get 5 │ │ - i64.load offset=8 │ │ - local.set 64 │ │ - local.get 63 │ │ - local.set 65 │ │ - local.get 64 │ │ - local.set 66 │ │ - local.get 65 │ │ - local.get 66 │ │ + i32.load offset=24 │ │ + local.set 32 │ │ + local.get 32 │ │ + i64.load offset=16 │ │ + local.set 33 │ │ + local.get 31 │ │ + local.set 34 │ │ + local.get 33 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.get 35 │ │ i64.lt_u │ │ - local.set 67 │ │ + local.set 36 │ │ i32.const 1 │ │ - local.set 68 │ │ - local.get 67 │ │ - local.get 68 │ │ + local.set 37 │ │ + local.get 36 │ │ + local.get 37 │ │ i32.and │ │ - local.set 69 │ │ - local.get 69 │ │ + local.set 38 │ │ + local.get 38 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ local.get 5 │ │ - i32.load offset=40 │ │ - local.set 70 │ │ - local.get 70 │ │ + i32.load offset=24 │ │ + local.set 39 │ │ + local.get 39 │ │ i32.load │ │ - local.set 71 │ │ + local.set 40 │ │ local.get 5 │ │ - i64.load offset=16 │ │ - local.set 72 │ │ - local.get 72 │ │ + i64.load │ │ + local.set 41 │ │ + local.get 41 │ │ i32.wrap_i64 │ │ - local.set 73 │ │ + local.set 42 │ │ i32.const 4 │ │ - local.set 74 │ │ - local.get 73 │ │ - local.get 74 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.get 43 │ │ i32.shl │ │ - local.set 75 │ │ - local.get 71 │ │ - local.get 75 │ │ + local.set 44 │ │ + local.get 40 │ │ + local.get 44 │ │ i32.add │ │ - local.set 76 │ │ - local.get 76 │ │ + local.set 45 │ │ + local.get 45 │ │ call $_zip_entry_init │ │ local.get 5 │ │ - i64.load offset=16 │ │ - local.set 77 │ │ + i64.load │ │ + local.set 46 │ │ i64.const 1 │ │ - local.set 78 │ │ - local.get 77 │ │ - local.get 78 │ │ + local.set 47 │ │ + local.get 46 │ │ + local.get 47 │ │ i64.add │ │ - local.set 79 │ │ + local.set 48 │ │ local.get 5 │ │ - local.get 79 │ │ - i64.store offset=16 │ │ + local.get 48 │ │ + i64.store │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 5 │ │ - i64.load offset=8 │ │ - local.set 80 │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 81 │ │ - local.get 81 │ │ - local.get 80 │ │ - i64.store offset=16 │ │ + i32.load offset=24 │ │ + local.set 49 │ │ + local.get 49 │ │ + i64.load offset=16 │ │ + local.set 50 │ │ local.get 5 │ │ - i32.load offset=40 │ │ - local.set 82 │ │ - local.get 82 │ │ - local.get 80 │ │ + i32.load offset=24 │ │ + local.set 51 │ │ + local.get 51 │ │ + local.get 50 │ │ i64.store offset=8 │ │ i32.const 1 │ │ - local.set 83 │ │ + local.set 52 │ │ i32.const 1 │ │ - local.set 84 │ │ - local.get 83 │ │ - local.get 84 │ │ + local.set 53 │ │ + local.get 52 │ │ + local.get 53 │ │ i32.and │ │ - local.set 85 │ │ + local.set 54 │ │ local.get 5 │ │ - local.get 85 │ │ - i32.store8 offset=47 │ │ + local.get 54 │ │ + i32.store8 offset=31 │ │ end │ │ local.get 5 │ │ - i32.load8_u offset=47 │ │ - local.set 86 │ │ + i32.load8_u offset=31 │ │ + local.set 55 │ │ i32.const 1 │ │ - local.set 87 │ │ - local.get 86 │ │ - local.get 87 │ │ + local.set 56 │ │ + local.get 55 │ │ + local.get 56 │ │ i32.and │ │ - local.set 88 │ │ - i32.const 48 │ │ - local.set 89 │ │ + local.set 57 │ │ + i32.const 32 │ │ + local.set 58 │ │ local.get 5 │ │ - local.get 89 │ │ + local.get 58 │ │ i32.add │ │ - local.set 90 │ │ - local.get 90 │ │ + local.set 59 │ │ + local.get 59 │ │ global.set $__stack_pointer │ │ - local.get 88 │ │ + local.get 57 │ │ return) │ │ (func $_zip_dirent_init (type 5) (param i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ i32.sub │ │ @@ -272447,162 +272233,170 @@ │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.store8 offset=6 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 12 │ │ - i32.const 831 │ │ + i32.const 0 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ - i32.store16 offset=8 │ │ + i32.store8 offset=7 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 14 │ │ - i32.const 10 │ │ + i32.const 831 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ - i32.store16 offset=10 │ │ + i32.store16 offset=8 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ - i32.const 0 │ │ + i32.const 10 │ │ local.set 17 │ │ local.get 16 │ │ local.get 17 │ │ - i32.store16 offset=12 │ │ + i32.store16 offset=10 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 18 │ │ - i32.const -1 │ │ + i32.const 0 │ │ local.set 19 │ │ local.get 18 │ │ local.get 19 │ │ - i32.store offset=16 │ │ + i32.store16 offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 20 │ │ - i32.const 0 │ │ + i32.const -1 │ │ local.set 21 │ │ local.get 20 │ │ local.get 21 │ │ - i32.store16 offset=22 │ │ + i32.store offset=16 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 22 │ │ i32.const 0 │ │ local.set 23 │ │ local.get 22 │ │ local.get 23 │ │ - i32.store16 offset=20 │ │ + i32.store16 offset=22 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 24 │ │ i32.const 0 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ - i32.store offset=24 │ │ + i32.store16 offset=20 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 26 │ │ - i64.const 0 │ │ + i32.const 0 │ │ local.set 27 │ │ local.get 26 │ │ local.get 27 │ │ - i64.store offset=32 │ │ + i32.store offset=24 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 28 │ │ i64.const 0 │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ - i64.store offset=40 │ │ + i64.store offset=32 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 30 │ │ - i32.const 0 │ │ + i64.const 0 │ │ local.set 31 │ │ local.get 30 │ │ local.get 31 │ │ - i32.store offset=48 │ │ + i64.store offset=40 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 32 │ │ i32.const 0 │ │ local.set 33 │ │ local.get 32 │ │ local.get 33 │ │ - i32.store offset=52 │ │ + i32.store offset=48 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 34 │ │ i32.const 0 │ │ local.set 35 │ │ local.get 34 │ │ local.get 35 │ │ - i32.store offset=56 │ │ + i32.store offset=52 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 36 │ │ i32.const 0 │ │ local.set 37 │ │ local.get 36 │ │ local.get 37 │ │ - i32.store offset=60 │ │ + i32.store offset=56 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 38 │ │ i32.const 0 │ │ local.set 39 │ │ local.get 38 │ │ local.get 39 │ │ - i32.store16 offset=64 │ │ + i32.store offset=60 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 40 │ │ - i32.const -2118778880 │ │ + i32.const 0 │ │ local.set 41 │ │ local.get 40 │ │ local.get 41 │ │ - i32.store offset=68 │ │ + i32.store16 offset=64 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 42 │ │ - i64.const 0 │ │ + i32.const -2118778880 │ │ local.set 43 │ │ local.get 42 │ │ local.get 43 │ │ - i64.store offset=72 │ │ + i32.store offset=68 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 44 │ │ - i32.const 0 │ │ + i64.const 0 │ │ local.set 45 │ │ local.get 44 │ │ local.get 45 │ │ - i32.store offset=80 │ │ + i64.store offset=72 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 46 │ │ i32.const 0 │ │ local.set 47 │ │ local.get 46 │ │ local.get 47 │ │ - i32.store16 offset=84 │ │ + i32.store offset=80 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 48 │ │ i32.const 0 │ │ local.set 49 │ │ local.get 48 │ │ local.get 49 │ │ + i32.store16 offset=84 │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 50 │ │ + i32.const 0 │ │ + local.set 51 │ │ + local.get 50 │ │ + local.get 51 │ │ i32.store offset=88 │ │ return) │ │ (func $_zip_dirent_finalize (type 5) (param i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ @@ -273004,2442 +272798,3333 @@ │ │ local.get 15 │ │ i32.add │ │ local.set 16 │ │ local.get 16 │ │ global.set $__stack_pointer │ │ local.get 14 │ │ return) │ │ - (func $_zip_dirent_read (type 35) (param i32 i32 i32 i32 i32) (result i64) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32) │ │ + (func $_zip_dirent_read (type 78) (param i32 i32 i32 i32 i64 i32 i32) (result i64) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i64 i64 i32 i32 i32 i32 i64 i64 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i64 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 5 │ │ - i32.const 112 │ │ - local.set 6 │ │ - local.get 5 │ │ - local.get 6 │ │ - i32.sub │ │ local.set 7 │ │ + i32.const 160 │ │ + local.set 8 │ │ local.get 7 │ │ + local.get 8 │ │ + i32.sub │ │ + local.set 9 │ │ + local.get 9 │ │ global.set $__stack_pointer │ │ - local.get 7 │ │ + local.get 9 │ │ local.get 0 │ │ - i32.store offset=100 │ │ - local.get 7 │ │ + i32.store offset=148 │ │ + local.get 9 │ │ local.get 1 │ │ - i32.store offset=96 │ │ - local.get 7 │ │ + i32.store offset=144 │ │ + local.get 9 │ │ local.get 2 │ │ - i32.store offset=92 │ │ + i32.store offset=140 │ │ local.get 3 │ │ - local.set 8 │ │ - local.get 7 │ │ - local.get 8 │ │ - i32.store8 offset=91 │ │ - local.get 7 │ │ - local.get 4 │ │ - i32.store offset=84 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 9 │ │ - i32.const 0 │ │ local.set 10 │ │ local.get 9 │ │ - local.set 11 │ │ local.get 10 │ │ - local.set 12 │ │ + i32.store8 offset=139 │ │ + local.get 9 │ │ + local.get 4 │ │ + i64.store offset=128 │ │ + local.get 5 │ │ + local.set 11 │ │ + local.get 9 │ │ local.get 11 │ │ + i32.store8 offset=127 │ │ + local.get 9 │ │ + local.get 6 │ │ + i32.store offset=120 │ │ + i32.const 0 │ │ + local.set 12 │ │ + local.get 9 │ │ local.get 12 │ │ - i32.ne │ │ + i32.store8 offset=43 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 13 │ │ - i32.const 1 │ │ + i32.const 0 │ │ local.set 14 │ │ local.get 13 │ │ - local.get 14 │ │ - i32.and │ │ local.set 15 │ │ - local.get 7 │ │ - local.get 15 │ │ - i32.store8 offset=17 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ + local.get 14 │ │ local.set 16 │ │ - i32.const 30 │ │ + local.get 15 │ │ + local.get 16 │ │ + i32.ne │ │ local.set 17 │ │ - i32.const 46 │ │ - local.set 18 │ │ i32.const 1 │ │ + local.set 18 │ │ + local.get 17 │ │ + local.get 18 │ │ + i32.and │ │ local.set 19 │ │ - local.get 16 │ │ + local.get 9 │ │ local.get 19 │ │ - i32.and │ │ + i32.store8 offset=42 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ local.set 20 │ │ - local.get 17 │ │ - local.get 18 │ │ - local.get 20 │ │ - select │ │ + i32.const 30 │ │ local.set 21 │ │ - local.get 7 │ │ - local.get 21 │ │ - i32.store offset=28 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + i32.const 46 │ │ local.set 22 │ │ - i32.const 0 │ │ + i32.const 1 │ │ local.set 23 │ │ - local.get 22 │ │ - local.set 24 │ │ + local.get 20 │ │ local.get 23 │ │ - local.set 25 │ │ + i32.and │ │ + local.set 24 │ │ + local.get 21 │ │ + local.get 22 │ │ local.get 24 │ │ + select │ │ + local.set 25 │ │ + local.get 9 │ │ local.get 25 │ │ - i32.ne │ │ + i32.store offset=60 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 26 │ │ - i32.const 1 │ │ + i32.const 0 │ │ local.set 27 │ │ local.get 26 │ │ + local.set 28 │ │ local.get 27 │ │ + local.set 29 │ │ + local.get 28 │ │ + local.get 29 │ │ + i32.ne │ │ + local.set 30 │ │ + i32.const 1 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ i32.and │ │ - local.set 28 │ │ + local.set 32 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 28 │ │ + local.get 32 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 29 │ │ - local.get 29 │ │ - call $_zip_buffer_left │ │ - local.set 30 │ │ - local.get 7 │ │ - i32.load offset=28 │ │ - local.set 31 │ │ - local.get 31 │ │ - local.set 32 │ │ - local.get 32 │ │ - i64.extend_i32_u │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 33 │ │ - local.get 30 │ │ - local.set 34 │ │ local.get 33 │ │ + call $_zip_buffer_left │ │ + local.set 34 │ │ + local.get 9 │ │ + i32.load offset=60 │ │ local.set 35 │ │ - local.get 34 │ │ local.get 35 │ │ - i64.lt_u │ │ local.set 36 │ │ - i32.const 1 │ │ - local.set 37 │ │ local.get 36 │ │ + i64.extend_i32_u │ │ + local.set 37 │ │ + local.get 34 │ │ + local.set 38 │ │ local.get 37 │ │ + local.set 39 │ │ + local.get 38 │ │ + local.get 39 │ │ + i64.lt_u │ │ + local.set 40 │ │ + i32.const 1 │ │ + local.set 41 │ │ + local.get 40 │ │ + local.get 41 │ │ i32.and │ │ - local.set 38 │ │ + local.set 42 │ │ block ;; label = @4 │ │ - local.get 38 │ │ + local.get 42 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 39 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 43 │ │ i32.const 19 │ │ - local.set 40 │ │ + local.set 44 │ │ i32.const 0 │ │ - local.set 41 │ │ - local.get 39 │ │ - local.get 40 │ │ - local.get 41 │ │ + local.set 45 │ │ + local.get 43 │ │ + local.get 44 │ │ + local.get 45 │ │ call $zip_error_set │ │ i64.const -1 │ │ - local.set 42 │ │ - local.get 7 │ │ - local.get 42 │ │ - i64.store offset=104 │ │ + local.set 46 │ │ + local.get 9 │ │ + local.get 46 │ │ + i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=96 │ │ - local.set 43 │ │ - local.get 7 │ │ - i32.load offset=28 │ │ - local.set 44 │ │ - local.get 44 │ │ - local.set 45 │ │ - local.get 45 │ │ - i64.extend_i32_u │ │ - local.set 46 │ │ - i32.const 32 │ │ + local.get 9 │ │ + i32.load offset=144 │ │ local.set 47 │ │ - local.get 7 │ │ - local.get 47 │ │ - i32.add │ │ + local.get 9 │ │ + i32.load offset=60 │ │ local.set 48 │ │ local.get 48 │ │ local.set 49 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 50 │ │ - local.get 43 │ │ - local.get 46 │ │ local.get 49 │ │ - local.get 50 │ │ - call $_zip_buffer_new_from_source │ │ + i64.extend_i32_u │ │ + local.set 50 │ │ + i32.const 64 │ │ local.set 51 │ │ - local.get 7 │ │ + local.get 9 │ │ local.get 51 │ │ - i32.store offset=92 │ │ - i32.const 0 │ │ + i32.add │ │ local.set 52 │ │ - local.get 51 │ │ - local.set 53 │ │ local.get 52 │ │ + local.set 53 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ local.set 54 │ │ + local.get 47 │ │ + local.get 50 │ │ local.get 53 │ │ local.get 54 │ │ - i32.eq │ │ + call $_zip_buffer_new_from_source │ │ local.set 55 │ │ - i32.const 1 │ │ + local.get 9 │ │ + local.get 55 │ │ + i32.store offset=140 │ │ + i32.const 0 │ │ local.set 56 │ │ local.get 55 │ │ + local.set 57 │ │ local.get 56 │ │ + local.set 58 │ │ + local.get 57 │ │ + local.get 58 │ │ + i32.eq │ │ + local.set 59 │ │ + i32.const 1 │ │ + local.set 60 │ │ + local.get 59 │ │ + local.get 60 │ │ i32.and │ │ - local.set 57 │ │ + local.set 61 │ │ block ;; label = @3 │ │ - local.get 57 │ │ + local.get 61 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i64.const -1 │ │ - local.set 58 │ │ - local.get 7 │ │ - local.get 58 │ │ - i64.store offset=104 │ │ + local.set 62 │ │ + local.get 9 │ │ + local.get 62 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 59 │ │ - i64.const 4 │ │ - local.set 60 │ │ - local.get 59 │ │ - local.get 60 │ │ - call $_zip_buffer_get │ │ - local.set 61 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 62 │ │ - i32.const 22654 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 63 │ │ - i32.const 22659 │ │ + i64.const 4 │ │ local.set 64 │ │ - i32.const 1 │ │ - local.set 65 │ │ - local.get 62 │ │ - local.get 65 │ │ - i32.and │ │ - local.set 66 │ │ local.get 63 │ │ local.get 64 │ │ - local.get 66 │ │ - select │ │ + call $_zip_buffer_get │ │ + local.set 65 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 66 │ │ + i32.const 22962 │ │ local.set 67 │ │ - local.get 67 │ │ - i32.load align=1 │ │ + i32.const 22967 │ │ local.set 68 │ │ - local.get 61 │ │ - i32.load align=1 │ │ + i32.const 1 │ │ local.set 69 │ │ + local.get 66 │ │ local.get 69 │ │ + i32.and │ │ + local.set 70 │ │ + local.get 67 │ │ local.get 68 │ │ + local.get 70 │ │ + select │ │ + local.set 71 │ │ + local.get 71 │ │ + i32.load align=1 │ │ + local.set 72 │ │ + local.get 65 │ │ + i32.load align=1 │ │ + local.set 73 │ │ + local.get 73 │ │ + local.get 72 │ │ i32.ne │ │ - local.set 70 │ │ + local.set 74 │ │ block ;; label = @2 │ │ - local.get 70 │ │ + local.get 74 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 71 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 75 │ │ i32.const 19 │ │ - local.set 72 │ │ + local.set 76 │ │ i32.const 0 │ │ - local.set 73 │ │ - local.get 71 │ │ - local.get 72 │ │ - local.get 73 │ │ + local.set 77 │ │ + local.get 75 │ │ + local.get 76 │ │ + local.get 77 │ │ call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 74 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 78 │ │ i32.const 1 │ │ - local.set 75 │ │ - local.get 74 │ │ - local.get 75 │ │ + local.set 79 │ │ + local.get 78 │ │ + local.get 79 │ │ i32.and │ │ - local.set 76 │ │ + local.set 80 │ │ block ;; label = @3 │ │ - local.get 76 │ │ + local.get 80 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 77 │ │ - local.get 77 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 81 │ │ + local.get 81 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 78 │ │ - local.get 7 │ │ - local.get 78 │ │ - i64.store offset=104 │ │ + local.set 82 │ │ + local.get 9 │ │ + local.get 82 │ │ + i64.store offset=152 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 79 │ │ - local.get 79 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 83 │ │ + local.get 83 │ │ call $_zip_dirent_init │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 80 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 84 │ │ i32.const 1 │ │ - local.set 81 │ │ - local.get 80 │ │ - local.get 81 │ │ + local.set 85 │ │ + local.get 84 │ │ + local.get 85 │ │ i32.and │ │ - local.set 82 │ │ + local.set 86 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 82 │ │ + local.get 86 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 83 │ │ - local.get 83 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 87 │ │ + local.get 87 │ │ call $_zip_buffer_get_16 │ │ - local.set 84 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 85 │ │ - local.get 85 │ │ - local.get 84 │ │ + local.set 88 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 89 │ │ + local.get 89 │ │ + local.get 88 │ │ i32.store16 offset=8 │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 86 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 90 │ │ i32.const 0 │ │ - local.set 87 │ │ - local.get 86 │ │ - local.get 87 │ │ + local.set 91 │ │ + local.get 90 │ │ + local.get 91 │ │ i32.store16 offset=8 │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 88 │ │ - local.get 88 │ │ - call $_zip_buffer_get_16 │ │ - local.set 89 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 90 │ │ - local.get 90 │ │ - local.get 89 │ │ - i32.store16 offset=10 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 91 │ │ - local.get 91 │ │ - call $_zip_buffer_get_16 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 92 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 93 │ │ - local.get 93 │ │ local.get 92 │ │ - i32.store16 offset=12 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_16 │ │ + local.set 93 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 94 │ │ local.get 94 │ │ - call $_zip_buffer_get_16 │ │ + local.get 93 │ │ + i32.store16 offset=10 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 95 │ │ - i32.const 65535 │ │ - local.set 96 │ │ local.get 95 │ │ - local.get 96 │ │ - i32.and │ │ + call $_zip_buffer_get_16 │ │ + local.set 96 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 97 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 97 │ │ + local.get 96 │ │ + i32.store16 offset=12 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 98 │ │ local.get 98 │ │ - local.get 97 │ │ - i32.store offset=16 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 99 │ │ - local.get 99 │ │ call $_zip_buffer_get_16 │ │ + local.set 99 │ │ + i32.const 65535 │ │ local.set 100 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 101 │ │ - local.get 101 │ │ + local.get 99 │ │ local.get 100 │ │ - i32.store16 offset=20 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + i32.and │ │ + local.set 101 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 102 │ │ local.get 102 │ │ - call $_zip_buffer_get_16 │ │ + local.get 101 │ │ + i32.store offset=16 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 103 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 104 │ │ - local.get 104 │ │ local.get 103 │ │ - i32.store16 offset=22 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_16 │ │ + local.set 104 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 105 │ │ local.get 105 │ │ - call $_zip_buffer_get_32 │ │ + local.get 104 │ │ + i32.store16 offset=20 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 106 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 107 │ │ - local.get 107 │ │ local.get 106 │ │ - i32.store offset=24 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_16 │ │ + local.set 107 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 108 │ │ local.get 108 │ │ - call $_zip_buffer_get_32 │ │ + local.get 107 │ │ + i32.store16 offset=22 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 109 │ │ local.get 109 │ │ + call $_zip_buffer_get_32 │ │ local.set 110 │ │ - local.get 110 │ │ - i64.extend_i32_u │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 111 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 111 │ │ + local.get 110 │ │ + i32.store offset=24 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 112 │ │ local.get 112 │ │ - local.get 111 │ │ - i64.store offset=32 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_32 │ │ local.set 113 │ │ local.get 113 │ │ - call $_zip_buffer_get_32 │ │ local.set 114 │ │ local.get 114 │ │ - local.set 115 │ │ - local.get 115 │ │ i64.extend_i32_u │ │ + local.set 115 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 116 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 116 │ │ + local.get 115 │ │ + i64.store offset=32 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 117 │ │ local.get 117 │ │ - local.get 116 │ │ - i64.store offset=40 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_32 │ │ local.set 118 │ │ local.get 118 │ │ - call $_zip_buffer_get_16 │ │ local.set 119 │ │ - local.get 7 │ │ local.get 119 │ │ - i32.store16 offset=22 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + i64.extend_i32_u │ │ local.set 120 │ │ - local.get 120 │ │ - call $_zip_buffer_get_16 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 121 │ │ - local.get 7 │ │ local.get 121 │ │ - i32.store16 offset=18 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ + local.get 120 │ │ + i64.store offset=40 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 122 │ │ - i32.const 1 │ │ - local.set 123 │ │ local.get 122 │ │ + call $_zip_buffer_get_16 │ │ + local.set 123 │ │ + local.get 9 │ │ local.get 123 │ │ - i32.and │ │ + i32.store16 offset=54 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 124 │ │ + local.get 124 │ │ + call $_zip_buffer_get_16 │ │ + local.set 125 │ │ + local.get 9 │ │ + local.get 125 │ │ + i32.store16 offset=50 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 126 │ │ + i32.const 1 │ │ + local.set 127 │ │ + local.get 126 │ │ + local.get 127 │ │ + i32.and │ │ + local.set 128 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 124 │ │ + local.get 128 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ - local.set 125 │ │ - local.get 7 │ │ - local.get 125 │ │ - i32.store16 offset=20 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 126 │ │ - i32.const 0 │ │ - local.set 127 │ │ - local.get 126 │ │ - local.get 127 │ │ - i32.store offset=60 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 128 │ │ - i32.const 0 │ │ local.set 129 │ │ - local.get 128 │ │ + local.get 9 │ │ local.get 129 │ │ - i32.store16 offset=64 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + i32.store16 offset=52 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 130 │ │ i32.const 0 │ │ local.set 131 │ │ local.get 130 │ │ local.get 131 │ │ - i32.store offset=68 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + i32.store offset=60 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 132 │ │ - i64.const 0 │ │ + i32.const 0 │ │ local.set 133 │ │ local.get 132 │ │ local.get 133 │ │ + i32.store16 offset=64 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 134 │ │ + i32.const 0 │ │ + local.set 135 │ │ + local.get 134 │ │ + local.get 135 │ │ + i32.store offset=68 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 136 │ │ + i64.const 0 │ │ + local.set 137 │ │ + local.get 136 │ │ + local.get 137 │ │ i64.store offset=72 │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 134 │ │ - local.get 134 │ │ - call $_zip_buffer_get_16 │ │ - local.set 135 │ │ - local.get 7 │ │ - local.get 135 │ │ - i32.store16 offset=20 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 136 │ │ - local.get 136 │ │ - call $_zip_buffer_get_16 │ │ - local.set 137 │ │ - i32.const 65535 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 138 │ │ - local.get 137 │ │ local.get 138 │ │ - i32.and │ │ + call $_zip_buffer_get_16 │ │ local.set 139 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 9 │ │ + local.get 139 │ │ + i32.store16 offset=52 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 140 │ │ local.get 140 │ │ - local.get 139 │ │ - i32.store offset=60 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 141 │ │ - local.get 141 │ │ call $_zip_buffer_get_16 │ │ + local.set 141 │ │ + i32.const 65535 │ │ local.set 142 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 143 │ │ - local.get 143 │ │ + local.get 141 │ │ local.get 142 │ │ - i32.store16 offset=64 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + i32.and │ │ + local.set 143 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 144 │ │ local.get 144 │ │ - call $_zip_buffer_get_32 │ │ + local.get 143 │ │ + i32.store offset=60 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 145 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 146 │ │ - local.get 146 │ │ local.get 145 │ │ - i32.store offset=68 │ │ - local.get 7 │ │ - i32.load offset=92 │ │ + call $_zip_buffer_get_16 │ │ + local.set 146 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 147 │ │ local.get 147 │ │ - call $_zip_buffer_get_32 │ │ + local.get 146 │ │ + i32.store16 offset=64 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 148 │ │ local.get 148 │ │ + call $_zip_buffer_get_32 │ │ local.set 149 │ │ - local.get 149 │ │ - i64.extend_i32_u │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 150 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 150 │ │ + local.get 149 │ │ + i32.store offset=68 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 151 │ │ local.get 151 │ │ - local.get 150 │ │ + call $_zip_buffer_get_32 │ │ + local.set 152 │ │ + local.get 152 │ │ + local.set 153 │ │ + local.get 153 │ │ + i64.extend_i32_u │ │ + local.set 154 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 155 │ │ + local.get 155 │ │ + local.get 154 │ │ i64.store offset=72 │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 152 │ │ - local.get 152 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 156 │ │ + local.get 156 │ │ call $_zip_buffer_ok │ │ - local.set 153 │ │ + local.set 157 │ │ i32.const 1 │ │ - local.set 154 │ │ - local.get 153 │ │ - local.get 154 │ │ + local.set 158 │ │ + local.get 157 │ │ + local.get 158 │ │ i32.and │ │ - local.set 155 │ │ + local.set 159 │ │ block ;; label = @2 │ │ - local.get 155 │ │ + local.get 159 │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 156 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 160 │ │ i32.const 20 │ │ - local.set 157 │ │ + local.set 161 │ │ i32.const 0 │ │ - local.set 158 │ │ - local.get 156 │ │ - local.get 157 │ │ - local.get 158 │ │ + local.set 162 │ │ + local.get 160 │ │ + local.get 161 │ │ + local.get 162 │ │ call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 159 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 163 │ │ i32.const 1 │ │ - local.set 160 │ │ - local.get 159 │ │ - local.get 160 │ │ + local.set 164 │ │ + local.get 163 │ │ + local.get 164 │ │ i32.and │ │ - local.set 161 │ │ + local.set 165 │ │ block ;; label = @3 │ │ - local.get 161 │ │ + local.get 165 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 162 │ │ - local.get 162 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 166 │ │ + local.get 166 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 163 │ │ - local.get 7 │ │ - local.get 163 │ │ - i64.store offset=104 │ │ + local.set 167 │ │ + local.get 9 │ │ + local.get 167 │ │ + i64.store offset=152 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 164 │ │ - local.get 164 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 168 │ │ + local.get 168 │ │ i32.load16_u offset=12 │ │ - local.set 165 │ │ + local.set 169 │ │ i32.const 65535 │ │ - local.set 166 │ │ - local.get 165 │ │ - local.get 166 │ │ + local.set 170 │ │ + local.get 169 │ │ + local.get 170 │ │ i32.and │ │ - local.set 167 │ │ + local.set 171 │ │ i32.const 1 │ │ - local.set 168 │ │ - local.get 167 │ │ - local.get 168 │ │ + local.set 172 │ │ + local.get 171 │ │ + local.get 172 │ │ i32.and │ │ - local.set 169 │ │ + local.set 173 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 169 │ │ + local.get 173 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 170 │ │ - local.get 170 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 174 │ │ + local.get 174 │ │ i32.load16_u offset=12 │ │ - local.set 171 │ │ + local.set 175 │ │ i32.const 65535 │ │ - local.set 172 │ │ - local.get 171 │ │ - local.get 172 │ │ + local.set 176 │ │ + local.get 175 │ │ + local.get 176 │ │ i32.and │ │ - local.set 173 │ │ + local.set 177 │ │ i32.const 64 │ │ - local.set 174 │ │ - local.get 173 │ │ - local.get 174 │ │ + local.set 178 │ │ + local.get 177 │ │ + local.get 178 │ │ i32.and │ │ - local.set 175 │ │ + local.set 179 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ - local.get 175 │ │ + local.get 179 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 176 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 180 │ │ i32.const 65535 │ │ - local.set 177 │ │ - local.get 176 │ │ - local.get 177 │ │ + local.set 181 │ │ + local.get 180 │ │ + local.get 181 │ │ i32.store16 offset=84 │ │ br 1 (;@4;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 178 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 182 │ │ i32.const 1 │ │ - local.set 179 │ │ - local.get 178 │ │ - local.get 179 │ │ + local.set 183 │ │ + local.get 182 │ │ + local.get 183 │ │ i32.store16 offset=84 │ │ end │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 180 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 184 │ │ i32.const 0 │ │ - local.set 181 │ │ - local.get 180 │ │ - local.get 181 │ │ + local.set 185 │ │ + local.get 184 │ │ + local.get 185 │ │ i32.store16 offset=84 │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 182 │ │ - i32.const 0 │ │ - local.set 183 │ │ - local.get 182 │ │ - local.get 183 │ │ - i32.store offset=48 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 184 │ │ - i32.const 0 │ │ - local.set 185 │ │ - local.get 184 │ │ - local.get 185 │ │ - i32.store offset=52 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 186 │ │ i32.const 0 │ │ local.set 187 │ │ local.get 186 │ │ local.get 187 │ │ - i32.store offset=56 │ │ - local.get 7 │ │ - i32.load16_u offset=22 │ │ + i32.store offset=48 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 188 │ │ - i32.const 65535 │ │ + i32.const 0 │ │ local.set 189 │ │ local.get 188 │ │ local.get 189 │ │ - i32.and │ │ + i32.store offset=52 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 190 │ │ - local.get 7 │ │ - i32.load16_u offset=18 │ │ + i32.const 0 │ │ local.set 191 │ │ - i32.const 65535 │ │ - local.set 192 │ │ + local.get 190 │ │ local.get 191 │ │ - local.get 192 │ │ - i32.and │ │ + i32.store offset=56 │ │ + local.get 9 │ │ + i32.load16_u offset=54 │ │ + local.set 192 │ │ + i32.const 65535 │ │ local.set 193 │ │ - local.get 190 │ │ + local.get 192 │ │ local.get 193 │ │ - i32.add │ │ + i32.and │ │ local.set 194 │ │ - local.get 7 │ │ - i32.load16_u offset=20 │ │ + local.get 9 │ │ + i32.load16_u offset=50 │ │ local.set 195 │ │ i32.const 65535 │ │ local.set 196 │ │ local.get 195 │ │ local.get 196 │ │ i32.and │ │ local.set 197 │ │ local.get 194 │ │ local.get 197 │ │ i32.add │ │ local.set 198 │ │ - local.get 7 │ │ - local.get 198 │ │ - i32.store offset=24 │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ + local.get 9 │ │ + i32.load16_u offset=52 │ │ local.set 199 │ │ - i32.const 1 │ │ + i32.const 65535 │ │ local.set 200 │ │ local.get 199 │ │ local.get 200 │ │ i32.and │ │ local.set 201 │ │ + local.get 198 │ │ + local.get 201 │ │ + i32.add │ │ + local.set 202 │ │ + local.get 9 │ │ + local.get 202 │ │ + i32.store offset=56 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 203 │ │ + i32.const 1 │ │ + local.set 204 │ │ + local.get 203 │ │ + local.get 204 │ │ + i32.and │ │ + local.set 205 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 201 │ │ + local.get 205 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 202 │ │ - local.get 202 │ │ - call $_zip_buffer_left │ │ - local.set 203 │ │ - local.get 7 │ │ - i32.load offset=24 │ │ - local.set 204 │ │ - local.get 204 │ │ - local.set 205 │ │ - local.get 205 │ │ - i64.extend_i32_u │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 206 │ │ - local.get 203 │ │ - local.set 207 │ │ local.get 206 │ │ + call $_zip_buffer_left │ │ + local.set 207 │ │ + local.get 9 │ │ + i32.load offset=56 │ │ local.set 208 │ │ - local.get 207 │ │ local.get 208 │ │ - i64.lt_u │ │ local.set 209 │ │ - i32.const 1 │ │ - local.set 210 │ │ local.get 209 │ │ + i64.extend_i32_u │ │ + local.set 210 │ │ + local.get 207 │ │ + local.set 211 │ │ local.get 210 │ │ + local.set 212 │ │ + local.get 211 │ │ + local.get 212 │ │ + i64.lt_u │ │ + local.set 213 │ │ + i32.const 1 │ │ + local.set 214 │ │ + local.get 213 │ │ + local.get 214 │ │ i32.and │ │ - local.set 211 │ │ + local.set 215 │ │ block ;; label = @4 │ │ - local.get 211 │ │ + local.get 215 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 212 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 216 │ │ i32.const 21 │ │ - local.set 213 │ │ + local.set 217 │ │ i32.const 12 │ │ - local.set 214 │ │ - local.get 212 │ │ - local.get 213 │ │ - local.get 214 │ │ + local.set 218 │ │ + local.get 216 │ │ + local.get 217 │ │ + local.get 218 │ │ call $zip_error_set │ │ i64.const -1 │ │ - local.set 215 │ │ - local.get 7 │ │ - local.get 215 │ │ - i64.store offset=104 │ │ + local.set 219 │ │ + local.get 9 │ │ + local.get 219 │ │ + i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 216 │ │ - local.get 216 │ │ - call $_zip_buffer_free │ │ - local.get 7 │ │ - i32.load offset=96 │ │ - local.set 217 │ │ - local.get 7 │ │ - i32.load offset=24 │ │ - local.set 218 │ │ - local.get 218 │ │ - local.set 219 │ │ - local.get 219 │ │ - i64.extend_i32_u │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 220 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ + local.get 220 │ │ + call $_zip_buffer_free │ │ + local.get 9 │ │ + i32.load offset=144 │ │ local.set 221 │ │ - i32.const 0 │ │ + local.get 9 │ │ + i32.load offset=56 │ │ local.set 222 │ │ - local.get 217 │ │ - local.get 220 │ │ local.get 222 │ │ - local.get 221 │ │ - call $_zip_buffer_new_from_source │ │ local.set 223 │ │ - local.get 7 │ │ local.get 223 │ │ - i32.store offset=92 │ │ - i32.const 0 │ │ + i64.extend_i32_u │ │ local.set 224 │ │ - local.get 223 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ local.set 225 │ │ - local.get 224 │ │ + i32.const 0 │ │ local.set 226 │ │ - local.get 225 │ │ + local.get 221 │ │ + local.get 224 │ │ local.get 226 │ │ - i32.eq │ │ + local.get 225 │ │ + call $_zip_buffer_new_from_source │ │ local.set 227 │ │ - i32.const 1 │ │ + local.get 9 │ │ + local.get 227 │ │ + i32.store offset=140 │ │ + i32.const 0 │ │ local.set 228 │ │ local.get 227 │ │ + local.set 229 │ │ local.get 228 │ │ + local.set 230 │ │ + local.get 229 │ │ + local.get 230 │ │ + i32.eq │ │ + local.set 231 │ │ + i32.const 1 │ │ + local.set 232 │ │ + local.get 231 │ │ + local.get 232 │ │ i32.and │ │ - local.set 229 │ │ + local.set 233 │ │ block ;; label = @3 │ │ - local.get 229 │ │ + local.get 233 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i64.const -1 │ │ - local.set 230 │ │ - local.get 7 │ │ - local.get 230 │ │ - i64.store offset=104 │ │ + local.set 234 │ │ + local.get 9 │ │ + local.get 234 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ end │ │ - local.get 7 │ │ - i32.load16_u offset=22 │ │ - local.set 231 │ │ + local.get 9 │ │ + i32.load16_u offset=54 │ │ + local.set 235 │ │ i32.const 0 │ │ - local.set 232 │ │ - i32.const 65535 │ │ - local.set 233 │ │ - local.get 231 │ │ - local.get 233 │ │ - i32.and │ │ - local.set 234 │ │ + local.set 236 │ │ i32.const 65535 │ │ - local.set 235 │ │ - local.get 232 │ │ + local.set 237 │ │ local.get 235 │ │ + local.get 237 │ │ i32.and │ │ - local.set 236 │ │ - local.get 234 │ │ + local.set 238 │ │ + i32.const 65535 │ │ + local.set 239 │ │ local.get 236 │ │ + local.get 239 │ │ + i32.and │ │ + local.set 240 │ │ + local.get 238 │ │ + local.get 240 │ │ i32.ne │ │ - local.set 237 │ │ + local.set 241 │ │ i32.const 1 │ │ - local.set 238 │ │ - local.get 237 │ │ - local.get 238 │ │ + local.set 242 │ │ + local.get 241 │ │ + local.get 242 │ │ i32.and │ │ - local.set 239 │ │ + local.set 243 │ │ block ;; label = @2 │ │ - local.get 239 │ │ + local.get 243 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 240 │ │ - local.get 7 │ │ - i32.load offset=96 │ │ - local.set 241 │ │ - local.get 7 │ │ - i32.load16_u offset=22 │ │ - local.set 242 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 243 │ │ - i32.const 1 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ local.set 244 │ │ - i32.const 65535 │ │ + local.get 9 │ │ + i32.load offset=144 │ │ local.set 245 │ │ - local.get 242 │ │ - local.get 245 │ │ - i32.and │ │ + local.get 9 │ │ + i32.load16_u offset=54 │ │ local.set 246 │ │ - i32.const 1 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ local.set 247 │ │ - local.get 244 │ │ - local.get 247 │ │ - i32.and │ │ + i32.const 1 │ │ local.set 248 │ │ - local.get 240 │ │ - local.get 241 │ │ - local.get 246 │ │ - local.get 248 │ │ - local.get 243 │ │ - call $_zip_read_string │ │ + i32.const 65535 │ │ local.set 249 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 250 │ │ - local.get 250 │ │ + local.get 246 │ │ local.get 249 │ │ - i32.store offset=48 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ + i32.and │ │ + local.set 250 │ │ + i32.const 1 │ │ local.set 251 │ │ + local.get 248 │ │ local.get 251 │ │ - i32.load offset=48 │ │ + i32.and │ │ local.set 252 │ │ - i32.const 0 │ │ - local.set 253 │ │ + local.get 244 │ │ + local.get 245 │ │ + local.get 250 │ │ local.get 252 │ │ + local.get 247 │ │ + call $_zip_read_string │ │ + local.set 253 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 254 │ │ + local.get 254 │ │ local.get 253 │ │ + i32.store offset=48 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 255 │ │ - local.get 254 │ │ local.get 255 │ │ - i32.ne │ │ + i32.load offset=48 │ │ local.set 256 │ │ - i32.const 1 │ │ + i32.const 0 │ │ local.set 257 │ │ local.get 256 │ │ + local.set 258 │ │ local.get 257 │ │ + local.set 259 │ │ + local.get 258 │ │ + local.get 259 │ │ + i32.eq │ │ + local.set 260 │ │ + i32.const 1 │ │ + local.set 261 │ │ + local.get 260 │ │ + local.get 261 │ │ i32.and │ │ - local.set 258 │ │ + local.set 262 │ │ block ;; label = @3 │ │ - local.get 258 │ │ + local.get 262 │ │ + i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 259 │ │ - local.get 259 │ │ - call $zip_error_code_zip │ │ - local.set 260 │ │ - i32.const 17 │ │ - local.set 261 │ │ - local.get 260 │ │ - local.set 262 │ │ - local.get 261 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ local.set 263 │ │ - local.get 262 │ │ local.get 263 │ │ - i32.eq │ │ + call $zip_error_code_zip │ │ local.set 264 │ │ - i32.const 1 │ │ + i32.const 17 │ │ local.set 265 │ │ local.get 264 │ │ + local.set 266 │ │ local.get 265 │ │ + local.set 267 │ │ + local.get 266 │ │ + local.get 267 │ │ + i32.eq │ │ + local.set 268 │ │ + i32.const 1 │ │ + local.set 269 │ │ + local.get 268 │ │ + local.get 269 │ │ i32.and │ │ - local.set 266 │ │ + local.set 270 │ │ block ;; label = @4 │ │ - local.get 266 │ │ + local.get 270 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 267 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 271 │ │ i32.const 21 │ │ - local.set 268 │ │ + local.set 272 │ │ i32.const 12 │ │ - local.set 269 │ │ - local.get 267 │ │ - local.get 268 │ │ - local.get 269 │ │ + local.set 273 │ │ + local.get 271 │ │ + local.get 272 │ │ + local.get 273 │ │ call $zip_error_set │ │ end │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 270 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 274 │ │ i32.const 1 │ │ - local.set 271 │ │ - local.get 270 │ │ - local.get 271 │ │ + local.set 275 │ │ + local.get 274 │ │ + local.get 275 │ │ i32.and │ │ - local.set 272 │ │ + local.set 276 │ │ block ;; label = @4 │ │ - local.get 272 │ │ + local.get 276 │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 273 │ │ - local.get 273 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 277 │ │ + local.get 277 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 274 │ │ - local.get 7 │ │ - local.get 274 │ │ - i64.store offset=104 │ │ + local.set 278 │ │ + local.get 9 │ │ + local.get 278 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 275 │ │ - local.get 275 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 279 │ │ + local.get 279 │ │ i32.load16_u offset=12 │ │ - local.set 276 │ │ + local.set 280 │ │ i32.const 65535 │ │ - local.set 277 │ │ - local.get 276 │ │ - local.get 277 │ │ + local.set 281 │ │ + local.get 280 │ │ + local.get 281 │ │ i32.and │ │ - local.set 278 │ │ + local.set 282 │ │ i32.const 2048 │ │ - local.set 279 │ │ - local.get 278 │ │ - local.get 279 │ │ + local.set 283 │ │ + local.get 282 │ │ + local.get 283 │ │ i32.and │ │ - local.set 280 │ │ + local.set 284 │ │ block ;; label = @3 │ │ - local.get 280 │ │ + local.get 284 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 281 │ │ - local.get 281 │ │ - i32.load offset=48 │ │ - local.set 282 │ │ - i32.const 2 │ │ - local.set 283 │ │ - local.get 282 │ │ - local.get 283 │ │ - call $_zip_guess_encoding │ │ - local.set 284 │ │ - i32.const 5 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ local.set 285 │ │ - local.get 284 │ │ - local.set 286 │ │ local.get 285 │ │ + i32.load offset=48 │ │ + local.set 286 │ │ + i32.const 2 │ │ local.set 287 │ │ local.get 286 │ │ local.get 287 │ │ - i32.eq │ │ + call $_zip_guess_encoding │ │ local.set 288 │ │ - i32.const 1 │ │ + i32.const 5 │ │ local.set 289 │ │ local.get 288 │ │ + local.set 290 │ │ local.get 289 │ │ + local.set 291 │ │ + local.get 290 │ │ + local.get 291 │ │ + i32.eq │ │ + local.set 292 │ │ + i32.const 1 │ │ + local.set 293 │ │ + local.get 292 │ │ + local.get 293 │ │ i32.and │ │ - local.set 290 │ │ + local.set 294 │ │ block ;; label = @4 │ │ - local.get 290 │ │ + local.get 294 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 291 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 295 │ │ i32.const 21 │ │ - local.set 292 │ │ + local.set 296 │ │ i32.const 13 │ │ - local.set 293 │ │ - local.get 291 │ │ - local.get 292 │ │ - local.get 293 │ │ + local.set 297 │ │ + local.get 295 │ │ + local.get 296 │ │ + local.get 297 │ │ call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 294 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 298 │ │ i32.const 1 │ │ - local.set 295 │ │ - local.get 294 │ │ - local.get 295 │ │ + local.set 299 │ │ + local.get 298 │ │ + local.get 299 │ │ i32.and │ │ - local.set 296 │ │ + local.set 300 │ │ block ;; label = @5 │ │ - local.get 296 │ │ + local.get 300 │ │ br_if 0 (;@5;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 297 │ │ - local.get 297 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 301 │ │ + local.get 301 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 298 │ │ - local.get 7 │ │ - local.get 298 │ │ - i64.store offset=104 │ │ + local.set 302 │ │ + local.get 9 │ │ + local.get 302 │ │ + i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ end │ │ + local.get 9 │ │ + i32.load8_u offset=127 │ │ + local.set 303 │ │ + i32.const 1 │ │ + local.set 304 │ │ + local.get 303 │ │ + local.get 304 │ │ + i32.and │ │ + local.set 305 │ │ + block ;; label = @3 │ │ + local.get 305 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 306 │ │ + local.get 306 │ │ + i32.load offset=48 │ │ + local.set 307 │ │ + local.get 307 │ │ + i32.load │ │ + local.set 308 │ │ + local.get 9 │ │ + local.get 308 │ │ + i32.store offset=36 │ │ + block ;; label = @4 │ │ + loop ;; label = @5 │ │ + local.get 9 │ │ + i32.load offset=36 │ │ + local.set 309 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 310 │ │ + local.get 310 │ │ + i32.load offset=48 │ │ + local.set 311 │ │ + local.get 311 │ │ + i32.load │ │ + local.set 312 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 313 │ │ + local.get 313 │ │ + i32.load offset=48 │ │ + local.set 314 │ │ + local.get 314 │ │ + i32.load16_u offset=4 │ │ + local.set 315 │ │ + i32.const 65535 │ │ + local.set 316 │ │ + local.get 315 │ │ + local.get 316 │ │ + i32.and │ │ + local.set 317 │ │ + local.get 312 │ │ + local.get 317 │ │ + i32.add │ │ + local.set 318 │ │ + local.get 309 │ │ + local.set 319 │ │ + local.get 318 │ │ + local.set 320 │ │ + local.get 319 │ │ + local.get 320 │ │ + i32.lt_u │ │ + local.set 321 │ │ + i32.const 1 │ │ + local.set 322 │ │ + local.get 321 │ │ + local.get 322 │ │ + i32.and │ │ + local.set 323 │ │ + local.get 323 │ │ + i32.eqz │ │ + br_if 1 (;@4;) │ │ + local.get 9 │ │ + i32.load offset=36 │ │ + local.set 324 │ │ + local.get 324 │ │ + i32.load8_u │ │ + local.set 325 │ │ + i32.const 255 │ │ + local.set 326 │ │ + local.get 325 │ │ + local.get 326 │ │ + i32.and │ │ + local.set 327 │ │ + block ;; label = @6 │ │ + local.get 327 │ │ + br_if 0 (;@6;) │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 328 │ │ + i32.const 21 │ │ + local.set 329 │ │ + i32.const 26 │ │ + local.set 330 │ │ + local.get 328 │ │ + local.get 329 │ │ + local.get 330 │ │ + call $zip_error_set │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 331 │ │ + i32.const 1 │ │ + local.set 332 │ │ + local.get 331 │ │ + local.get 332 │ │ + i32.and │ │ + local.set 333 │ │ + block ;; label = @7 │ │ + local.get 333 │ │ + br_if 0 (;@7;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 334 │ │ + local.get 334 │ │ + call $_zip_buffer_free │ │ + end │ │ + i64.const -1 │ │ + local.set 335 │ │ + local.get 9 │ │ + local.get 335 │ │ + i64.store offset=152 │ │ + br 5 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=36 │ │ + local.set 336 │ │ + i32.const 1 │ │ + local.set 337 │ │ + local.get 336 │ │ + local.get 337 │ │ + i32.add │ │ + local.set 338 │ │ + local.get 9 │ │ + local.get 338 │ │ + i32.store offset=36 │ │ + br 0 (;@5;) │ │ + end │ │ + end │ │ + end │ │ end │ │ - local.get 7 │ │ - i32.load16_u offset=18 │ │ - local.set 299 │ │ + local.get 9 │ │ + i32.load16_u offset=50 │ │ + local.set 339 │ │ i32.const 0 │ │ - local.set 300 │ │ + local.set 340 │ │ i32.const 65535 │ │ - local.set 301 │ │ - local.get 299 │ │ - local.get 301 │ │ + local.set 341 │ │ + local.get 339 │ │ + local.get 341 │ │ i32.and │ │ - local.set 302 │ │ + local.set 342 │ │ i32.const 65535 │ │ - local.set 303 │ │ - local.get 300 │ │ - local.get 303 │ │ + local.set 343 │ │ + local.get 340 │ │ + local.get 343 │ │ i32.and │ │ - local.set 304 │ │ - local.get 302 │ │ - local.get 304 │ │ + local.set 344 │ │ + local.get 342 │ │ + local.get 344 │ │ i32.ne │ │ - local.set 305 │ │ + local.set 345 │ │ i32.const 1 │ │ - local.set 306 │ │ - local.get 305 │ │ - local.get 306 │ │ + local.set 346 │ │ + local.get 345 │ │ + local.get 346 │ │ i32.and │ │ - local.set 307 │ │ + local.set 347 │ │ block ;; label = @2 │ │ - local.get 307 │ │ + local.get 347 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 308 │ │ - local.get 7 │ │ - i32.load offset=96 │ │ - local.set 309 │ │ - local.get 7 │ │ - i32.load16_u offset=18 │ │ - local.set 310 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 348 │ │ + local.get 9 │ │ + i32.load offset=144 │ │ + local.set 349 │ │ + local.get 9 │ │ + i32.load16_u offset=50 │ │ + local.set 350 │ │ i32.const 65535 │ │ - local.set 311 │ │ - local.get 310 │ │ - local.get 311 │ │ + local.set 351 │ │ + local.get 350 │ │ + local.get 351 │ │ i32.and │ │ - local.set 312 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 313 │ │ + local.set 352 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 353 │ │ i32.const 0 │ │ - local.set 314 │ │ + local.set 354 │ │ i32.const 1 │ │ - local.set 315 │ │ - local.get 314 │ │ - local.get 315 │ │ + local.set 355 │ │ + local.get 354 │ │ + local.get 355 │ │ i32.and │ │ - local.set 316 │ │ - local.get 308 │ │ - local.get 309 │ │ - local.get 312 │ │ - local.get 316 │ │ - local.get 313 │ │ + local.set 356 │ │ + local.get 348 │ │ + local.get 349 │ │ + local.get 352 │ │ + local.get 356 │ │ + local.get 353 │ │ call $_zip_read_data │ │ - local.set 317 │ │ - local.get 7 │ │ - local.get 317 │ │ - i32.store offset=12 │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 318 │ │ + local.set 357 │ │ + local.get 9 │ │ + local.get 357 │ │ + i32.store offset=32 │ │ + local.get 9 │ │ + i32.load offset=32 │ │ + local.set 358 │ │ i32.const 0 │ │ - local.set 319 │ │ - local.get 318 │ │ - local.set 320 │ │ - local.get 319 │ │ - local.set 321 │ │ - local.get 320 │ │ - local.get 321 │ │ + local.set 359 │ │ + local.get 358 │ │ + local.set 360 │ │ + local.get 359 │ │ + local.set 361 │ │ + local.get 360 │ │ + local.get 361 │ │ i32.eq │ │ - local.set 322 │ │ + local.set 362 │ │ i32.const 1 │ │ - local.set 323 │ │ - local.get 322 │ │ - local.get 323 │ │ + local.set 363 │ │ + local.get 362 │ │ + local.get 363 │ │ i32.and │ │ - local.set 324 │ │ + local.set 364 │ │ block ;; label = @3 │ │ - local.get 324 │ │ + local.get 364 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 325 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 365 │ │ i32.const 1 │ │ - local.set 326 │ │ - local.get 325 │ │ - local.get 326 │ │ + local.set 366 │ │ + local.get 365 │ │ + local.get 366 │ │ i32.and │ │ - local.set 327 │ │ + local.set 367 │ │ block ;; label = @4 │ │ - local.get 327 │ │ + local.get 367 │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 328 │ │ - local.get 328 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 368 │ │ + local.get 368 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 329 │ │ - local.get 7 │ │ - local.get 329 │ │ - i64.store offset=104 │ │ + local.set 369 │ │ + local.get 9 │ │ + local.get 369 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 330 │ │ - local.get 7 │ │ - i32.load16_u offset=18 │ │ - local.set 331 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 332 │ │ + local.get 9 │ │ + i32.load offset=32 │ │ + local.set 370 │ │ + local.get 9 │ │ + i32.load16_u offset=50 │ │ + local.set 371 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 372 │ │ i32.const 256 │ │ - local.set 333 │ │ + local.set 373 │ │ i32.const 512 │ │ - local.set 334 │ │ + local.set 374 │ │ i32.const 1 │ │ - local.set 335 │ │ - local.get 332 │ │ - local.get 335 │ │ + local.set 375 │ │ + local.get 372 │ │ + local.get 375 │ │ i32.and │ │ - local.set 336 │ │ - local.get 333 │ │ - local.get 334 │ │ - local.get 336 │ │ + local.set 376 │ │ + local.get 373 │ │ + local.get 374 │ │ + local.get 376 │ │ select │ │ - local.set 337 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 338 │ │ + local.set 377 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 378 │ │ i32.const 52 │ │ - local.set 339 │ │ - local.get 338 │ │ - local.get 339 │ │ + local.set 379 │ │ + local.get 378 │ │ + local.get 379 │ │ i32.add │ │ - local.set 340 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 341 │ │ + local.set 380 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 381 │ │ i32.const 65535 │ │ - local.set 342 │ │ - local.get 331 │ │ - local.get 342 │ │ + local.set 382 │ │ + local.get 371 │ │ + local.get 382 │ │ i32.and │ │ - local.set 343 │ │ - local.get 330 │ │ - local.get 343 │ │ - local.get 337 │ │ - local.get 340 │ │ - local.get 341 │ │ + local.set 383 │ │ + local.get 370 │ │ + local.get 383 │ │ + local.get 377 │ │ + local.get 380 │ │ + local.get 381 │ │ call $_zip_ef_parse │ │ - local.set 344 │ │ + local.set 384 │ │ i32.const 1 │ │ - local.set 345 │ │ - local.get 344 │ │ - local.get 345 │ │ + local.set 385 │ │ + local.get 384 │ │ + local.get 385 │ │ i32.and │ │ - local.set 346 │ │ + local.set 386 │ │ block ;; label = @3 │ │ - local.get 346 │ │ + local.get 386 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 347 │ │ - local.get 347 │ │ + local.get 9 │ │ + i32.load offset=32 │ │ + local.set 387 │ │ + local.get 387 │ │ call $dlfree │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 348 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 388 │ │ i32.const 1 │ │ - local.set 349 │ │ - local.get 348 │ │ - local.get 349 │ │ + local.set 389 │ │ + local.get 388 │ │ + local.get 389 │ │ i32.and │ │ - local.set 350 │ │ + local.set 390 │ │ block ;; label = @4 │ │ - local.get 350 │ │ + local.get 390 │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 351 │ │ - local.get 351 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 391 │ │ + local.get 391 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 352 │ │ - local.get 7 │ │ - local.get 352 │ │ - i64.store offset=104 │ │ + local.set 392 │ │ + local.get 9 │ │ + local.get 392 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 353 │ │ - local.get 353 │ │ + local.get 9 │ │ + i32.load offset=32 │ │ + local.set 393 │ │ + local.get 393 │ │ call $dlfree │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 354 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 394 │ │ i32.const 1 │ │ - local.set 355 │ │ - local.get 354 │ │ - local.get 355 │ │ + local.set 395 │ │ + local.get 394 │ │ + local.get 395 │ │ i32.and │ │ - local.set 356 │ │ + local.set 396 │ │ block ;; label = @3 │ │ - local.get 356 │ │ + local.get 396 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 357 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 397 │ │ i32.const 1 │ │ - local.set 358 │ │ - local.get 357 │ │ - local.get 358 │ │ + local.set 398 │ │ + local.get 397 │ │ + local.get 398 │ │ i32.store8 offset=4 │ │ end │ │ end │ │ - local.get 7 │ │ - i32.load16_u offset=20 │ │ - local.set 359 │ │ + local.get 9 │ │ + i32.load16_u offset=52 │ │ + local.set 399 │ │ i32.const 0 │ │ - local.set 360 │ │ + local.set 400 │ │ i32.const 65535 │ │ - local.set 361 │ │ - local.get 359 │ │ - local.get 361 │ │ + local.set 401 │ │ + local.get 399 │ │ + local.get 401 │ │ i32.and │ │ - local.set 362 │ │ + local.set 402 │ │ i32.const 65535 │ │ - local.set 363 │ │ - local.get 360 │ │ - local.get 363 │ │ + local.set 403 │ │ + local.get 400 │ │ + local.get 403 │ │ i32.and │ │ - local.set 364 │ │ - local.get 362 │ │ - local.get 364 │ │ + local.set 404 │ │ + local.get 402 │ │ + local.get 404 │ │ i32.ne │ │ - local.set 365 │ │ + local.set 405 │ │ i32.const 1 │ │ - local.set 366 │ │ - local.get 365 │ │ - local.get 366 │ │ + local.set 406 │ │ + local.get 405 │ │ + local.get 406 │ │ i32.and │ │ - local.set 367 │ │ + local.set 407 │ │ block ;; label = @2 │ │ - local.get 367 │ │ + local.get 407 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 368 │ │ - local.get 7 │ │ - i32.load offset=96 │ │ - local.set 369 │ │ - local.get 7 │ │ - i32.load16_u offset=20 │ │ - local.set 370 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 371 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 408 │ │ + local.get 9 │ │ + i32.load offset=144 │ │ + local.set 409 │ │ + local.get 9 │ │ + i32.load16_u offset=52 │ │ + local.set 410 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 411 │ │ i32.const 0 │ │ - local.set 372 │ │ + local.set 412 │ │ i32.const 65535 │ │ - local.set 373 │ │ - local.get 370 │ │ - local.get 373 │ │ + local.set 413 │ │ + local.get 410 │ │ + local.get 413 │ │ i32.and │ │ - local.set 374 │ │ + local.set 414 │ │ i32.const 1 │ │ - local.set 375 │ │ - local.get 372 │ │ - local.get 375 │ │ + local.set 415 │ │ + local.get 412 │ │ + local.get 415 │ │ i32.and │ │ - local.set 376 │ │ - local.get 368 │ │ - local.get 369 │ │ - local.get 374 │ │ - local.get 376 │ │ - local.get 371 │ │ + local.set 416 │ │ + local.get 408 │ │ + local.get 409 │ │ + local.get 414 │ │ + local.get 416 │ │ + local.get 411 │ │ call $_zip_read_string │ │ - local.set 377 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 378 │ │ - local.get 378 │ │ - local.get 377 │ │ + local.set 417 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 418 │ │ + local.get 418 │ │ + local.get 417 │ │ i32.store offset=56 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 379 │ │ - local.get 379 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 419 │ │ + local.get 419 │ │ i32.load offset=56 │ │ - local.set 380 │ │ + local.set 420 │ │ i32.const 0 │ │ - local.set 381 │ │ - local.get 380 │ │ - local.set 382 │ │ - local.get 381 │ │ - local.set 383 │ │ - local.get 382 │ │ - local.get 383 │ │ - i32.ne │ │ - local.set 384 │ │ + local.set 421 │ │ + local.get 420 │ │ + local.set 422 │ │ + local.get 421 │ │ + local.set 423 │ │ + local.get 422 │ │ + local.get 423 │ │ + i32.eq │ │ + local.set 424 │ │ i32.const 1 │ │ - local.set 385 │ │ - local.get 384 │ │ - local.get 385 │ │ + local.set 425 │ │ + local.get 424 │ │ + local.get 425 │ │ i32.and │ │ - local.set 386 │ │ + local.set 426 │ │ block ;; label = @3 │ │ - local.get 386 │ │ + local.get 426 │ │ + i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 387 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 427 │ │ i32.const 1 │ │ - local.set 388 │ │ - local.get 387 │ │ - local.get 388 │ │ + local.set 428 │ │ + local.get 427 │ │ + local.get 428 │ │ i32.and │ │ - local.set 389 │ │ + local.set 429 │ │ block ;; label = @4 │ │ - local.get 389 │ │ + local.get 429 │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 390 │ │ - local.get 390 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 430 │ │ + local.get 430 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 391 │ │ - local.get 7 │ │ - local.get 391 │ │ - i64.store offset=104 │ │ + local.set 431 │ │ + local.get 9 │ │ + local.get 431 │ │ + i64.store offset=152 │ │ br 2 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 392 │ │ - local.get 392 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 432 │ │ + local.get 432 │ │ i32.load16_u offset=12 │ │ - local.set 393 │ │ + local.set 433 │ │ i32.const 65535 │ │ - local.set 394 │ │ - local.get 393 │ │ - local.get 394 │ │ + local.set 434 │ │ + local.get 433 │ │ + local.get 434 │ │ i32.and │ │ - local.set 395 │ │ + local.set 435 │ │ i32.const 2048 │ │ - local.set 396 │ │ - local.get 395 │ │ - local.get 396 │ │ + local.set 436 │ │ + local.get 435 │ │ + local.get 436 │ │ i32.and │ │ - local.set 397 │ │ + local.set 437 │ │ block ;; label = @3 │ │ - local.get 397 │ │ + local.get 437 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 398 │ │ - local.get 398 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 438 │ │ + local.get 438 │ │ i32.load offset=56 │ │ - local.set 399 │ │ + local.set 439 │ │ i32.const 2 │ │ - local.set 400 │ │ - local.get 399 │ │ - local.get 400 │ │ + local.set 440 │ │ + local.get 439 │ │ + local.get 440 │ │ call $_zip_guess_encoding │ │ - local.set 401 │ │ + local.set 441 │ │ i32.const 5 │ │ - local.set 402 │ │ - local.get 401 │ │ - local.set 403 │ │ - local.get 402 │ │ - local.set 404 │ │ - local.get 403 │ │ - local.get 404 │ │ + local.set 442 │ │ + local.get 441 │ │ + local.set 443 │ │ + local.get 442 │ │ + local.set 444 │ │ + local.get 443 │ │ + local.get 444 │ │ i32.eq │ │ - local.set 405 │ │ + local.set 445 │ │ i32.const 1 │ │ - local.set 406 │ │ - local.get 405 │ │ - local.get 406 │ │ + local.set 446 │ │ + local.get 445 │ │ + local.get 446 │ │ i32.and │ │ - local.set 407 │ │ + local.set 447 │ │ block ;; label = @4 │ │ - local.get 407 │ │ + local.get 447 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 408 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 448 │ │ i32.const 21 │ │ - local.set 409 │ │ - i32.const 13 │ │ - local.set 410 │ │ - local.get 408 │ │ - local.get 409 │ │ - local.get 410 │ │ + local.set 449 │ │ + i32.const 14 │ │ + local.set 450 │ │ + local.get 448 │ │ + local.get 449 │ │ + local.get 450 │ │ call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 411 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 451 │ │ i32.const 1 │ │ - local.set 412 │ │ - local.get 411 │ │ - local.get 412 │ │ + local.set 452 │ │ + local.get 451 │ │ + local.get 452 │ │ i32.and │ │ - local.set 413 │ │ + local.set 453 │ │ block ;; label = @5 │ │ - local.get 413 │ │ + local.get 453 │ │ br_if 0 (;@5;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 414 │ │ - local.get 414 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 454 │ │ + local.get 454 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 415 │ │ - local.get 7 │ │ - local.get 415 │ │ - i64.store offset=104 │ │ + local.set 455 │ │ + local.get 9 │ │ + local.get 455 │ │ + i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ end │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 416 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 417 │ │ - local.get 417 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 456 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 457 │ │ + local.get 457 │ │ i32.load offset=48 │ │ - local.set 418 │ │ + local.set 458 │ │ + local.get 9 │ │ + i32.load8_u offset=127 │ │ + local.set 459 │ │ i32.const 28789 │ │ - local.set 419 │ │ + local.set 460 │ │ i32.const 65535 │ │ - local.set 420 │ │ - local.get 419 │ │ - local.get 420 │ │ + local.set 461 │ │ + local.get 460 │ │ + local.get 461 │ │ i32.and │ │ - local.set 421 │ │ - local.get 416 │ │ - local.get 421 │ │ - local.get 418 │ │ + local.set 462 │ │ + i32.const 1 │ │ + local.set 463 │ │ + local.get 459 │ │ + local.get 463 │ │ + i32.and │ │ + local.set 464 │ │ + local.get 456 │ │ + local.get 462 │ │ + local.get 458 │ │ + local.get 464 │ │ call $_zip_dirent_process_ef_utf_8 │ │ - local.set 422 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 423 │ │ - local.get 423 │ │ - local.get 422 │ │ + local.set 465 │ │ + local.get 9 │ │ + local.get 465 │ │ + i32.store offset=44 │ │ + i32.const 0 │ │ + local.set 466 │ │ + local.get 465 │ │ + local.set 467 │ │ + local.get 466 │ │ + local.set 468 │ │ + local.get 467 │ │ + local.get 468 │ │ + i32.eq │ │ + local.set 469 │ │ + i32.const 1 │ │ + local.set 470 │ │ + local.get 469 │ │ + local.get 470 │ │ + i32.and │ │ + local.set 471 │ │ + block ;; label = @2 │ │ + local.get 471 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 472 │ │ + local.get 472 │ │ + i32.load offset=48 │ │ + local.set 473 │ │ + i32.const 0 │ │ + local.set 474 │ │ + local.get 473 │ │ + local.set 475 │ │ + local.get 474 │ │ + local.set 476 │ │ + local.get 475 │ │ + local.get 476 │ │ + i32.ne │ │ + local.set 477 │ │ + i32.const 1 │ │ + local.set 478 │ │ + local.get 477 │ │ + local.get 478 │ │ + i32.and │ │ + local.set 479 │ │ + local.get 479 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 480 │ │ + i32.const 21 │ │ + local.set 481 │ │ + i32.const 23 │ │ + local.set 482 │ │ + local.get 480 │ │ + local.get 481 │ │ + local.get 482 │ │ + call $zip_error_set │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 483 │ │ + i32.const 1 │ │ + local.set 484 │ │ + local.get 483 │ │ + local.get 484 │ │ + i32.and │ │ + local.set 485 │ │ + block ;; label = @3 │ │ + local.get 485 │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 486 │ │ + local.get 486 │ │ + call $_zip_buffer_free │ │ + end │ │ + i64.const -1 │ │ + local.set 487 │ │ + local.get 9 │ │ + local.get 487 │ │ + i64.store offset=152 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=44 │ │ + local.set 488 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 489 │ │ + local.get 489 │ │ + local.get 488 │ │ i32.store offset=48 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 424 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 425 │ │ - local.get 425 │ │ - i32.load offset=56 │ │ - local.set 426 │ │ - i32.const 25461 │ │ - local.set 427 │ │ - i32.const 65535 │ │ - local.set 428 │ │ - local.get 427 │ │ - local.get 428 │ │ - i32.and │ │ - local.set 429 │ │ - local.get 424 │ │ - local.get 429 │ │ - local.get 426 │ │ - call $_zip_dirent_process_ef_utf_8 │ │ - local.set 430 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 431 │ │ - local.get 431 │ │ - local.get 430 │ │ - i32.store offset=56 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 432 │ │ - local.get 432 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 490 │ │ + i32.const 1 │ │ + local.set 491 │ │ + local.get 490 │ │ + local.get 491 │ │ + i32.and │ │ + local.set 492 │ │ + block ;; label = @2 │ │ + local.get 492 │ │ + br_if 0 (;@2;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 493 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 494 │ │ + local.get 494 │ │ + i32.load offset=56 │ │ + local.set 495 │ │ + local.get 9 │ │ + i32.load8_u offset=127 │ │ + local.set 496 │ │ + i32.const 25461 │ │ + local.set 497 │ │ + i32.const 65535 │ │ + local.set 498 │ │ + local.get 497 │ │ + local.get 498 │ │ + i32.and │ │ + local.set 499 │ │ + i32.const 1 │ │ + local.set 500 │ │ + local.get 496 │ │ + local.get 500 │ │ + i32.and │ │ + local.set 501 │ │ + local.get 493 │ │ + local.get 499 │ │ + local.get 495 │ │ + local.get 501 │ │ + call $_zip_dirent_process_ef_utf_8 │ │ + local.set 502 │ │ + local.get 9 │ │ + local.get 502 │ │ + i32.store offset=44 │ │ + i32.const 0 │ │ + local.set 503 │ │ + local.get 502 │ │ + local.set 504 │ │ + local.get 503 │ │ + local.set 505 │ │ + local.get 504 │ │ + local.get 505 │ │ + i32.eq │ │ + local.set 506 │ │ + i32.const 1 │ │ + local.set 507 │ │ + local.get 506 │ │ + local.get 507 │ │ + i32.and │ │ + local.set 508 │ │ + block ;; label = @3 │ │ + local.get 508 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 509 │ │ + local.get 509 │ │ + i32.load offset=56 │ │ + local.set 510 │ │ + i32.const 0 │ │ + local.set 511 │ │ + local.get 510 │ │ + local.set 512 │ │ + local.get 511 │ │ + local.set 513 │ │ + local.get 512 │ │ + local.get 513 │ │ + i32.ne │ │ + local.set 514 │ │ + i32.const 1 │ │ + local.set 515 │ │ + local.get 514 │ │ + local.get 515 │ │ + i32.and │ │ + local.set 516 │ │ + local.get 516 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 517 │ │ + i32.const 21 │ │ + local.set 518 │ │ + i32.const 24 │ │ + local.set 519 │ │ + local.get 517 │ │ + local.get 518 │ │ + local.get 519 │ │ + call $zip_error_set │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 520 │ │ + i32.const 1 │ │ + local.set 521 │ │ + local.get 520 │ │ + local.get 521 │ │ + i32.and │ │ + local.set 522 │ │ + block ;; label = @4 │ │ + local.get 522 │ │ + br_if 0 (;@4;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 523 │ │ + local.get 523 │ │ + call $_zip_buffer_free │ │ + end │ │ + i64.const -1 │ │ + local.set 524 │ │ + local.get 9 │ │ + local.get 524 │ │ + i64.store offset=152 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=44 │ │ + local.set 525 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 526 │ │ + local.get 526 │ │ + local.get 525 │ │ + i32.store offset=56 │ │ + end │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 527 │ │ + local.get 527 │ │ i64.load offset=40 │ │ - local.set 433 │ │ + local.set 528 │ │ i64.const 4294967295 │ │ - local.set 434 │ │ - local.get 433 │ │ - local.set 435 │ │ - local.get 434 │ │ - local.set 436 │ │ - local.get 435 │ │ - local.get 436 │ │ + local.set 529 │ │ + local.get 528 │ │ + local.set 530 │ │ + local.get 529 │ │ + local.set 531 │ │ + local.get 530 │ │ + local.get 531 │ │ i64.eq │ │ - local.set 437 │ │ + local.set 532 │ │ i32.const 1 │ │ - local.set 438 │ │ - local.get 437 │ │ - local.get 438 │ │ + local.set 533 │ │ + local.get 532 │ │ + local.get 533 │ │ i32.and │ │ - local.set 439 │ │ + local.set 534 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 439 │ │ + local.get 534 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 440 │ │ - local.get 440 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 535 │ │ + local.get 535 │ │ i64.load offset=32 │ │ - local.set 441 │ │ + local.set 536 │ │ i64.const 4294967295 │ │ - local.set 442 │ │ - local.get 441 │ │ - local.set 443 │ │ - local.get 442 │ │ - local.set 444 │ │ - local.get 443 │ │ - local.get 444 │ │ + local.set 537 │ │ + local.get 536 │ │ + local.set 538 │ │ + local.get 537 │ │ + local.set 539 │ │ + local.get 538 │ │ + local.get 539 │ │ i64.eq │ │ - local.set 445 │ │ + local.set 540 │ │ i32.const 1 │ │ - local.set 446 │ │ - local.get 445 │ │ - local.get 446 │ │ + local.set 541 │ │ + local.get 540 │ │ + local.get 541 │ │ i32.and │ │ - local.set 447 │ │ - local.get 447 │ │ + local.set 542 │ │ + local.get 542 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 448 │ │ - local.get 448 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 543 │ │ + local.get 543 │ │ i64.load offset=72 │ │ - local.set 449 │ │ + local.set 544 │ │ i64.const 4294967295 │ │ - local.set 450 │ │ - local.get 449 │ │ - local.set 451 │ │ - local.get 450 │ │ - local.set 452 │ │ - local.get 451 │ │ - local.get 452 │ │ + local.set 545 │ │ + local.get 544 │ │ + local.set 546 │ │ + local.get 545 │ │ + local.set 547 │ │ + local.get 546 │ │ + local.get 547 │ │ i64.eq │ │ - local.set 453 │ │ + local.set 548 │ │ i32.const 1 │ │ - local.set 454 │ │ - local.get 453 │ │ - local.get 454 │ │ + local.set 549 │ │ + local.get 548 │ │ + local.get 549 │ │ i32.and │ │ - local.set 455 │ │ - local.get 455 │ │ + local.set 550 │ │ + local.get 550 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 456 │ │ - local.get 456 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 551 │ │ + local.get 551 │ │ i32.load offset=52 │ │ - local.set 457 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 458 │ │ + local.set 552 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 553 │ │ i32.const 256 │ │ - local.set 459 │ │ + local.set 554 │ │ i32.const 512 │ │ - local.set 460 │ │ + local.set 555 │ │ i32.const 1 │ │ - local.set 461 │ │ - local.get 458 │ │ - local.get 461 │ │ - i32.and │ │ - local.set 462 │ │ - local.get 459 │ │ - local.get 460 │ │ - local.get 462 │ │ + local.set 556 │ │ + local.get 553 │ │ + local.get 556 │ │ + i32.and │ │ + local.set 557 │ │ + local.get 554 │ │ + local.get 555 │ │ + local.get 557 │ │ select │ │ - local.set 463 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 464 │ │ - i32.const 10 │ │ - local.set 465 │ │ - local.get 7 │ │ - local.get 465 │ │ + local.set 558 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 559 │ │ + i32.const 30 │ │ + local.set 560 │ │ + local.get 9 │ │ + local.get 560 │ │ i32.add │ │ - local.set 466 │ │ - local.get 466 │ │ - local.set 467 │ │ + local.set 561 │ │ + local.get 561 │ │ + local.set 562 │ │ i32.const 1 │ │ - local.set 468 │ │ + local.set 563 │ │ i32.const 0 │ │ - local.set 469 │ │ + local.set 564 │ │ i32.const 65535 │ │ - local.set 470 │ │ - local.get 468 │ │ - local.get 470 │ │ + local.set 565 │ │ + local.get 563 │ │ + local.get 565 │ │ i32.and │ │ - local.set 471 │ │ + local.set 566 │ │ i32.const 65535 │ │ - local.set 472 │ │ - local.get 469 │ │ - local.get 472 │ │ + local.set 567 │ │ + local.get 564 │ │ + local.get 567 │ │ i32.and │ │ - local.set 473 │ │ - local.get 457 │ │ - local.get 467 │ │ - local.get 471 │ │ - local.get 473 │ │ - local.get 463 │ │ - local.get 464 │ │ + local.set 568 │ │ + local.get 552 │ │ + local.get 562 │ │ + local.get 566 │ │ + local.get 568 │ │ + local.get 558 │ │ + local.get 559 │ │ call $_zip_ef_get_by_id │ │ - local.set 474 │ │ - local.get 7 │ │ - local.get 474 │ │ - i32.store offset=4 │ │ - local.get 7 │ │ - i32.load offset=4 │ │ - local.set 475 │ │ + local.set 569 │ │ + local.get 9 │ │ + local.get 569 │ │ + i32.store offset=24 │ │ + local.get 9 │ │ + i32.load offset=24 │ │ + local.set 570 │ │ i32.const 0 │ │ - local.set 476 │ │ - local.get 475 │ │ - local.set 477 │ │ - local.get 476 │ │ - local.set 478 │ │ - local.get 477 │ │ - local.get 478 │ │ + local.set 571 │ │ + local.get 570 │ │ + local.set 572 │ │ + local.get 571 │ │ + local.set 573 │ │ + local.get 572 │ │ + local.get 573 │ │ i32.ne │ │ - local.set 479 │ │ + local.set 574 │ │ i32.const 1 │ │ - local.set 480 │ │ - local.get 479 │ │ - local.get 480 │ │ + local.set 575 │ │ + local.get 574 │ │ + local.get 575 │ │ i32.and │ │ - local.set 481 │ │ + local.set 576 │ │ block ;; label = @3 │ │ - local.get 481 │ │ + local.get 576 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 482 │ │ - local.get 7 │ │ - i32.load offset=4 │ │ - local.set 483 │ │ - local.get 7 │ │ - i32.load16_u offset=10 │ │ - local.set 484 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 577 │ │ + local.get 9 │ │ + i32.load offset=24 │ │ + local.set 578 │ │ + local.get 9 │ │ + i32.load16_u offset=30 │ │ + local.set 579 │ │ i32.const 65535 │ │ - local.set 485 │ │ - local.get 484 │ │ - local.get 485 │ │ + local.set 580 │ │ + local.get 579 │ │ + local.get 580 │ │ i32.and │ │ - local.set 486 │ │ - local.get 486 │ │ + local.set 581 │ │ + local.get 581 │ │ i64.extend_i32_u │ │ - local.set 487 │ │ - local.get 7 │ │ - i32.load8_u offset=91 │ │ - local.set 488 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 489 │ │ + local.set 582 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 583 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 584 │ │ i32.const 1 │ │ - local.set 490 │ │ - local.get 488 │ │ - local.get 490 │ │ + local.set 585 │ │ + local.get 583 │ │ + local.get 585 │ │ i32.and │ │ - local.set 491 │ │ - local.get 482 │ │ - local.get 483 │ │ - local.get 487 │ │ - local.get 491 │ │ - local.get 489 │ │ + local.set 586 │ │ + local.get 577 │ │ + local.get 578 │ │ + local.get 582 │ │ + local.get 586 │ │ + local.get 584 │ │ call $zip_dirent_process_ef_zip64 │ │ - local.set 492 │ │ + local.set 587 │ │ i32.const 1 │ │ - local.set 493 │ │ - local.get 492 │ │ - local.get 493 │ │ + local.set 588 │ │ + local.get 587 │ │ + local.get 588 │ │ i32.and │ │ - local.set 494 │ │ + local.set 589 │ │ block ;; label = @4 │ │ - local.get 494 │ │ + local.get 589 │ │ br_if 0 (;@4;) │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 495 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 590 │ │ i32.const 1 │ │ - local.set 496 │ │ - local.get 495 │ │ - local.get 496 │ │ + local.set 591 │ │ + local.get 590 │ │ + local.get 591 │ │ i32.and │ │ - local.set 497 │ │ + local.set 592 │ │ block ;; label = @5 │ │ - local.get 497 │ │ + local.get 592 │ │ br_if 0 (;@5;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 498 │ │ - local.get 498 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 593 │ │ + local.get 593 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 499 │ │ - local.get 7 │ │ - local.get 499 │ │ - i64.store offset=104 │ │ + local.set 594 │ │ + local.get 9 │ │ + local.get 594 │ │ + i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ end │ │ + i32.const 1 │ │ + local.set 595 │ │ + local.get 9 │ │ + local.get 595 │ │ + i32.store8 offset=43 │ │ end │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 500 │ │ - local.get 500 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 596 │ │ + local.get 596 │ │ call $_zip_buffer_ok │ │ - local.set 501 │ │ + local.set 597 │ │ i32.const 1 │ │ - local.set 502 │ │ - local.get 501 │ │ - local.get 502 │ │ + local.set 598 │ │ + local.get 597 │ │ + local.get 598 │ │ i32.and │ │ - local.set 503 │ │ + local.set 599 │ │ block ;; label = @2 │ │ - local.get 503 │ │ + local.get 599 │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 504 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 600 │ │ i32.const 20 │ │ - local.set 505 │ │ + local.set 601 │ │ i32.const 0 │ │ - local.set 506 │ │ - local.get 504 │ │ - local.get 505 │ │ - local.get 506 │ │ + local.set 602 │ │ + local.get 600 │ │ + local.get 601 │ │ + local.get 602 │ │ call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 507 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 603 │ │ i32.const 1 │ │ - local.set 508 │ │ - local.get 507 │ │ - local.get 508 │ │ + local.set 604 │ │ + local.get 603 │ │ + local.get 604 │ │ i32.and │ │ - local.set 509 │ │ + local.set 605 │ │ block ;; label = @3 │ │ - local.get 509 │ │ + local.get 605 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 510 │ │ - local.get 510 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 606 │ │ + local.get 606 │ │ call $_zip_buffer_free │ │ end │ │ i64.const -1 │ │ - local.set 511 │ │ - local.get 7 │ │ - local.get 511 │ │ - i64.store offset=104 │ │ + local.set 607 │ │ + local.get 9 │ │ + local.get 607 │ │ + i64.store offset=152 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load8_u offset=17 │ │ - local.set 512 │ │ + local.get 9 │ │ + i32.load8_u offset=42 │ │ + local.set 608 │ │ i32.const 1 │ │ - local.set 513 │ │ - local.get 512 │ │ - local.get 513 │ │ + local.set 609 │ │ + local.get 608 │ │ + local.get 609 │ │ i32.and │ │ - local.set 514 │ │ + local.set 610 │ │ block ;; label = @2 │ │ - local.get 514 │ │ + local.get 610 │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=92 │ │ - local.set 515 │ │ - local.get 515 │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 611 │ │ + local.get 611 │ │ call $_zip_buffer_free │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 516 │ │ - local.get 516 │ │ + local.get 9 │ │ + i32.load8_u offset=139 │ │ + local.set 612 │ │ + i32.const 1 │ │ + local.set 613 │ │ + local.get 612 │ │ + local.get 613 │ │ + i32.and │ │ + local.set 614 │ │ + block ;; label = @2 │ │ + local.get 614 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 615 │ │ + local.get 615 │ │ + i32.load16_u offset=12 │ │ + local.set 616 │ │ + i32.const 65535 │ │ + local.set 617 │ │ + local.get 616 │ │ + local.get 617 │ │ + i32.and │ │ + local.set 618 │ │ + i32.const 8 │ │ + local.set 619 │ │ + local.get 618 │ │ + local.get 619 │ │ + i32.and │ │ + local.set 620 │ │ + local.get 620 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 9 │ │ + i32.load offset=144 │ │ + local.set 621 │ │ + local.get 9 │ │ + i64.load offset=128 │ │ + local.set 622 │ │ + i32.const 1 │ │ + local.set 623 │ │ + local.get 621 │ │ + local.get 622 │ │ + local.get 623 │ │ + call $zip_source_seek │ │ + local.set 624 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 624 │ │ + br_if 0 (;@4;) │ │ + local.get 9 │ │ + i32.load offset=144 │ │ + local.set 625 │ │ + i32.const 64 │ │ + local.set 626 │ │ + local.get 9 │ │ + local.get 626 │ │ + i32.add │ │ + local.set 627 │ │ + local.get 627 │ │ + local.set 628 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 629 │ │ + i64.const 24 │ │ + local.set 630 │ │ + local.get 625 │ │ + local.get 630 │ │ + local.get 628 │ │ + local.get 629 │ │ + call $_zip_buffer_new_from_source │ │ + local.set 631 │ │ + local.get 9 │ │ + local.get 631 │ │ + i32.store offset=140 │ │ + i32.const 0 │ │ + local.set 632 │ │ + local.get 631 │ │ + local.set 633 │ │ + local.get 632 │ │ + local.set 634 │ │ + local.get 633 │ │ + local.get 634 │ │ + i32.eq │ │ + local.set 635 │ │ + i32.const 1 │ │ + local.set 636 │ │ + local.get 635 │ │ + local.get 636 │ │ + i32.and │ │ + local.set 637 │ │ + local.get 637 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + end │ │ + i64.const -1 │ │ + local.set 638 │ │ + local.get 9 │ │ + local.get 638 │ │ + i64.store offset=152 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 639 │ │ + i64.const 4 │ │ + local.set 640 │ │ + local.get 639 │ │ + local.get 640 │ │ + call $_zip_buffer_peek │ │ + local.set 641 │ │ + local.get 641 │ │ + i32.load align=1 │ │ + local.set 642 │ │ + i32.const 134695760 │ │ + local.set 643 │ │ + local.get 642 │ │ + local.get 643 │ │ + i32.ne │ │ + local.set 644 │ │ + block ;; label = @3 │ │ + local.get 644 │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 645 │ │ + i64.const 4 │ │ + local.set 646 │ │ + local.get 645 │ │ + local.get 646 │ │ + call $_zip_buffer_skip │ │ + drop │ │ + end │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 647 │ │ + local.get 647 │ │ + call $_zip_buffer_get_32 │ │ + local.set 648 │ │ + local.get 9 │ │ + local.get 648 │ │ + i32.store offset=20 │ │ + local.get 9 │ │ + i32.load8_u offset=43 │ │ + local.set 649 │ │ + i32.const 1 │ │ + local.set 650 │ │ + local.get 649 │ │ + local.get 650 │ │ + i32.and │ │ + local.set 651 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 651 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 652 │ │ + local.get 652 │ │ + call $_zip_buffer_get_64 │ │ + local.set 653 │ │ + local.get 653 │ │ + local.set 654 │ │ + br 1 (;@3;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 655 │ │ + local.get 655 │ │ + call $_zip_buffer_get_32 │ │ + local.set 656 │ │ + local.get 656 │ │ + local.set 657 │ │ + local.get 657 │ │ + i64.extend_i32_u │ │ + local.set 658 │ │ + local.get 658 │ │ + local.set 654 │ │ + end │ │ + local.get 654 │ │ + local.set 659 │ │ + local.get 9 │ │ + local.get 659 │ │ + i64.store offset=8 │ │ + local.get 9 │ │ + i32.load8_u offset=43 │ │ + local.set 660 │ │ + i32.const 1 │ │ + local.set 661 │ │ + local.get 660 │ │ + local.get 661 │ │ + i32.and │ │ + local.set 662 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 662 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 663 │ │ + local.get 663 │ │ + call $_zip_buffer_get_64 │ │ + local.set 664 │ │ + local.get 664 │ │ + local.set 665 │ │ + br 1 (;@3;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 666 │ │ + local.get 666 │ │ + call $_zip_buffer_get_32 │ │ + local.set 667 │ │ + local.get 667 │ │ + local.set 668 │ │ + local.get 668 │ │ + i64.extend_i32_u │ │ + local.set 669 │ │ + local.get 669 │ │ + local.set 665 │ │ + end │ │ + local.get 665 │ │ + local.set 670 │ │ + local.get 9 │ │ + local.get 670 │ │ + i64.store │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 671 │ │ + local.get 671 │ │ + call $_zip_buffer_ok │ │ + local.set 672 │ │ + i32.const 1 │ │ + local.set 673 │ │ + local.get 672 │ │ + local.get 673 │ │ + i32.and │ │ + local.set 674 │ │ + block ;; label = @3 │ │ + local.get 674 │ │ + br_if 0 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 675 │ │ + i32.const 20 │ │ + local.set 676 │ │ + i32.const 0 │ │ + local.set 677 │ │ + local.get 675 │ │ + local.get 676 │ │ + local.get 677 │ │ + call $zip_error_set │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 678 │ │ + local.get 678 │ │ + call $_zip_buffer_free │ │ + i64.const -1 │ │ + local.set 679 │ │ + local.get 9 │ │ + local.get 679 │ │ + i64.store offset=152 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=140 │ │ + local.set 680 │ │ + local.get 680 │ │ + call $_zip_buffer_free │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 681 │ │ + local.get 681 │ │ + i32.load offset=24 │ │ + local.set 682 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + block ;; label = @5 │ │ + local.get 682 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 683 │ │ + local.get 683 │ │ + i32.load offset=24 │ │ + local.set 684 │ │ + local.get 9 │ │ + i32.load offset=20 │ │ + local.set 685 │ │ + local.get 684 │ │ + local.set 686 │ │ + local.get 685 │ │ + local.set 687 │ │ + local.get 686 │ │ + local.get 687 │ │ + i32.ne │ │ + local.set 688 │ │ + i32.const 1 │ │ + local.set 689 │ │ + local.get 688 │ │ + local.get 689 │ │ + i32.and │ │ + local.set 690 │ │ + local.get 690 │ │ + br_if 1 (;@4;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 691 │ │ + local.get 691 │ │ + i64.load offset=32 │ │ + local.set 692 │ │ + i64.const 0 │ │ + local.set 693 │ │ + local.get 692 │ │ + local.set 694 │ │ + local.get 693 │ │ + local.set 695 │ │ + local.get 694 │ │ + local.get 695 │ │ + i64.ne │ │ + local.set 696 │ │ + i32.const 1 │ │ + local.set 697 │ │ + local.get 696 │ │ + local.get 697 │ │ + i32.and │ │ + local.set 698 │ │ + block ;; label = @5 │ │ + local.get 698 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 699 │ │ + local.get 699 │ │ + i64.load offset=32 │ │ + local.set 700 │ │ + local.get 9 │ │ + i64.load offset=8 │ │ + local.set 701 │ │ + local.get 700 │ │ + local.set 702 │ │ + local.get 701 │ │ + local.set 703 │ │ + local.get 702 │ │ + local.get 703 │ │ + i64.ne │ │ + local.set 704 │ │ + i32.const 1 │ │ + local.set 705 │ │ + local.get 704 │ │ + local.get 705 │ │ + i32.and │ │ + local.set 706 │ │ + local.get 706 │ │ + br_if 1 (;@4;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 707 │ │ + local.get 707 │ │ + i64.load offset=40 │ │ + local.set 708 │ │ + i64.const 0 │ │ + local.set 709 │ │ + local.get 708 │ │ + local.set 710 │ │ + local.get 709 │ │ + local.set 711 │ │ + local.get 710 │ │ + local.get 711 │ │ + i64.ne │ │ + local.set 712 │ │ + i32.const 1 │ │ + local.set 713 │ │ + local.get 712 │ │ + local.get 713 │ │ + i32.and │ │ + local.set 714 │ │ + local.get 714 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 715 │ │ + local.get 715 │ │ + i64.load offset=40 │ │ + local.set 716 │ │ + local.get 9 │ │ + i64.load │ │ + local.set 717 │ │ + local.get 716 │ │ + local.set 718 │ │ + local.get 717 │ │ + local.set 719 │ │ + local.get 718 │ │ + local.get 719 │ │ + i64.ne │ │ + local.set 720 │ │ + i32.const 1 │ │ + local.set 721 │ │ + local.get 720 │ │ + local.get 721 │ │ + i32.and │ │ + local.set 722 │ │ + local.get 722 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 723 │ │ + i32.const 21 │ │ + local.set 724 │ │ + local.get 723 │ │ + local.get 724 │ │ + local.get 724 │ │ + call $zip_error_set │ │ + i64.const -1 │ │ + local.set 725 │ │ + local.get 9 │ │ + local.get 725 │ │ + i64.store offset=152 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 9 │ │ + i32.load offset=20 │ │ + local.set 726 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 727 │ │ + local.get 727 │ │ + local.get 726 │ │ + i32.store offset=24 │ │ + local.get 9 │ │ + i64.load offset=8 │ │ + local.set 728 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 729 │ │ + local.get 729 │ │ + local.get 728 │ │ + i64.store offset=32 │ │ + local.get 9 │ │ + i64.load │ │ + local.set 730 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 731 │ │ + local.get 731 │ │ + local.get 730 │ │ + i64.store offset=40 │ │ + end │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 732 │ │ + local.get 732 │ │ i64.load offset=72 │ │ - local.set 517 │ │ + local.set 733 │ │ i64.const 9223372036854775807 │ │ - local.set 518 │ │ - local.get 517 │ │ - local.set 519 │ │ - local.get 518 │ │ - local.set 520 │ │ - local.get 519 │ │ - local.get 520 │ │ + local.set 734 │ │ + local.get 733 │ │ + local.set 735 │ │ + local.get 734 │ │ + local.set 736 │ │ + local.get 735 │ │ + local.get 736 │ │ i64.gt_u │ │ - local.set 521 │ │ + local.set 737 │ │ i32.const 1 │ │ - local.set 522 │ │ - local.get 521 │ │ - local.get 522 │ │ + local.set 738 │ │ + local.get 737 │ │ + local.get 738 │ │ i32.and │ │ - local.set 523 │ │ + local.set 739 │ │ block ;; label = @2 │ │ - local.get 523 │ │ + local.get 739 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 524 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 740 │ │ i32.const 4 │ │ - local.set 525 │ │ + local.set 741 │ │ i32.const 22 │ │ - local.set 526 │ │ - local.get 524 │ │ - local.get 525 │ │ - local.get 526 │ │ + local.set 742 │ │ + local.get 740 │ │ + local.get 741 │ │ + local.get 742 │ │ call $zip_error_set │ │ i64.const -1 │ │ - local.set 527 │ │ - local.get 7 │ │ - local.get 527 │ │ - i64.store offset=104 │ │ + local.set 743 │ │ + local.get 9 │ │ + local.get 743 │ │ + i64.store offset=152 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 528 │ │ - local.get 7 │ │ - i32.load offset=84 │ │ - local.set 529 │ │ - local.get 528 │ │ - local.get 529 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 744 │ │ + local.get 9 │ │ + i32.load offset=120 │ │ + local.set 745 │ │ + local.get 744 │ │ + local.get 745 │ │ call $_zip_dirent_process_winzip_aes │ │ - local.set 530 │ │ + local.set 746 │ │ i32.const 1 │ │ - local.set 531 │ │ - local.get 530 │ │ - local.get 531 │ │ + local.set 747 │ │ + local.get 746 │ │ + local.get 747 │ │ i32.and │ │ - local.set 532 │ │ + local.set 748 │ │ block ;; label = @2 │ │ - local.get 532 │ │ + local.get 748 │ │ br_if 0 (;@2;) │ │ i64.const -1 │ │ - local.set 533 │ │ - local.get 7 │ │ - local.get 533 │ │ - i64.store offset=104 │ │ + local.set 749 │ │ + local.get 9 │ │ + local.get 749 │ │ + i64.store offset=152 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 534 │ │ - local.get 534 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 750 │ │ + local.get 750 │ │ i32.load offset=52 │ │ - local.set 535 │ │ - local.get 535 │ │ + local.set 751 │ │ + local.get 751 │ │ call $_zip_ef_remove_internal │ │ - local.set 536 │ │ - local.get 7 │ │ - i32.load offset=100 │ │ - local.set 537 │ │ - local.get 537 │ │ - local.get 536 │ │ + local.set 752 │ │ + local.get 9 │ │ + i32.load offset=148 │ │ + local.set 753 │ │ + local.get 753 │ │ + local.get 752 │ │ i32.store offset=52 │ │ - local.get 7 │ │ - i32.load offset=28 │ │ - local.set 538 │ │ - local.get 538 │ │ - local.set 539 │ │ - local.get 539 │ │ + local.get 9 │ │ + i32.load offset=60 │ │ + local.set 754 │ │ + local.get 754 │ │ + local.set 755 │ │ + local.get 755 │ │ i64.extend_i32_u │ │ - local.set 540 │ │ - local.get 7 │ │ - i32.load offset=24 │ │ - local.set 541 │ │ - local.get 541 │ │ - local.set 542 │ │ - local.get 542 │ │ + local.set 756 │ │ + local.get 9 │ │ + i32.load offset=56 │ │ + local.set 757 │ │ + local.get 757 │ │ + local.set 758 │ │ + local.get 758 │ │ i64.extend_i32_u │ │ - local.set 543 │ │ - local.get 540 │ │ - local.get 543 │ │ + local.set 759 │ │ + local.get 756 │ │ + local.get 759 │ │ i64.add │ │ - local.set 544 │ │ - local.get 7 │ │ - local.get 544 │ │ - i64.store offset=104 │ │ + local.set 760 │ │ + local.get 9 │ │ + local.get 760 │ │ + i64.store offset=152 │ │ end │ │ - local.get 7 │ │ - i64.load offset=104 │ │ - local.set 545 │ │ - i32.const 112 │ │ - local.set 546 │ │ - local.get 7 │ │ - local.get 546 │ │ + local.get 9 │ │ + i64.load offset=152 │ │ + local.set 761 │ │ + i32.const 160 │ │ + local.set 762 │ │ + local.get 9 │ │ + local.get 762 │ │ i32.add │ │ - local.set 547 │ │ - local.get 547 │ │ + local.set 763 │ │ + local.get 763 │ │ global.set $__stack_pointer │ │ - local.get 545 │ │ + local.get 761 │ │ return) │ │ - (func $_zip_dirent_process_ef_utf_8 (type 4) (param i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $_zip_dirent_process_ef_utf_8 (type 14) (param i32 i32 i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 3 │ │ - i32.const 48 │ │ local.set 4 │ │ - local.get 3 │ │ - local.get 4 │ │ - i32.sub │ │ + i32.const 48 │ │ local.set 5 │ │ + local.get 4 │ │ local.get 5 │ │ + i32.sub │ │ + local.set 6 │ │ + local.get 6 │ │ global.set $__stack_pointer │ │ - local.get 5 │ │ + local.get 6 │ │ local.get 0 │ │ i32.store offset=40 │ │ - local.get 5 │ │ + local.get 6 │ │ local.get 1 │ │ i32.store16 offset=38 │ │ - local.get 5 │ │ + local.get 6 │ │ local.get 2 │ │ i32.store offset=32 │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 6 │ │ - local.get 6 │ │ - i32.load offset=52 │ │ + local.get 3 │ │ local.set 7 │ │ - local.get 5 │ │ - i32.load16_u offset=38 │ │ + local.get 6 │ │ + local.get 7 │ │ + i32.store8 offset=31 │ │ + local.get 6 │ │ + i32.load offset=40 │ │ local.set 8 │ │ - i32.const 30 │ │ + local.get 8 │ │ + i32.load offset=52 │ │ local.set 9 │ │ - local.get 5 │ │ - local.get 9 │ │ - i32.add │ │ + local.get 6 │ │ + i32.load16_u offset=38 │ │ local.set 10 │ │ - local.get 10 │ │ + i32.const 28 │ │ local.set 11 │ │ - i32.const 0 │ │ + local.get 6 │ │ + local.get 11 │ │ + i32.add │ │ local.set 12 │ │ - i32.const 768 │ │ + local.get 12 │ │ local.set 13 │ │ i32.const 0 │ │ local.set 14 │ │ - i32.const 65535 │ │ + i32.const 768 │ │ local.set 15 │ │ - local.get 8 │ │ - local.get 15 │ │ - i32.and │ │ + i32.const 0 │ │ local.set 16 │ │ i32.const 65535 │ │ local.set 17 │ │ - local.get 12 │ │ + local.get 10 │ │ local.get 17 │ │ i32.and │ │ local.set 18 │ │ - local.get 7 │ │ - local.get 11 │ │ - local.get 16 │ │ - local.get 18 │ │ - local.get 13 │ │ - local.get 14 │ │ - call $_zip_ef_get_by_id │ │ + i32.const 65535 │ │ local.set 19 │ │ - local.get 5 │ │ + local.get 14 │ │ local.get 19 │ │ - i32.store offset=16 │ │ - local.get 5 │ │ - i32.load offset=16 │ │ + i32.and │ │ local.set 20 │ │ - i32.const 0 │ │ - local.set 21 │ │ + local.get 9 │ │ + local.get 13 │ │ + local.get 18 │ │ local.get 20 │ │ - local.set 22 │ │ + local.get 15 │ │ + local.get 16 │ │ + call $_zip_ef_get_by_id │ │ + local.set 21 │ │ + local.get 6 │ │ local.get 21 │ │ + i32.store offset=16 │ │ + local.get 6 │ │ + i32.load offset=16 │ │ + local.set 22 │ │ + i32.const 0 │ │ local.set 23 │ │ local.get 22 │ │ - local.get 23 │ │ - i32.eq │ │ local.set 24 │ │ - i32.const 1 │ │ + local.get 23 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ - i32.and │ │ + i32.eq │ │ local.set 26 │ │ + i32.const 1 │ │ + local.set 27 │ │ + local.get 26 │ │ + local.get 27 │ │ + i32.and │ │ + local.set 28 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 26 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i32.load16_u offset=30 │ │ - local.set 27 │ │ - i32.const 65535 │ │ - local.set 28 │ │ - local.get 27 │ │ local.get 28 │ │ - i32.and │ │ + br_if 0 (;@3;) │ │ + local.get 6 │ │ + i32.load16_u offset=28 │ │ local.set 29 │ │ - i32.const 5 │ │ + i32.const 65535 │ │ local.set 30 │ │ local.get 29 │ │ - local.set 31 │ │ local.get 30 │ │ + i32.and │ │ + local.set 31 │ │ + i32.const 5 │ │ local.set 32 │ │ local.get 31 │ │ - local.get 32 │ │ - i32.lt_s │ │ local.set 33 │ │ - i32.const 1 │ │ + local.get 32 │ │ local.set 34 │ │ local.get 33 │ │ local.get 34 │ │ - i32.and │ │ + i32.lt_s │ │ local.set 35 │ │ - local.get 35 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i32.load offset=16 │ │ + i32.const 1 │ │ local.set 36 │ │ + local.get 35 │ │ local.get 36 │ │ - i32.load8_u │ │ + i32.and │ │ local.set 37 │ │ - i32.const 255 │ │ - local.set 38 │ │ local.get 37 │ │ + br_if 0 (;@3;) │ │ + local.get 6 │ │ + i32.load offset=16 │ │ + local.set 38 │ │ local.get 38 │ │ - i32.and │ │ + i32.load8_u │ │ local.set 39 │ │ - i32.const 1 │ │ + i32.const 255 │ │ local.set 40 │ │ local.get 39 │ │ - local.set 41 │ │ local.get 40 │ │ + i32.and │ │ + local.set 41 │ │ + i32.const 1 │ │ local.set 42 │ │ local.get 41 │ │ - local.get 42 │ │ - i32.ne │ │ local.set 43 │ │ - i32.const 1 │ │ + local.get 42 │ │ local.set 44 │ │ local.get 43 │ │ local.get 44 │ │ - i32.and │ │ + i32.ne │ │ local.set 45 │ │ + i32.const 1 │ │ + local.set 46 │ │ local.get 45 │ │ + local.get 46 │ │ + i32.and │ │ + local.set 47 │ │ + local.get 47 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=32 │ │ - local.set 46 │ │ - local.get 5 │ │ - local.get 46 │ │ + local.set 48 │ │ + local.get 6 │ │ + local.get 48 │ │ i32.store offset=44 │ │ br 1 (;@1;) │ │ end │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=16 │ │ - local.set 47 │ │ - local.get 5 │ │ - i32.load16_u offset=30 │ │ - local.set 48 │ │ - i32.const 65535 │ │ local.set 49 │ │ - local.get 48 │ │ - local.get 49 │ │ - i32.and │ │ + local.get 6 │ │ + i32.load16_u offset=28 │ │ local.set 50 │ │ - local.get 50 │ │ - i64.extend_i32_u │ │ + i32.const 65535 │ │ local.set 51 │ │ - local.get 47 │ │ + local.get 50 │ │ local.get 51 │ │ - call $_zip_buffer_new │ │ + i32.and │ │ local.set 52 │ │ - local.get 5 │ │ local.get 52 │ │ - i32.store offset=20 │ │ - i32.const 0 │ │ + i64.extend_i32_u │ │ local.set 53 │ │ - local.get 52 │ │ - local.set 54 │ │ + local.get 49 │ │ local.get 53 │ │ + call $_zip_buffer_new │ │ + local.set 54 │ │ + local.get 6 │ │ + local.get 54 │ │ + i32.store offset=20 │ │ + i32.const 0 │ │ local.set 55 │ │ local.get 54 │ │ - local.get 55 │ │ - i32.eq │ │ local.set 56 │ │ - i32.const 1 │ │ + local.get 55 │ │ local.set 57 │ │ local.get 56 │ │ local.get 57 │ │ - i32.and │ │ + i32.eq │ │ local.set 58 │ │ + i32.const 1 │ │ + local.set 59 │ │ + local.get 58 │ │ + local.get 59 │ │ + i32.and │ │ + local.set 60 │ │ block ;; label = @2 │ │ - local.get 58 │ │ + local.get 60 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=32 │ │ - local.set 59 │ │ - local.get 5 │ │ - local.get 59 │ │ + local.set 61 │ │ + local.get 6 │ │ + local.get 61 │ │ i32.store offset=44 │ │ br 1 (;@1;) │ │ end │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=20 │ │ - local.set 60 │ │ - local.get 60 │ │ + local.set 62 │ │ + local.get 62 │ │ call $_zip_buffer_get_8 │ │ drop │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=20 │ │ - local.set 61 │ │ - local.get 61 │ │ - call $_zip_buffer_get_32 │ │ - local.set 62 │ │ - local.get 5 │ │ - local.get 62 │ │ - i32.store offset=24 │ │ - local.get 5 │ │ - i32.load offset=32 │ │ local.set 63 │ │ local.get 63 │ │ - call $_zip_string_crc32 │ │ + call $_zip_buffer_get_32 │ │ local.set 64 │ │ - local.get 5 │ │ - i32.load offset=24 │ │ - local.set 65 │ │ + local.get 6 │ │ local.get 64 │ │ - local.set 66 │ │ + i32.store offset=24 │ │ + local.get 6 │ │ + i32.load offset=32 │ │ + local.set 65 │ │ local.get 65 │ │ + call $_zip_string_crc32 │ │ + local.set 66 │ │ + local.get 6 │ │ + i32.load offset=24 │ │ local.set 67 │ │ local.get 66 │ │ - local.get 67 │ │ - i32.eq │ │ local.set 68 │ │ - i32.const 1 │ │ + local.get 67 │ │ local.set 69 │ │ local.get 68 │ │ local.get 69 │ │ - i32.and │ │ + i32.eq │ │ local.set 70 │ │ + i32.const 1 │ │ + local.set 71 │ │ + local.get 70 │ │ + local.get 71 │ │ + i32.and │ │ + local.set 72 │ │ block ;; label = @2 │ │ - local.get 70 │ │ + local.get 72 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=20 │ │ - local.set 71 │ │ - local.get 71 │ │ - call $_zip_buffer_left │ │ - local.set 72 │ │ - local.get 72 │ │ - i32.wrap_i64 │ │ local.set 73 │ │ - local.get 5 │ │ local.get 73 │ │ - i32.store16 offset=14 │ │ - local.get 5 │ │ - i32.load offset=20 │ │ + call $_zip_buffer_left │ │ local.set 74 │ │ - local.get 5 │ │ - i32.load16_u offset=14 │ │ + local.get 74 │ │ + i32.wrap_i64 │ │ local.set 75 │ │ - i32.const 65535 │ │ - local.set 76 │ │ + local.get 6 │ │ local.get 75 │ │ - local.get 76 │ │ - i32.and │ │ + i32.store16 offset=14 │ │ + local.get 6 │ │ + i32.load offset=20 │ │ + local.set 76 │ │ + local.get 6 │ │ + i32.load16_u offset=14 │ │ local.set 77 │ │ - local.get 77 │ │ - i64.extend_i32_u │ │ + i32.const 65535 │ │ local.set 78 │ │ - local.get 74 │ │ + local.get 77 │ │ local.get 78 │ │ - call $_zip_buffer_get │ │ + i32.and │ │ local.set 79 │ │ - local.get 5 │ │ - i32.load16_u offset=14 │ │ + local.get 79 │ │ + i64.extend_i32_u │ │ local.set 80 │ │ - i32.const 2048 │ │ + local.get 76 │ │ + local.get 80 │ │ + call $_zip_buffer_get │ │ local.set 81 │ │ - i32.const 0 │ │ + local.get 6 │ │ + i32.load16_u offset=14 │ │ local.set 82 │ │ - i32.const 65535 │ │ + i32.const 2048 │ │ local.set 83 │ │ - local.get 80 │ │ - local.get 83 │ │ - i32.and │ │ + i32.const 0 │ │ local.set 84 │ │ - local.get 79 │ │ - local.get 84 │ │ - local.get 81 │ │ - local.get 82 │ │ - call $_zip_string_new │ │ + i32.const 65535 │ │ local.set 85 │ │ - local.get 5 │ │ + local.get 82 │ │ local.get 85 │ │ - i32.store offset=8 │ │ - local.get 5 │ │ - i32.load offset=8 │ │ + i32.and │ │ local.set 86 │ │ - i32.const 0 │ │ - local.set 87 │ │ + local.get 81 │ │ local.get 86 │ │ - local.set 88 │ │ + local.get 83 │ │ + local.get 84 │ │ + call $_zip_string_new │ │ + local.set 87 │ │ + local.get 6 │ │ local.get 87 │ │ + i32.store offset=8 │ │ + local.get 6 │ │ + i32.load offset=8 │ │ + local.set 88 │ │ + i32.const 0 │ │ local.set 89 │ │ local.get 88 │ │ - local.get 89 │ │ - i32.ne │ │ local.set 90 │ │ - i32.const 1 │ │ + local.get 89 │ │ local.set 91 │ │ local.get 90 │ │ local.get 91 │ │ - i32.and │ │ + i32.ne │ │ local.set 92 │ │ + i32.const 1 │ │ + local.set 93 │ │ + local.get 92 │ │ + local.get 93 │ │ + i32.and │ │ + local.set 94 │ │ block ;; label = @3 │ │ - local.get 92 │ │ + local.get 94 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 5 │ │ + local.get 6 │ │ + i32.load8_u offset=31 │ │ + local.set 95 │ │ + i32.const 1 │ │ + local.set 96 │ │ + local.get 95 │ │ + local.get 96 │ │ + i32.and │ │ + local.set 97 │ │ + block ;; label = @4 │ │ + local.get 97 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 6 │ │ + i32.load offset=32 │ │ + local.set 98 │ │ + local.get 6 │ │ + i32.load offset=8 │ │ + local.set 99 │ │ + local.get 98 │ │ + local.get 99 │ │ + call $_zip_string_equal │ │ + local.set 100 │ │ + block ;; label = @5 │ │ + local.get 100 │ │ + br_if 0 (;@5;) │ │ + local.get 6 │ │ + i32.load offset=8 │ │ + local.set 101 │ │ + local.get 101 │ │ + call $_zip_string_is_ascii │ │ + local.set 102 │ │ + i32.const 1 │ │ + local.set 103 │ │ + local.get 102 │ │ + local.get 103 │ │ + i32.and │ │ + local.set 104 │ │ + local.get 104 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + local.get 6 │ │ + i32.load offset=8 │ │ + local.set 105 │ │ + local.get 105 │ │ + call $_zip_string_free │ │ + local.get 6 │ │ + i32.load offset=20 │ │ + local.set 106 │ │ + local.get 106 │ │ + call $_zip_buffer_free │ │ + i32.const 0 │ │ + local.set 107 │ │ + local.get 6 │ │ + local.get 107 │ │ + i32.store offset=44 │ │ + br 4 (;@1;) │ │ + end │ │ + end │ │ + local.get 6 │ │ i32.load offset=32 │ │ - local.set 93 │ │ - local.get 93 │ │ + local.set 108 │ │ + local.get 108 │ │ call $_zip_string_free │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=8 │ │ - local.set 94 │ │ - local.get 5 │ │ - local.get 94 │ │ + local.set 109 │ │ + local.get 6 │ │ + local.get 109 │ │ i32.store offset=32 │ │ end │ │ end │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=20 │ │ - local.set 95 │ │ - local.get 95 │ │ + local.set 110 │ │ + local.get 110 │ │ call $_zip_buffer_free │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=32 │ │ - local.set 96 │ │ - local.get 5 │ │ - local.get 96 │ │ + local.set 111 │ │ + local.get 6 │ │ + local.get 111 │ │ i32.store offset=44 │ │ end │ │ - local.get 5 │ │ + local.get 6 │ │ i32.load offset=44 │ │ - local.set 97 │ │ + local.set 112 │ │ i32.const 48 │ │ - local.set 98 │ │ - local.get 5 │ │ - local.get 98 │ │ + local.set 113 │ │ + local.get 6 │ │ + local.get 113 │ │ i32.add │ │ - local.set 99 │ │ - local.get 99 │ │ + local.set 114 │ │ + local.get 114 │ │ global.set $__stack_pointer │ │ - local.get 97 │ │ + local.get 112 │ │ return) │ │ (func $zip_dirent_process_ef_zip64 (type 77) (param i32 i32 i64 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 48 │ │ local.set 6 │ │ @@ -275936,15 +276621,15 @@ │ │ local.get 132 │ │ br_if 0 (;@3;) │ │ local.get 7 │ │ i32.load offset=16 │ │ local.set 133 │ │ i32.const 21 │ │ local.set 134 │ │ - i32.const 14 │ │ + i32.const 15 │ │ local.set 135 │ │ local.get 133 │ │ local.get 134 │ │ local.get 135 │ │ call $zip_error_set │ │ local.get 7 │ │ i32.load offset=12 │ │ @@ -276157,15 +276842,15 @@ │ │ br_if 1 (;@2;) │ │ end │ │ local.get 4 │ │ i32.load offset=20 │ │ local.set 46 │ │ i32.const 21 │ │ local.set 47 │ │ - i32.const 14 │ │ + i32.const 16 │ │ local.set 48 │ │ local.get 46 │ │ local.get 47 │ │ local.get 48 │ │ call $zip_error_set │ │ i32.const 0 │ │ local.set 49 │ │ @@ -276469,15 +277154,15 @@ │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.load offset=20 │ │ local.set 120 │ │ i32.const 21 │ │ local.set 121 │ │ - i32.const 14 │ │ + i32.const 16 │ │ local.set 122 │ │ local.get 120 │ │ local.get 121 │ │ local.get 122 │ │ call $zip_error_set │ │ local.get 4 │ │ i32.load offset=12 │ │ @@ -277850,14 +278535,295 @@ │ │ local.get 80 │ │ i32.add │ │ local.set 81 │ │ local.get 81 │ │ global.set $__stack_pointer │ │ local.get 79 │ │ return) │ │ + (func $zip_dirent_check_consistency (type 10) (param i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 1 │ │ + i32.const 16 │ │ + local.set 2 │ │ + local.get 1 │ │ + local.get 2 │ │ + i32.sub │ │ + local.set 3 │ │ + local.get 3 │ │ + local.get 0 │ │ + i32.store offset=8 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 4 │ │ + local.get 4 │ │ + i32.load offset=16 │ │ + local.set 5 │ │ + block ;; label = @1 │ │ + block ;; label = @2 │ │ + local.get 5 │ │ + br_if 0 (;@2;) │ │ + i64.const 0 │ │ + local.set 6 │ │ + local.get 3 │ │ + local.get 6 │ │ + i64.store │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 7 │ │ + local.get 7 │ │ + i32.load16_u offset=84 │ │ + local.set 8 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + block ;; label = @5 │ │ + block ;; label = @6 │ │ + block ;; label = @7 │ │ + block ;; label = @8 │ │ + block ;; label = @9 │ │ + local.get 8 │ │ + i32.eqz │ │ + br_if 0 (;@9;) │ │ + i32.const 1 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.get 9 │ │ + i32.eq │ │ + local.set 10 │ │ + local.get 10 │ │ + br_if 1 (;@8;) │ │ + i32.const 257 │ │ + local.set 11 │ │ + local.get 8 │ │ + local.get 11 │ │ + i32.eq │ │ + local.set 12 │ │ + local.get 12 │ │ + br_if 2 (;@7;) │ │ + i32.const 258 │ │ + local.set 13 │ │ + local.get 8 │ │ + local.get 13 │ │ + i32.eq │ │ + local.set 14 │ │ + local.get 14 │ │ + br_if 3 (;@6;) │ │ + i32.const 259 │ │ + local.set 15 │ │ + local.get 8 │ │ + local.get 15 │ │ + i32.eq │ │ + local.set 16 │ │ + local.get 16 │ │ + br_if 4 (;@5;) │ │ + br 5 (;@4;) │ │ + end │ │ + br 5 (;@3;) │ │ + end │ │ + i64.const 12 │ │ + local.set 17 │ │ + local.get 3 │ │ + local.get 17 │ │ + i64.store │ │ + br 4 (;@3;) │ │ + end │ │ + i64.const 20 │ │ + local.set 18 │ │ + local.get 3 │ │ + local.get 18 │ │ + i64.store │ │ + br 3 (;@3;) │ │ + end │ │ + i64.const 24 │ │ + local.set 19 │ │ + local.get 3 │ │ + local.get 19 │ │ + i64.store │ │ + br 2 (;@3;) │ │ + end │ │ + i64.const 28 │ │ + local.set 20 │ │ + local.get 3 │ │ + local.get 20 │ │ + i64.store │ │ + br 1 (;@3;) │ │ + end │ │ + i32.const 0 │ │ + local.set 21 │ │ + local.get 3 │ │ + local.get 21 │ │ + i32.store offset=12 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 22 │ │ + local.get 22 │ │ + i64.load offset=40 │ │ + local.set 23 │ │ + local.get 3 │ │ + i64.load │ │ + local.set 24 │ │ + local.get 23 │ │ + local.get 24 │ │ + i64.add │ │ + local.set 25 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 26 │ │ + local.get 26 │ │ + i64.load offset=40 │ │ + local.set 27 │ │ + local.get 25 │ │ + local.set 28 │ │ + local.get 27 │ │ + local.set 29 │ │ + local.get 28 │ │ + local.get 29 │ │ + i64.lt_u │ │ + local.set 30 │ │ + i32.const 1 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ + i32.and │ │ + local.set 32 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 32 │ │ + br_if 0 (;@4;) │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 33 │ │ + local.get 33 │ │ + i64.load offset=32 │ │ + local.set 34 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 35 │ │ + local.get 35 │ │ + i64.load offset=40 │ │ + local.set 36 │ │ + local.get 3 │ │ + i64.load │ │ + local.set 37 │ │ + local.get 36 │ │ + local.get 37 │ │ + i64.add │ │ + local.set 38 │ │ + local.get 34 │ │ + local.set 39 │ │ + local.get 38 │ │ + local.set 40 │ │ + local.get 39 │ │ + local.get 40 │ │ + i64.ne │ │ + local.set 41 │ │ + i32.const 1 │ │ + local.set 42 │ │ + local.get 41 │ │ + local.get 42 │ │ + i32.and │ │ + local.set 43 │ │ + local.get 43 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + end │ │ + i32.const 20 │ │ + local.set 44 │ │ + local.get 3 │ │ + local.get 44 │ │ + i32.store offset=12 │ │ + br 2 (;@1;) │ │ + end │ │ + end │ │ + i32.const 0 │ │ + local.set 45 │ │ + local.get 3 │ │ + local.get 45 │ │ + i32.store offset=12 │ │ + end │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 46 │ │ + local.get 46 │ │ + return) │ │ + (func $zip_dirent_get_last_mod_mtime (type 10) (param i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 1 │ │ + i32.const 16 │ │ + local.set 2 │ │ + local.get 1 │ │ + local.get 2 │ │ + i32.sub │ │ + local.set 3 │ │ + local.get 3 │ │ + global.set $__stack_pointer │ │ + local.get 3 │ │ + local.get 0 │ │ + i32.store offset=12 │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 4 │ │ + local.get 4 │ │ + i32.load8_u offset=7 │ │ + local.set 5 │ │ + i32.const 1 │ │ + local.set 6 │ │ + local.get 5 │ │ + local.get 6 │ │ + i32.and │ │ + local.set 7 │ │ + block ;; label = @1 │ │ + local.get 7 │ │ + br_if 0 (;@1;) │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 8 │ │ + i32.const 20 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.get 9 │ │ + i32.add │ │ + local.set 10 │ │ + local.get 10 │ │ + call $_zip_d2u_time │ │ + local.set 11 │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 12 │ │ + local.get 12 │ │ + local.get 11 │ │ + i32.store offset=92 │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 13 │ │ + i32.const 1 │ │ + local.set 14 │ │ + local.get 13 │ │ + local.get 14 │ │ + i32.store8 offset=7 │ │ + end │ │ + local.get 3 │ │ + i32.load offset=12 │ │ + local.set 15 │ │ + local.get 15 │ │ + i32.load offset=92 │ │ + local.set 16 │ │ + i32.const 16 │ │ + local.set 17 │ │ + local.get 3 │ │ + local.get 17 │ │ + i32.add │ │ + local.set 18 │ │ + local.get 18 │ │ + global.set $__stack_pointer │ │ + local.get 16 │ │ + return) │ │ (func $_zip_entry_finalize (type 5) (param i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ @@ -277942,15 +278908,15 @@ │ │ i32.const 0 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.store8 offset=12 │ │ return) │ │ (func $zip_discard (type 5) (param i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ i32.sub │ │ @@ -278054,15 +279020,15 @@ │ │ local.set 28 │ │ local.get 28 │ │ call $_zip_string_free │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 29 │ │ local.get 29 │ │ - i32.load offset=80 │ │ + i32.load offset=92 │ │ local.set 30 │ │ local.get 30 │ │ call $_zip_hash_free │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 31 │ │ local.get 31 │ │ @@ -278179,120 +279145,115 @@ │ │ local.get 3 │ │ i64.load │ │ local.set 61 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 62 │ │ local.get 62 │ │ - i32.load offset=68 │ │ + i64.load offset=72 │ │ local.set 63 │ │ - local.get 63 │ │ + local.get 61 │ │ local.set 64 │ │ - local.get 64 │ │ - i64.extend_i32_u │ │ + local.get 63 │ │ local.set 65 │ │ - local.get 61 │ │ - local.set 66 │ │ + local.get 64 │ │ local.get 65 │ │ + i64.lt_u │ │ + local.set 66 │ │ + i32.const 1 │ │ local.set 67 │ │ local.get 66 │ │ local.get 67 │ │ - i64.lt_u │ │ + i32.and │ │ local.set 68 │ │ - i32.const 1 │ │ - local.set 69 │ │ local.get 68 │ │ - local.get 69 │ │ - i32.and │ │ - local.set 70 │ │ - local.get 70 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ local.get 3 │ │ i32.load offset=12 │ │ + local.set 69 │ │ + local.get 69 │ │ + i32.load offset=88 │ │ + local.set 70 │ │ + local.get 3 │ │ + i64.load │ │ local.set 71 │ │ local.get 71 │ │ - i32.load offset=76 │ │ + i32.wrap_i64 │ │ local.set 72 │ │ - local.get 3 │ │ - i64.load │ │ + i32.const 2 │ │ local.set 73 │ │ + local.get 72 │ │ local.get 73 │ │ - i32.wrap_i64 │ │ + i32.shl │ │ local.set 74 │ │ - i32.const 2 │ │ - local.set 75 │ │ + local.get 70 │ │ local.get 74 │ │ + i32.add │ │ + local.set 75 │ │ local.get 75 │ │ - i32.shl │ │ + i32.load │ │ local.set 76 │ │ - local.get 72 │ │ local.get 76 │ │ - i32.add │ │ - local.set 77 │ │ - local.get 77 │ │ - i32.load │ │ - local.set 78 │ │ - local.get 78 │ │ call $_zip_source_invalidate │ │ local.get 3 │ │ i64.load │ │ - local.set 79 │ │ + local.set 77 │ │ i64.const 1 │ │ - local.set 80 │ │ - local.get 79 │ │ - local.get 80 │ │ + local.set 78 │ │ + local.get 77 │ │ + local.get 78 │ │ i64.add │ │ - local.set 81 │ │ + local.set 79 │ │ local.get 3 │ │ - local.get 81 │ │ + local.get 79 │ │ i64.store │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ + local.set 80 │ │ + local.get 80 │ │ + i32.load offset=88 │ │ + local.set 81 │ │ + local.get 81 │ │ + call $dlfree │ │ + local.get 3 │ │ + i32.load offset=12 │ │ local.set 82 │ │ local.get 82 │ │ - i32.load offset=76 │ │ + i32.load offset=96 │ │ local.set 83 │ │ local.get 83 │ │ - call $dlfree │ │ + call $_zip_progress_free │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 84 │ │ - local.get 84 │ │ - i32.load offset=84 │ │ + i32.const 8 │ │ local.set 85 │ │ + local.get 84 │ │ local.get 85 │ │ - call $_zip_progress_free │ │ - local.get 3 │ │ - i32.load offset=12 │ │ + i32.add │ │ local.set 86 │ │ - i32.const 8 │ │ - local.set 87 │ │ local.get 86 │ │ - local.get 87 │ │ - i32.add │ │ - local.set 88 │ │ - local.get 88 │ │ call $zip_error_fini │ │ local.get 3 │ │ i32.load offset=12 │ │ - local.set 89 │ │ - local.get 89 │ │ + local.set 87 │ │ + local.get 87 │ │ call $dlfree │ │ end │ │ i32.const 16 │ │ - local.set 90 │ │ + local.set 88 │ │ local.get 3 │ │ - local.get 90 │ │ + local.get 88 │ │ i32.add │ │ - local.set 91 │ │ - local.get 91 │ │ + local.set 89 │ │ + local.get 89 │ │ global.set $__stack_pointer │ │ return) │ │ (func $zip_open (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 48 │ │ @@ -279396,15 +280357,15 @@ │ │ local.get 5 │ │ i32.load offset=12 │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 23 │ │ local.get 24 │ │ - i32.store offset=88 │ │ + i32.store offset=100 │ │ local.get 5 │ │ i32.load offset=20 │ │ local.set 25 │ │ i32.const 16 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ @@ -279462,15 +280423,15 @@ │ │ i32.add │ │ local.set 39 │ │ local.get 39 │ │ global.set $__stack_pointer │ │ local.get 37 │ │ return) │ │ (func $_zip_open (type 4) (param i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 112 │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i32.sub │ │ @@ -279736,494 +280697,500 @@ │ │ local.get 71 │ │ i32.add │ │ local.set 72 │ │ local.get 69 │ │ local.get 72 │ │ call $_zip_error_copy │ │ local.get 5 │ │ - i32.load offset=96 │ │ + i32.load offset=92 │ │ local.set 73 │ │ - local.get 73 │ │ - call $zip_error_code_zip │ │ + i32.const 8 │ │ local.set 74 │ │ - i32.const 19 │ │ - local.set 75 │ │ + local.get 73 │ │ local.get 74 │ │ - local.set 76 │ │ + i32.add │ │ + local.set 75 │ │ local.get 75 │ │ + call $zip_error_code_zip │ │ + local.set 76 │ │ + i32.const 19 │ │ local.set 77 │ │ local.get 76 │ │ - local.get 77 │ │ - i32.eq │ │ local.set 78 │ │ - i32.const 1 │ │ + local.get 77 │ │ local.set 79 │ │ local.get 78 │ │ local.get 79 │ │ - i32.and │ │ + i32.eq │ │ local.set 80 │ │ + i32.const 1 │ │ + local.set 81 │ │ + local.get 80 │ │ + local.get 81 │ │ + i32.and │ │ + local.set 82 │ │ block ;; label = @3 │ │ - local.get 80 │ │ + local.get 82 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=104 │ │ - local.set 81 │ │ - local.get 81 │ │ - call $_is_truncated_zip │ │ - local.set 82 │ │ - i32.const 1 │ │ local.set 83 │ │ - local.get 82 │ │ local.get 83 │ │ - i32.and │ │ + call $_is_truncated_zip │ │ local.set 84 │ │ + i32.const 1 │ │ + local.set 85 │ │ + local.get 84 │ │ + local.get 85 │ │ + i32.and │ │ + local.set 86 │ │ block ;; label = @4 │ │ - local.get 84 │ │ + local.get 86 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=96 │ │ - local.set 85 │ │ + local.set 87 │ │ i32.const 35 │ │ - local.set 86 │ │ + local.set 88 │ │ i32.const 0 │ │ - local.set 87 │ │ - local.get 85 │ │ - local.get 86 │ │ + local.set 89 │ │ local.get 87 │ │ + local.get 88 │ │ + local.get 89 │ │ call $zip_error_set │ │ end │ │ end │ │ local.get 5 │ │ i32.load offset=104 │ │ - local.set 88 │ │ - local.get 88 │ │ + local.set 90 │ │ + local.get 90 │ │ call $zip_source_keep │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 89 │ │ - local.get 89 │ │ + local.set 91 │ │ + local.get 91 │ │ call $zip_discard │ │ i32.const 0 │ │ - local.set 90 │ │ + local.set 92 │ │ local.get 5 │ │ - local.get 90 │ │ + local.get 92 │ │ i32.store offset=108 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 91 │ │ - local.get 91 │ │ + local.set 93 │ │ + local.get 93 │ │ i32.load │ │ - local.set 92 │ │ + local.set 94 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 93 │ │ - local.get 93 │ │ - local.get 92 │ │ + local.set 95 │ │ + local.get 95 │ │ + local.get 94 │ │ i32.store offset=64 │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 94 │ │ - local.get 94 │ │ + local.set 96 │ │ + local.get 96 │ │ i64.load offset=8 │ │ - local.set 95 │ │ + local.set 97 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 96 │ │ - local.get 96 │ │ - local.get 95 │ │ + local.set 98 │ │ + local.get 98 │ │ + local.get 97 │ │ i64.store offset=48 │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 97 │ │ - local.get 97 │ │ + local.set 99 │ │ + local.get 99 │ │ i64.load offset=16 │ │ - local.set 98 │ │ + local.set 100 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 99 │ │ - local.get 99 │ │ - local.get 98 │ │ + local.set 101 │ │ + local.get 101 │ │ + local.get 100 │ │ i64.store offset=56 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 100 │ │ + local.set 102 │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 101 │ │ - local.get 100 │ │ - local.get 101 │ │ + local.set 103 │ │ + local.get 102 │ │ + local.get 103 │ │ call $zip_check_torrentzip │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 102 │ │ - local.get 102 │ │ - i32.load offset=20 │ │ - local.set 103 │ │ - i32.const 4 │ │ local.set 104 │ │ - local.get 103 │ │ local.get 104 │ │ - i32.and │ │ + i32.load offset=20 │ │ local.set 105 │ │ + i32.const 4 │ │ + local.set 106 │ │ + local.get 105 │ │ + local.get 106 │ │ + i32.and │ │ + local.set 107 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 105 │ │ + local.get 107 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 106 │ │ - local.get 106 │ │ - i32.load offset=40 │ │ - local.set 107 │ │ - local.get 107 │ │ + local.set 108 │ │ + local.get 108 │ │ + i32.load offset=72 │ │ + local.set 109 │ │ + local.get 109 │ │ call $_zip_string_free │ │ br 1 (;@2;) │ │ end │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 108 │ │ - local.get 108 │ │ - i32.load offset=40 │ │ - local.set 109 │ │ - local.get 5 │ │ - i32.load offset=92 │ │ local.set 110 │ │ local.get 110 │ │ - local.get 109 │ │ + i32.load offset=72 │ │ + local.set 111 │ │ + local.get 5 │ │ + i32.load offset=92 │ │ + local.set 112 │ │ + local.get 112 │ │ + local.get 111 │ │ i32.store offset=32 │ │ end │ │ local.get 5 │ │ i32.load offset=88 │ │ - local.set 111 │ │ - local.get 111 │ │ - call $dlfree │ │ - local.get 5 │ │ - i32.load offset=92 │ │ - local.set 112 │ │ - local.get 112 │ │ - i32.load offset=80 │ │ local.set 113 │ │ + local.get 113 │ │ + call $dlfree │ │ local.get 5 │ │ i32.load offset=92 │ │ local.set 114 │ │ local.get 114 │ │ - i64.load offset=48 │ │ + i32.load offset=92 │ │ local.set 115 │ │ local.get 5 │ │ i32.load offset=92 │ │ local.set 116 │ │ - i32.const 8 │ │ - local.set 117 │ │ local.get 116 │ │ - local.get 117 │ │ - i32.add │ │ + i64.load offset=48 │ │ + local.set 117 │ │ + local.get 5 │ │ + i32.load offset=92 │ │ local.set 118 │ │ - local.get 113 │ │ - local.get 115 │ │ + i32.const 8 │ │ + local.set 119 │ │ local.get 118 │ │ + local.get 119 │ │ + i32.add │ │ + local.set 120 │ │ + local.get 115 │ │ + local.get 117 │ │ + local.get 120 │ │ call $_zip_hash_reserve_capacity │ │ drop │ │ i64.const 0 │ │ - local.set 119 │ │ + local.set 121 │ │ local.get 5 │ │ - local.get 119 │ │ + local.get 121 │ │ i64.store offset=16 │ │ block ;; label = @2 │ │ loop ;; label = @3 │ │ local.get 5 │ │ i64.load offset=16 │ │ - local.set 120 │ │ + local.set 122 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 121 │ │ - local.get 121 │ │ - i64.load offset=48 │ │ - local.set 122 │ │ - local.get 120 │ │ local.set 123 │ │ - local.get 122 │ │ - local.set 124 │ │ local.get 123 │ │ - local.get 124 │ │ - i64.lt_u │ │ + i64.load offset=48 │ │ + local.set 124 │ │ + local.get 122 │ │ local.set 125 │ │ - i32.const 1 │ │ + local.get 124 │ │ local.set 126 │ │ local.get 125 │ │ local.get 126 │ │ - i32.and │ │ + i64.lt_u │ │ local.set 127 │ │ + i32.const 1 │ │ + local.set 128 │ │ local.get 127 │ │ + local.get 128 │ │ + i32.and │ │ + local.set 129 │ │ + local.get 129 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 128 │ │ - local.get 128 │ │ - i32.load offset=64 │ │ - local.set 129 │ │ - local.get 5 │ │ - i64.load offset=16 │ │ local.set 130 │ │ local.get 130 │ │ - i32.wrap_i64 │ │ + i32.load offset=64 │ │ local.set 131 │ │ - i32.const 4 │ │ + local.get 5 │ │ + i64.load offset=16 │ │ local.set 132 │ │ - local.get 131 │ │ local.get 132 │ │ - i32.shl │ │ + i32.wrap_i64 │ │ local.set 133 │ │ - local.get 129 │ │ - local.get 133 │ │ - i32.add │ │ + i32.const 4 │ │ local.set 134 │ │ + local.get 133 │ │ local.get 134 │ │ - i32.load │ │ + i32.shl │ │ local.set 135 │ │ + local.get 131 │ │ local.get 135 │ │ - i32.load offset=48 │ │ + i32.add │ │ local.set 136 │ │ + local.get 136 │ │ + i32.load │ │ + local.set 137 │ │ + local.get 137 │ │ + i32.load offset=48 │ │ + local.set 138 │ │ local.get 5 │ │ i32.load offset=96 │ │ - local.set 137 │ │ + local.set 139 │ │ i32.const 0 │ │ - local.set 138 │ │ - local.get 136 │ │ - local.get 138 │ │ + local.set 140 │ │ local.get 138 │ │ - local.get 137 │ │ + local.get 140 │ │ + local.get 140 │ │ + local.get 139 │ │ call $_zip_string_get │ │ - local.set 139 │ │ + local.set 141 │ │ local.get 5 │ │ - local.get 139 │ │ + local.get 141 │ │ i32.store offset=12 │ │ local.get 5 │ │ i32.load offset=12 │ │ - local.set 140 │ │ - i32.const 0 │ │ - local.set 141 │ │ - local.get 140 │ │ local.set 142 │ │ - local.get 141 │ │ + i32.const 0 │ │ local.set 143 │ │ local.get 142 │ │ - local.get 143 │ │ - i32.eq │ │ local.set 144 │ │ - i32.const 1 │ │ + local.get 143 │ │ local.set 145 │ │ local.get 144 │ │ local.get 145 │ │ - i32.and │ │ + i32.eq │ │ local.set 146 │ │ + i32.const 1 │ │ + local.set 147 │ │ + local.get 146 │ │ + local.get 147 │ │ + i32.and │ │ + local.set 148 │ │ block ;; label = @4 │ │ - local.get 146 │ │ + local.get 148 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=104 │ │ - local.set 147 │ │ - local.get 147 │ │ + local.set 149 │ │ + local.get 149 │ │ call $zip_source_keep │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 148 │ │ - local.get 148 │ │ + local.set 150 │ │ + local.get 150 │ │ call $zip_discard │ │ i32.const 0 │ │ - local.set 149 │ │ + local.set 151 │ │ local.get 5 │ │ - local.get 149 │ │ + local.get 151 │ │ i32.store offset=108 │ │ br 3 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 150 │ │ - local.get 150 │ │ - i32.load offset=80 │ │ - local.set 151 │ │ + local.set 152 │ │ + local.get 152 │ │ + i32.load offset=92 │ │ + local.set 153 │ │ local.get 5 │ │ i32.load offset=12 │ │ - local.set 152 │ │ + local.set 154 │ │ local.get 5 │ │ i64.load offset=16 │ │ - local.set 153 │ │ + local.set 155 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 154 │ │ - i32.const 8 │ │ - local.set 155 │ │ - local.get 154 │ │ - local.get 155 │ │ - i32.add │ │ local.set 156 │ │ i32.const 8 │ │ local.set 157 │ │ - local.get 151 │ │ - local.get 152 │ │ - local.get 153 │ │ - local.get 157 │ │ local.get 156 │ │ - call $_zip_hash_add │ │ + local.get 157 │ │ + i32.add │ │ local.set 158 │ │ - i32.const 1 │ │ + i32.const 8 │ │ local.set 159 │ │ - local.get 158 │ │ + local.get 153 │ │ + local.get 154 │ │ + local.get 155 │ │ local.get 159 │ │ - i32.and │ │ + local.get 158 │ │ + call $_zip_hash_add │ │ local.set 160 │ │ + i32.const 1 │ │ + local.set 161 │ │ + local.get 160 │ │ + local.get 161 │ │ + i32.and │ │ + local.set 162 │ │ block ;; label = @4 │ │ - local.get 160 │ │ + local.get 162 │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 161 │ │ - local.get 161 │ │ - i32.load offset=8 │ │ - local.set 162 │ │ - i32.const 10 │ │ local.set 163 │ │ - local.get 162 │ │ - local.set 164 │ │ local.get 163 │ │ + i32.load offset=8 │ │ + local.set 164 │ │ + i32.const 10 │ │ local.set 165 │ │ local.get 164 │ │ - local.get 165 │ │ - i32.ne │ │ local.set 166 │ │ - i32.const 1 │ │ + local.get 165 │ │ local.set 167 │ │ local.get 166 │ │ local.get 167 │ │ - i32.and │ │ + i32.ne │ │ local.set 168 │ │ + i32.const 1 │ │ + local.set 169 │ │ + local.get 168 │ │ + local.get 169 │ │ + i32.and │ │ + local.set 170 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ - local.get 168 │ │ + local.get 170 │ │ br_if 0 (;@6;) │ │ local.get 5 │ │ i32.load offset=100 │ │ - local.set 169 │ │ - i32.const 4 │ │ - local.set 170 │ │ - local.get 169 │ │ - local.get 170 │ │ - i32.and │ │ local.set 171 │ │ + i32.const 4 │ │ + local.set 172 │ │ local.get 171 │ │ + local.get 172 │ │ + i32.and │ │ + local.set 173 │ │ + local.get 173 │ │ i32.eqz │ │ br_if 1 (;@5;) │ │ end │ │ local.get 5 │ │ i32.load offset=96 │ │ - local.set 172 │ │ + local.set 174 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 173 │ │ - i32.const 8 │ │ - local.set 174 │ │ - local.get 173 │ │ - local.get 174 │ │ - i32.add │ │ local.set 175 │ │ - local.get 172 │ │ + i32.const 8 │ │ + local.set 176 │ │ local.get 175 │ │ + local.get 176 │ │ + i32.add │ │ + local.set 177 │ │ + local.get 174 │ │ + local.get 177 │ │ call $_zip_error_copy │ │ local.get 5 │ │ i32.load offset=104 │ │ - local.set 176 │ │ - local.get 176 │ │ + local.set 178 │ │ + local.get 178 │ │ call $zip_source_keep │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 177 │ │ - local.get 177 │ │ + local.set 179 │ │ + local.get 179 │ │ call $zip_discard │ │ i32.const 0 │ │ - local.set 178 │ │ + local.set 180 │ │ local.get 5 │ │ - local.get 178 │ │ + local.get 180 │ │ i32.store offset=108 │ │ br 4 (;@1;) │ │ end │ │ end │ │ local.get 5 │ │ i64.load offset=16 │ │ - local.set 179 │ │ + local.set 181 │ │ i64.const 1 │ │ - local.set 180 │ │ - local.get 179 │ │ - local.get 180 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.get 182 │ │ i64.add │ │ - local.set 181 │ │ + local.set 183 │ │ local.get 5 │ │ - local.get 181 │ │ + local.get 183 │ │ i64.store offset=16 │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 182 │ │ - local.get 182 │ │ + local.set 184 │ │ + local.get 184 │ │ i32.load offset=20 │ │ - local.set 183 │ │ + local.set 185 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 184 │ │ - local.get 184 │ │ - local.get 183 │ │ + local.set 186 │ │ + local.get 186 │ │ + local.get 185 │ │ i32.store offset=24 │ │ local.get 5 │ │ i32.load offset=92 │ │ - local.set 185 │ │ + local.set 187 │ │ local.get 5 │ │ - local.get 185 │ │ + local.get 187 │ │ i32.store offset=108 │ │ end │ │ local.get 5 │ │ i32.load offset=108 │ │ - local.set 186 │ │ + local.set 188 │ │ i32.const 112 │ │ - local.set 187 │ │ + local.set 189 │ │ local.get 5 │ │ - local.get 187 │ │ + local.get 189 │ │ i32.add │ │ - local.set 188 │ │ - local.get 188 │ │ + local.set 190 │ │ + local.get 190 │ │ global.set $__stack_pointer │ │ - local.get 186 │ │ + local.get 188 │ │ return) │ │ (func $_zip_find_central_dir (type 60) (param i32 i64) (result i32) │ │ - (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ - i32.const 96 │ │ + i32.const 64 │ │ local.set 3 │ │ local.get 2 │ │ local.get 3 │ │ i32.sub │ │ local.set 4 │ │ local.get 4 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ local.get 0 │ │ - i32.store offset=88 │ │ + i32.store offset=56 │ │ local.get 4 │ │ local.get 1 │ │ - i64.store offset=80 │ │ + i64.store offset=48 │ │ local.get 4 │ │ - i64.load offset=80 │ │ + i64.load offset=48 │ │ local.set 5 │ │ i64.const 22 │ │ local.set 6 │ │ local.get 5 │ │ local.set 7 │ │ local.get 6 │ │ local.set 8 │ │ @@ -280239,15 +281206,15 @@ │ │ local.set 11 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 11 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 12 │ │ i32.const 8 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ i32.add │ │ local.set 14 │ │ @@ -280259,19 +281226,19 @@ │ │ local.get 15 │ │ local.get 16 │ │ call $zip_error_set │ │ i32.const 0 │ │ local.set 17 │ │ local.get 4 │ │ local.get 17 │ │ - i32.store offset=92 │ │ + i32.store offset=60 │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ - i64.load offset=80 │ │ + i64.load offset=48 │ │ local.set 18 │ │ i64.const 65578 │ │ local.set 19 │ │ local.get 18 │ │ local.set 20 │ │ local.get 19 │ │ local.set 21 │ │ @@ -280287,38 +281254,38 @@ │ │ local.set 24 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 24 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ - i64.load offset=80 │ │ + i64.load offset=48 │ │ local.set 25 │ │ local.get 25 │ │ local.set 26 │ │ br 1 (;@2;) │ │ end │ │ i64.const 65578 │ │ local.set 27 │ │ local.get 27 │ │ local.set 26 │ │ end │ │ local.get 26 │ │ local.set 28 │ │ local.get 4 │ │ local.get 28 │ │ - i64.store offset=48 │ │ + i64.store offset=24 │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 29 │ │ local.get 29 │ │ i32.load │ │ local.set 30 │ │ local.get 4 │ │ - i64.load offset=48 │ │ + i64.load offset=24 │ │ local.set 31 │ │ i64.const 0 │ │ local.set 32 │ │ local.get 32 │ │ local.get 31 │ │ i64.sub │ │ local.set 33 │ │ @@ -280346,27 +281313,27 @@ │ │ i32.and │ │ local.set 41 │ │ block ;; label = @2 │ │ local.get 41 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 42 │ │ local.get 42 │ │ i32.load │ │ local.set 43 │ │ local.get 43 │ │ call $zip_source_error │ │ local.set 44 │ │ local.get 4 │ │ local.get 44 │ │ - i32.store offset=8 │ │ + i32.store │ │ local.get 4 │ │ - i32.load offset=8 │ │ + i32.load │ │ local.set 45 │ │ local.get 45 │ │ call $zip_error_code_zip │ │ local.set 46 │ │ i32.const 4 │ │ local.set 47 │ │ local.get 46 │ │ @@ -280384,15 +281351,15 @@ │ │ i32.and │ │ local.set 52 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 52 │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ - i32.load offset=8 │ │ + i32.load │ │ local.set 53 │ │ local.get 53 │ │ call $zip_error_code_system │ │ local.set 54 │ │ i32.const 22 │ │ local.set 55 │ │ local.get 54 │ │ @@ -280410,48 +281377,48 @@ │ │ i32.and │ │ local.set 60 │ │ local.get 60 │ │ i32.eqz │ │ br_if 1 (;@3;) │ │ end │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 61 │ │ i32.const 8 │ │ local.set 62 │ │ local.get 61 │ │ local.get 62 │ │ i32.add │ │ local.set 63 │ │ local.get 4 │ │ - i32.load offset=8 │ │ + i32.load │ │ local.set 64 │ │ local.get 63 │ │ local.get 64 │ │ call $_zip_error_copy │ │ i32.const 0 │ │ local.set 65 │ │ local.get 4 │ │ local.get 65 │ │ - i32.store offset=92 │ │ + i32.store offset=60 │ │ br 2 (;@1;) │ │ end │ │ end │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 66 │ │ local.get 66 │ │ i32.load │ │ local.set 67 │ │ local.get 67 │ │ call $zip_source_tell │ │ local.set 68 │ │ local.get 4 │ │ local.get 68 │ │ - i64.store offset=56 │ │ + i64.store offset=32 │ │ i64.const 0 │ │ local.set 69 │ │ local.get 68 │ │ local.set 70 │ │ local.get 69 │ │ local.set 71 │ │ local.get 70 │ │ @@ -280465,49 +281432,49 @@ │ │ i32.and │ │ local.set 74 │ │ block ;; label = @2 │ │ local.get 74 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 75 │ │ i32.const 8 │ │ local.set 76 │ │ local.get 75 │ │ local.get 76 │ │ i32.add │ │ local.set 77 │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 78 │ │ local.get 78 │ │ i32.load │ │ local.set 79 │ │ local.get 77 │ │ local.get 79 │ │ call $zip_error_set_from_source │ │ i32.const 0 │ │ local.set 80 │ │ local.get 4 │ │ local.get 80 │ │ - i32.store offset=92 │ │ + i32.store offset=60 │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 81 │ │ local.get 81 │ │ i32.load │ │ local.set 82 │ │ local.get 4 │ │ - i64.load offset=48 │ │ + i64.load offset=24 │ │ local.set 83 │ │ local.get 4 │ │ - i32.load offset=88 │ │ + i32.load offset=56 │ │ local.set 84 │ │ i32.const 8 │ │ local.set 85 │ │ local.get 84 │ │ local.get 85 │ │ i32.add │ │ local.set 86 │ │ @@ -280517,15 +281484,15 @@ │ │ local.get 83 │ │ local.get 87 │ │ local.get 86 │ │ call $_zip_buffer_new_from_source │ │ local.set 88 │ │ local.get 4 │ │ local.get 88 │ │ - i32.store offset=12 │ │ + i32.store offset=4 │ │ i32.const 0 │ │ local.set 89 │ │ local.get 88 │ │ local.set 90 │ │ local.get 89 │ │ local.set 91 │ │ local.get 90 │ │ @@ -280542,569 +281509,337 @@ │ │ local.get 94 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 95 │ │ local.get 4 │ │ local.get 95 │ │ - i32.store offset=92 │ │ + i32.store offset=60 │ │ br 1 (;@1;) │ │ end │ │ - i64.const -1 │ │ + i32.const 0 │ │ local.set 96 │ │ local.get 4 │ │ local.get 96 │ │ - i64.store offset=32 │ │ - i32.const 0 │ │ - local.set 97 │ │ - local.get 4 │ │ - local.get 97 │ │ - i32.store offset=76 │ │ + i32.store offset=44 │ │ local.get 4 │ │ - i64.load offset=48 │ │ - local.set 98 │ │ + i64.load offset=24 │ │ + local.set 97 │ │ i64.const 65578 │ │ + local.set 98 │ │ + local.get 97 │ │ local.set 99 │ │ local.get 98 │ │ local.set 100 │ │ local.get 99 │ │ - local.set 101 │ │ local.get 100 │ │ - local.get 101 │ │ i64.ge_u │ │ - local.set 102 │ │ + local.set 101 │ │ i32.const 1 │ │ - local.set 103 │ │ + local.set 102 │ │ + local.get 101 │ │ local.get 102 │ │ - local.get 103 │ │ i32.and │ │ - local.set 104 │ │ + local.set 103 │ │ block ;; label = @2 │ │ - local.get 104 │ │ + local.get 103 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 105 │ │ + i32.load offset=4 │ │ + local.set 104 │ │ i64.const 20 │ │ - local.set 106 │ │ + local.set 105 │ │ + local.get 104 │ │ local.get 105 │ │ - local.get 106 │ │ call $_zip_buffer_set_offset │ │ drop │ │ end │ │ - i32.const 16 │ │ - local.set 107 │ │ + i32.const 8 │ │ + local.set 106 │ │ local.get 4 │ │ - local.get 107 │ │ + local.get 106 │ │ i32.add │ │ + local.set 107 │ │ + local.get 107 │ │ local.set 108 │ │ - local.get 108 │ │ - local.set 109 │ │ i32.const 19 │ │ - local.set 110 │ │ + local.set 109 │ │ i32.const 0 │ │ - local.set 111 │ │ + local.set 110 │ │ + local.get 108 │ │ local.get 109 │ │ local.get 110 │ │ - local.get 111 │ │ call $zip_error_set │ │ + i32.const 0 │ │ + local.set 111 │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 112 │ │ - i64.const 0 │ │ - local.set 113 │ │ - local.get 112 │ │ - local.get 113 │ │ - call $_zip_buffer_get │ │ - local.set 114 │ │ - local.get 4 │ │ - local.get 114 │ │ - i32.store offset=68 │ │ - loop ;; label = @2 │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 115 │ │ - local.get 115 │ │ - call $_zip_buffer_left │ │ - local.set 116 │ │ - i64.const 22 │ │ - local.set 117 │ │ - local.get 116 │ │ - local.set 118 │ │ - local.get 117 │ │ - local.set 119 │ │ - local.get 118 │ │ - local.get 119 │ │ - i64.ge_u │ │ - local.set 120 │ │ - i32.const 0 │ │ - local.set 121 │ │ - i32.const 1 │ │ - local.set 122 │ │ - local.get 120 │ │ - local.get 122 │ │ - i32.and │ │ - local.set 123 │ │ - local.get 121 │ │ - local.set 124 │ │ - block ;; label = @3 │ │ - local.get 123 │ │ - i32.eqz │ │ - br_if 0 (;@3;) │ │ + local.get 111 │ │ + i32.store offset=40 │ │ + block ;; label = @2 │ │ + loop ;; label = @3 │ │ local.get 4 │ │ - i32.load offset=68 │ │ - local.set 125 │ │ + i32.load offset=4 │ │ + local.set 112 │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 126 │ │ - local.get 126 │ │ - call $_zip_buffer_left │ │ - local.set 127 │ │ - local.get 127 │ │ - i32.wrap_i64 │ │ - local.set 128 │ │ - i32.const 18 │ │ - local.set 129 │ │ - local.get 128 │ │ - local.get 129 │ │ - i32.sub │ │ - local.set 130 │ │ - i32.const 22649 │ │ - local.set 131 │ │ - i32.const 4 │ │ - local.set 132 │ │ - local.get 125 │ │ - local.get 130 │ │ - local.get 131 │ │ - local.get 132 │ │ - call $_zip_memmem │ │ - local.set 133 │ │ + i32.load offset=40 │ │ + local.set 113 │ │ + local.get 112 │ │ + local.get 113 │ │ + call $find_eocd │ │ + local.set 114 │ │ local.get 4 │ │ - local.get 133 │ │ - i32.store offset=68 │ │ + local.get 114 │ │ + i32.store offset=40 │ │ i32.const 0 │ │ - local.set 134 │ │ - local.get 133 │ │ - local.set 135 │ │ - local.get 134 │ │ - local.set 136 │ │ - local.get 135 │ │ - local.get 136 │ │ + local.set 115 │ │ + local.get 114 │ │ + local.set 116 │ │ + local.get 115 │ │ + local.set 117 │ │ + local.get 116 │ │ + local.get 117 │ │ i32.ne │ │ - local.set 137 │ │ - local.get 137 │ │ - local.set 124 │ │ - end │ │ - local.get 124 │ │ - local.set 138 │ │ - i32.const 1 │ │ - local.set 139 │ │ - local.get 138 │ │ - local.get 139 │ │ - i32.and │ │ - local.set 140 │ │ - block ;; label = @3 │ │ - local.get 140 │ │ + local.set 118 │ │ + i32.const 1 │ │ + local.set 119 │ │ + local.get 118 │ │ + local.get 119 │ │ + i32.and │ │ + local.set 120 │ │ + local.get 120 │ │ i32.eqz │ │ - br_if 0 (;@3;) │ │ + br_if 1 (;@2;) │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 141 │ │ + i32.load offset=4 │ │ + local.set 121 │ │ local.get 4 │ │ - i32.load offset=68 │ │ - local.set 142 │ │ + i32.load offset=40 │ │ + local.set 122 │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 143 │ │ - local.get 143 │ │ + i32.load offset=4 │ │ + local.set 123 │ │ + local.get 123 │ │ call $_zip_buffer_data │ │ - local.set 144 │ │ - local.get 142 │ │ - local.get 144 │ │ + local.set 124 │ │ + local.get 122 │ │ + local.get 124 │ │ i32.sub │ │ - local.set 145 │ │ - local.get 145 │ │ - local.set 146 │ │ - local.get 146 │ │ + local.set 125 │ │ + local.get 125 │ │ + local.set 126 │ │ + local.get 126 │ │ i64.extend_i32_s │ │ - local.set 147 │ │ - local.get 141 │ │ - local.get 147 │ │ + local.set 127 │ │ + local.get 121 │ │ + local.get 127 │ │ call $_zip_buffer_set_offset │ │ drop │ │ local.get 4 │ │ - i32.load offset=88 │ │ - local.set 148 │ │ + i32.load offset=56 │ │ + local.set 128 │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 149 │ │ + i32.load offset=4 │ │ + local.set 129 │ │ local.get 4 │ │ - i64.load offset=56 │ │ - local.set 150 │ │ - i32.const 16 │ │ - local.set 151 │ │ + i64.load offset=32 │ │ + local.set 130 │ │ + i32.const 44 │ │ + local.set 131 │ │ local.get 4 │ │ - local.get 151 │ │ + local.get 131 │ │ i32.add │ │ - local.set 152 │ │ - local.get 152 │ │ - local.set 153 │ │ - local.get 148 │ │ - local.get 149 │ │ - local.get 150 │ │ - local.get 153 │ │ - call $_zip_read_cdir │ │ - local.set 154 │ │ + local.set 132 │ │ + local.get 132 │ │ + local.set 133 │ │ + i32.const 8 │ │ + local.set 134 │ │ local.get 4 │ │ - local.get 154 │ │ - i32.store offset=72 │ │ - i32.const 0 │ │ - local.set 155 │ │ - local.get 154 │ │ - local.set 156 │ │ - local.get 155 │ │ - local.set 157 │ │ - local.get 156 │ │ - local.get 157 │ │ - i32.ne │ │ - local.set 158 │ │ + local.get 134 │ │ + i32.add │ │ + local.set 135 │ │ + local.get 135 │ │ + local.set 136 │ │ + local.get 128 │ │ + local.get 129 │ │ + local.get 130 │ │ + local.get 133 │ │ + local.get 136 │ │ + call $_zip_read_cdir │ │ + local.set 137 │ │ i32.const 1 │ │ - local.set 159 │ │ - local.get 158 │ │ - local.get 159 │ │ + local.set 138 │ │ + local.get 137 │ │ + local.get 138 │ │ i32.and │ │ - local.set 160 │ │ + local.set 139 │ │ block ;; label = @4 │ │ - local.get 160 │ │ + local.get 139 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ - i32.load offset=76 │ │ - local.set 161 │ │ + i32.load offset=44 │ │ + local.set 140 │ │ i32.const 0 │ │ - local.set 162 │ │ - local.get 161 │ │ - local.set 163 │ │ - local.get 162 │ │ - local.set 164 │ │ - local.get 163 │ │ - local.get 164 │ │ + local.set 141 │ │ + local.get 140 │ │ + local.set 142 │ │ + local.get 141 │ │ + local.set 143 │ │ + local.get 142 │ │ + local.get 143 │ │ i32.ne │ │ - local.set 165 │ │ + local.set 144 │ │ i32.const 1 │ │ - local.set 166 │ │ - local.get 165 │ │ - local.get 166 │ │ + local.set 145 │ │ + local.get 144 │ │ + local.get 145 │ │ i32.and │ │ - local.set 167 │ │ + local.set 146 │ │ block ;; label = @5 │ │ - block ;; label = @6 │ │ - local.get 167 │ │ - i32.eqz │ │ - br_if 0 (;@6;) │ │ - local.get 4 │ │ - i64.load offset=32 │ │ - local.set 168 │ │ - i64.const 0 │ │ - local.set 169 │ │ - local.get 168 │ │ - local.set 170 │ │ - local.get 169 │ │ - local.set 171 │ │ - local.get 170 │ │ - local.get 171 │ │ - i64.le_s │ │ - local.set 172 │ │ - i32.const 1 │ │ - local.set 173 │ │ - local.get 172 │ │ - local.get 173 │ │ - i32.and │ │ - local.set 174 │ │ - block ;; label = @7 │ │ - local.get 174 │ │ - i32.eqz │ │ - br_if 0 (;@7;) │ │ - local.get 4 │ │ - i32.load offset=88 │ │ - local.set 175 │ │ - local.get 4 │ │ - i32.load offset=76 │ │ - local.set 176 │ │ - i32.const 16 │ │ - local.set 177 │ │ - local.get 4 │ │ - local.get 177 │ │ - i32.add │ │ - local.set 178 │ │ - local.get 178 │ │ - local.set 179 │ │ - local.get 175 │ │ - local.get 176 │ │ - local.get 179 │ │ - call $_zip_checkcons │ │ - local.set 180 │ │ - local.get 4 │ │ - local.get 180 │ │ - i64.store offset=32 │ │ - end │ │ - local.get 4 │ │ - i32.load offset=88 │ │ - local.set 181 │ │ - local.get 4 │ │ - i32.load offset=72 │ │ - local.set 182 │ │ - i32.const 16 │ │ - local.set 183 │ │ - local.get 4 │ │ - local.get 183 │ │ - i32.add │ │ - local.set 184 │ │ - local.get 184 │ │ - local.set 185 │ │ - local.get 181 │ │ - local.get 182 │ │ - local.get 185 │ │ - call $_zip_checkcons │ │ - local.set 186 │ │ - local.get 4 │ │ - local.get 186 │ │ - i64.store offset=40 │ │ - local.get 4 │ │ - i64.load offset=32 │ │ - local.set 187 │ │ - local.get 4 │ │ - i64.load offset=40 │ │ - local.set 188 │ │ - local.get 187 │ │ - local.set 189 │ │ - local.get 188 │ │ - local.set 190 │ │ - local.get 189 │ │ - local.get 190 │ │ - i64.lt_s │ │ - local.set 191 │ │ - i32.const 1 │ │ - local.set 192 │ │ - local.get 191 │ │ - local.get 192 │ │ - i32.and │ │ - local.set 193 │ │ - block ;; label = @7 │ │ - block ;; label = @8 │ │ - local.get 193 │ │ - i32.eqz │ │ - br_if 0 (;@8;) │ │ - local.get 4 │ │ - i32.load offset=76 │ │ - local.set 194 │ │ - local.get 194 │ │ - call $_zip_cdir_free │ │ - local.get 4 │ │ - i32.load offset=72 │ │ - local.set 195 │ │ - local.get 4 │ │ - local.get 195 │ │ - i32.store offset=76 │ │ - local.get 4 │ │ - i64.load offset=40 │ │ - local.set 196 │ │ - local.get 4 │ │ - local.get 196 │ │ - i64.store offset=32 │ │ - br 1 (;@7;) │ │ - end │ │ - local.get 4 │ │ - i32.load offset=72 │ │ - local.set 197 │ │ - local.get 197 │ │ - call $_zip_cdir_free │ │ - end │ │ - br 1 (;@5;) │ │ - end │ │ - local.get 4 │ │ - i32.load offset=72 │ │ - local.set 198 │ │ - local.get 4 │ │ - local.get 198 │ │ - i32.store offset=76 │ │ + local.get 146 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ local.get 4 │ │ - i32.load offset=88 │ │ - local.set 199 │ │ - local.get 199 │ │ + i32.load offset=56 │ │ + local.set 147 │ │ + local.get 147 │ │ i32.load offset=4 │ │ - local.set 200 │ │ + local.set 148 │ │ i32.const 4 │ │ - local.set 201 │ │ - local.get 200 │ │ - local.get 201 │ │ + local.set 149 │ │ + local.get 148 │ │ + local.get 149 │ │ i32.and │ │ - local.set 202 │ │ - block ;; label = @6 │ │ - block ;; label = @7 │ │ - local.get 202 │ │ - i32.eqz │ │ - br_if 0 (;@7;) │ │ - local.get 4 │ │ - i32.load offset=88 │ │ - local.set 203 │ │ - local.get 4 │ │ - i32.load offset=76 │ │ - local.set 204 │ │ - i32.const 16 │ │ - local.set 205 │ │ - local.get 4 │ │ - local.get 205 │ │ - i32.add │ │ - local.set 206 │ │ - local.get 206 │ │ - local.set 207 │ │ - local.get 203 │ │ - local.get 204 │ │ - local.get 207 │ │ - call $_zip_checkcons │ │ - local.set 208 │ │ - local.get 4 │ │ - local.get 208 │ │ - i64.store offset=32 │ │ - br 1 (;@6;) │ │ - end │ │ - i64.const 0 │ │ - local.set 209 │ │ - local.get 4 │ │ - local.get 209 │ │ - i64.store offset=32 │ │ - end │ │ + local.set 150 │ │ + local.get 150 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + local.get 4 │ │ + i32.load offset=56 │ │ + local.set 151 │ │ + local.get 4 │ │ + i32.load offset=44 │ │ + local.set 152 │ │ + i32.const 8 │ │ + local.set 153 │ │ + local.get 4 │ │ + local.get 153 │ │ + i32.add │ │ + local.set 154 │ │ + local.get 154 │ │ + local.set 155 │ │ + local.get 151 │ │ + local.get 152 │ │ + local.get 155 │ │ + call $_zip_checkcons │ │ + local.set 156 │ │ + i64.const 0 │ │ + local.set 157 │ │ + local.get 156 │ │ + local.set 158 │ │ + local.get 157 │ │ + local.set 159 │ │ + local.get 158 │ │ + local.get 159 │ │ + i64.lt_s │ │ + local.set 160 │ │ + i32.const 1 │ │ + local.set 161 │ │ + local.get 160 │ │ + local.get 161 │ │ + i32.and │ │ + local.set 162 │ │ + local.get 162 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + local.get 4 │ │ + i32.load offset=44 │ │ + local.set 163 │ │ + local.get 163 │ │ + call $_zip_cdir_free │ │ + i32.const 0 │ │ + local.set 164 │ │ + local.get 4 │ │ + local.get 164 │ │ + i32.store offset=44 │ │ end │ │ - i32.const 0 │ │ - local.set 210 │ │ - local.get 4 │ │ - local.get 210 │ │ - i32.store offset=72 │ │ + br 2 (;@2;) │ │ end │ │ - local.get 4 │ │ - i32.load offset=68 │ │ - local.set 211 │ │ - i32.const 1 │ │ - local.set 212 │ │ - local.get 211 │ │ - local.get 212 │ │ - i32.add │ │ - local.set 213 │ │ - local.get 4 │ │ - local.get 213 │ │ - i32.store offset=68 │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 214 │ │ - local.get 4 │ │ - i32.load offset=68 │ │ - local.set 215 │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 216 │ │ - local.get 216 │ │ - call $_zip_buffer_data │ │ - local.set 217 │ │ - local.get 215 │ │ - local.get 217 │ │ - i32.sub │ │ - local.set 218 │ │ - local.get 218 │ │ - local.set 219 │ │ - local.get 219 │ │ - i64.extend_i32_s │ │ - local.set 220 │ │ - local.get 214 │ │ - local.get 220 │ │ - call $_zip_buffer_set_offset │ │ - drop │ │ - br 1 (;@2;) │ │ + br 0 (;@3;) │ │ end │ │ end │ │ local.get 4 │ │ - i32.load offset=12 │ │ - local.set 221 │ │ - local.get 221 │ │ + i32.load offset=4 │ │ + local.set 165 │ │ + local.get 165 │ │ call $_zip_buffer_free │ │ local.get 4 │ │ - i64.load offset=32 │ │ - local.set 222 │ │ - i64.const 0 │ │ - local.set 223 │ │ - local.get 222 │ │ - local.set 224 │ │ - local.get 223 │ │ - local.set 225 │ │ - local.get 224 │ │ - local.get 225 │ │ - i64.lt_s │ │ - local.set 226 │ │ + i32.load offset=44 │ │ + local.set 166 │ │ + i32.const 0 │ │ + local.set 167 │ │ + local.get 166 │ │ + local.set 168 │ │ + local.get 167 │ │ + local.set 169 │ │ + local.get 168 │ │ + local.get 169 │ │ + i32.eq │ │ + local.set 170 │ │ i32.const 1 │ │ - local.set 227 │ │ - local.get 226 │ │ - local.get 227 │ │ + local.set 171 │ │ + local.get 170 │ │ + local.get 171 │ │ i32.and │ │ - local.set 228 │ │ + local.set 172 │ │ block ;; label = @2 │ │ - local.get 228 │ │ + local.get 172 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=88 │ │ - local.set 229 │ │ + i32.load offset=56 │ │ + local.set 173 │ │ i32.const 8 │ │ - local.set 230 │ │ - local.get 229 │ │ - local.get 230 │ │ + local.set 174 │ │ + local.get 173 │ │ + local.get 174 │ │ i32.add │ │ - local.set 231 │ │ - i32.const 16 │ │ - local.set 232 │ │ + local.set 175 │ │ + i32.const 8 │ │ + local.set 176 │ │ local.get 4 │ │ - local.get 232 │ │ + local.get 176 │ │ i32.add │ │ - local.set 233 │ │ - local.get 233 │ │ - local.set 234 │ │ - local.get 231 │ │ - local.get 234 │ │ + local.set 177 │ │ + local.get 177 │ │ + local.set 178 │ │ + local.get 175 │ │ + local.get 178 │ │ call $_zip_error_copy │ │ - local.get 4 │ │ - i32.load offset=76 │ │ - local.set 235 │ │ - local.get 235 │ │ - call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 236 │ │ - local.get 4 │ │ - local.get 236 │ │ - i32.store offset=92 │ │ - br 1 (;@1;) │ │ end │ │ local.get 4 │ │ - i32.load offset=76 │ │ - local.set 237 │ │ + i32.load offset=44 │ │ + local.set 179 │ │ local.get 4 │ │ - local.get 237 │ │ - i32.store offset=92 │ │ + local.get 179 │ │ + i32.store offset=60 │ │ end │ │ local.get 4 │ │ - i32.load offset=92 │ │ - local.set 238 │ │ - i32.const 96 │ │ - local.set 239 │ │ + i32.load offset=60 │ │ + local.set 180 │ │ + i32.const 64 │ │ + local.set 181 │ │ local.get 4 │ │ - local.get 239 │ │ + local.get 181 │ │ i32.add │ │ - local.set 240 │ │ - local.get 240 │ │ + local.set 182 │ │ + local.get 182 │ │ global.set $__stack_pointer │ │ - local.get 238 │ │ + local.get 180 │ │ return) │ │ (func $_is_truncated_zip (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ @@ -281322,15 +282057,15 @@ │ │ br_if 0 (;@2;) │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 12 │ │ local.get 12 │ │ - i32.load offset=40 │ │ + i32.load offset=72 │ │ local.set 13 │ │ local.get 13 │ │ call $_zip_string_length │ │ local.set 14 │ │ i32.const 65535 │ │ local.set 15 │ │ local.get 14 │ │ @@ -281357,20 +282092,20 @@ │ │ block ;; label = @3 │ │ local.get 22 │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 23 │ │ local.get 23 │ │ - i32.load offset=40 │ │ + i32.load offset=72 │ │ local.set 24 │ │ local.get 24 │ │ i32.load │ │ local.set 25 │ │ - i32.const 17432 │ │ + i32.const 17735 │ │ local.set 26 │ │ i32.const 14 │ │ local.set 27 │ │ local.get 25 │ │ local.get 26 │ │ local.get 27 │ │ call $strncmp │ │ @@ -281389,15 +282124,15 @@ │ │ local.set 30 │ │ local.get 30 │ │ local.set 31 │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 32 │ │ local.get 32 │ │ - i32.load offset=40 │ │ + i32.load offset=72 │ │ local.set 33 │ │ local.get 33 │ │ i32.load │ │ local.set 34 │ │ i32.const 14 │ │ local.set 35 │ │ local.get 34 │ │ @@ -281640,15 +282375,15 @@ │ │ local.get 4 │ │ local.get 101 │ │ i64.store offset=544 │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 102 │ │ local.get 102 │ │ - i64.load offset=24 │ │ + i64.load offset=48 │ │ local.set 103 │ │ local.get 4 │ │ local.get 103 │ │ i64.store offset=568 │ │ local.get 4 │ │ i32.load offset=628 │ │ local.set 104 │ │ @@ -281661,21 +282396,21 @@ │ │ local.get 105 │ │ i32.load │ │ local.set 106 │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 107 │ │ local.get 107 │ │ - i64.load offset=32 │ │ + i64.load offset=56 │ │ local.set 108 │ │ local.get 4 │ │ i32.load offset=632 │ │ local.set 109 │ │ local.get 109 │ │ - i64.load offset=24 │ │ + i64.load offset=48 │ │ local.set 110 │ │ i32.const 544 │ │ local.set 111 │ │ local.get 4 │ │ local.get 111 │ │ i32.add │ │ local.set 112 │ │ @@ -281886,2012 +282621,2559 @@ │ │ local.get 4 │ │ local.get 164 │ │ i32.add │ │ local.set 165 │ │ local.get 165 │ │ global.set $__stack_pointer │ │ return) │ │ - (func $_zip_memmem (type 14) (param i32 i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $find_eocd (type 6) (param i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 4 │ │ + local.set 2 │ │ i32.const 32 │ │ - local.set 5 │ │ - local.get 4 │ │ - local.get 5 │ │ + local.set 3 │ │ + local.get 2 │ │ + local.get 3 │ │ i32.sub │ │ - local.set 6 │ │ - local.get 6 │ │ + local.set 4 │ │ + local.get 4 │ │ global.set $__stack_pointer │ │ - local.get 6 │ │ + local.get 4 │ │ local.get 0 │ │ i32.store offset=24 │ │ - local.get 6 │ │ + local.get 4 │ │ local.get 1 │ │ i32.store offset=20 │ │ + local.get 4 │ │ + i32.load offset=24 │ │ + local.set 5 │ │ + local.get 5 │ │ + call $_zip_buffer_data │ │ + local.set 6 │ │ + local.get 4 │ │ local.get 6 │ │ - local.get 2 │ │ i32.store offset=16 │ │ - local.get 6 │ │ - local.get 3 │ │ - i32.store offset=12 │ │ - local.get 6 │ │ - i32.load offset=12 │ │ + local.get 4 │ │ + i32.load offset=20 │ │ local.set 7 │ │ + i32.const 0 │ │ + local.set 8 │ │ + local.get 7 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.get 10 │ │ + i32.eq │ │ + local.set 11 │ │ + i32.const 1 │ │ + local.set 12 │ │ + local.get 11 │ │ + local.get 12 │ │ + i32.and │ │ + local.set 13 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 7 │ │ - br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 8 │ │ - local.get 6 │ │ - local.get 8 │ │ - i32.store offset=28 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=20 │ │ - local.set 9 │ │ - local.get 6 │ │ - i32.load offset=12 │ │ - local.set 10 │ │ - local.get 9 │ │ - local.set 11 │ │ - local.get 10 │ │ - local.set 12 │ │ - local.get 11 │ │ - local.get 12 │ │ - i32.lt_u │ │ - local.set 13 │ │ - i32.const 1 │ │ - local.set 14 │ │ - local.get 13 │ │ - local.get 14 │ │ - i32.and │ │ - local.set 15 │ │ - block ;; label = @2 │ │ - local.get 15 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - i32.const 0 │ │ - local.set 16 │ │ - local.get 6 │ │ - local.get 16 │ │ - i32.store offset=28 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 17 │ │ - local.get 6 │ │ - local.get 17 │ │ - i32.store offset=8 │ │ - loop ;; label = @2 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 18 │ │ - local.get 6 │ │ - i32.load offset=16 │ │ - local.set 19 │ │ - local.get 19 │ │ - i32.load8_u │ │ - local.set 20 │ │ - i32.const 255 │ │ + block ;; label = @3 │ │ + local.get 13 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ + local.get 4 │ │ + i32.load offset=16 │ │ + local.set 14 │ │ + local.get 4 │ │ + i32.load offset=24 │ │ + local.set 15 │ │ + local.get 15 │ │ + call $_zip_buffer_size │ │ + local.set 16 │ │ + local.get 16 │ │ + i32.wrap_i64 │ │ + local.set 17 │ │ + local.get 14 │ │ + local.get 17 │ │ + i32.add │ │ + local.set 18 │ │ + i32.const -4 │ │ + local.set 19 │ │ + local.get 18 │ │ + local.get 19 │ │ + i32.add │ │ + local.set 20 │ │ + local.get 4 │ │ + local.get 20 │ │ + i32.store offset=20 │ │ + br 1 (;@2;) │ │ + end │ │ + local.get 4 │ │ + i32.load offset=20 │ │ local.set 21 │ │ - local.get 20 │ │ - local.get 21 │ │ - i32.and │ │ + local.get 4 │ │ + i32.load offset=24 │ │ local.set 22 │ │ - local.get 6 │ │ - i32.load offset=20 │ │ + local.get 22 │ │ + call $_zip_buffer_data │ │ local.set 23 │ │ - local.get 6 │ │ - i32.load offset=12 │ │ + local.get 21 │ │ local.set 24 │ │ - i32.const 1 │ │ + local.get 23 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ - i32.sub │ │ + i32.eq │ │ local.set 26 │ │ - local.get 23 │ │ - local.get 26 │ │ - i32.sub │ │ + i32.const 1 │ │ local.set 27 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 28 │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 29 │ │ - local.get 28 │ │ - local.get 29 │ │ - i32.sub │ │ - local.set 30 │ │ + local.get 26 │ │ local.get 27 │ │ - local.get 30 │ │ - i32.sub │ │ - local.set 31 │ │ - local.get 18 │ │ - local.get 22 │ │ - local.get 31 │ │ - call $memchr │ │ - local.set 32 │ │ - local.get 6 │ │ - local.get 32 │ │ - i32.store offset=8 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 33 │ │ - i32.const 0 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.set 35 │ │ - local.get 34 │ │ - local.set 36 │ │ - local.get 35 │ │ - local.get 36 │ │ - i32.eq │ │ - local.set 37 │ │ - i32.const 1 │ │ - local.set 38 │ │ - local.get 37 │ │ - local.get 38 │ │ i32.and │ │ - local.set 39 │ │ + local.set 28 │ │ block ;; label = @3 │ │ - local.get 39 │ │ + local.get 28 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ - local.set 40 │ │ - local.get 6 │ │ - local.get 40 │ │ + local.set 29 │ │ + local.get 4 │ │ + local.get 29 │ │ i32.store offset=28 │ │ br 2 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 41 │ │ - i32.const 1 │ │ - local.set 42 │ │ - local.get 41 │ │ - local.get 42 │ │ - i32.add │ │ - local.set 43 │ │ - local.get 6 │ │ - i32.load offset=16 │ │ - local.set 44 │ │ - i32.const 1 │ │ - local.set 45 │ │ - local.get 44 │ │ - local.get 45 │ │ + local.get 4 │ │ + i32.load offset=20 │ │ + local.set 30 │ │ + i32.const -1 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ i32.add │ │ - local.set 46 │ │ - local.get 6 │ │ - i32.load offset=12 │ │ - local.set 47 │ │ - i32.const 1 │ │ - local.set 48 │ │ - local.get 47 │ │ - local.get 48 │ │ - i32.sub │ │ - local.set 49 │ │ - local.get 43 │ │ - local.get 46 │ │ - local.get 49 │ │ - call $memcmp │ │ - local.set 50 │ │ - block ;; label = @3 │ │ - local.get 50 │ │ - br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + local.set 32 │ │ + local.get 4 │ │ + local.get 32 │ │ + i32.store offset=20 │ │ + end │ │ + local.get 4 │ │ + i32.load offset=20 │ │ + local.set 33 │ │ + local.get 4 │ │ + local.get 33 │ │ + i32.store offset=12 │ │ + block ;; label = @2 │ │ + loop ;; label = @3 │ │ + local.get 4 │ │ + i32.load offset=12 │ │ + local.set 34 │ │ + local.get 4 │ │ + i32.load offset=16 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.set 36 │ │ + local.get 35 │ │ + local.set 37 │ │ + local.get 36 │ │ + local.get 37 │ │ + i32.ge_u │ │ + local.set 38 │ │ + i32.const 1 │ │ + local.set 39 │ │ + local.get 38 │ │ + local.get 39 │ │ + i32.and │ │ + local.set 40 │ │ + local.get 40 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + local.get 4 │ │ + i32.load offset=12 │ │ + local.set 41 │ │ + local.get 41 │ │ + i32.load8_u │ │ + local.set 42 │ │ + i32.const 255 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.get 43 │ │ + i32.and │ │ + local.set 44 │ │ + i32.const 0 │ │ + local.set 45 │ │ + local.get 45 │ │ + i32.load8_u offset=22957 │ │ + local.set 46 │ │ + i32.const 24 │ │ + local.set 47 │ │ + local.get 46 │ │ + local.get 47 │ │ + i32.shl │ │ + local.set 48 │ │ + local.get 48 │ │ + local.get 47 │ │ + i32.shr_s │ │ + local.set 49 │ │ + local.get 44 │ │ + local.set 50 │ │ + local.get 49 │ │ local.set 51 │ │ - local.get 6 │ │ + local.get 50 │ │ local.get 51 │ │ - i32.store offset=28 │ │ - br 2 (;@1;) │ │ + i32.eq │ │ + local.set 52 │ │ + i32.const 1 │ │ + local.set 53 │ │ + local.get 52 │ │ + local.get 53 │ │ + i32.and │ │ + local.set 54 │ │ + block ;; label = @4 │ │ + local.get 54 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 4 │ │ + i32.load offset=12 │ │ + local.set 55 │ │ + local.get 55 │ │ + i32.load align=1 │ │ + local.set 56 │ │ + i32.const 101010256 │ │ + local.set 57 │ │ + local.get 56 │ │ + local.get 57 │ │ + i32.ne │ │ + local.set 58 │ │ + block ;; label = @5 │ │ + local.get 58 │ │ + br_if 0 (;@5;) │ │ + local.get 4 │ │ + i32.load offset=12 │ │ + local.set 59 │ │ + local.get 4 │ │ + local.get 59 │ │ + i32.store offset=28 │ │ + br 4 (;@1;) │ │ + end │ │ + end │ │ + local.get 4 │ │ + i32.load offset=12 │ │ + local.set 60 │ │ + i32.const -1 │ │ + local.set 61 │ │ + local.get 60 │ │ + local.get 61 │ │ + i32.add │ │ + local.set 62 │ │ + local.get 4 │ │ + local.get 62 │ │ + i32.store offset=12 │ │ + br 0 (;@3;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 52 │ │ - i32.const 1 │ │ - local.set 53 │ │ - local.get 52 │ │ - local.get 53 │ │ - i32.add │ │ - local.set 54 │ │ - local.get 6 │ │ - local.get 54 │ │ - i32.store offset=8 │ │ - br 0 (;@2;) │ │ end │ │ + i32.const 0 │ │ + local.set 63 │ │ + local.get 4 │ │ + local.get 63 │ │ + i32.store offset=28 │ │ end │ │ - local.get 6 │ │ + local.get 4 │ │ i32.load offset=28 │ │ - local.set 55 │ │ + local.set 64 │ │ i32.const 32 │ │ - local.set 56 │ │ - local.get 6 │ │ - local.get 56 │ │ + local.set 65 │ │ + local.get 4 │ │ + local.get 65 │ │ i32.add │ │ - local.set 57 │ │ - local.get 57 │ │ + local.set 66 │ │ + local.get 66 │ │ global.set $__stack_pointer │ │ - local.get 55 │ │ + local.get 64 │ │ return) │ │ - (func $_zip_read_cdir (type 20) (param i32 i32 i64 i32) (result i32) │ │ - (local i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $_zip_read_cdir (type 77) (param i32 i32 i64 i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 4 │ │ - i32.const 112 │ │ local.set 5 │ │ - local.get 4 │ │ - local.get 5 │ │ - i32.sub │ │ + i32.const 112 │ │ local.set 6 │ │ + local.get 5 │ │ local.get 6 │ │ + i32.sub │ │ + local.set 7 │ │ + local.get 7 │ │ global.set $__stack_pointer │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 0 │ │ i32.store offset=104 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 1 │ │ i32.store offset=100 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 2 │ │ i64.store offset=88 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 3 │ │ i32.store offset=84 │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 7 │ │ local.get 7 │ │ - call $_zip_buffer_offset │ │ + local.get 4 │ │ + i32.store offset=80 │ │ + local.get 7 │ │ + i32.load offset=100 │ │ local.set 8 │ │ - local.get 6 │ │ local.get 8 │ │ - i64.store offset=48 │ │ - local.get 6 │ │ - i32.load offset=100 │ │ + call $_zip_buffer_offset │ │ local.set 9 │ │ + local.get 7 │ │ local.get 9 │ │ - call $_zip_buffer_left │ │ + i64.store offset=48 │ │ + i32.const 0 │ │ local.set 10 │ │ - i64.const 22 │ │ - local.set 11 │ │ + local.get 7 │ │ local.get 10 │ │ + i32.store8 offset=43 │ │ + local.get 7 │ │ + i32.load offset=84 │ │ + local.set 11 │ │ + i32.const 0 │ │ local.set 12 │ │ local.get 11 │ │ - local.set 13 │ │ local.get 12 │ │ - local.get 13 │ │ - i64.lt_u │ │ + i32.store │ │ + local.get 7 │ │ + i32.load offset=100 │ │ + local.set 13 │ │ + local.get 7 │ │ + i64.load offset=88 │ │ local.set 14 │ │ - i32.const 1 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ local.set 15 │ │ + local.get 13 │ │ local.get 14 │ │ local.get 15 │ │ - i32.and │ │ + call $_zip_read_eocd │ │ local.set 16 │ │ + local.get 7 │ │ + local.get 16 │ │ + i32.store offset=76 │ │ + i32.const 0 │ │ + local.set 17 │ │ + local.get 16 │ │ + local.set 18 │ │ + local.get 17 │ │ + local.set 19 │ │ + local.get 18 │ │ + local.get 19 │ │ + i32.eq │ │ + local.set 20 │ │ + i32.const 1 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.get 21 │ │ + i32.and │ │ + local.set 22 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 16 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 17 │ │ - i32.const 19 │ │ - local.set 18 │ │ - i32.const 0 │ │ - local.set 19 │ │ - local.get 17 │ │ - local.get 18 │ │ - local.get 19 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 20 │ │ - local.get 6 │ │ - local.get 20 │ │ - i32.store offset=108 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 21 │ │ - i64.const 4 │ │ - local.set 22 │ │ - local.get 21 │ │ - local.get 22 │ │ - call $_zip_buffer_get │ │ - local.set 23 │ │ - local.get 23 │ │ - i32.load align=1 │ │ - local.set 24 │ │ - i32.const 101010256 │ │ - local.set 25 │ │ - local.get 24 │ │ - local.get 25 │ │ - i32.ne │ │ - local.set 26 │ │ - block ;; label = @2 │ │ - local.get 26 │ │ + local.get 22 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 27 │ │ - i32.const 19 │ │ - local.set 28 │ │ i32.const 0 │ │ - local.set 29 │ │ - local.get 27 │ │ - local.get 28 │ │ - local.get 29 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 30 │ │ - local.get 6 │ │ - local.get 30 │ │ - i32.store offset=108 │ │ + local.set 23 │ │ + i32.const 1 │ │ + local.set 24 │ │ + local.get 23 │ │ + local.get 24 │ │ + i32.and │ │ + local.set 25 │ │ + local.get 7 │ │ + local.get 25 │ │ + i32.store8 offset=111 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=48 │ │ - local.set 31 │ │ + local.set 26 │ │ i64.const 20 │ │ - local.set 32 │ │ - local.get 31 │ │ - local.set 33 │ │ - local.get 32 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.get 34 │ │ + local.set 27 │ │ + local.get 26 │ │ + local.set 28 │ │ + local.get 27 │ │ + local.set 29 │ │ + local.get 28 │ │ + local.get 29 │ │ i64.ge_u │ │ - local.set 35 │ │ + local.set 30 │ │ i32.const 1 │ │ - local.set 36 │ │ - local.get 35 │ │ - local.get 36 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ i32.and │ │ - local.set 37 │ │ + local.set 32 │ │ block ;; label = @2 │ │ + local.get 32 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=100 │ │ + local.set 33 │ │ + local.get 33 │ │ + call $_zip_buffer_data │ │ + local.set 34 │ │ + local.get 7 │ │ + i64.load offset=48 │ │ + local.set 35 │ │ + local.get 35 │ │ + i32.wrap_i64 │ │ + local.set 36 │ │ + local.get 34 │ │ + local.get 36 │ │ + i32.add │ │ + local.set 37 │ │ + i32.const -20 │ │ + local.set 38 │ │ + local.get 37 │ │ + local.get 38 │ │ + i32.add │ │ + local.set 39 │ │ + local.get 39 │ │ + i32.load align=1 │ │ + local.set 40 │ │ + i32.const 117853008 │ │ + local.set 41 │ │ + local.get 40 │ │ + local.get 41 │ │ + i32.ne │ │ + local.set 42 │ │ + local.get 42 │ │ + br_if 0 (;@2;) │ │ + i32.const 1 │ │ + local.set 43 │ │ + local.get 7 │ │ + local.get 43 │ │ + i32.store8 offset=43 │ │ + local.get 7 │ │ + i32.load offset=100 │ │ + local.set 44 │ │ + local.get 7 │ │ + i64.load offset=48 │ │ + local.set 45 │ │ + i64.const -20 │ │ + local.set 46 │ │ + local.get 45 │ │ + local.get 46 │ │ + i64.add │ │ + local.set 47 │ │ + local.get 44 │ │ + local.get 47 │ │ + call $_zip_buffer_set_offset │ │ + drop │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 48 │ │ + local.get 7 │ │ + i32.load offset=104 │ │ + local.set 49 │ │ + local.get 49 │ │ + i32.load │ │ + local.set 50 │ │ + local.get 7 │ │ + i32.load offset=100 │ │ + local.set 51 │ │ + local.get 7 │ │ + i64.load offset=88 │ │ + local.set 52 │ │ + local.get 49 │ │ + i32.load offset=20 │ │ + local.set 53 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 54 │ │ + local.get 48 │ │ + local.get 50 │ │ + local.get 51 │ │ + local.get 52 │ │ + local.get 53 │ │ + local.get 54 │ │ + call $_zip_read_eocd64 │ │ + local.set 55 │ │ + i32.const 2 │ │ + local.set 56 │ │ + local.get 55 │ │ + local.get 56 │ │ + i32.gt_u │ │ + drop │ │ block ;; label = @3 │ │ - local.get 37 │ │ + block ;; label = @4 │ │ + block ;; label = @5 │ │ + block ;; label = @6 │ │ + local.get 55 │ │ + br_table 0 (;@6;) 1 (;@5;) 2 (;@4;) 3 (;@3;) │ │ + end │ │ + br 2 (;@3;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 57 │ │ + local.get 57 │ │ + call $_zip_cdir_free │ │ + i32.const 1 │ │ + local.set 58 │ │ + i32.const 1 │ │ + local.set 59 │ │ + local.get 58 │ │ + local.get 59 │ │ + i32.and │ │ + local.set 60 │ │ + local.get 7 │ │ + local.get 60 │ │ + i32.store8 offset=111 │ │ + br 3 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 61 │ │ + local.get 61 │ │ + call $_zip_cdir_free │ │ + i32.const 0 │ │ + local.set 62 │ │ + i32.const 1 │ │ + local.set 63 │ │ + local.get 62 │ │ + local.get 63 │ │ + i32.and │ │ + local.set 64 │ │ + local.get 7 │ │ + local.get 64 │ │ + i32.store8 offset=111 │ │ + br 2 (;@1;) │ │ + end │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 65 │ │ + local.get 65 │ │ + i32.load offset=28 │ │ + local.set 66 │ │ + block ;; label = @2 │ │ + block ;; label = @3 │ │ + local.get 66 │ │ + br_if 0 (;@3;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 67 │ │ + local.get 67 │ │ + i32.load offset=24 │ │ + local.set 68 │ │ + local.get 68 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + end │ │ + local.get 7 │ │ + i32.load8_u offset=43 │ │ + local.set 69 │ │ + i32.const 1 │ │ + local.set 70 │ │ + local.get 69 │ │ + local.get 70 │ │ + i32.and │ │ + local.set 71 │ │ + local.get 71 │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 72 │ │ + local.get 72 │ │ + i32.load offset=28 │ │ + local.set 73 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 74 │ │ + local.get 74 │ │ + i32.load offset=24 │ │ + local.set 75 │ │ + local.get 73 │ │ + local.set 76 │ │ + local.get 75 │ │ + local.set 77 │ │ + local.get 76 │ │ + local.get 77 │ │ + i32.ne │ │ + local.set 78 │ │ + i32.const 1 │ │ + local.set 79 │ │ + local.get 78 │ │ + local.get 79 │ │ + i32.and │ │ + local.set 80 │ │ + local.get 80 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 81 │ │ + local.get 81 │ │ + i32.load offset=24 │ │ + local.set 82 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 83 │ │ + local.get 83 │ │ + i32.load offset=28 │ │ + local.set 84 │ │ + local.get 82 │ │ + local.set 85 │ │ + local.get 84 │ │ + local.set 86 │ │ + local.get 85 │ │ + local.get 86 │ │ + i32.lt_u │ │ + local.set 87 │ │ + i32.const 1 │ │ + local.set 88 │ │ + local.get 87 │ │ + local.get 88 │ │ + i32.and │ │ + local.set 89 │ │ + block ;; label = @3 │ │ + local.get 89 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 38 │ │ - local.get 38 │ │ - call $_zip_buffer_data │ │ - local.set 39 │ │ - local.get 6 │ │ - i64.load offset=48 │ │ - local.set 40 │ │ - local.get 40 │ │ - i32.wrap_i64 │ │ - local.set 41 │ │ - local.get 39 │ │ - local.get 41 │ │ - i32.add │ │ - local.set 42 │ │ - i32.const -20 │ │ - local.set 43 │ │ - local.get 42 │ │ - local.get 43 │ │ - i32.add │ │ - local.set 44 │ │ - local.get 44 │ │ - i32.load align=1 │ │ - local.set 45 │ │ - i32.const 117853008 │ │ - local.set 46 │ │ - local.get 45 │ │ - local.get 46 │ │ - i32.ne │ │ - local.set 47 │ │ - local.get 47 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 90 │ │ + local.get 90 │ │ + call $_zip_cdir_free │ │ + i32.const 0 │ │ + local.set 91 │ │ + i32.const 1 │ │ + local.set 92 │ │ + local.get 91 │ │ + local.get 92 │ │ + i32.and │ │ + local.set 93 │ │ + local.get 7 │ │ + local.get 93 │ │ + i32.store8 offset=111 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 94 │ │ + local.get 94 │ │ + i64.load offset=48 │ │ + local.set 95 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 96 │ │ + local.get 96 │ │ + i64.load offset=64 │ │ + local.set 97 │ │ + local.get 95 │ │ + local.set 98 │ │ + local.get 97 │ │ + local.set 99 │ │ + local.get 98 │ │ + local.get 99 │ │ + i64.le_u │ │ + local.set 100 │ │ + i32.const 1 │ │ + local.set 101 │ │ + local.get 100 │ │ + local.get 101 │ │ + i32.and │ │ + local.set 102 │ │ + block ;; label = @3 │ │ + local.get 102 │ │ + i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 48 │ │ - local.get 6 │ │ - i64.load offset=48 │ │ - local.set 49 │ │ - i64.const 20 │ │ - local.set 50 │ │ - local.get 49 │ │ - local.get 50 │ │ - i64.sub │ │ - local.set 51 │ │ - local.get 48 │ │ - local.get 51 │ │ - call $_zip_buffer_set_offset │ │ - drop │ │ - local.get 6 │ │ - i32.load offset=104 │ │ - local.set 52 │ │ - local.get 52 │ │ - i32.load │ │ - local.set 53 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 103 │ │ + local.get 103 │ │ + call $_zip_cdir_free │ │ + i32.const 0 │ │ + local.set 104 │ │ + i32.const 1 │ │ + local.set 105 │ │ + local.get 104 │ │ + local.get 105 │ │ + i32.and │ │ + local.set 106 │ │ + local.get 7 │ │ + local.get 106 │ │ + i32.store8 offset=111 │ │ + br 2 (;@1;) │ │ + end │ │ + end │ │ + local.get 7 │ │ + i32.load8_u offset=43 │ │ + local.set 107 │ │ + i32.const 1 │ │ + local.set 108 │ │ + local.get 107 │ │ + local.get 108 │ │ + i32.and │ │ + local.set 109 │ │ + block ;; label = @2 │ │ + local.get 109 │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 110 │ │ + local.get 110 │ │ + i32.load offset=24 │ │ + local.set 111 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 111 │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 112 │ │ + local.get 112 │ │ + i32.load offset=28 │ │ + local.set 113 │ │ + local.get 113 │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 114 │ │ + local.get 114 │ │ + i64.load offset=64 │ │ + local.set 115 │ │ + i64.const 0 │ │ + local.set 116 │ │ + local.get 115 │ │ + local.set 117 │ │ + local.get 116 │ │ + local.set 118 │ │ + local.get 117 │ │ + local.get 118 │ │ + i64.eq │ │ + local.set 119 │ │ + i32.const 1 │ │ + local.set 120 │ │ + local.get 119 │ │ + local.get 120 │ │ + i32.and │ │ + local.set 121 │ │ + local.get 121 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 122 │ │ + local.get 122 │ │ + i64.load offset=56 │ │ + local.set 123 │ │ + i64.const 0 │ │ + local.set 124 │ │ + local.get 123 │ │ + local.set 125 │ │ + local.get 124 │ │ + local.set 126 │ │ + local.get 125 │ │ + local.get 126 │ │ + i64.eq │ │ + local.set 127 │ │ + i32.const 1 │ │ + local.set 128 │ │ + local.get 127 │ │ + local.get 128 │ │ + i32.and │ │ + local.set 129 │ │ + local.get 129 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 130 │ │ + local.get 130 │ │ + i64.load offset=40 │ │ + local.set 131 │ │ + i64.const 0 │ │ + local.set 132 │ │ + local.get 131 │ │ + local.set 133 │ │ + local.get 132 │ │ + local.set 134 │ │ + local.get 133 │ │ + local.get 134 │ │ + i64.eq │ │ + local.set 135 │ │ + i32.const 1 │ │ + local.set 136 │ │ + local.get 135 │ │ + local.get 136 │ │ + i32.and │ │ + local.set 137 │ │ + local.get 137 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + br 1 (;@3;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 138 │ │ + local.get 138 │ │ + i64.load offset=56 │ │ + local.set 139 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 54 │ │ - local.get 6 │ │ + local.set 140 │ │ + local.get 7 │ │ i64.load offset=88 │ │ - local.set 55 │ │ - local.get 6 │ │ + local.set 141 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 56 │ │ - local.get 56 │ │ - i32.load offset=20 │ │ - local.set 57 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 58 │ │ - local.get 53 │ │ - local.get 54 │ │ - local.get 55 │ │ - local.get 57 │ │ - local.get 58 │ │ - call $_zip_read_eocd64 │ │ - local.set 59 │ │ - local.get 6 │ │ - local.get 59 │ │ - i32.store offset=80 │ │ - br 1 (;@2;) │ │ + local.set 142 │ │ + local.get 142 │ │ + i32.load │ │ + local.set 143 │ │ + i32.const 22967 │ │ + local.set 144 │ │ + local.get 139 │ │ + local.get 140 │ │ + local.get 141 │ │ + local.get 143 │ │ + local.get 144 │ │ + call $check_magic │ │ + local.set 145 │ │ + i32.const 1 │ │ + local.set 146 │ │ + local.get 145 │ │ + local.get 146 │ │ + i32.and │ │ + local.set 147 │ │ + block ;; label = @4 │ │ + local.get 147 │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 148 │ │ + local.get 148 │ │ + call $_zip_cdir_free │ │ + i32.const 0 │ │ + local.set 149 │ │ + i32.const 1 │ │ + local.set 150 │ │ + local.get 149 │ │ + local.get 150 │ │ + i32.and │ │ + local.set 151 │ │ + local.get 7 │ │ + local.get 151 │ │ + i32.store8 offset=111 │ │ + br 3 (;@1;) │ │ + end │ │ end │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 60 │ │ - local.get 6 │ │ - i64.load offset=48 │ │ - local.set 61 │ │ - local.get 60 │ │ - local.get 61 │ │ - call $_zip_buffer_set_offset │ │ - drop │ │ - local.get 6 │ │ - i32.load offset=100 │ │ - local.set 62 │ │ - local.get 6 │ │ - i64.load offset=88 │ │ - local.set 63 │ │ - local.get 6 │ │ - i32.load offset=104 │ │ - local.set 64 │ │ - local.get 64 │ │ - i32.load offset=20 │ │ - local.set 65 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 66 │ │ - local.get 62 │ │ - local.get 63 │ │ - local.get 65 │ │ - local.get 66 │ │ - call $_zip_read_eocd │ │ - local.set 67 │ │ - local.get 6 │ │ - local.get 67 │ │ - i32.store offset=80 │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 152 │ │ + local.get 7 │ │ + i32.load offset=104 │ │ + local.set 153 │ │ + local.get 153 │ │ + i32.load offset=20 │ │ + local.set 154 │ │ + local.get 7 │ │ i32.load offset=80 │ │ - local.set 68 │ │ - i32.const 0 │ │ - local.set 69 │ │ - local.get 68 │ │ - local.set 70 │ │ - local.get 69 │ │ - local.set 71 │ │ - local.get 70 │ │ - local.get 71 │ │ - i32.eq │ │ - local.set 72 │ │ + local.set 155 │ │ + local.get 152 │ │ + local.get 154 │ │ + local.get 155 │ │ + call $check_eocd │ │ + local.set 156 │ │ i32.const 1 │ │ - local.set 73 │ │ - local.get 72 │ │ - local.get 73 │ │ + local.set 157 │ │ + local.get 156 │ │ + local.get 157 │ │ i32.and │ │ - local.set 74 │ │ + local.set 158 │ │ block ;; label = @2 │ │ - local.get 74 │ │ - i32.eqz │ │ + local.get 158 │ │ br_if 0 (;@2;) │ │ - i32.const 0 │ │ - local.set 75 │ │ - local.get 6 │ │ - local.get 75 │ │ - i32.store offset=108 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 159 │ │ + local.get 159 │ │ + call $_zip_cdir_free │ │ + i32.const 1 │ │ + local.set 160 │ │ + i32.const 1 │ │ + local.set 161 │ │ + local.get 160 │ │ + local.get 161 │ │ + i32.and │ │ + local.set 162 │ │ + local.get 7 │ │ + local.get 162 │ │ + i32.store8 offset=111 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 76 │ │ - local.get 6 │ │ + local.set 163 │ │ + local.get 7 │ │ i64.load offset=48 │ │ - local.set 77 │ │ + local.set 164 │ │ i64.const 20 │ │ - local.set 78 │ │ - local.get 77 │ │ - local.get 78 │ │ + local.set 165 │ │ + local.get 164 │ │ + local.get 165 │ │ i64.add │ │ - local.set 79 │ │ - local.get 76 │ │ - local.get 79 │ │ + local.set 166 │ │ + local.get 163 │ │ + local.get 166 │ │ call $_zip_buffer_set_offset │ │ drop │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 80 │ │ - local.get 80 │ │ + local.set 167 │ │ + local.get 167 │ │ call $_zip_buffer_get_16 │ │ - local.set 81 │ │ - local.get 6 │ │ - local.get 81 │ │ - i32.store16 offset=78 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 82 │ │ - local.get 82 │ │ - i64.load offset=32 │ │ - local.set 83 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 84 │ │ - local.get 84 │ │ - i64.load offset=24 │ │ - local.set 85 │ │ - local.get 83 │ │ - local.get 85 │ │ + local.set 168 │ │ + local.get 7 │ │ + local.get 168 │ │ + i32.store16 offset=74 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 169 │ │ + local.get 169 │ │ + i64.load offset=56 │ │ + local.set 170 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 171 │ │ + local.get 171 │ │ + i64.load offset=48 │ │ + local.set 172 │ │ + local.get 170 │ │ + local.get 172 │ │ i64.add │ │ - local.set 86 │ │ - local.get 6 │ │ + local.set 173 │ │ + local.get 7 │ │ i64.load offset=88 │ │ - local.set 87 │ │ - local.get 6 │ │ + local.set 174 │ │ + local.get 7 │ │ i64.load offset=48 │ │ - local.set 88 │ │ - local.get 87 │ │ - local.get 88 │ │ + local.set 175 │ │ + local.get 174 │ │ + local.get 175 │ │ i64.add │ │ - local.set 89 │ │ - local.get 86 │ │ - local.set 90 │ │ - local.get 89 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.get 91 │ │ + local.set 176 │ │ + local.get 173 │ │ + local.set 177 │ │ + local.get 176 │ │ + local.set 178 │ │ + local.get 177 │ │ + local.get 178 │ │ i64.gt_u │ │ - local.set 92 │ │ + local.set 179 │ │ i32.const 1 │ │ - local.set 93 │ │ - local.get 92 │ │ - local.get 93 │ │ + local.set 180 │ │ + local.get 179 │ │ + local.get 180 │ │ i32.and │ │ - local.set 94 │ │ + local.set 181 │ │ block ;; label = @2 │ │ - local.get 94 │ │ + local.get 181 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 95 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 182 │ │ i32.const 21 │ │ - local.set 96 │ │ + local.set 183 │ │ i32.const 1 │ │ - local.set 97 │ │ - local.get 95 │ │ - local.get 96 │ │ - local.get 97 │ │ + local.set 184 │ │ + local.get 182 │ │ + local.get 183 │ │ + local.get 184 │ │ call $zip_error_set │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 98 │ │ - local.get 98 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 185 │ │ + local.get 185 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 99 │ │ - local.get 6 │ │ - local.get 99 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 186 │ │ + i32.const 1 │ │ + local.set 187 │ │ + local.get 186 │ │ + local.get 187 │ │ + i32.and │ │ + local.set 188 │ │ + local.get 7 │ │ + local.get 188 │ │ + i32.store8 offset=111 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 100 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 189 │ │ i32.const 65535 │ │ - local.set 101 │ │ - local.get 100 │ │ - local.get 101 │ │ + local.set 190 │ │ + local.get 189 │ │ + local.get 190 │ │ i32.and │ │ - local.set 102 │ │ + local.set 191 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 102 │ │ + local.get 191 │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 103 │ │ - local.get 103 │ │ + local.set 192 │ │ + local.get 192 │ │ i32.load offset=4 │ │ - local.set 104 │ │ + local.set 193 │ │ i32.const 4 │ │ - local.set 105 │ │ - local.get 104 │ │ - local.get 105 │ │ + local.set 194 │ │ + local.get 193 │ │ + local.get 194 │ │ i32.and │ │ - local.set 106 │ │ - local.get 106 │ │ + local.set 195 │ │ + local.get 195 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 107 │ │ - local.get 6 │ │ + local.set 196 │ │ + local.get 7 │ │ i64.load offset=48 │ │ - local.set 108 │ │ + local.set 197 │ │ i64.const 22 │ │ - local.set 109 │ │ - local.get 108 │ │ - local.get 109 │ │ + local.set 198 │ │ + local.get 197 │ │ + local.get 198 │ │ i64.add │ │ - local.set 110 │ │ - local.get 107 │ │ - local.get 110 │ │ + local.set 199 │ │ + local.get 196 │ │ + local.get 199 │ │ call $_zip_buffer_set_offset │ │ drop │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 111 │ │ - local.get 111 │ │ + local.set 200 │ │ + local.get 200 │ │ call $_zip_buffer_left │ │ - local.set 112 │ │ - local.get 6 │ │ - local.get 112 │ │ + local.set 201 │ │ + local.get 7 │ │ + local.get 201 │ │ i64.store offset=32 │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=32 │ │ - local.set 113 │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 114 │ │ + local.set 202 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 203 │ │ i32.const 65535 │ │ - local.set 115 │ │ - local.get 114 │ │ - local.get 115 │ │ + local.set 204 │ │ + local.get 203 │ │ + local.get 204 │ │ i32.and │ │ - local.set 116 │ │ - local.get 116 │ │ + local.set 205 │ │ + local.get 205 │ │ i64.extend_i32_u │ │ - local.set 117 │ │ - local.get 113 │ │ - local.set 118 │ │ - local.get 117 │ │ - local.set 119 │ │ - local.get 118 │ │ - local.get 119 │ │ - i64.lt_u │ │ - local.set 120 │ │ + local.set 206 │ │ + local.get 202 │ │ + local.set 207 │ │ + local.get 206 │ │ + local.set 208 │ │ + local.get 207 │ │ + local.get 208 │ │ + i64.ne │ │ + local.set 209 │ │ i32.const 1 │ │ - local.set 121 │ │ - local.get 120 │ │ - local.get 121 │ │ + local.set 210 │ │ + local.get 209 │ │ + local.get 210 │ │ i32.and │ │ - local.set 122 │ │ + local.set 211 │ │ block ;; label = @3 │ │ + local.get 211 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ + local.get 7 │ │ + i32.load offset=104 │ │ + local.set 212 │ │ + local.get 212 │ │ + i32.load offset=4 │ │ + local.set 213 │ │ + i32.const 4 │ │ + local.set 214 │ │ + local.get 213 │ │ + local.get 214 │ │ + i32.and │ │ + local.set 215 │ │ block ;; label = @4 │ │ - local.get 122 │ │ - br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=104 │ │ - local.set 123 │ │ - local.get 123 │ │ - i32.load offset=4 │ │ - local.set 124 │ │ - i32.const 4 │ │ - local.set 125 │ │ - local.get 124 │ │ - local.get 125 │ │ - i32.and │ │ - local.set 126 │ │ - local.get 126 │ │ + local.get 215 │ │ i32.eqz │ │ - br_if 1 (;@3;) │ │ - local.get 6 │ │ - i64.load offset=32 │ │ - local.set 127 │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 128 │ │ - i32.const 65535 │ │ - local.set 129 │ │ - local.get 128 │ │ - local.get 129 │ │ - i32.and │ │ - local.set 130 │ │ - local.get 130 │ │ - i64.extend_i32_u │ │ - local.set 131 │ │ - local.get 127 │ │ - local.set 132 │ │ - local.get 131 │ │ - local.set 133 │ │ - local.get 132 │ │ - local.get 133 │ │ - i64.ne │ │ - local.set 134 │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 216 │ │ + i32.const 21 │ │ + local.set 217 │ │ + i32.const 2 │ │ + local.set 218 │ │ + local.get 216 │ │ + local.get 217 │ │ + local.get 218 │ │ + call $zip_error_set │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 219 │ │ + local.get 219 │ │ + call $_zip_cdir_free │ │ i32.const 1 │ │ - local.set 135 │ │ - local.get 134 │ │ - local.get 135 │ │ + local.set 220 │ │ + i32.const 1 │ │ + local.set 221 │ │ + local.get 220 │ │ + local.get 221 │ │ i32.and │ │ - local.set 136 │ │ - local.get 136 │ │ + local.set 222 │ │ + local.get 7 │ │ + local.get 222 │ │ + i32.store8 offset=111 │ │ + br 3 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i64.load offset=32 │ │ + local.set 223 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 224 │ │ + i32.const 65535 │ │ + local.set 225 │ │ + local.get 224 │ │ + local.get 225 │ │ + i32.and │ │ + local.set 226 │ │ + local.get 226 │ │ + i64.extend_i32_u │ │ + local.set 227 │ │ + local.get 223 │ │ + local.set 228 │ │ + local.get 227 │ │ + local.set 229 │ │ + local.get 228 │ │ + local.get 229 │ │ + i64.lt_u │ │ + local.set 230 │ │ + i32.const 1 │ │ + local.set 231 │ │ + local.get 230 │ │ + local.get 231 │ │ + i32.and │ │ + local.set 232 │ │ + block ;; label = @4 │ │ + local.get 232 │ │ i32.eqz │ │ - br_if 1 (;@3;) │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i64.load offset=32 │ │ + local.set 233 │ │ + local.get 233 │ │ + i32.wrap_i64 │ │ + local.set 234 │ │ + local.get 7 │ │ + local.get 234 │ │ + i32.store16 offset=74 │ │ end │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 137 │ │ - i32.const 21 │ │ - local.set 138 │ │ - i32.const 2 │ │ - local.set 139 │ │ - local.get 137 │ │ - local.get 138 │ │ - local.get 139 │ │ - call $zip_error_set │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 140 │ │ - local.get 140 │ │ - call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 141 │ │ - local.get 6 │ │ - local.get 141 │ │ - i32.store offset=108 │ │ - br 2 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 142 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 235 │ │ i32.const 0 │ │ - local.set 143 │ │ + local.set 236 │ │ i32.const 65535 │ │ - local.set 144 │ │ - local.get 142 │ │ - local.get 144 │ │ + local.set 237 │ │ + local.get 235 │ │ + local.get 237 │ │ i32.and │ │ - local.set 145 │ │ + local.set 238 │ │ i32.const 65535 │ │ - local.set 146 │ │ - local.get 143 │ │ - local.get 146 │ │ + local.set 239 │ │ + local.get 236 │ │ + local.get 239 │ │ i32.and │ │ - local.set 147 │ │ - local.get 145 │ │ - local.get 147 │ │ + local.set 240 │ │ + local.get 238 │ │ + local.get 240 │ │ i32.ne │ │ - local.set 148 │ │ + local.set 241 │ │ i32.const 1 │ │ - local.set 149 │ │ - local.get 148 │ │ - local.get 149 │ │ + local.set 242 │ │ + local.get 241 │ │ + local.get 242 │ │ i32.and │ │ - local.set 150 │ │ + local.set 243 │ │ block ;; label = @3 │ │ - local.get 150 │ │ + local.get 243 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 151 │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 152 │ │ + local.set 244 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 245 │ │ i32.const 65535 │ │ - local.set 153 │ │ - local.get 152 │ │ - local.get 153 │ │ + local.set 246 │ │ + local.get 245 │ │ + local.get 246 │ │ i32.and │ │ - local.set 154 │ │ - local.get 154 │ │ + local.set 247 │ │ + local.get 247 │ │ i64.extend_i32_u │ │ - local.set 155 │ │ - local.get 151 │ │ - local.get 155 │ │ + local.set 248 │ │ + local.get 244 │ │ + local.get 248 │ │ call $_zip_buffer_get │ │ - local.set 156 │ │ - local.get 6 │ │ - i32.load16_u offset=78 │ │ - local.set 157 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 158 │ │ + local.set 249 │ │ + local.get 7 │ │ + i32.load16_u offset=74 │ │ + local.set 250 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 251 │ │ i32.const 0 │ │ - local.set 159 │ │ + local.set 252 │ │ i32.const 65535 │ │ - local.set 160 │ │ - local.get 157 │ │ - local.get 160 │ │ + local.set 253 │ │ + local.get 250 │ │ + local.get 253 │ │ i32.and │ │ - local.set 161 │ │ - local.get 156 │ │ - local.get 161 │ │ - local.get 159 │ │ - local.get 158 │ │ + local.set 254 │ │ + local.get 249 │ │ + local.get 254 │ │ + local.get 252 │ │ + local.get 251 │ │ call $_zip_string_new │ │ - local.set 162 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 163 │ │ - local.get 163 │ │ - local.get 162 │ │ - i32.store offset=40 │ │ + local.set 255 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 256 │ │ + local.get 256 │ │ + local.get 255 │ │ + i32.store offset=72 │ │ i32.const 0 │ │ - local.set 164 │ │ - local.get 162 │ │ - local.set 165 │ │ - local.get 164 │ │ - local.set 166 │ │ - local.get 165 │ │ - local.get 166 │ │ + local.set 257 │ │ + local.get 255 │ │ + local.set 258 │ │ + local.get 257 │ │ + local.set 259 │ │ + local.get 258 │ │ + local.get 259 │ │ i32.eq │ │ - local.set 167 │ │ + local.set 260 │ │ i32.const 1 │ │ - local.set 168 │ │ - local.get 167 │ │ - local.get 168 │ │ + local.set 261 │ │ + local.get 260 │ │ + local.get 261 │ │ i32.and │ │ - local.set 169 │ │ + local.set 262 │ │ block ;; label = @4 │ │ - local.get 169 │ │ + local.get 262 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 170 │ │ - local.get 170 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 263 │ │ + local.get 263 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 171 │ │ - local.get 6 │ │ - local.get 171 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 264 │ │ + i32.const 1 │ │ + local.set 265 │ │ + local.get 264 │ │ + local.get 265 │ │ + i32.and │ │ + local.set 266 │ │ + local.get 7 │ │ + local.get 266 │ │ + i32.store8 offset=111 │ │ br 3 (;@1;) │ │ end │ │ end │ │ end │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 172 │ │ - local.get 172 │ │ - i64.load offset=32 │ │ - local.set 173 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 267 │ │ + local.get 267 │ │ + i64.load offset=56 │ │ + local.set 268 │ │ + local.get 7 │ │ i64.load offset=88 │ │ - local.set 174 │ │ - local.get 173 │ │ - local.set 175 │ │ - local.get 174 │ │ - local.set 176 │ │ - local.get 175 │ │ - local.get 176 │ │ + local.set 269 │ │ + local.get 268 │ │ + local.set 270 │ │ + local.get 269 │ │ + local.set 271 │ │ + local.get 270 │ │ + local.get 271 │ │ i64.ge_u │ │ - local.set 177 │ │ + local.set 272 │ │ i32.const 1 │ │ - local.set 178 │ │ - local.get 177 │ │ - local.get 178 │ │ + local.set 273 │ │ + local.get 272 │ │ + local.get 273 │ │ i32.and │ │ - local.set 179 │ │ + local.set 274 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 179 │ │ + local.get 274 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 180 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 181 │ │ - local.get 181 │ │ - i64.load offset=32 │ │ - local.set 182 │ │ - local.get 6 │ │ + local.set 275 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 276 │ │ + local.get 276 │ │ + i64.load offset=56 │ │ + local.set 277 │ │ + local.get 7 │ │ i64.load offset=88 │ │ - local.set 183 │ │ - local.get 182 │ │ - local.get 183 │ │ + local.set 278 │ │ + local.get 277 │ │ + local.get 278 │ │ i64.sub │ │ - local.set 184 │ │ - local.get 180 │ │ - local.get 184 │ │ + local.set 279 │ │ + local.get 275 │ │ + local.get 279 │ │ call $_zip_buffer_set_offset │ │ drop │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=100 │ │ - local.set 185 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 186 │ │ - local.get 186 │ │ - i64.load offset=24 │ │ - local.set 187 │ │ - local.get 185 │ │ - local.get 187 │ │ + local.set 280 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 281 │ │ + local.get 281 │ │ + i64.load offset=48 │ │ + local.set 282 │ │ + local.get 280 │ │ + local.get 282 │ │ call $_zip_buffer_get │ │ - local.set 188 │ │ - local.get 6 │ │ - local.get 188 │ │ + local.set 283 │ │ + local.get 7 │ │ + local.get 283 │ │ i32.store offset=28 │ │ i32.const 0 │ │ - local.set 189 │ │ - local.get 188 │ │ - local.set 190 │ │ - local.get 189 │ │ - local.set 191 │ │ - local.get 190 │ │ - local.get 191 │ │ + local.set 284 │ │ + local.get 283 │ │ + local.set 285 │ │ + local.get 284 │ │ + local.set 286 │ │ + local.get 285 │ │ + local.get 286 │ │ i32.eq │ │ - local.set 192 │ │ + local.set 287 │ │ i32.const 1 │ │ - local.set 193 │ │ - local.get 192 │ │ - local.get 193 │ │ + local.set 288 │ │ + local.get 287 │ │ + local.get 288 │ │ i32.and │ │ - local.set 194 │ │ + local.set 289 │ │ block ;; label = @4 │ │ - local.get 194 │ │ + local.get 289 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 195 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 290 │ │ i32.const 21 │ │ - local.set 196 │ │ + local.set 291 │ │ i32.const 3 │ │ - local.set 197 │ │ - local.get 195 │ │ - local.get 196 │ │ - local.get 197 │ │ + local.set 292 │ │ + local.get 290 │ │ + local.get 291 │ │ + local.get 292 │ │ call $zip_error_set │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 198 │ │ - local.get 198 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 293 │ │ + local.get 293 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 199 │ │ - local.get 6 │ │ - local.get 199 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 294 │ │ + i32.const 1 │ │ + local.set 295 │ │ + local.get 294 │ │ + local.get 295 │ │ + i32.and │ │ + local.set 296 │ │ + local.get 7 │ │ + local.get 296 │ │ + i32.store8 offset=111 │ │ br 3 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=28 │ │ - local.set 200 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 201 │ │ - local.get 201 │ │ - i64.load offset=24 │ │ - local.set 202 │ │ - local.get 200 │ │ - local.get 202 │ │ + local.set 297 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 298 │ │ + local.get 298 │ │ + i64.load offset=48 │ │ + local.set 299 │ │ + local.get 297 │ │ + local.get 299 │ │ call $_zip_buffer_new │ │ - local.set 203 │ │ - local.get 6 │ │ - local.get 203 │ │ + local.set 300 │ │ + local.get 7 │ │ + local.get 300 │ │ i32.store offset=44 │ │ i32.const 0 │ │ - local.set 204 │ │ - local.get 203 │ │ - local.set 205 │ │ - local.get 204 │ │ - local.set 206 │ │ - local.get 205 │ │ - local.get 206 │ │ + local.set 301 │ │ + local.get 300 │ │ + local.set 302 │ │ + local.get 301 │ │ + local.set 303 │ │ + local.get 302 │ │ + local.get 303 │ │ i32.eq │ │ - local.set 207 │ │ + local.set 304 │ │ i32.const 1 │ │ - local.set 208 │ │ - local.get 207 │ │ - local.get 208 │ │ + local.set 305 │ │ + local.get 304 │ │ + local.get 305 │ │ i32.and │ │ - local.set 209 │ │ + local.set 306 │ │ block ;; label = @4 │ │ - local.get 209 │ │ + local.get 306 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 210 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 307 │ │ i32.const 14 │ │ - local.set 211 │ │ + local.set 308 │ │ i32.const 0 │ │ - local.set 212 │ │ - local.get 210 │ │ - local.get 211 │ │ - local.get 212 │ │ + local.set 309 │ │ + local.get 307 │ │ + local.get 308 │ │ + local.get 309 │ │ call $zip_error_set │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 213 │ │ - local.get 213 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 310 │ │ + local.get 310 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 214 │ │ - local.get 6 │ │ - local.get 214 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 311 │ │ + i32.const 1 │ │ + local.set 312 │ │ + local.get 311 │ │ + local.get 312 │ │ + i32.and │ │ + local.set 313 │ │ + local.get 7 │ │ + local.get 313 │ │ + i32.store8 offset=111 │ │ br 3 (;@1;) │ │ end │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ - local.set 215 │ │ - local.get 6 │ │ - local.get 215 │ │ + local.set 314 │ │ + local.get 7 │ │ + local.get 314 │ │ i32.store offset=44 │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 216 │ │ - local.get 216 │ │ + local.set 315 │ │ + local.get 315 │ │ i32.load │ │ - local.set 217 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 218 │ │ - local.get 218 │ │ - i64.load offset=32 │ │ - local.set 219 │ │ + local.set 316 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 317 │ │ + local.get 317 │ │ + i64.load offset=56 │ │ + local.set 318 │ │ i32.const 0 │ │ - local.set 220 │ │ - local.get 217 │ │ - local.get 219 │ │ - local.get 220 │ │ + local.set 319 │ │ + local.get 316 │ │ + local.get 318 │ │ + local.get 319 │ │ call $zip_source_seek │ │ - local.set 221 │ │ + local.set 320 │ │ i32.const 0 │ │ - local.set 222 │ │ - local.get 221 │ │ - local.set 223 │ │ - local.get 222 │ │ - local.set 224 │ │ - local.get 223 │ │ - local.get 224 │ │ + local.set 321 │ │ + local.get 320 │ │ + local.set 322 │ │ + local.get 321 │ │ + local.set 323 │ │ + local.get 322 │ │ + local.get 323 │ │ i32.lt_s │ │ - local.set 225 │ │ + local.set 324 │ │ i32.const 1 │ │ - local.set 226 │ │ - local.get 225 │ │ - local.get 226 │ │ + local.set 325 │ │ + local.get 324 │ │ + local.get 325 │ │ i32.and │ │ - local.set 227 │ │ + local.set 326 │ │ block ;; label = @3 │ │ - local.get 227 │ │ + local.get 326 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 228 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 327 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 229 │ │ - local.get 229 │ │ + local.set 328 │ │ + local.get 328 │ │ i32.load │ │ - local.set 230 │ │ - local.get 228 │ │ - local.get 230 │ │ + local.set 329 │ │ + local.get 327 │ │ + local.get 329 │ │ call $zip_error_set_from_source │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 231 │ │ - local.get 231 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 330 │ │ + local.get 330 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 232 │ │ - local.get 6 │ │ - local.get 232 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 331 │ │ + i32.const 1 │ │ + local.set 332 │ │ + local.get 331 │ │ + local.get 332 │ │ + i32.and │ │ + local.set 333 │ │ + local.get 7 │ │ + local.get 333 │ │ + i32.store8 offset=111 │ │ br 2 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 233 │ │ - local.get 233 │ │ + local.set 334 │ │ + local.get 334 │ │ i32.load │ │ - local.set 234 │ │ - local.get 234 │ │ + local.set 335 │ │ + local.get 335 │ │ call $zip_source_tell │ │ - local.set 235 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 236 │ │ - local.get 236 │ │ - i64.load offset=32 │ │ - local.set 237 │ │ - local.get 235 │ │ - local.set 238 │ │ - local.get 237 │ │ - local.set 239 │ │ - local.get 238 │ │ - local.get 239 │ │ + local.set 336 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 337 │ │ + local.get 337 │ │ + i64.load offset=56 │ │ + local.set 338 │ │ + local.get 336 │ │ + local.set 339 │ │ + local.get 338 │ │ + local.set 340 │ │ + local.get 339 │ │ + local.get 340 │ │ i64.ne │ │ - local.set 240 │ │ + local.set 341 │ │ i32.const 1 │ │ - local.set 241 │ │ - local.get 240 │ │ - local.get 241 │ │ + local.set 342 │ │ + local.get 341 │ │ + local.get 342 │ │ i32.and │ │ - local.set 242 │ │ + local.set 343 │ │ block ;; label = @3 │ │ - local.get 242 │ │ + local.get 343 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 243 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 344 │ │ i32.const 19 │ │ - local.set 244 │ │ + local.set 345 │ │ i32.const 0 │ │ - local.set 245 │ │ - local.get 243 │ │ - local.get 244 │ │ - local.get 245 │ │ + local.set 346 │ │ + local.get 344 │ │ + local.get 345 │ │ + local.get 346 │ │ call $zip_error_set │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 246 │ │ - local.get 246 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 347 │ │ + local.get 347 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 247 │ │ - local.get 6 │ │ - local.get 247 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 348 │ │ + i32.const 1 │ │ + local.set 349 │ │ + local.get 348 │ │ + local.get 349 │ │ + i32.and │ │ + local.set 350 │ │ + local.get 7 │ │ + local.get 350 │ │ + i32.store8 offset=111 │ │ br 2 (;@1;) │ │ end │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 351 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 352 │ │ + local.get 352 │ │ + i64.load offset=40 │ │ + local.set 353 │ │ + local.get 7 │ │ i32.load offset=80 │ │ - local.set 248 │ │ - local.get 248 │ │ - i64.load offset=24 │ │ - local.set 249 │ │ - local.get 6 │ │ - local.get 249 │ │ + local.set 354 │ │ + local.get 351 │ │ + local.get 353 │ │ + local.get 354 │ │ + call $_zip_cdir_grow │ │ + local.set 355 │ │ + i32.const 1 │ │ + local.set 356 │ │ + local.get 355 │ │ + local.get 356 │ │ + i32.and │ │ + local.set 357 │ │ + block ;; label = @2 │ │ + local.get 357 │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 358 │ │ + local.get 358 │ │ + call $_zip_cdir_free │ │ + local.get 7 │ │ + i32.load offset=44 │ │ + local.set 359 │ │ + local.get 359 │ │ + call $_zip_buffer_free │ │ + i32.const 1 │ │ + local.set 360 │ │ + i32.const 1 │ │ + local.set 361 │ │ + local.get 360 │ │ + local.get 361 │ │ + i32.and │ │ + local.set 362 │ │ + local.get 7 │ │ + local.get 362 │ │ + i32.store8 offset=111 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 363 │ │ + local.get 363 │ │ + i64.load offset=48 │ │ + local.set 364 │ │ + local.get 7 │ │ + local.get 364 │ │ i64.store offset=56 │ │ i64.const 0 │ │ - local.set 250 │ │ - local.get 6 │ │ - local.get 250 │ │ + local.set 365 │ │ + local.get 7 │ │ + local.get 365 │ │ i64.store offset=64 │ │ block ;; label = @2 │ │ loop ;; label = @3 │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=56 │ │ - local.set 251 │ │ + local.set 366 │ │ i64.const 0 │ │ - local.set 252 │ │ - local.get 251 │ │ - local.set 253 │ │ - local.get 252 │ │ - local.set 254 │ │ - local.get 253 │ │ - local.get 254 │ │ + local.set 367 │ │ + local.get 366 │ │ + local.set 368 │ │ + local.get 367 │ │ + local.set 369 │ │ + local.get 368 │ │ + local.get 369 │ │ i64.gt_u │ │ - local.set 255 │ │ + local.set 370 │ │ i32.const 1 │ │ - local.set 256 │ │ - local.get 255 │ │ - local.get 256 │ │ + local.set 371 │ │ + local.get 370 │ │ + local.get 371 │ │ i32.and │ │ - local.set 257 │ │ - local.get 257 │ │ + local.set 372 │ │ + local.get 372 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ - local.set 258 │ │ - local.get 6 │ │ - local.get 258 │ │ + local.set 373 │ │ + local.get 7 │ │ + local.get 373 │ │ i32.store8 offset=27 │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 259 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 260 │ │ - local.get 260 │ │ + local.set 374 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 375 │ │ + local.get 375 │ │ i64.load offset=8 │ │ - local.set 261 │ │ - local.get 259 │ │ - local.set 262 │ │ - local.get 261 │ │ - local.set 263 │ │ - local.get 262 │ │ - local.get 263 │ │ + local.set 376 │ │ + local.get 374 │ │ + local.set 377 │ │ + local.get 376 │ │ + local.set 378 │ │ + local.get 377 │ │ + local.get 378 │ │ i64.eq │ │ - local.set 264 │ │ + local.set 379 │ │ i32.const 1 │ │ - local.set 265 │ │ - local.get 264 │ │ - local.get 265 │ │ + local.set 380 │ │ + local.get 379 │ │ + local.get 380 │ │ i32.and │ │ - local.set 266 │ │ + local.set 381 │ │ block ;; label = @4 │ │ - local.get 266 │ │ + local.get 381 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 267 │ │ - local.get 267 │ │ - i32.load8_u offset=44 │ │ - local.set 268 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 382 │ │ + local.get 382 │ │ + i32.load8_u offset=76 │ │ + local.set 383 │ │ i32.const 1 │ │ - local.set 269 │ │ - local.get 268 │ │ - local.get 269 │ │ + local.set 384 │ │ + local.get 383 │ │ + local.get 384 │ │ i32.and │ │ - local.set 270 │ │ + local.set 385 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ - local.get 270 │ │ + local.get 385 │ │ br_if 0 (;@6;) │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=56 │ │ - local.set 271 │ │ + local.set 386 │ │ i64.const 46 │ │ - local.set 272 │ │ - local.get 271 │ │ - local.set 273 │ │ - local.get 272 │ │ - local.set 274 │ │ - local.get 273 │ │ - local.get 274 │ │ + local.set 387 │ │ + local.get 386 │ │ + local.set 388 │ │ + local.get 387 │ │ + local.set 389 │ │ + local.get 388 │ │ + local.get 389 │ │ i64.lt_u │ │ - local.set 275 │ │ + local.set 390 │ │ i32.const 1 │ │ - local.set 276 │ │ - local.get 275 │ │ - local.get 276 │ │ + local.set 391 │ │ + local.get 390 │ │ + local.get 391 │ │ i32.and │ │ - local.set 277 │ │ - local.get 277 │ │ + local.set 392 │ │ + local.get 392 │ │ i32.eqz │ │ br_if 1 (;@5;) │ │ end │ │ br 3 (;@2;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 393 │ │ + local.get 7 │ │ i32.load offset=80 │ │ - local.set 278 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 279 │ │ + local.set 394 │ │ i64.const 65536 │ │ - local.set 280 │ │ - local.get 278 │ │ - local.get 280 │ │ - local.get 279 │ │ + local.set 395 │ │ + local.get 393 │ │ + local.get 395 │ │ + local.get 394 │ │ call $_zip_cdir_grow │ │ - local.set 281 │ │ + local.set 396 │ │ i32.const 1 │ │ - local.set 282 │ │ - local.get 281 │ │ - local.get 282 │ │ + local.set 397 │ │ + local.get 396 │ │ + local.get 397 │ │ i32.and │ │ - local.set 283 │ │ + local.set 398 │ │ block ;; label = @5 │ │ - local.get 283 │ │ + local.get 398 │ │ br_if 0 (;@5;) │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 284 │ │ - local.get 284 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 399 │ │ + local.get 399 │ │ call $_zip_cdir_free │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 285 │ │ - local.get 285 │ │ + local.set 400 │ │ + local.get 400 │ │ call $_zip_buffer_free │ │ - i32.const 0 │ │ - local.set 286 │ │ - local.get 6 │ │ - local.get 286 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 401 │ │ + i32.const 1 │ │ + local.set 402 │ │ + local.get 401 │ │ + local.get 402 │ │ + i32.and │ │ + local.set 403 │ │ + local.get 7 │ │ + local.get 403 │ │ + i32.store8 offset=111 │ │ br 4 (;@1;) │ │ end │ │ i32.const 1 │ │ - local.set 287 │ │ - local.get 6 │ │ - local.get 287 │ │ + local.set 404 │ │ + local.get 7 │ │ + local.get 404 │ │ i32.store8 offset=27 │ │ end │ │ call $_zip_dirent_new │ │ - local.set 288 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 289 │ │ - local.get 289 │ │ + local.set 405 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 406 │ │ + local.get 406 │ │ i32.load │ │ - local.set 290 │ │ - local.get 6 │ │ + local.set 407 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 291 │ │ - local.get 291 │ │ + local.set 408 │ │ + local.get 408 │ │ i32.wrap_i64 │ │ - local.set 292 │ │ + local.set 409 │ │ i32.const 4 │ │ - local.set 293 │ │ - local.get 292 │ │ - local.get 293 │ │ + local.set 410 │ │ + local.get 409 │ │ + local.get 410 │ │ i32.shl │ │ - local.set 294 │ │ - local.get 290 │ │ - local.get 294 │ │ + local.set 411 │ │ + local.get 407 │ │ + local.get 411 │ │ i32.add │ │ - local.set 295 │ │ - local.get 295 │ │ - local.get 288 │ │ + local.set 412 │ │ + local.get 412 │ │ + local.get 405 │ │ i32.store │ │ i32.const 0 │ │ - local.set 296 │ │ - local.get 288 │ │ - local.set 297 │ │ - local.get 296 │ │ - local.set 298 │ │ - local.get 297 │ │ - local.get 298 │ │ + local.set 413 │ │ + local.get 405 │ │ + local.set 414 │ │ + local.get 413 │ │ + local.set 415 │ │ + local.get 414 │ │ + local.get 415 │ │ i32.eq │ │ - local.set 299 │ │ + local.set 416 │ │ i32.const 1 │ │ - local.set 300 │ │ - local.get 299 │ │ - local.get 300 │ │ + local.set 417 │ │ + local.get 416 │ │ + local.get 417 │ │ i32.and │ │ - local.set 301 │ │ + local.set 418 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ - local.get 301 │ │ + local.get 418 │ │ br_if 0 (;@5;) │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 302 │ │ - local.get 302 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 419 │ │ + local.get 419 │ │ i32.load │ │ - local.set 303 │ │ - local.get 6 │ │ + local.set 420 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 304 │ │ - local.get 304 │ │ + local.set 421 │ │ + local.get 421 │ │ i32.wrap_i64 │ │ - local.set 305 │ │ + local.set 422 │ │ i32.const 4 │ │ - local.set 306 │ │ - local.get 305 │ │ - local.get 306 │ │ + local.set 423 │ │ + local.get 422 │ │ + local.get 423 │ │ i32.shl │ │ - local.set 307 │ │ - local.get 303 │ │ - local.get 307 │ │ + local.set 424 │ │ + local.get 420 │ │ + local.get 424 │ │ i32.add │ │ - local.set 308 │ │ - local.get 308 │ │ + local.set 425 │ │ + local.get 425 │ │ i32.load │ │ - local.set 309 │ │ - local.get 6 │ │ + local.set 426 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 310 │ │ - local.get 310 │ │ + local.set 427 │ │ + local.get 427 │ │ i32.load │ │ - local.set 311 │ │ - local.get 6 │ │ + local.set 428 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 312 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 313 │ │ + local.set 429 │ │ + local.get 7 │ │ + i32.load offset=104 │ │ + local.set 430 │ │ + local.get 430 │ │ + i32.load offset=4 │ │ + local.set 431 │ │ + i32.const 4 │ │ + local.set 432 │ │ + local.get 431 │ │ + local.get 432 │ │ + i32.and │ │ + local.set 433 │ │ i32.const 0 │ │ - local.set 314 │ │ + local.set 434 │ │ + local.get 433 │ │ + local.set 435 │ │ + local.get 434 │ │ + local.set 436 │ │ + local.get 435 │ │ + local.get 436 │ │ + i32.ne │ │ + local.set 437 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 438 │ │ + i32.const 0 │ │ + local.set 439 │ │ + i64.const 0 │ │ + local.set 440 │ │ i32.const 1 │ │ - local.set 315 │ │ - local.get 314 │ │ - local.get 315 │ │ + local.set 441 │ │ + local.get 439 │ │ + local.get 441 │ │ i32.and │ │ - local.set 316 │ │ - local.get 309 │ │ - local.get 311 │ │ - local.get 312 │ │ - local.get 316 │ │ - local.get 313 │ │ + local.set 442 │ │ + i32.const 1 │ │ + local.set 443 │ │ + local.get 437 │ │ + local.get 443 │ │ + i32.and │ │ + local.set 444 │ │ + local.get 426 │ │ + local.get 428 │ │ + local.get 429 │ │ + local.get 442 │ │ + local.get 440 │ │ + local.get 444 │ │ + local.get 438 │ │ call $_zip_dirent_read │ │ - local.set 317 │ │ - local.get 6 │ │ - local.get 317 │ │ + local.set 445 │ │ + local.get 7 │ │ + local.get 445 │ │ i64.store offset=16 │ │ i64.const 0 │ │ - local.set 318 │ │ - local.get 317 │ │ - local.set 319 │ │ - local.get 318 │ │ - local.set 320 │ │ - local.get 319 │ │ - local.get 320 │ │ + local.set 446 │ │ + local.get 445 │ │ + local.set 447 │ │ + local.get 446 │ │ + local.set 448 │ │ + local.get 447 │ │ + local.get 448 │ │ i64.lt_s │ │ - local.set 321 │ │ + local.set 449 │ │ i32.const 1 │ │ - local.set 322 │ │ - local.get 321 │ │ - local.get 322 │ │ + local.set 450 │ │ + local.get 449 │ │ + local.get 450 │ │ i32.and │ │ - local.set 323 │ │ - local.get 323 │ │ + local.set 451 │ │ + local.get 451 │ │ i32.eqz │ │ br_if 1 (;@4;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 324 │ │ - local.get 324 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 452 │ │ + local.get 452 │ │ call $zip_error_code_zip │ │ - local.set 325 │ │ + local.set 453 │ │ i32.const 21 │ │ - local.set 326 │ │ - local.get 325 │ │ - local.set 327 │ │ - local.get 326 │ │ - local.set 328 │ │ - local.get 327 │ │ - local.get 328 │ │ + local.set 454 │ │ + local.get 453 │ │ + local.set 455 │ │ + local.get 454 │ │ + local.set 456 │ │ + local.get 455 │ │ + local.get 456 │ │ i32.eq │ │ - local.set 329 │ │ + local.set 457 │ │ i32.const 1 │ │ - local.set 330 │ │ - local.get 329 │ │ - local.get 330 │ │ + local.set 458 │ │ + local.get 457 │ │ + local.get 458 │ │ i32.and │ │ - local.set 331 │ │ + local.set 459 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ - local.get 331 │ │ + local.get 459 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 332 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 460 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 333 │ │ + local.set 461 │ │ i64.const 8388607 │ │ - local.set 334 │ │ - local.get 333 │ │ - local.set 335 │ │ - local.get 334 │ │ - local.set 336 │ │ - local.get 335 │ │ - local.get 336 │ │ + local.set 462 │ │ + local.get 461 │ │ + local.set 463 │ │ + local.get 462 │ │ + local.set 464 │ │ + local.get 463 │ │ + local.get 464 │ │ i64.gt_u │ │ - local.set 337 │ │ + local.set 465 │ │ i32.const 1 │ │ - local.set 338 │ │ - local.get 337 │ │ - local.get 338 │ │ + local.set 466 │ │ + local.get 465 │ │ + local.get 466 │ │ i32.and │ │ - local.set 339 │ │ + local.set 467 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ - local.get 339 │ │ + local.get 467 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ i32.const 8388607 │ │ - local.set 340 │ │ - local.get 340 │ │ - local.set 341 │ │ + local.set 468 │ │ + local.get 468 │ │ + local.set 469 │ │ br 1 (;@7;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 342 │ │ - local.get 342 │ │ + local.set 470 │ │ + local.get 470 │ │ i32.wrap_i64 │ │ - local.set 343 │ │ - local.get 343 │ │ - local.set 341 │ │ + local.set 471 │ │ + local.get 471 │ │ + local.set 469 │ │ end │ │ - local.get 341 │ │ - local.set 344 │ │ + local.get 469 │ │ + local.set 472 │ │ i32.const 8 │ │ - local.set 345 │ │ - local.get 344 │ │ - local.get 345 │ │ + local.set 473 │ │ + local.get 472 │ │ + local.get 473 │ │ i32.shl │ │ - local.set 346 │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 347 │ │ - local.get 347 │ │ + local.set 474 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 475 │ │ + local.get 475 │ │ call $zip_error_code_system │ │ - local.set 348 │ │ + local.set 476 │ │ i32.const 255 │ │ - local.set 349 │ │ - local.get 348 │ │ - local.get 349 │ │ + local.set 477 │ │ + local.get 476 │ │ + local.get 477 │ │ i32.and │ │ - local.set 350 │ │ - local.get 346 │ │ - local.get 350 │ │ + local.set 478 │ │ + local.get 474 │ │ + local.get 478 │ │ i32.or │ │ - local.set 351 │ │ + local.set 479 │ │ i32.const 21 │ │ - local.set 352 │ │ - local.get 332 │ │ - local.get 352 │ │ - local.get 351 │ │ + local.set 480 │ │ + local.get 460 │ │ + local.get 480 │ │ + local.get 479 │ │ call $zip_error_set │ │ br 1 (;@5;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load8_u offset=27 │ │ - local.set 353 │ │ + local.set 481 │ │ i32.const 1 │ │ - local.set 354 │ │ - local.get 353 │ │ - local.get 354 │ │ + local.set 482 │ │ + local.get 481 │ │ + local.get 482 │ │ i32.and │ │ - local.set 355 │ │ + local.set 483 │ │ block ;; label = @6 │ │ - local.get 355 │ │ + local.get 483 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 356 │ │ - local.get 356 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 484 │ │ + local.get 484 │ │ call $zip_error_code_zip │ │ - local.set 357 │ │ + local.set 485 │ │ i32.const 19 │ │ - local.set 358 │ │ - local.get 357 │ │ - local.set 359 │ │ - local.get 358 │ │ - local.set 360 │ │ - local.get 359 │ │ - local.get 360 │ │ + local.set 486 │ │ + local.get 485 │ │ + local.set 487 │ │ + local.get 486 │ │ + local.set 488 │ │ + local.get 487 │ │ + local.get 488 │ │ i32.eq │ │ - local.set 361 │ │ + local.set 489 │ │ i32.const 1 │ │ - local.set 362 │ │ - local.get 361 │ │ - local.get 362 │ │ + local.set 490 │ │ + local.get 489 │ │ + local.get 490 │ │ i32.and │ │ - local.set 363 │ │ - local.get 363 │ │ + local.set 491 │ │ + local.get 491 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 364 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 492 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 365 │ │ + local.set 493 │ │ i64.const 8388607 │ │ - local.set 366 │ │ - local.get 365 │ │ - local.set 367 │ │ - local.get 366 │ │ - local.set 368 │ │ - local.get 367 │ │ - local.get 368 │ │ + local.set 494 │ │ + local.get 493 │ │ + local.set 495 │ │ + local.get 494 │ │ + local.set 496 │ │ + local.get 495 │ │ + local.get 496 │ │ i64.gt_u │ │ - local.set 369 │ │ + local.set 497 │ │ i32.const 1 │ │ - local.set 370 │ │ - local.get 369 │ │ - local.get 370 │ │ + local.set 498 │ │ + local.get 497 │ │ + local.get 498 │ │ i32.and │ │ - local.set 371 │ │ + local.set 499 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ - local.get 371 │ │ + local.get 499 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ i32.const 8388607 │ │ - local.set 372 │ │ - local.get 372 │ │ - local.set 373 │ │ + local.set 500 │ │ + local.get 500 │ │ + local.set 501 │ │ br 1 (;@7;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 374 │ │ - local.get 374 │ │ + local.set 502 │ │ + local.get 502 │ │ i32.wrap_i64 │ │ - local.set 375 │ │ - local.get 375 │ │ - local.set 373 │ │ + local.set 503 │ │ + local.get 503 │ │ + local.set 501 │ │ end │ │ - local.get 373 │ │ - local.set 376 │ │ + local.get 501 │ │ + local.set 504 │ │ i32.const 8 │ │ - local.set 377 │ │ - local.get 376 │ │ - local.get 377 │ │ + local.set 505 │ │ + local.get 504 │ │ + local.get 505 │ │ i32.shl │ │ - local.set 378 │ │ + local.set 506 │ │ i32.const 4 │ │ - local.set 379 │ │ - local.get 378 │ │ - local.get 379 │ │ + local.set 507 │ │ + local.get 506 │ │ + local.get 507 │ │ i32.or │ │ - local.set 380 │ │ + local.set 508 │ │ i32.const 21 │ │ - local.set 381 │ │ - local.get 364 │ │ - local.get 381 │ │ - local.get 380 │ │ + local.set 509 │ │ + local.get 492 │ │ + local.get 509 │ │ + local.get 508 │ │ call $zip_error_set │ │ end │ │ end │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 382 │ │ - local.get 382 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 510 │ │ + local.get 510 │ │ call $_zip_cdir_free │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 383 │ │ - local.get 383 │ │ + local.set 511 │ │ + local.get 511 │ │ call $_zip_buffer_free │ │ - i32.const 0 │ │ - local.set 384 │ │ - local.get 6 │ │ - local.get 384 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 512 │ │ + i32.const 1 │ │ + local.set 513 │ │ + local.get 512 │ │ + local.get 513 │ │ + i32.and │ │ + local.set 514 │ │ + local.get 7 │ │ + local.get 514 │ │ + i32.store8 offset=111 │ │ br 3 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 385 │ │ + local.set 515 │ │ i64.const 1 │ │ - local.set 386 │ │ - local.get 385 │ │ - local.get 386 │ │ + local.set 516 │ │ + local.get 515 │ │ + local.get 516 │ │ i64.add │ │ - local.set 387 │ │ - local.get 6 │ │ - local.get 387 │ │ + local.set 517 │ │ + local.get 7 │ │ + local.get 517 │ │ i64.store offset=64 │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=16 │ │ - local.set 388 │ │ - local.get 6 │ │ + local.set 518 │ │ + local.get 7 │ │ i64.load offset=56 │ │ - local.set 389 │ │ - local.get 389 │ │ - local.get 388 │ │ + local.set 519 │ │ + local.get 519 │ │ + local.get 518 │ │ i64.sub │ │ - local.set 390 │ │ - local.get 6 │ │ - local.get 390 │ │ + local.set 520 │ │ + local.get 7 │ │ + local.get 520 │ │ i64.store offset=56 │ │ br 0 (;@3;) │ │ end │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=64 │ │ - local.set 391 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 392 │ │ - local.get 392 │ │ + local.set 521 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 522 │ │ + local.get 522 │ │ i64.load offset=8 │ │ - local.set 393 │ │ - local.get 391 │ │ - local.set 394 │ │ - local.get 393 │ │ - local.set 395 │ │ - local.get 394 │ │ - local.get 395 │ │ + local.set 523 │ │ + local.get 521 │ │ + local.set 524 │ │ + local.get 523 │ │ + local.set 525 │ │ + local.get 524 │ │ + local.get 525 │ │ i64.ne │ │ - local.set 396 │ │ + local.set 526 │ │ i32.const 1 │ │ - local.set 397 │ │ - local.get 396 │ │ - local.get 397 │ │ + local.set 527 │ │ + local.get 526 │ │ + local.get 527 │ │ i32.and │ │ - local.set 398 │ │ + local.set 528 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 398 │ │ + local.get 528 │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load offset=56 │ │ - local.set 399 │ │ + local.set 529 │ │ i64.const 0 │ │ - local.set 400 │ │ - local.get 399 │ │ - local.set 401 │ │ - local.get 400 │ │ - local.set 402 │ │ - local.get 401 │ │ - local.get 402 │ │ + local.set 530 │ │ + local.get 529 │ │ + local.set 531 │ │ + local.get 530 │ │ + local.set 532 │ │ + local.get 531 │ │ + local.get 532 │ │ i64.gt_u │ │ - local.set 403 │ │ + local.set 533 │ │ i32.const 1 │ │ - local.set 404 │ │ - local.get 403 │ │ - local.get 404 │ │ + local.set 534 │ │ + local.get 533 │ │ + local.get 534 │ │ i32.and │ │ - local.set 405 │ │ - local.get 405 │ │ + local.set 535 │ │ + local.get 535 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 406 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 536 │ │ i32.const 21 │ │ - local.set 407 │ │ + local.set 537 │ │ i32.const 5 │ │ - local.set 408 │ │ - local.get 406 │ │ - local.get 407 │ │ - local.get 408 │ │ + local.set 538 │ │ + local.get 536 │ │ + local.get 537 │ │ + local.get 538 │ │ call $zip_error_set │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 409 │ │ - local.get 409 │ │ + local.set 539 │ │ + local.get 539 │ │ call $_zip_buffer_free │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 410 │ │ - local.get 410 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 540 │ │ + local.get 540 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 411 │ │ - local.get 6 │ │ - local.get 411 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 541 │ │ + i32.const 1 │ │ + local.set 542 │ │ + local.get 541 │ │ + local.get 542 │ │ + i32.and │ │ + local.set 543 │ │ + local.get 7 │ │ + local.get 543 │ │ + i32.store8 offset=111 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 412 │ │ - local.get 412 │ │ + local.set 544 │ │ + local.get 544 │ │ i32.load offset=4 │ │ - local.set 413 │ │ + local.set 545 │ │ i32.const 4 │ │ - local.set 414 │ │ - local.get 413 │ │ - local.get 414 │ │ + local.set 546 │ │ + local.get 545 │ │ + local.get 546 │ │ i32.and │ │ - local.set 415 │ │ + local.set 547 │ │ block ;; label = @2 │ │ - local.get 415 │ │ + local.get 547 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 416 │ │ + local.set 548 │ │ i32.const 0 │ │ - local.set 417 │ │ - local.get 416 │ │ - local.set 418 │ │ - local.get 417 │ │ - local.set 419 │ │ - local.get 418 │ │ - local.get 419 │ │ + local.set 549 │ │ + local.get 548 │ │ + local.set 550 │ │ + local.get 549 │ │ + local.set 551 │ │ + local.get 550 │ │ + local.get 551 │ │ i32.ne │ │ - local.set 420 │ │ + local.set 552 │ │ i32.const 1 │ │ - local.set 421 │ │ - local.get 420 │ │ - local.get 421 │ │ + local.set 553 │ │ + local.get 552 │ │ + local.get 553 │ │ i32.and │ │ - local.set 422 │ │ + local.set 554 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ - local.get 422 │ │ + local.get 554 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 423 │ │ - local.get 423 │ │ + local.set 555 │ │ + local.get 555 │ │ call $_zip_buffer_eof │ │ - local.set 424 │ │ + local.set 556 │ │ i32.const 1 │ │ - local.set 425 │ │ - local.get 424 │ │ - local.get 425 │ │ + local.set 557 │ │ + local.get 556 │ │ + local.get 557 │ │ i32.and │ │ - local.set 426 │ │ - local.get 6 │ │ - local.get 426 │ │ + local.set 558 │ │ + local.get 7 │ │ + local.get 558 │ │ i32.store8 offset=15 │ │ br 1 (;@3;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 427 │ │ - local.get 427 │ │ + local.set 559 │ │ + local.get 559 │ │ i32.load │ │ - local.set 428 │ │ - local.get 428 │ │ + local.set 560 │ │ + local.get 560 │ │ call $zip_source_tell │ │ - local.set 429 │ │ - local.get 6 │ │ - local.get 429 │ │ + local.set 561 │ │ + local.get 7 │ │ + local.get 561 │ │ i64.store │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load │ │ - local.set 430 │ │ + local.set 562 │ │ i64.const 0 │ │ - local.set 431 │ │ - local.get 430 │ │ - local.set 432 │ │ - local.get 431 │ │ - local.set 433 │ │ - local.get 432 │ │ - local.get 433 │ │ + local.set 563 │ │ + local.get 562 │ │ + local.set 564 │ │ + local.get 563 │ │ + local.set 565 │ │ + local.get 564 │ │ + local.get 565 │ │ i64.lt_s │ │ - local.set 434 │ │ + local.set 566 │ │ i32.const 1 │ │ - local.set 435 │ │ - local.get 434 │ │ - local.get 435 │ │ + local.set 567 │ │ + local.get 566 │ │ + local.get 567 │ │ i32.and │ │ - local.set 436 │ │ + local.set 568 │ │ block ;; label = @4 │ │ - local.get 436 │ │ + local.get 568 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 437 │ │ - local.get 6 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 569 │ │ + local.get 7 │ │ i32.load offset=104 │ │ - local.set 438 │ │ - local.get 438 │ │ + local.set 570 │ │ + local.get 570 │ │ i32.load │ │ - local.set 439 │ │ - local.get 437 │ │ - local.get 439 │ │ + local.set 571 │ │ + local.get 569 │ │ + local.get 571 │ │ call $zip_error_set_from_source │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 440 │ │ - local.get 440 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 572 │ │ + local.get 572 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 441 │ │ - local.get 6 │ │ - local.get 441 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 573 │ │ + i32.const 1 │ │ + local.set 574 │ │ + local.get 573 │ │ + local.get 574 │ │ + i32.and │ │ + local.set 575 │ │ + local.get 7 │ │ + local.get 575 │ │ + i32.store8 offset=111 │ │ br 3 (;@1;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i64.load │ │ - local.set 442 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 443 │ │ - local.get 443 │ │ - i64.load offset=32 │ │ - local.set 444 │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 445 │ │ - local.get 445 │ │ - i64.load offset=24 │ │ - local.set 446 │ │ - local.get 444 │ │ - local.get 446 │ │ + local.set 576 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 577 │ │ + local.get 577 │ │ + i64.load offset=56 │ │ + local.set 578 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 579 │ │ + local.get 579 │ │ + i64.load offset=48 │ │ + local.set 580 │ │ + local.get 578 │ │ + local.get 580 │ │ i64.add │ │ - local.set 447 │ │ - local.get 442 │ │ - local.set 448 │ │ - local.get 447 │ │ - local.set 449 │ │ - local.get 448 │ │ - local.get 449 │ │ + local.set 581 │ │ + local.get 576 │ │ + local.set 582 │ │ + local.get 581 │ │ + local.set 583 │ │ + local.get 582 │ │ + local.get 583 │ │ i64.eq │ │ - local.set 450 │ │ + local.set 584 │ │ i32.const 1 │ │ - local.set 451 │ │ - local.get 450 │ │ - local.get 451 │ │ + local.set 585 │ │ + local.get 584 │ │ + local.get 585 │ │ i32.and │ │ - local.set 452 │ │ - local.get 6 │ │ - local.get 452 │ │ + local.set 586 │ │ + local.get 7 │ │ + local.get 586 │ │ i32.store8 offset=15 │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load8_u offset=15 │ │ - local.set 453 │ │ + local.set 587 │ │ i32.const 1 │ │ - local.set 454 │ │ - local.get 453 │ │ - local.get 454 │ │ + local.set 588 │ │ + local.get 587 │ │ + local.get 588 │ │ i32.and │ │ - local.set 455 │ │ + local.set 589 │ │ block ;; label = @3 │ │ - local.get 455 │ │ + local.get 589 │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ - i32.load offset=84 │ │ - local.set 456 │ │ + local.get 7 │ │ + i32.load offset=80 │ │ + local.set 590 │ │ i32.const 21 │ │ - local.set 457 │ │ + local.set 591 │ │ i32.const 3 │ │ - local.set 458 │ │ - local.get 456 │ │ - local.get 457 │ │ - local.get 458 │ │ + local.set 592 │ │ + local.get 590 │ │ + local.get 591 │ │ + local.get 592 │ │ call $zip_error_set │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 459 │ │ - local.get 459 │ │ + local.set 593 │ │ + local.get 593 │ │ call $_zip_buffer_free │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 460 │ │ - local.get 460 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 594 │ │ + local.get 594 │ │ call $_zip_cdir_free │ │ - i32.const 0 │ │ - local.set 461 │ │ - local.get 6 │ │ - local.get 461 │ │ - i32.store offset=108 │ │ + i32.const 1 │ │ + local.set 595 │ │ + i32.const 1 │ │ + local.set 596 │ │ + local.get 595 │ │ + local.get 596 │ │ + i32.and │ │ + local.set 597 │ │ + local.get 7 │ │ + local.get 597 │ │ + i32.store8 offset=111 │ │ br 2 (;@1;) │ │ end │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=44 │ │ - local.set 462 │ │ - local.get 462 │ │ + local.set 598 │ │ + local.get 598 │ │ call $_zip_buffer_free │ │ - local.get 6 │ │ - i32.load offset=80 │ │ - local.set 463 │ │ - local.get 6 │ │ - local.get 463 │ │ - i32.store offset=108 │ │ + local.get 7 │ │ + i32.load offset=76 │ │ + local.set 599 │ │ + local.get 7 │ │ + i32.load offset=84 │ │ + local.set 600 │ │ + local.get 600 │ │ + local.get 599 │ │ + i32.store │ │ + i32.const 1 │ │ + local.set 601 │ │ + i32.const 1 │ │ + local.set 602 │ │ + local.get 601 │ │ + local.get 602 │ │ + i32.and │ │ + local.set 603 │ │ + local.get 7 │ │ + local.get 603 │ │ + i32.store8 offset=111 │ │ end │ │ - local.get 6 │ │ - i32.load offset=108 │ │ - local.set 464 │ │ + local.get 7 │ │ + i32.load8_u offset=111 │ │ + local.set 604 │ │ + i32.const 1 │ │ + local.set 605 │ │ + local.get 604 │ │ + local.get 605 │ │ + i32.and │ │ + local.set 606 │ │ i32.const 112 │ │ - local.set 465 │ │ - local.get 6 │ │ - local.get 465 │ │ + local.set 607 │ │ + local.get 7 │ │ + local.get 607 │ │ i32.add │ │ - local.set 466 │ │ - local.get 466 │ │ + local.set 608 │ │ + local.get 608 │ │ global.set $__stack_pointer │ │ - local.get 464 │ │ + local.get 606 │ │ return) │ │ (func $_zip_checkcons (type 47) (param i32 i32 i32) (result i64) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 160 │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i32.sub │ │ @@ -284105,15 +285387,15 @@ │ │ local.get 5 │ │ i64.load offset=120 │ │ local.set 60 │ │ local.get 5 │ │ i32.load offset=144 │ │ local.set 61 │ │ local.get 61 │ │ - i64.load offset=32 │ │ + i64.load offset=56 │ │ local.set 62 │ │ local.get 60 │ │ local.set 63 │ │ local.get 62 │ │ local.set 64 │ │ local.get 63 │ │ local.get 64 │ │ @@ -284294,15 +285576,15 @@ │ │ local.get 5 │ │ i64.load offset=112 │ │ local.set 115 │ │ local.get 5 │ │ i32.load offset=144 │ │ local.set 116 │ │ local.get 116 │ │ - i64.load offset=32 │ │ + i64.load offset=56 │ │ local.set 117 │ │ local.get 115 │ │ local.set 118 │ │ local.get 117 │ │ local.set 119 │ │ local.get 118 │ │ local.get 119 │ │ @@ -284419,334 +285701,335 @@ │ │ local.get 5 │ │ i32.load offset=148 │ │ local.set 150 │ │ local.get 150 │ │ i32.load │ │ local.set 151 │ │ local.get 5 │ │ - i32.load offset=140 │ │ + i32.load offset=144 │ │ local.set 152 │ │ - i32.const 8 │ │ + local.get 152 │ │ + i32.load │ │ local.set 153 │ │ local.get 5 │ │ - local.get 153 │ │ - i32.add │ │ + i64.load offset=128 │ │ local.set 154 │ │ local.get 154 │ │ + i32.wrap_i64 │ │ local.set 155 │ │ - i32.const 0 │ │ + i32.const 4 │ │ local.set 156 │ │ - i32.const 1 │ │ + local.get 155 │ │ + local.get 156 │ │ + i32.shl │ │ local.set 157 │ │ - i32.const 1 │ │ - local.set 158 │ │ + local.get 153 │ │ local.get 157 │ │ + i32.add │ │ + local.set 158 │ │ local.get 158 │ │ - i32.and │ │ + i32.load │ │ local.set 159 │ │ - local.get 155 │ │ - local.get 151 │ │ - local.get 156 │ │ local.get 159 │ │ - local.get 152 │ │ - call $_zip_dirent_read │ │ + i64.load offset=32 │ │ local.set 160 │ │ - i64.const -1 │ │ + local.get 5 │ │ + i32.load offset=140 │ │ local.set 161 │ │ - local.get 160 │ │ + i32.const 8 │ │ local.set 162 │ │ - local.get 161 │ │ - local.set 163 │ │ + local.get 5 │ │ local.get 162 │ │ + i32.add │ │ + local.set 163 │ │ local.get 163 │ │ - i64.eq │ │ local.set 164 │ │ - i32.const 1 │ │ + i32.const 0 │ │ local.set 165 │ │ + i32.const 1 │ │ + local.set 166 │ │ + i32.const 1 │ │ + local.set 167 │ │ + local.get 166 │ │ + local.get 167 │ │ + i32.and │ │ + local.set 168 │ │ + i32.const 1 │ │ + local.set 169 │ │ + local.get 166 │ │ + local.get 169 │ │ + i32.and │ │ + local.set 170 │ │ local.get 164 │ │ + local.get 151 │ │ local.get 165 │ │ + local.get 168 │ │ + local.get 160 │ │ + local.get 170 │ │ + local.get 161 │ │ + call $_zip_dirent_read │ │ + local.set 171 │ │ + i64.const -1 │ │ + local.set 172 │ │ + local.get 171 │ │ + local.set 173 │ │ + local.get 172 │ │ + local.set 174 │ │ + local.get 173 │ │ + local.get 174 │ │ + i64.eq │ │ + local.set 175 │ │ + i32.const 1 │ │ + local.set 176 │ │ + local.get 175 │ │ + local.get 176 │ │ i32.and │ │ - local.set 166 │ │ + local.set 177 │ │ block ;; label = @4 │ │ - local.get 166 │ │ + local.get 177 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=140 │ │ - local.set 167 │ │ - local.get 167 │ │ + local.set 178 │ │ + local.get 178 │ │ call $zip_error_code_zip │ │ - local.set 168 │ │ + local.set 179 │ │ i32.const 21 │ │ - local.set 169 │ │ - local.get 168 │ │ - local.set 170 │ │ - local.get 169 │ │ - local.set 171 │ │ - local.get 170 │ │ - local.get 171 │ │ + local.set 180 │ │ + local.get 179 │ │ + local.set 181 │ │ + local.get 180 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.get 182 │ │ i32.eq │ │ - local.set 172 │ │ + local.set 183 │ │ i32.const 1 │ │ - local.set 173 │ │ - local.get 172 │ │ - local.get 173 │ │ + local.set 184 │ │ + local.get 183 │ │ + local.get 184 │ │ i32.and │ │ - local.set 174 │ │ + local.set 185 │ │ block ;; label = @5 │ │ - local.get 174 │ │ + local.get 185 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.load offset=140 │ │ - local.set 175 │ │ + local.set 186 │ │ local.get 5 │ │ i64.load offset=128 │ │ - local.set 176 │ │ + local.set 187 │ │ i64.const 8388607 │ │ - local.set 177 │ │ - local.get 176 │ │ - local.set 178 │ │ - local.get 177 │ │ - local.set 179 │ │ - local.get 178 │ │ - local.get 179 │ │ + local.set 188 │ │ + local.get 187 │ │ + local.set 189 │ │ + local.get 188 │ │ + local.set 190 │ │ + local.get 189 │ │ + local.get 190 │ │ i64.gt_u │ │ - local.set 180 │ │ + local.set 191 │ │ i32.const 1 │ │ - local.set 181 │ │ - local.get 180 │ │ - local.get 181 │ │ + local.set 192 │ │ + local.get 191 │ │ + local.get 192 │ │ i32.and │ │ - local.set 182 │ │ + local.set 193 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ - local.get 182 │ │ + local.get 193 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ i32.const 8388607 │ │ - local.set 183 │ │ - local.get 183 │ │ - local.set 184 │ │ + local.set 194 │ │ + local.get 194 │ │ + local.set 195 │ │ br 1 (;@6;) │ │ end │ │ local.get 5 │ │ i64.load offset=128 │ │ - local.set 185 │ │ - local.get 185 │ │ + local.set 196 │ │ + local.get 196 │ │ i32.wrap_i64 │ │ - local.set 186 │ │ - local.get 186 │ │ - local.set 184 │ │ + local.set 197 │ │ + local.get 197 │ │ + local.set 195 │ │ end │ │ - local.get 184 │ │ - local.set 187 │ │ + local.get 195 │ │ + local.set 198 │ │ i32.const 8 │ │ - local.set 188 │ │ - local.get 187 │ │ - local.get 188 │ │ + local.set 199 │ │ + local.get 198 │ │ + local.get 199 │ │ i32.shl │ │ - local.set 189 │ │ + local.set 200 │ │ local.get 5 │ │ i32.load offset=140 │ │ - local.set 190 │ │ - local.get 190 │ │ + local.set 201 │ │ + local.get 201 │ │ call $zip_error_code_system │ │ - local.set 191 │ │ + local.set 202 │ │ i32.const 255 │ │ - local.set 192 │ │ - local.get 191 │ │ - local.get 192 │ │ + local.set 203 │ │ + local.get 202 │ │ + local.get 203 │ │ i32.and │ │ - local.set 193 │ │ - local.get 189 │ │ - local.get 193 │ │ + local.set 204 │ │ + local.get 200 │ │ + local.get 204 │ │ i32.or │ │ - local.set 194 │ │ + local.set 205 │ │ i32.const 21 │ │ - local.set 195 │ │ - local.get 175 │ │ - local.get 195 │ │ - local.get 194 │ │ + local.set 206 │ │ + local.get 186 │ │ + local.get 206 │ │ + local.get 205 │ │ call $zip_error_set │ │ end │ │ i32.const 8 │ │ - local.set 196 │ │ + local.set 207 │ │ local.get 5 │ │ - local.get 196 │ │ + local.get 207 │ │ i32.add │ │ - local.set 197 │ │ - local.get 197 │ │ - local.set 198 │ │ - local.get 198 │ │ + local.set 208 │ │ + local.get 208 │ │ + local.set 209 │ │ + local.get 209 │ │ call $_zip_dirent_finalize │ │ i64.const -1 │ │ - local.set 199 │ │ + local.set 210 │ │ local.get 5 │ │ - local.get 199 │ │ + local.get 210 │ │ i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=144 │ │ - local.set 200 │ │ - local.get 200 │ │ + local.set 211 │ │ + local.get 211 │ │ i32.load │ │ - local.set 201 │ │ + local.set 212 │ │ local.get 5 │ │ i64.load offset=128 │ │ - local.set 202 │ │ - local.get 202 │ │ + local.set 213 │ │ + local.get 213 │ │ i32.wrap_i64 │ │ - local.set 203 │ │ + local.set 214 │ │ i32.const 4 │ │ - local.set 204 │ │ - local.get 203 │ │ - local.get 204 │ │ + local.set 215 │ │ + local.get 214 │ │ + local.get 215 │ │ i32.shl │ │ - local.set 205 │ │ - local.get 201 │ │ - local.get 205 │ │ + local.set 216 │ │ + local.get 212 │ │ + local.get 216 │ │ i32.add │ │ - local.set 206 │ │ - local.get 206 │ │ + local.set 217 │ │ + local.get 217 │ │ i32.load │ │ - local.set 207 │ │ + local.set 218 │ │ i32.const 8 │ │ - local.set 208 │ │ + local.set 219 │ │ local.get 5 │ │ - local.get 208 │ │ + local.get 219 │ │ i32.add │ │ - local.set 209 │ │ - local.get 209 │ │ - local.set 210 │ │ - local.get 207 │ │ - local.get 210 │ │ + local.set 220 │ │ + local.get 220 │ │ + local.set 221 │ │ + local.get 218 │ │ + local.get 221 │ │ call $_zip_headercomp │ │ - local.set 211 │ │ + local.set 222 │ │ block ;; label = @4 │ │ - local.get 211 │ │ + local.get 222 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=140 │ │ - local.set 212 │ │ + local.set 223 │ │ local.get 5 │ │ i64.load offset=128 │ │ - local.set 213 │ │ + local.set 224 │ │ i64.const 8388607 │ │ - local.set 214 │ │ - local.get 213 │ │ - local.set 215 │ │ - local.get 214 │ │ - local.set 216 │ │ - local.get 215 │ │ - local.get 216 │ │ + local.set 225 │ │ + local.get 224 │ │ + local.set 226 │ │ + local.get 225 │ │ + local.set 227 │ │ + local.get 226 │ │ + local.get 227 │ │ i64.gt_u │ │ - local.set 217 │ │ + local.set 228 │ │ i32.const 1 │ │ - local.set 218 │ │ - local.get 217 │ │ - local.get 218 │ │ + local.set 229 │ │ + local.get 228 │ │ + local.get 229 │ │ i32.and │ │ - local.set 219 │ │ + local.set 230 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ - local.get 219 │ │ + local.get 230 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 8388607 │ │ - local.set 220 │ │ - local.get 220 │ │ - local.set 221 │ │ + local.set 231 │ │ + local.get 231 │ │ + local.set 232 │ │ br 1 (;@5;) │ │ end │ │ local.get 5 │ │ i64.load offset=128 │ │ - local.set 222 │ │ - local.get 222 │ │ + local.set 233 │ │ + local.get 233 │ │ i32.wrap_i64 │ │ - local.set 223 │ │ - local.get 223 │ │ - local.set 221 │ │ + local.set 234 │ │ + local.get 234 │ │ + local.set 232 │ │ end │ │ - local.get 221 │ │ - local.set 224 │ │ + local.get 232 │ │ + local.set 235 │ │ i32.const 8 │ │ - local.set 225 │ │ - local.get 224 │ │ - local.get 225 │ │ + local.set 236 │ │ + local.get 235 │ │ + local.get 236 │ │ i32.shl │ │ - local.set 226 │ │ + local.set 237 │ │ i32.const 6 │ │ - local.set 227 │ │ - local.get 226 │ │ - local.get 227 │ │ + local.set 238 │ │ + local.get 237 │ │ + local.get 238 │ │ i32.or │ │ - local.set 228 │ │ + local.set 239 │ │ i32.const 21 │ │ - local.set 229 │ │ - local.get 212 │ │ - local.get 229 │ │ - local.get 228 │ │ + local.set 240 │ │ + local.get 223 │ │ + local.get 240 │ │ + local.get 239 │ │ call $zip_error_set │ │ i32.const 8 │ │ - local.set 230 │ │ + local.set 241 │ │ local.get 5 │ │ - local.get 230 │ │ + local.get 241 │ │ i32.add │ │ - local.set 231 │ │ - local.get 231 │ │ - local.set 232 │ │ - local.get 232 │ │ + local.set 242 │ │ + local.get 242 │ │ + local.set 243 │ │ + local.get 243 │ │ call $_zip_dirent_finalize │ │ i64.const -1 │ │ - local.set 233 │ │ + local.set 244 │ │ local.get 5 │ │ - local.get 233 │ │ + local.get 244 │ │ i64.store offset=152 │ │ br 3 (;@1;) │ │ end │ │ local.get 5 │ │ i32.load offset=144 │ │ - local.set 234 │ │ - local.get 234 │ │ - i32.load │ │ - local.set 235 │ │ - local.get 5 │ │ - i64.load offset=128 │ │ - local.set 236 │ │ - local.get 236 │ │ - i32.wrap_i64 │ │ - local.set 237 │ │ - i32.const 4 │ │ - local.set 238 │ │ - local.get 237 │ │ - local.get 238 │ │ - i32.shl │ │ - local.set 239 │ │ - local.get 235 │ │ - local.get 239 │ │ - i32.add │ │ - local.set 240 │ │ - local.get 240 │ │ - i32.load │ │ - local.set 241 │ │ - local.get 241 │ │ - i32.load offset=52 │ │ - local.set 242 │ │ - local.get 5 │ │ - i32.load offset=60 │ │ - local.set 243 │ │ - local.get 242 │ │ - local.get 243 │ │ - call $_zip_ef_merge │ │ - local.set 244 │ │ - local.get 5 │ │ - i32.load offset=144 │ │ local.set 245 │ │ local.get 245 │ │ i32.load │ │ local.set 246 │ │ local.get 5 │ │ i64.load offset=128 │ │ local.set 247 │ │ @@ -284763,144 +286046,284 @@ │ │ local.get 250 │ │ i32.add │ │ local.set 251 │ │ local.get 251 │ │ i32.load │ │ local.set 252 │ │ local.get 252 │ │ - local.get 244 │ │ - i32.store offset=52 │ │ - local.get 5 │ │ - i32.load offset=144 │ │ + i32.load offset=52 │ │ local.set 253 │ │ - local.get 253 │ │ - i32.load │ │ - local.set 254 │ │ local.get 5 │ │ - i64.load offset=128 │ │ + i32.load offset=60 │ │ + local.set 254 │ │ + local.get 253 │ │ + local.get 254 │ │ + call $_zip_ef_merge │ │ local.set 255 │ │ - local.get 255 │ │ - i32.wrap_i64 │ │ + local.get 5 │ │ + i32.load offset=144 │ │ local.set 256 │ │ - i32.const 4 │ │ - local.set 257 │ │ local.get 256 │ │ - local.get 257 │ │ - i32.shl │ │ + i32.load │ │ + local.set 257 │ │ + local.get 5 │ │ + i64.load offset=128 │ │ local.set 258 │ │ - local.get 254 │ │ local.get 258 │ │ - i32.add │ │ + i32.wrap_i64 │ │ local.set 259 │ │ - local.get 259 │ │ - i32.load │ │ + i32.const 4 │ │ local.set 260 │ │ - i32.const 1 │ │ - local.set 261 │ │ + local.get 259 │ │ local.get 260 │ │ + i32.shl │ │ + local.set 261 │ │ + local.get 257 │ │ local.get 261 │ │ - i32.store8 offset=4 │ │ - i32.const 0 │ │ + i32.add │ │ local.set 262 │ │ - local.get 5 │ │ local.get 262 │ │ - i32.store offset=60 │ │ - i32.const 8 │ │ + i32.load │ │ local.set 263 │ │ - local.get 5 │ │ local.get 263 │ │ - i32.add │ │ + local.get 255 │ │ + i32.store offset=52 │ │ + local.get 5 │ │ + i32.load offset=144 │ │ local.set 264 │ │ local.get 264 │ │ + i32.load │ │ local.set 265 │ │ - local.get 265 │ │ - call $_zip_dirent_finalize │ │ local.get 5 │ │ i64.load offset=128 │ │ local.set 266 │ │ - i64.const 1 │ │ - local.set 267 │ │ local.get 266 │ │ + i32.wrap_i64 │ │ + local.set 267 │ │ + i32.const 4 │ │ + local.set 268 │ │ local.get 267 │ │ + local.get 268 │ │ + i32.shl │ │ + local.set 269 │ │ + local.get 265 │ │ + local.get 269 │ │ + i32.add │ │ + local.set 270 │ │ + local.get 270 │ │ + i32.load │ │ + local.set 271 │ │ + i32.const 1 │ │ + local.set 272 │ │ + local.get 271 │ │ + local.get 272 │ │ + i32.store8 offset=4 │ │ + i32.const 0 │ │ + local.set 273 │ │ + local.get 5 │ │ + local.get 273 │ │ + i32.store offset=60 │ │ + i32.const 8 │ │ + local.set 274 │ │ + local.get 5 │ │ + local.get 274 │ │ + i32.add │ │ + local.set 275 │ │ + local.get 275 │ │ + local.set 276 │ │ + local.get 276 │ │ + call $_zip_dirent_finalize │ │ + local.get 5 │ │ + i32.load offset=144 │ │ + local.set 277 │ │ + local.get 277 │ │ + i32.load │ │ + local.set 278 │ │ + local.get 5 │ │ + i64.load offset=128 │ │ + local.set 279 │ │ + local.get 279 │ │ + i32.wrap_i64 │ │ + local.set 280 │ │ + i32.const 4 │ │ + local.set 281 │ │ + local.get 280 │ │ + local.get 281 │ │ + i32.shl │ │ + local.set 282 │ │ + local.get 278 │ │ + local.get 282 │ │ + i32.add │ │ + local.set 283 │ │ + local.get 283 │ │ + i32.load │ │ + local.set 284 │ │ + local.get 284 │ │ + call $zip_dirent_check_consistency │ │ + local.set 285 │ │ + local.get 5 │ │ + local.get 285 │ │ + i32.store offset=4 │ │ + block ;; label = @4 │ │ + local.get 285 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 5 │ │ + i32.load offset=140 │ │ + local.set 286 │ │ + local.get 5 │ │ + i64.load offset=128 │ │ + local.set 287 │ │ + i64.const 8388607 │ │ + local.set 288 │ │ + local.get 287 │ │ + local.set 289 │ │ + local.get 288 │ │ + local.set 290 │ │ + local.get 289 │ │ + local.get 290 │ │ + i64.gt_u │ │ + local.set 291 │ │ + i32.const 1 │ │ + local.set 292 │ │ + local.get 291 │ │ + local.get 292 │ │ + i32.and │ │ + local.set 293 │ │ + block ;; label = @5 │ │ + block ;; label = @6 │ │ + local.get 293 │ │ + i32.eqz │ │ + br_if 0 (;@6;) │ │ + i32.const 8388607 │ │ + local.set 294 │ │ + local.get 294 │ │ + local.set 295 │ │ + br 1 (;@5;) │ │ + end │ │ + local.get 5 │ │ + i64.load offset=128 │ │ + local.set 296 │ │ + local.get 296 │ │ + i32.wrap_i64 │ │ + local.set 297 │ │ + local.get 297 │ │ + local.set 295 │ │ + end │ │ + local.get 295 │ │ + local.set 298 │ │ + i32.const 8 │ │ + local.set 299 │ │ + local.get 298 │ │ + local.get 299 │ │ + i32.shl │ │ + local.set 300 │ │ + local.get 5 │ │ + i32.load offset=4 │ │ + local.set 301 │ │ + local.get 300 │ │ + local.get 301 │ │ + i32.or │ │ + local.set 302 │ │ + i32.const 21 │ │ + local.set 303 │ │ + local.get 286 │ │ + local.get 303 │ │ + local.get 302 │ │ + call $zip_error_set │ │ + i64.const -1 │ │ + local.set 304 │ │ + local.get 5 │ │ + local.get 304 │ │ + i64.store offset=152 │ │ + br 3 (;@1;) │ │ + end │ │ + local.get 5 │ │ + i64.load offset=128 │ │ + local.set 305 │ │ + i64.const 1 │ │ + local.set 306 │ │ + local.get 305 │ │ + local.get 306 │ │ i64.add │ │ - local.set 268 │ │ + local.set 307 │ │ local.get 5 │ │ - local.get 268 │ │ + local.get 307 │ │ i64.store offset=128 │ │ br 0 (;@3;) │ │ end │ │ end │ │ local.get 5 │ │ i64.load offset=112 │ │ - local.set 269 │ │ + local.set 308 │ │ local.get 5 │ │ i64.load offset=120 │ │ - local.set 270 │ │ - local.get 269 │ │ - local.get 270 │ │ + local.set 309 │ │ + local.get 308 │ │ + local.get 309 │ │ i64.sub │ │ - local.set 271 │ │ + local.set 310 │ │ i64.const 9223372036854775807 │ │ - local.set 272 │ │ - local.get 271 │ │ - local.set 273 │ │ - local.get 272 │ │ - local.set 274 │ │ - local.get 273 │ │ - local.get 274 │ │ + local.set 311 │ │ + local.get 310 │ │ + local.set 312 │ │ + local.get 311 │ │ + local.set 313 │ │ + local.get 312 │ │ + local.get 313 │ │ i64.lt_u │ │ - local.set 275 │ │ + local.set 314 │ │ i32.const 1 │ │ - local.set 276 │ │ - local.get 275 │ │ - local.get 276 │ │ + local.set 315 │ │ + local.get 314 │ │ + local.get 315 │ │ i32.and │ │ - local.set 277 │ │ + local.set 316 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 277 │ │ + local.get 316 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ i64.load offset=112 │ │ - local.set 278 │ │ + local.set 317 │ │ local.get 5 │ │ i64.load offset=120 │ │ - local.set 279 │ │ - local.get 278 │ │ - local.get 279 │ │ + local.set 318 │ │ + local.get 317 │ │ + local.get 318 │ │ i64.sub │ │ - local.set 280 │ │ - local.get 280 │ │ - local.set 281 │ │ + local.set 319 │ │ + local.get 319 │ │ + local.set 320 │ │ br 1 (;@2;) │ │ end │ │ i64.const 9223372036854775807 │ │ - local.set 282 │ │ - local.get 282 │ │ - local.set 281 │ │ + local.set 321 │ │ + local.get 321 │ │ + local.set 320 │ │ end │ │ - local.get 281 │ │ - local.set 283 │ │ + local.get 320 │ │ + local.set 322 │ │ local.get 5 │ │ - local.get 283 │ │ + local.get 322 │ │ i64.store offset=152 │ │ end │ │ local.get 5 │ │ i64.load offset=152 │ │ - local.set 284 │ │ + local.set 323 │ │ i32.const 160 │ │ - local.set 285 │ │ + local.set 324 │ │ local.get 5 │ │ - local.get 285 │ │ + local.get 324 │ │ i32.add │ │ - local.set 286 │ │ - local.get 286 │ │ + local.set 325 │ │ + local.get 325 │ │ global.set $__stack_pointer │ │ - local.get 284 │ │ + local.get 323 │ │ return) │ │ (func $decode_hex (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ @@ -285103,1763 +286526,2240 @@ │ │ i32.store offset=12 │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 59 │ │ local.get 59 │ │ return) │ │ - (func $_zip_read_eocd64 (type 77) (param i32 i32 i64 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32) │ │ + (func $_zip_read_eocd (type 76) (param i32 i64 i32) (result i32) │ │ + (local i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ + local.set 3 │ │ + i32.const 32 │ │ + local.set 4 │ │ + local.get 3 │ │ + local.get 4 │ │ + i32.sub │ │ local.set 5 │ │ - i32.const 176 │ │ - local.set 6 │ │ local.get 5 │ │ + global.set $__stack_pointer │ │ + local.get 5 │ │ + local.get 0 │ │ + i32.store offset=24 │ │ + local.get 5 │ │ + local.get 1 │ │ + i64.store offset=16 │ │ + local.get 5 │ │ + local.get 2 │ │ + i32.store offset=12 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 6 │ │ local.get 6 │ │ - i32.sub │ │ + call $_zip_buffer_left │ │ local.set 7 │ │ + i64.const 22 │ │ + local.set 8 │ │ local.get 7 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.get 10 │ │ + i64.lt_u │ │ + local.set 11 │ │ + i32.const 1 │ │ + local.set 12 │ │ + local.get 11 │ │ + local.get 12 │ │ + i32.and │ │ + local.set 13 │ │ + block ;; label = @1 │ │ + block ;; label = @2 │ │ + local.get 13 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 5 │ │ + i32.load offset=12 │ │ + local.set 14 │ │ + i32.const 21 │ │ + local.set 15 │ │ + i32.const 7 │ │ + local.set 16 │ │ + local.get 14 │ │ + local.get 15 │ │ + local.get 16 │ │ + call $zip_error_set │ │ + i32.const 0 │ │ + local.set 17 │ │ + local.get 5 │ │ + local.get 17 │ │ + i32.store offset=28 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 5 │ │ + i32.load offset=12 │ │ + local.set 18 │ │ + local.get 18 │ │ + call $_zip_cdir_new │ │ + local.set 19 │ │ + local.get 5 │ │ + local.get 19 │ │ + i32.store offset=8 │ │ + i32.const 0 │ │ + local.set 20 │ │ + local.get 19 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.set 22 │ │ + local.get 21 │ │ + local.get 22 │ │ + i32.eq │ │ + local.set 23 │ │ + i32.const 1 │ │ + local.set 24 │ │ + local.get 23 │ │ + local.get 24 │ │ + i32.and │ │ + local.set 25 │ │ + block ;; label = @2 │ │ + local.get 25 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + i32.const 0 │ │ + local.set 26 │ │ + local.get 5 │ │ + local.get 26 │ │ + i32.store offset=28 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 5 │ │ + i64.load offset=16 │ │ + local.set 27 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 28 │ │ + local.get 28 │ │ + call $_zip_buffer_offset │ │ + local.set 29 │ │ + local.get 27 │ │ + local.get 29 │ │ + i64.add │ │ + local.set 30 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 31 │ │ + local.get 31 │ │ + local.get 30 │ │ + i64.store offset=64 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 32 │ │ + i64.const 4 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.get 33 │ │ + call $_zip_buffer_skip │ │ + drop │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 34 │ │ + i32.const 0 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.get 35 │ │ + i32.store8 offset=76 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 36 │ │ + local.get 36 │ │ + call $_zip_buffer_get_16 │ │ + local.set 37 │ │ + i32.const 65535 │ │ + local.set 38 │ │ + local.get 37 │ │ + local.get 38 │ │ + i32.and │ │ + local.set 39 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 40 │ │ + local.get 40 │ │ + local.get 39 │ │ + i32.store offset=24 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 41 │ │ + local.get 41 │ │ + call $_zip_buffer_get_16 │ │ + local.set 42 │ │ + i32.const 65535 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.get 43 │ │ + i32.and │ │ + local.set 44 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 45 │ │ + local.get 45 │ │ + local.get 44 │ │ + i32.store offset=28 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 46 │ │ + local.get 46 │ │ + call $_zip_buffer_get_16 │ │ + local.set 47 │ │ + i32.const 65535 │ │ + local.set 48 │ │ + local.get 47 │ │ + local.get 48 │ │ + i32.and │ │ + local.set 49 │ │ + local.get 49 │ │ + i64.extend_i32_u │ │ + local.set 50 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 51 │ │ + local.get 51 │ │ + local.get 50 │ │ + i64.store offset=32 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 52 │ │ + local.get 52 │ │ + call $_zip_buffer_get_16 │ │ + local.set 53 │ │ + i32.const 65535 │ │ + local.set 54 │ │ + local.get 53 │ │ + local.get 54 │ │ + i32.and │ │ + local.set 55 │ │ + local.get 55 │ │ + i64.extend_i32_u │ │ + local.set 56 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 57 │ │ + local.get 57 │ │ + local.get 56 │ │ + i64.store offset=40 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 58 │ │ + local.get 58 │ │ + call $_zip_buffer_get_32 │ │ + local.set 59 │ │ + local.get 59 │ │ + local.set 60 │ │ + local.get 60 │ │ + i64.extend_i32_u │ │ + local.set 61 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 62 │ │ + local.get 62 │ │ + local.get 61 │ │ + i64.store offset=48 │ │ + local.get 5 │ │ + i32.load offset=24 │ │ + local.set 63 │ │ + local.get 63 │ │ + call $_zip_buffer_get_32 │ │ + local.set 64 │ │ + local.get 64 │ │ + local.set 65 │ │ + local.get 65 │ │ + i64.extend_i32_u │ │ + local.set 66 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 67 │ │ + local.get 67 │ │ + local.get 66 │ │ + i64.store offset=56 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 68 │ │ + local.get 5 │ │ + local.get 68 │ │ + i32.store offset=28 │ │ + end │ │ + local.get 5 │ │ + i32.load offset=28 │ │ + local.set 69 │ │ + i32.const 32 │ │ + local.set 70 │ │ + local.get 5 │ │ + local.get 70 │ │ + i32.add │ │ + local.set 71 │ │ + local.get 71 │ │ global.set $__stack_pointer │ │ + local.get 69 │ │ + return) │ │ + (func $_zip_read_eocd64 (type 79) (param i32 i32 i32 i64 i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i64 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 6 │ │ + i32.const 160 │ │ + local.set 7 │ │ + local.get 6 │ │ local.get 7 │ │ + i32.sub │ │ + local.set 8 │ │ + local.get 8 │ │ + global.set $__stack_pointer │ │ + local.get 8 │ │ local.get 0 │ │ - i32.store offset=168 │ │ - local.get 7 │ │ + i32.store offset=152 │ │ + local.get 8 │ │ local.get 1 │ │ - i32.store offset=164 │ │ - local.get 7 │ │ + i32.store offset=148 │ │ + local.get 8 │ │ local.get 2 │ │ - i64.store offset=152 │ │ - local.get 7 │ │ + i32.store offset=144 │ │ + local.get 8 │ │ local.get 3 │ │ - i32.store offset=148 │ │ - local.get 7 │ │ + i64.store offset=136 │ │ + local.get 8 │ │ local.get 4 │ │ - i32.store offset=144 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 8 │ │ + i32.store offset=132 │ │ local.get 8 │ │ - call $_zip_buffer_offset │ │ + local.get 5 │ │ + i32.store offset=128 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 9 │ │ - local.get 7 │ │ local.get 9 │ │ - i64.store offset=24 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ + call $_zip_buffer_offset │ │ local.set 10 │ │ - i64.const 4 │ │ - local.set 11 │ │ + local.get 8 │ │ local.get 10 │ │ + i64.store offset=24 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 11 │ │ + i64.const 4 │ │ + local.set 12 │ │ local.get 11 │ │ + local.get 12 │ │ call $_zip_buffer_get │ │ drop │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 12 │ │ - local.get 12 │ │ - call $_zip_buffer_get_16 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 13 │ │ - i32.const 65535 │ │ - local.set 14 │ │ local.get 13 │ │ + call $_zip_buffer_get_32 │ │ + local.set 14 │ │ + local.get 8 │ │ local.get 14 │ │ - i32.and │ │ + i32.store offset=12 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 15 │ │ - local.get 7 │ │ local.get 15 │ │ - i32.store offset=16 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ + call $_zip_buffer_get_64 │ │ local.set 16 │ │ + local.get 8 │ │ local.get 16 │ │ - call $_zip_buffer_get_16 │ │ + i64.store offset=56 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 17 │ │ - i32.const 65535 │ │ - local.set 18 │ │ local.get 17 │ │ + call $_zip_buffer_get_32 │ │ + local.set 18 │ │ + local.get 8 │ │ local.get 18 │ │ - i32.and │ │ + i32.store offset=16 │ │ + local.get 8 │ │ + i64.load offset=56 │ │ local.set 19 │ │ - local.get 7 │ │ - local.get 19 │ │ - i32.store offset=8 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 20 │ │ - local.get 20 │ │ - call $_zip_buffer_get_64 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ local.set 21 │ │ - local.get 7 │ │ - local.get 21 │ │ - i64.store offset=56 │ │ - local.get 7 │ │ - i64.load offset=56 │ │ + local.get 8 │ │ + i32.load offset=148 │ │ local.set 22 │ │ - i64.const 9223372036854775807 │ │ + i32.const 22952 │ │ local.set 23 │ │ + local.get 19 │ │ + local.get 20 │ │ + local.get 21 │ │ local.get 22 │ │ - local.set 24 │ │ local.get 23 │ │ + call $check_magic │ │ + local.set 24 │ │ + i32.const 1 │ │ local.set 25 │ │ local.get 24 │ │ local.get 25 │ │ - i64.gt_u │ │ - local.set 26 │ │ - i32.const 1 │ │ - local.set 27 │ │ - local.get 26 │ │ - local.get 27 │ │ i32.and │ │ - local.set 28 │ │ + local.set 26 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 28 │ │ + local.get 26 │ │ + br_if 0 (;@2;) │ │ + i32.const 2 │ │ + local.set 27 │ │ + local.get 8 │ │ + local.get 27 │ │ + i32.store offset=156 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=16 │ │ + local.set 28 │ │ + i32.const 1 │ │ + local.set 29 │ │ + local.get 28 │ │ + local.set 30 │ │ + local.get 29 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ + i32.ne │ │ + local.set 32 │ │ + i32.const 1 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.get 33 │ │ + i32.and │ │ + local.set 34 │ │ + block ;; label = @2 │ │ + local.get 34 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 29 │ │ - i32.const 4 │ │ - local.set 30 │ │ - i32.const 22 │ │ - local.set 31 │ │ - local.get 29 │ │ - local.get 30 │ │ - local.get 31 │ │ - call $zip_error_set │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 35 │ │ + i32.const 1 │ │ + local.set 36 │ │ i32.const 0 │ │ - local.set 32 │ │ - local.get 7 │ │ - local.get 32 │ │ - i32.store offset=172 │ │ + local.set 37 │ │ + local.get 35 │ │ + local.get 36 │ │ + local.get 37 │ │ + call $zip_error_set │ │ + i32.const 1 │ │ + local.set 38 │ │ + local.get 8 │ │ + local.get 38 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 33 │ │ - i64.const 56 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.get 34 │ │ - i64.add │ │ - local.set 35 │ │ - local.get 7 │ │ - i64.load offset=24 │ │ - local.set 36 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 37 │ │ - local.get 36 │ │ - local.get 37 │ │ - i64.add │ │ - local.set 38 │ │ - local.get 35 │ │ local.set 39 │ │ - local.get 38 │ │ + i64.const 9223372036854775807 │ │ local.set 40 │ │ local.get 39 │ │ - local.get 40 │ │ - i64.gt_u │ │ local.set 41 │ │ - i32.const 1 │ │ + local.get 40 │ │ local.set 42 │ │ local.get 41 │ │ local.get 42 │ │ - i32.and │ │ + i64.gt_u │ │ local.set 43 │ │ + i32.const 1 │ │ + local.set 44 │ │ + local.get 43 │ │ + local.get 44 │ │ + i32.and │ │ + local.set 45 │ │ block ;; label = @2 │ │ - local.get 43 │ │ + local.get 45 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 44 │ │ - i32.const 21 │ │ - local.set 45 │ │ - i32.const 8 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ local.set 46 │ │ - local.get 44 │ │ - local.get 45 │ │ - local.get 46 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ + i32.const 4 │ │ local.set 47 │ │ - local.get 7 │ │ + i32.const 22 │ │ + local.set 48 │ │ + local.get 46 │ │ local.get 47 │ │ - i32.store offset=172 │ │ + local.get 48 │ │ + call $zip_error_set │ │ + i32.const 1 │ │ + local.set 49 │ │ + local.get 8 │ │ + local.get 49 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 48 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 49 │ │ - local.get 48 │ │ local.set 50 │ │ - local.get 49 │ │ + i64.const 56 │ │ local.set 51 │ │ local.get 50 │ │ local.get 51 │ │ - i64.ge_u │ │ + i64.add │ │ local.set 52 │ │ - i32.const 1 │ │ + local.get 8 │ │ + i64.load offset=24 │ │ local.set 53 │ │ - local.get 52 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ + local.set 54 │ │ local.get 53 │ │ + local.get 54 │ │ + i64.add │ │ + local.set 55 │ │ + local.get 52 │ │ + local.set 56 │ │ + local.get 55 │ │ + local.set 57 │ │ + local.get 56 │ │ + local.get 57 │ │ + i64.gt_u │ │ + local.set 58 │ │ + i32.const 1 │ │ + local.set 59 │ │ + local.get 58 │ │ + local.get 59 │ │ i32.and │ │ - local.set 54 │ │ + local.set 60 │ │ + block ;; label = @2 │ │ + local.get 60 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 61 │ │ + i32.const 21 │ │ + local.set 62 │ │ + i32.const 8 │ │ + local.set 63 │ │ + local.get 61 │ │ + local.get 62 │ │ + local.get 63 │ │ + call $zip_error_set │ │ + i32.const 1 │ │ + local.set 64 │ │ + local.get 8 │ │ + local.get 64 │ │ + i32.store offset=156 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 8 │ │ + i64.load offset=56 │ │ + local.set 65 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ + local.set 66 │ │ + local.get 65 │ │ + local.set 67 │ │ + local.get 66 │ │ + local.set 68 │ │ + local.get 67 │ │ + local.get 68 │ │ + i64.ge_u │ │ + local.set 69 │ │ + i32.const 1 │ │ + local.set 70 │ │ + local.get 69 │ │ + local.get 70 │ │ + i32.and │ │ + local.set 71 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 54 │ │ + local.get 71 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 55 │ │ + local.set 72 │ │ i64.const 56 │ │ - local.set 56 │ │ - local.get 55 │ │ - local.get 56 │ │ + local.set 73 │ │ + local.get 72 │ │ + local.get 73 │ │ i64.add │ │ - local.set 57 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 58 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 59 │ │ - local.get 59 │ │ + local.set 74 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ + local.set 75 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 76 │ │ + local.get 76 │ │ call $_zip_buffer_size │ │ - local.set 60 │ │ - local.get 58 │ │ - local.get 60 │ │ + local.set 77 │ │ + local.get 75 │ │ + local.get 77 │ │ i64.add │ │ - local.set 61 │ │ - local.get 57 │ │ - local.set 62 │ │ - local.get 61 │ │ - local.set 63 │ │ - local.get 62 │ │ - local.get 63 │ │ + local.set 78 │ │ + local.get 74 │ │ + local.set 79 │ │ + local.get 78 │ │ + local.set 80 │ │ + local.get 79 │ │ + local.get 80 │ │ i64.le_u │ │ - local.set 64 │ │ + local.set 81 │ │ i32.const 1 │ │ - local.set 65 │ │ - local.get 64 │ │ - local.get 65 │ │ + local.set 82 │ │ + local.get 81 │ │ + local.get 82 │ │ i32.and │ │ - local.set 66 │ │ - local.get 66 │ │ + local.set 83 │ │ + local.get 83 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 67 │ │ - local.get 7 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 84 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 68 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 69 │ │ - local.get 68 │ │ - local.get 69 │ │ + local.set 85 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ + local.set 86 │ │ + local.get 85 │ │ + local.get 86 │ │ i64.sub │ │ - local.set 70 │ │ - local.get 67 │ │ - local.get 70 │ │ + local.set 87 │ │ + local.get 84 │ │ + local.get 87 │ │ call $_zip_buffer_set_offset │ │ drop │ │ i32.const 0 │ │ - local.set 71 │ │ - local.get 7 │ │ - local.get 71 │ │ + local.set 88 │ │ + local.get 8 │ │ + local.get 88 │ │ i32.store8 offset=23 │ │ br 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=168 │ │ - local.set 72 │ │ - local.get 7 │ │ + local.get 8 │ │ + i32.load offset=148 │ │ + local.set 89 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 73 │ │ + local.set 90 │ │ i32.const 0 │ │ - local.set 74 │ │ - local.get 72 │ │ - local.get 73 │ │ - local.get 74 │ │ + local.set 91 │ │ + local.get 89 │ │ + local.get 90 │ │ + local.get 91 │ │ call $zip_source_seek │ │ - local.set 75 │ │ + local.set 92 │ │ i32.const 0 │ │ - local.set 76 │ │ - local.get 75 │ │ - local.set 77 │ │ - local.get 76 │ │ - local.set 78 │ │ - local.get 77 │ │ - local.get 78 │ │ + local.set 93 │ │ + local.get 92 │ │ + local.set 94 │ │ + local.get 93 │ │ + local.set 95 │ │ + local.get 94 │ │ + local.get 95 │ │ i32.lt_s │ │ - local.set 79 │ │ + local.set 96 │ │ i32.const 1 │ │ - local.set 80 │ │ - local.get 79 │ │ - local.get 80 │ │ + local.set 97 │ │ + local.get 96 │ │ + local.get 97 │ │ i32.and │ │ - local.set 81 │ │ + local.set 98 │ │ block ;; label = @3 │ │ - local.get 81 │ │ + local.get 98 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 82 │ │ - local.get 7 │ │ - i32.load offset=168 │ │ - local.set 83 │ │ - local.get 82 │ │ - local.get 83 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 99 │ │ + local.get 8 │ │ + i32.load offset=148 │ │ + local.set 100 │ │ + local.get 99 │ │ + local.get 100 │ │ call $zip_error_set_from_source │ │ - i32.const 0 │ │ - local.set 84 │ │ - local.get 7 │ │ - local.get 84 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 101 │ │ + local.get 8 │ │ + local.get 101 │ │ + i32.store offset=156 │ │ br 2 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=168 │ │ - local.set 85 │ │ + local.get 8 │ │ + i32.load offset=148 │ │ + local.set 102 │ │ i32.const 64 │ │ - local.set 86 │ │ - local.get 7 │ │ - local.get 86 │ │ + local.set 103 │ │ + local.get 8 │ │ + local.get 103 │ │ i32.add │ │ - local.set 87 │ │ - local.get 87 │ │ - local.set 88 │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 89 │ │ + local.set 104 │ │ + local.get 104 │ │ + local.set 105 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 106 │ │ i64.const 56 │ │ - local.set 90 │ │ - local.get 85 │ │ - local.get 90 │ │ - local.get 88 │ │ - local.get 89 │ │ + local.set 107 │ │ + local.get 102 │ │ + local.get 107 │ │ + local.get 105 │ │ + local.get 106 │ │ call $_zip_buffer_new_from_source │ │ - local.set 91 │ │ - local.get 7 │ │ - local.get 91 │ │ - i32.store offset=164 │ │ + local.set 108 │ │ + local.get 8 │ │ + local.get 108 │ │ + i32.store offset=144 │ │ i32.const 0 │ │ - local.set 92 │ │ - local.get 91 │ │ - local.set 93 │ │ - local.get 92 │ │ - local.set 94 │ │ - local.get 93 │ │ - local.get 94 │ │ + local.set 109 │ │ + local.get 108 │ │ + local.set 110 │ │ + local.get 109 │ │ + local.set 111 │ │ + local.get 110 │ │ + local.get 111 │ │ i32.eq │ │ - local.set 95 │ │ + local.set 112 │ │ i32.const 1 │ │ - local.set 96 │ │ - local.get 95 │ │ - local.get 96 │ │ + local.set 113 │ │ + local.get 112 │ │ + local.get 113 │ │ i32.and │ │ - local.set 97 │ │ + local.set 114 │ │ block ;; label = @3 │ │ - local.get 97 │ │ + local.get 114 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - i32.const 0 │ │ - local.set 98 │ │ - local.get 7 │ │ - local.get 98 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 115 │ │ + local.get 8 │ │ + local.get 115 │ │ + i32.store offset=156 │ │ br 2 (;@1;) │ │ end │ │ i32.const 1 │ │ - local.set 99 │ │ - local.get 7 │ │ - local.get 99 │ │ + local.set 116 │ │ + local.get 8 │ │ + local.get 116 │ │ i32.store8 offset=23 │ │ end │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 100 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 117 │ │ i64.const 4 │ │ - local.set 101 │ │ - local.get 100 │ │ - local.get 101 │ │ + local.set 118 │ │ + local.get 117 │ │ + local.get 118 │ │ call $_zip_buffer_get │ │ - local.set 102 │ │ - local.get 102 │ │ + local.set 119 │ │ + local.get 119 │ │ i32.load align=1 │ │ - local.set 103 │ │ + local.set 120 │ │ i32.const 101075792 │ │ - local.set 104 │ │ - local.get 103 │ │ - local.get 104 │ │ + local.set 121 │ │ + local.get 120 │ │ + local.get 121 │ │ i32.ne │ │ - local.set 105 │ │ + local.set 122 │ │ block ;; label = @2 │ │ - local.get 105 │ │ + local.get 122 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 106 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 123 │ │ i32.const 21 │ │ - local.set 107 │ │ + local.set 124 │ │ i32.const 9 │ │ - local.set 108 │ │ - local.get 106 │ │ - local.get 107 │ │ - local.get 108 │ │ + local.set 125 │ │ + local.get 123 │ │ + local.get 124 │ │ + local.get 125 │ │ call $zip_error_set │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 109 │ │ + local.set 126 │ │ i32.const 1 │ │ - local.set 110 │ │ - local.get 109 │ │ - local.get 110 │ │ + local.set 127 │ │ + local.get 126 │ │ + local.get 127 │ │ i32.and │ │ - local.set 111 │ │ + local.set 128 │ │ block ;; label = @3 │ │ - local.get 111 │ │ + local.get 128 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 112 │ │ - local.get 112 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 129 │ │ + local.get 129 │ │ call $_zip_buffer_free │ │ end │ │ - i32.const 0 │ │ - local.set 113 │ │ - local.get 7 │ │ - local.get 113 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 130 │ │ + local.get 8 │ │ + local.get 130 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 114 │ │ - local.get 114 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 131 │ │ + local.get 131 │ │ call $_zip_buffer_get_64 │ │ - local.set 115 │ │ - local.get 7 │ │ - local.get 115 │ │ + local.set 132 │ │ + local.get 8 │ │ + local.get 132 │ │ i64.store offset=48 │ │ - local.get 7 │ │ - i32.load offset=148 │ │ - local.set 116 │ │ + local.get 8 │ │ + i32.load offset=132 │ │ + local.set 133 │ │ i32.const 4 │ │ - local.set 117 │ │ - local.get 116 │ │ - local.get 117 │ │ + local.set 134 │ │ + local.get 133 │ │ + local.get 134 │ │ i32.and │ │ - local.set 118 │ │ + local.set 135 │ │ block ;; label = @2 │ │ - local.get 118 │ │ + local.get 135 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ + local.get 8 │ │ i64.load offset=48 │ │ - local.set 119 │ │ - local.get 7 │ │ + local.set 136 │ │ + local.get 8 │ │ i64.load offset=56 │ │ - local.set 120 │ │ - local.get 119 │ │ - local.get 120 │ │ + local.set 137 │ │ + local.get 136 │ │ + local.get 137 │ │ i64.add │ │ - local.set 121 │ │ + local.set 138 │ │ i64.const 12 │ │ - local.set 122 │ │ - local.get 121 │ │ - local.get 122 │ │ + local.set 139 │ │ + local.get 138 │ │ + local.get 139 │ │ i64.add │ │ - local.set 123 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 124 │ │ - local.get 7 │ │ + local.set 140 │ │ + local.get 8 │ │ + i64.load offset=136 │ │ + local.set 141 │ │ + local.get 8 │ │ i64.load offset=24 │ │ - local.set 125 │ │ - local.get 124 │ │ - local.get 125 │ │ + local.set 142 │ │ + local.get 141 │ │ + local.get 142 │ │ i64.add │ │ - local.set 126 │ │ - local.get 123 │ │ - local.set 127 │ │ - local.get 126 │ │ - local.set 128 │ │ - local.get 127 │ │ - local.get 128 │ │ + local.set 143 │ │ + local.get 140 │ │ + local.set 144 │ │ + local.get 143 │ │ + local.set 145 │ │ + local.get 144 │ │ + local.get 145 │ │ i64.ne │ │ - local.set 129 │ │ + local.set 146 │ │ i32.const 1 │ │ - local.set 130 │ │ - local.get 129 │ │ - local.get 130 │ │ + local.set 147 │ │ + local.get 146 │ │ + local.get 147 │ │ i32.and │ │ - local.set 131 │ │ - local.get 131 │ │ + local.set 148 │ │ + local.get 148 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 132 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 149 │ │ i32.const 21 │ │ - local.set 133 │ │ + local.set 150 │ │ i32.const 8 │ │ - local.set 134 │ │ - local.get 132 │ │ - local.get 133 │ │ - local.get 134 │ │ + local.set 151 │ │ + local.get 149 │ │ + local.get 150 │ │ + local.get 151 │ │ call $zip_error_set │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 135 │ │ + local.set 152 │ │ i32.const 1 │ │ - local.set 136 │ │ - local.get 135 │ │ - local.get 136 │ │ + local.set 153 │ │ + local.get 152 │ │ + local.get 153 │ │ i32.and │ │ - local.set 137 │ │ + local.set 154 │ │ block ;; label = @3 │ │ - local.get 137 │ │ + local.get 154 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 138 │ │ - local.get 138 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 155 │ │ + local.get 155 │ │ call $_zip_buffer_free │ │ end │ │ - i32.const 0 │ │ - local.set 139 │ │ - local.get 7 │ │ - local.get 139 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 156 │ │ + local.get 8 │ │ + local.get 156 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 140 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 157 │ │ i64.const 4 │ │ - local.set 141 │ │ - local.get 140 │ │ - local.get 141 │ │ + local.set 158 │ │ + local.get 157 │ │ + local.get 158 │ │ call $_zip_buffer_get │ │ drop │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 142 │ │ - local.get 142 │ │ - call $_zip_buffer_get_32 │ │ - local.set 143 │ │ - local.get 7 │ │ - local.get 143 │ │ - i32.store offset=12 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 144 │ │ - local.get 144 │ │ - call $_zip_buffer_get_32 │ │ - local.set 145 │ │ - local.get 7 │ │ - local.get 145 │ │ - i32.store offset=4 │ │ - local.get 7 │ │ - i32.load offset=16 │ │ - local.set 146 │ │ - i32.const 65535 │ │ - local.set 147 │ │ - local.get 146 │ │ - local.set 148 │ │ - local.get 147 │ │ - local.set 149 │ │ - local.get 148 │ │ - local.get 149 │ │ - i32.eq │ │ - local.set 150 │ │ - i32.const 1 │ │ - local.set 151 │ │ - local.get 150 │ │ - local.get 151 │ │ - i32.and │ │ - local.set 152 │ │ - block ;; label = @2 │ │ - local.get 152 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 153 │ │ - local.get 7 │ │ - local.get 153 │ │ - i32.store offset=16 │ │ - end │ │ - local.get 7 │ │ - i32.load offset=8 │ │ - local.set 154 │ │ - i32.const 65535 │ │ - local.set 155 │ │ - local.get 154 │ │ - local.set 156 │ │ - local.get 155 │ │ - local.set 157 │ │ - local.get 156 │ │ - local.get 157 │ │ - i32.eq │ │ - local.set 158 │ │ - i32.const 1 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 159 │ │ - local.get 158 │ │ local.get 159 │ │ - i32.and │ │ + call $_zip_buffer_get_32 │ │ local.set 160 │ │ - block ;; label = @2 │ │ - local.get 160 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=4 │ │ - local.set 161 │ │ - local.get 7 │ │ - local.get 161 │ │ - i32.store offset=8 │ │ - end │ │ - local.get 7 │ │ - i32.load offset=148 │ │ + local.get 8 │ │ + local.get 160 │ │ + i32.store offset=8 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 161 │ │ + local.get 161 │ │ + call $_zip_buffer_get_32 │ │ local.set 162 │ │ - i32.const 4 │ │ + local.get 8 │ │ + i32.load offset=12 │ │ local.set 163 │ │ local.get 162 │ │ + local.set 164 │ │ local.get 163 │ │ + local.set 165 │ │ + local.get 164 │ │ + local.get 165 │ │ + i32.ne │ │ + local.set 166 │ │ + i32.const 1 │ │ + local.set 167 │ │ + local.get 166 │ │ + local.get 167 │ │ i32.and │ │ - local.set 164 │ │ + local.set 168 │ │ block ;; label = @2 │ │ - local.get 164 │ │ + local.get 168 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=8 │ │ - local.set 165 │ │ - local.get 7 │ │ - i32.load offset=4 │ │ - local.set 166 │ │ - local.get 165 │ │ - local.set 167 │ │ - local.get 166 │ │ - local.set 168 │ │ - local.get 167 │ │ - local.get 168 │ │ - i32.ne │ │ + local.get 8 │ │ + i32.load offset=128 │ │ local.set 169 │ │ - i32.const 1 │ │ + i32.const 21 │ │ local.set 170 │ │ + i32.const 22 │ │ + local.set 171 │ │ local.get 169 │ │ local.get 170 │ │ - i32.and │ │ - local.set 171 │ │ - block ;; label = @3 │ │ - local.get 171 │ │ - br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=16 │ │ - local.set 172 │ │ - local.get 7 │ │ - i32.load offset=12 │ │ - local.set 173 │ │ - local.get 172 │ │ - local.set 174 │ │ - local.get 173 │ │ - local.set 175 │ │ - local.get 174 │ │ - local.get 175 │ │ - i32.ne │ │ - local.set 176 │ │ - i32.const 1 │ │ - local.set 177 │ │ - local.get 176 │ │ - local.get 177 │ │ - i32.and │ │ - local.set 178 │ │ - local.get 178 │ │ - i32.eqz │ │ - br_if 1 (;@2;) │ │ - end │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 179 │ │ - i32.const 21 │ │ - local.set 180 │ │ - i32.const 10 │ │ - local.set 181 │ │ - local.get 179 │ │ - local.get 180 │ │ - local.get 181 │ │ + local.get 171 │ │ call $zip_error_set │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 182 │ │ + local.set 172 │ │ i32.const 1 │ │ - local.set 183 │ │ - local.get 182 │ │ - local.get 183 │ │ + local.set 173 │ │ + local.get 172 │ │ + local.get 173 │ │ i32.and │ │ - local.set 184 │ │ + local.set 174 │ │ block ;; label = @3 │ │ - local.get 184 │ │ + local.get 174 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 185 │ │ - local.get 185 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 175 │ │ + local.get 175 │ │ call $_zip_buffer_free │ │ end │ │ - i32.const 0 │ │ - local.set 186 │ │ - local.get 7 │ │ - local.get 186 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 176 │ │ + local.get 8 │ │ + local.get 176 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=16 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 177 │ │ + local.get 177 │ │ + call $_zip_buffer_get_64 │ │ + local.set 178 │ │ + local.get 8 │ │ + local.get 178 │ │ + i64.store offset=32 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 179 │ │ + local.get 179 │ │ + call $_zip_buffer_get_64 │ │ + local.set 180 │ │ + local.get 8 │ │ + local.get 180 │ │ + i64.store offset=40 │ │ + local.get 8 │ │ + i64.load offset=40 │ │ + local.set 181 │ │ + local.get 8 │ │ + i64.load offset=32 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.set 183 │ │ + local.get 182 │ │ + local.set 184 │ │ + local.get 183 │ │ + local.get 184 │ │ + i64.ne │ │ + local.set 185 │ │ + i32.const 1 │ │ + local.set 186 │ │ + local.get 185 │ │ + local.get 186 │ │ + i32.and │ │ local.set 187 │ │ block ;; label = @2 │ │ - block ;; label = @3 │ │ - local.get 187 │ │ - br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=8 │ │ - local.set 188 │ │ - local.get 188 │ │ - i32.eqz │ │ - br_if 1 (;@2;) │ │ - end │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 189 │ │ + local.get 187 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 188 │ │ i32.const 1 │ │ - local.set 190 │ │ + local.set 189 │ │ i32.const 0 │ │ - local.set 191 │ │ + local.set 190 │ │ + local.get 188 │ │ local.get 189 │ │ local.get 190 │ │ - local.get 191 │ │ call $zip_error_set │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 192 │ │ + local.set 191 │ │ i32.const 1 │ │ - local.set 193 │ │ + local.set 192 │ │ + local.get 191 │ │ local.get 192 │ │ - local.get 193 │ │ i32.and │ │ - local.set 194 │ │ + local.set 193 │ │ block ;; label = @3 │ │ - local.get 194 │ │ + local.get 193 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 195 │ │ - local.get 195 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 194 │ │ + local.get 194 │ │ call $_zip_buffer_free │ │ end │ │ - i32.const 0 │ │ - local.set 196 │ │ - local.get 7 │ │ - local.get 196 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 195 │ │ + local.get 8 │ │ + local.get 195 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=164 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 196 │ │ + local.get 196 │ │ + call $_zip_buffer_get_64 │ │ local.set 197 │ │ + local.get 8 │ │ local.get 197 │ │ - call $_zip_buffer_get_64 │ │ + i64.store offset=48 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 198 │ │ - local.get 7 │ │ local.get 198 │ │ - i64.store offset=40 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ + call $_zip_buffer_get_64 │ │ local.set 199 │ │ + local.get 8 │ │ local.get 199 │ │ - call $_zip_buffer_get_64 │ │ + i64.store offset=120 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ local.set 200 │ │ - local.get 7 │ │ local.get 200 │ │ - i64.store offset=32 │ │ - local.get 7 │ │ - i64.load offset=40 │ │ + call $_zip_buffer_ok │ │ local.set 201 │ │ - local.get 7 │ │ - i64.load offset=32 │ │ + i32.const 1 │ │ local.set 202 │ │ local.get 201 │ │ - local.set 203 │ │ local.get 202 │ │ - local.set 204 │ │ - local.get 203 │ │ - local.get 204 │ │ - i64.ne │ │ - local.set 205 │ │ - i32.const 1 │ │ - local.set 206 │ │ - local.get 205 │ │ - local.get 206 │ │ - i32.and │ │ - local.set 207 │ │ - block ;; label = @2 │ │ - local.get 207 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 208 │ │ - i32.const 1 │ │ - local.set 209 │ │ - i32.const 0 │ │ - local.set 210 │ │ - local.get 208 │ │ - local.get 209 │ │ - local.get 210 │ │ - call $zip_error_set │ │ - local.get 7 │ │ - i32.load8_u offset=23 │ │ - local.set 211 │ │ - i32.const 1 │ │ - local.set 212 │ │ - local.get 211 │ │ - local.get 212 │ │ - i32.and │ │ - local.set 213 │ │ - block ;; label = @3 │ │ - local.get 213 │ │ - i32.eqz │ │ - br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 214 │ │ - local.get 214 │ │ - call $_zip_buffer_free │ │ - end │ │ - i32.const 0 │ │ - local.set 215 │ │ - local.get 7 │ │ - local.get 215 │ │ - i32.store offset=172 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 216 │ │ - local.get 216 │ │ - call $_zip_buffer_get_64 │ │ - local.set 217 │ │ - local.get 7 │ │ - local.get 217 │ │ - i64.store offset=48 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 218 │ │ - local.get 218 │ │ - call $_zip_buffer_get_64 │ │ - local.set 219 │ │ - local.get 7 │ │ - local.get 219 │ │ - i64.store offset=128 │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 220 │ │ - local.get 220 │ │ - call $_zip_buffer_ok │ │ - local.set 221 │ │ - i32.const 1 │ │ - local.set 222 │ │ - local.get 221 │ │ - local.get 222 │ │ i32.and │ │ - local.set 223 │ │ + local.set 203 │ │ block ;; label = @2 │ │ - local.get 223 │ │ + local.get 203 │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 224 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 204 │ │ i32.const 20 │ │ - local.set 225 │ │ + local.set 205 │ │ i32.const 0 │ │ - local.set 226 │ │ - local.get 224 │ │ - local.get 225 │ │ - local.get 226 │ │ + local.set 206 │ │ + local.get 204 │ │ + local.get 205 │ │ + local.get 206 │ │ call $zip_error_set │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 227 │ │ + local.set 207 │ │ i32.const 1 │ │ - local.set 228 │ │ - local.get 227 │ │ - local.get 228 │ │ + local.set 208 │ │ + local.get 207 │ │ + local.get 208 │ │ i32.and │ │ - local.set 229 │ │ + local.set 209 │ │ block ;; label = @3 │ │ - local.get 229 │ │ + local.get 209 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 230 │ │ - local.get 230 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 210 │ │ + local.get 210 │ │ call $_zip_buffer_free │ │ end │ │ - i32.const 0 │ │ - local.set 231 │ │ - local.get 7 │ │ - local.get 231 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 211 │ │ + local.get 8 │ │ + local.get 211 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ + local.get 8 │ │ i32.load8_u offset=23 │ │ - local.set 232 │ │ + local.set 212 │ │ i32.const 1 │ │ - local.set 233 │ │ - local.get 232 │ │ - local.get 233 │ │ + local.set 213 │ │ + local.get 212 │ │ + local.get 213 │ │ i32.and │ │ - local.set 234 │ │ + local.set 214 │ │ block ;; label = @2 │ │ - local.get 234 │ │ + local.get 214 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=164 │ │ - local.set 235 │ │ - local.get 235 │ │ + local.get 8 │ │ + i32.load offset=144 │ │ + local.set 215 │ │ + local.get 215 │ │ call $_zip_buffer_free │ │ end │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 236 │ │ + local.get 8 │ │ + i64.load offset=120 │ │ + local.set 216 │ │ i64.const 9223372036854775807 │ │ - local.set 237 │ │ - local.get 236 │ │ - local.set 238 │ │ - local.get 237 │ │ - local.set 239 │ │ - local.get 238 │ │ - local.get 239 │ │ + local.set 217 │ │ + local.get 216 │ │ + local.set 218 │ │ + local.get 217 │ │ + local.set 219 │ │ + local.get 218 │ │ + local.get 219 │ │ i64.gt_u │ │ - local.set 240 │ │ + local.set 220 │ │ i32.const 1 │ │ - local.set 241 │ │ - local.get 240 │ │ - local.get 241 │ │ + local.set 221 │ │ + local.get 220 │ │ + local.get 221 │ │ i32.and │ │ - local.set 242 │ │ + local.set 222 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 242 │ │ + local.get 222 │ │ br_if 0 (;@3;) │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 243 │ │ - local.get 7 │ │ + local.get 8 │ │ + i64.load offset=120 │ │ + local.set 223 │ │ + local.get 8 │ │ i64.load offset=48 │ │ - local.set 244 │ │ - local.get 243 │ │ - local.get 244 │ │ + local.set 224 │ │ + local.get 223 │ │ + local.get 224 │ │ i64.add │ │ - local.set 245 │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 246 │ │ - local.get 245 │ │ - local.set 247 │ │ - local.get 246 │ │ - local.set 248 │ │ - local.get 247 │ │ - local.get 248 │ │ + local.set 225 │ │ + local.get 8 │ │ + i64.load offset=120 │ │ + local.set 226 │ │ + local.get 225 │ │ + local.set 227 │ │ + local.get 226 │ │ + local.set 228 │ │ + local.get 227 │ │ + local.get 228 │ │ i64.lt_u │ │ - local.set 249 │ │ + local.set 229 │ │ i32.const 1 │ │ - local.set 250 │ │ - local.get 249 │ │ - local.get 250 │ │ + local.set 230 │ │ + local.get 229 │ │ + local.get 230 │ │ i32.and │ │ - local.set 251 │ │ - local.get 251 │ │ + local.set 231 │ │ + local.get 231 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 252 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 232 │ │ i32.const 4 │ │ - local.set 253 │ │ + local.set 233 │ │ i32.const 22 │ │ - local.set 254 │ │ - local.get 252 │ │ - local.get 253 │ │ - local.get 254 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 255 │ │ - local.get 7 │ │ - local.get 255 │ │ - i32.store offset=172 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 256 │ │ - local.get 7 │ │ - i64.load offset=48 │ │ - local.set 257 │ │ - local.get 256 │ │ - local.get 257 │ │ - i64.add │ │ - local.set 258 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 259 │ │ - local.get 7 │ │ - i64.load offset=56 │ │ - local.set 260 │ │ - local.get 259 │ │ - local.get 260 │ │ - i64.add │ │ - local.set 261 │ │ - local.get 258 │ │ - local.set 262 │ │ - local.get 261 │ │ - local.set 263 │ │ - local.get 262 │ │ - local.get 263 │ │ - i64.gt_u │ │ - local.set 264 │ │ - i32.const 1 │ │ - local.set 265 │ │ - local.get 264 │ │ - local.get 265 │ │ - i32.and │ │ - local.set 266 │ │ - block ;; label = @2 │ │ - local.get 266 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 267 │ │ - i32.const 21 │ │ - local.set 268 │ │ - i32.const 1 │ │ - local.set 269 │ │ - local.get 267 │ │ - local.get 268 │ │ - local.get 269 │ │ + local.set 234 │ │ + local.get 232 │ │ + local.get 233 │ │ + local.get 234 │ │ call $zip_error_set │ │ - i32.const 0 │ │ - local.set 270 │ │ - local.get 7 │ │ - local.get 270 │ │ - i32.store offset=172 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 7 │ │ - i32.load offset=148 │ │ - local.set 271 │ │ - i32.const 4 │ │ - local.set 272 │ │ - local.get 271 │ │ - local.get 272 │ │ - i32.and │ │ - local.set 273 │ │ - block ;; label = @2 │ │ - local.get 273 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 274 │ │ - local.get 7 │ │ - i64.load offset=48 │ │ - local.set 275 │ │ - local.get 274 │ │ - local.get 275 │ │ - i64.add │ │ - local.set 276 │ │ - local.get 7 │ │ - i64.load offset=152 │ │ - local.set 277 │ │ - local.get 7 │ │ - i64.load offset=56 │ │ - local.set 278 │ │ - local.get 277 │ │ - local.get 278 │ │ - i64.add │ │ - local.set 279 │ │ - local.get 276 │ │ - local.set 280 │ │ - local.get 279 │ │ - local.set 281 │ │ - local.get 280 │ │ - local.get 281 │ │ - i64.ne │ │ - local.set 282 │ │ - i32.const 1 │ │ - local.set 283 │ │ - local.get 282 │ │ - local.get 283 │ │ - i32.and │ │ - local.set 284 │ │ - local.get 284 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 285 │ │ - i32.const 21 │ │ - local.set 286 │ │ i32.const 1 │ │ - local.set 287 │ │ - local.get 285 │ │ - local.get 286 │ │ - local.get 287 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 288 │ │ - local.get 7 │ │ - local.get 288 │ │ - i32.store offset=172 │ │ + local.set 235 │ │ + local.get 8 │ │ + local.get 235 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ + local.get 8 │ │ i64.load offset=40 │ │ - local.set 289 │ │ - local.get 7 │ │ + local.set 236 │ │ + local.get 8 │ │ i64.load offset=48 │ │ - local.set 290 │ │ + local.set 237 │ │ i64.const 46 │ │ - local.set 291 │ │ - local.get 290 │ │ - local.get 291 │ │ + local.set 238 │ │ + local.get 237 │ │ + local.get 238 │ │ i64.div_u │ │ - local.set 292 │ │ - local.get 289 │ │ - local.set 293 │ │ - local.get 292 │ │ - local.set 294 │ │ - local.get 293 │ │ - local.get 294 │ │ + local.set 239 │ │ + local.get 236 │ │ + local.set 240 │ │ + local.get 239 │ │ + local.set 241 │ │ + local.get 240 │ │ + local.get 241 │ │ i64.gt_u │ │ - local.set 295 │ │ + local.set 242 │ │ i32.const 1 │ │ - local.set 296 │ │ - local.get 295 │ │ - local.get 296 │ │ + local.set 243 │ │ + local.get 242 │ │ + local.get 243 │ │ i32.and │ │ - local.set 297 │ │ + local.set 244 │ │ block ;; label = @2 │ │ - local.get 297 │ │ + local.get 244 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 298 │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 245 │ │ i32.const 21 │ │ - local.set 299 │ │ + local.set 246 │ │ i32.const 11 │ │ - local.set 300 │ │ - local.get 298 │ │ - local.get 299 │ │ - local.get 300 │ │ + local.set 247 │ │ + local.get 245 │ │ + local.get 246 │ │ + local.get 247 │ │ call $zip_error_set │ │ - i32.const 0 │ │ - local.set 301 │ │ - local.get 7 │ │ - local.get 301 │ │ - i32.store offset=172 │ │ + i32.const 1 │ │ + local.set 248 │ │ + local.get 8 │ │ + local.get 248 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i64.load offset=40 │ │ - local.set 302 │ │ - local.get 7 │ │ - i32.load offset=144 │ │ - local.set 303 │ │ - local.get 302 │ │ - local.get 303 │ │ - call $_zip_cdir_new │ │ - local.set 304 │ │ - local.get 7 │ │ - local.get 304 │ │ - i32.store offset=140 │ │ - i32.const 0 │ │ - local.set 305 │ │ - local.get 304 │ │ - local.set 306 │ │ - local.get 305 │ │ - local.set 307 │ │ - local.get 306 │ │ - local.get 307 │ │ - i32.eq │ │ - local.set 308 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 249 │ │ + local.get 249 │ │ + i64.load offset=48 │ │ + local.set 250 │ │ + i64.const 4294967295 │ │ + local.set 251 │ │ + local.get 250 │ │ + local.set 252 │ │ + local.get 251 │ │ + local.set 253 │ │ + local.get 252 │ │ + local.get 253 │ │ + i64.ne │ │ + local.set 254 │ │ i32.const 1 │ │ - local.set 309 │ │ - local.get 308 │ │ - local.get 309 │ │ + local.set 255 │ │ + local.get 254 │ │ + local.get 255 │ │ i32.and │ │ - local.set 310 │ │ + local.set 256 │ │ block ;; label = @2 │ │ - local.get 310 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - i32.const 0 │ │ - local.set 311 │ │ - local.get 7 │ │ - local.get 311 │ │ - i32.store offset=172 │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 256 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 257 │ │ + local.get 257 │ │ + i64.load offset=48 │ │ + local.set 258 │ │ + local.get 8 │ │ + i64.load offset=48 │ │ + local.set 259 │ │ + local.get 258 │ │ + local.set 260 │ │ + local.get 259 │ │ + local.set 261 │ │ + local.get 260 │ │ + local.get 261 │ │ + i64.ne │ │ + local.set 262 │ │ + i32.const 1 │ │ + local.set 263 │ │ + local.get 262 │ │ + local.get 263 │ │ + i32.and │ │ + local.set 264 │ │ + local.get 264 │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 265 │ │ + local.get 265 │ │ + i64.load offset=56 │ │ + local.set 266 │ │ + i64.const 4294967295 │ │ + local.set 267 │ │ + local.get 266 │ │ + local.set 268 │ │ + local.get 267 │ │ + local.set 269 │ │ + local.get 268 │ │ + local.get 269 │ │ + i64.ne │ │ + local.set 270 │ │ + i32.const 1 │ │ + local.set 271 │ │ + local.get 270 │ │ + local.get 271 │ │ + i32.and │ │ + local.set 272 │ │ + block ;; label = @4 │ │ + local.get 272 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 273 │ │ + local.get 273 │ │ + i64.load offset=56 │ │ + local.set 274 │ │ + local.get 8 │ │ + i64.load offset=120 │ │ + local.set 275 │ │ + local.get 274 │ │ + local.set 276 │ │ + local.get 275 │ │ + local.set 277 │ │ + local.get 276 │ │ + local.get 277 │ │ + i64.ne │ │ + local.set 278 │ │ + i32.const 1 │ │ + local.set 279 │ │ + local.get 278 │ │ + local.get 279 │ │ + i32.and │ │ + local.set 280 │ │ + local.get 280 │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 281 │ │ + local.get 281 │ │ + i64.load offset=40 │ │ + local.set 282 │ │ + i64.const 65535 │ │ + local.set 283 │ │ + local.get 282 │ │ + local.set 284 │ │ + local.get 283 │ │ + local.set 285 │ │ + local.get 284 │ │ + local.get 285 │ │ + i64.ne │ │ + local.set 286 │ │ + i32.const 1 │ │ + local.set 287 │ │ + local.get 286 │ │ + local.get 287 │ │ + i32.and │ │ + local.set 288 │ │ + block ;; label = @4 │ │ + local.get 288 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 289 │ │ + local.get 289 │ │ + i64.load offset=40 │ │ + local.set 290 │ │ + local.get 8 │ │ + i64.load offset=40 │ │ + local.set 291 │ │ + local.get 290 │ │ + local.set 292 │ │ + local.get 291 │ │ + local.set 293 │ │ + local.get 292 │ │ + local.get 293 │ │ + i64.ne │ │ + local.set 294 │ │ + i32.const 1 │ │ + local.set 295 │ │ + local.get 294 │ │ + local.get 295 │ │ + i32.and │ │ + local.set 296 │ │ + local.get 296 │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 297 │ │ + local.get 297 │ │ + i64.load offset=32 │ │ + local.set 298 │ │ + i64.const 65535 │ │ + local.set 299 │ │ + local.get 298 │ │ + local.set 300 │ │ + local.get 299 │ │ + local.set 301 │ │ + local.get 300 │ │ + local.get 301 │ │ + i64.ne │ │ + local.set 302 │ │ + i32.const 1 │ │ + local.set 303 │ │ + local.get 302 │ │ + local.get 303 │ │ + i32.and │ │ + local.set 304 │ │ + block ;; label = @4 │ │ + local.get 304 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 305 │ │ + local.get 305 │ │ + i64.load offset=32 │ │ + local.set 306 │ │ + local.get 8 │ │ + i64.load offset=32 │ │ + local.set 307 │ │ + local.get 306 │ │ + local.set 308 │ │ + local.get 307 │ │ + local.set 309 │ │ + local.get 308 │ │ + local.get 309 │ │ + i64.ne │ │ + local.set 310 │ │ + i32.const 1 │ │ + local.set 311 │ │ + local.get 310 │ │ + local.get 311 │ │ + i32.and │ │ + local.set 312 │ │ + local.get 312 │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 313 │ │ + local.get 313 │ │ + i32.load offset=24 │ │ + local.set 314 │ │ + i32.const 65535 │ │ + local.set 315 │ │ + local.get 314 │ │ + local.set 316 │ │ + local.get 315 │ │ + local.set 317 │ │ + local.get 316 │ │ + local.get 317 │ │ + i32.ne │ │ + local.set 318 │ │ + i32.const 1 │ │ + local.set 319 │ │ + local.get 318 │ │ + local.get 319 │ │ + i32.and │ │ + local.set 320 │ │ + block ;; label = @4 │ │ + local.get 320 │ │ + i32.eqz │ │ + br_if 0 (;@4;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 321 │ │ + local.get 321 │ │ + i32.load offset=24 │ │ + local.set 322 │ │ + local.get 8 │ │ + i32.load offset=8 │ │ + local.set 323 │ │ + local.get 322 │ │ + local.set 324 │ │ + local.get 323 │ │ + local.set 325 │ │ + local.get 324 │ │ + local.get 325 │ │ + i32.ne │ │ + local.set 326 │ │ + i32.const 1 │ │ + local.set 327 │ │ + local.get 326 │ │ + local.get 327 │ │ + i32.and │ │ + local.set 328 │ │ + local.get 328 │ │ + br_if 1 (;@3;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 329 │ │ + local.get 329 │ │ + i32.load offset=28 │ │ + local.set 330 │ │ + i32.const 65535 │ │ + local.set 331 │ │ + local.get 330 │ │ + local.set 332 │ │ + local.get 331 │ │ + local.set 333 │ │ + local.get 332 │ │ + local.get 333 │ │ + i32.ne │ │ + local.set 334 │ │ + i32.const 1 │ │ + local.set 335 │ │ + local.get 334 │ │ + local.get 335 │ │ + i32.and │ │ + local.set 336 │ │ + local.get 336 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 337 │ │ + local.get 337 │ │ + i32.load offset=28 │ │ + local.set 338 │ │ + local.get 8 │ │ + i32.load offset=12 │ │ + local.set 339 │ │ + local.get 338 │ │ + local.set 340 │ │ + local.get 339 │ │ + local.set 341 │ │ + local.get 340 │ │ + local.get 341 │ │ + i32.ne │ │ + local.set 342 │ │ + i32.const 1 │ │ + local.set 343 │ │ + local.get 342 │ │ + local.get 343 │ │ + i32.and │ │ + local.set 344 │ │ + local.get 344 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + end │ │ + local.get 8 │ │ + i32.load offset=128 │ │ + local.set 345 │ │ + i32.const 21 │ │ + local.set 346 │ │ + i32.const 10 │ │ + local.set 347 │ │ + local.get 345 │ │ + local.get 346 │ │ + local.get 347 │ │ + call $zip_error_set │ │ + i32.const 1 │ │ + local.set 348 │ │ + local.get 8 │ │ + local.get 348 │ │ + i32.store offset=156 │ │ br 1 (;@1;) │ │ end │ │ - local.get 7 │ │ - i32.load offset=140 │ │ - local.set 312 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 349 │ │ i32.const 1 │ │ - local.set 313 │ │ - local.get 312 │ │ - local.get 313 │ │ - i32.store8 offset=44 │ │ - local.get 7 │ │ + local.set 350 │ │ + local.get 349 │ │ + local.get 350 │ │ + i32.store8 offset=76 │ │ + local.get 8 │ │ i64.load offset=48 │ │ - local.set 314 │ │ - local.get 7 │ │ - i32.load offset=140 │ │ - local.set 315 │ │ - local.get 315 │ │ - local.get 314 │ │ - i64.store offset=24 │ │ - local.get 7 │ │ - i64.load offset=128 │ │ - local.set 316 │ │ - local.get 7 │ │ - i32.load offset=140 │ │ - local.set 317 │ │ - local.get 317 │ │ - local.get 316 │ │ + local.set 351 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 352 │ │ + local.get 352 │ │ + local.get 351 │ │ + i64.store offset=48 │ │ + local.get 8 │ │ + i64.load offset=120 │ │ + local.set 353 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 354 │ │ + local.get 354 │ │ + local.get 353 │ │ + i64.store offset=56 │ │ + local.get 8 │ │ + i64.load offset=32 │ │ + local.set 355 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 356 │ │ + local.get 356 │ │ + local.get 355 │ │ i64.store offset=32 │ │ - local.get 7 │ │ - i32.load offset=140 │ │ - local.set 318 │ │ - local.get 7 │ │ - local.get 318 │ │ - i32.store offset=172 │ │ + local.get 8 │ │ + i64.load offset=40 │ │ + local.set 357 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 358 │ │ + local.get 358 │ │ + local.get 357 │ │ + i64.store offset=40 │ │ + local.get 8 │ │ + i32.load offset=8 │ │ + local.set 359 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 360 │ │ + local.get 360 │ │ + local.get 359 │ │ + i32.store offset=24 │ │ + local.get 8 │ │ + i32.load offset=12 │ │ + local.set 361 │ │ + local.get 8 │ │ + i32.load offset=152 │ │ + local.set 362 │ │ + local.get 362 │ │ + local.get 361 │ │ + i32.store offset=28 │ │ + i32.const 0 │ │ + local.set 363 │ │ + local.get 8 │ │ + local.get 363 │ │ + i32.store offset=156 │ │ end │ │ - local.get 7 │ │ - i32.load offset=172 │ │ - local.set 319 │ │ - i32.const 176 │ │ - local.set 320 │ │ - local.get 7 │ │ - local.get 320 │ │ + local.get 8 │ │ + i32.load offset=156 │ │ + local.set 364 │ │ + i32.const 160 │ │ + local.set 365 │ │ + local.get 8 │ │ + local.get 365 │ │ i32.add │ │ - local.set 321 │ │ - local.get 321 │ │ + local.set 366 │ │ + local.get 366 │ │ global.set $__stack_pointer │ │ - local.get 319 │ │ + local.get 364 │ │ return) │ │ - (func $_zip_read_eocd (type 33) (param i32 i64 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32) │ │ + (func $check_magic (type 80) (param i64 i32 i64 i32 i32) (result i32) │ │ + (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 4 │ │ - i32.const 80 │ │ local.set 5 │ │ - local.get 4 │ │ - local.get 5 │ │ - i32.sub │ │ + i32.const 48 │ │ local.set 6 │ │ + local.get 5 │ │ local.get 6 │ │ + i32.sub │ │ + local.set 7 │ │ + local.get 7 │ │ global.set $__stack_pointer │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 0 │ │ - i32.store offset=72 │ │ - local.get 6 │ │ + i64.store offset=32 │ │ + local.get 7 │ │ local.get 1 │ │ - i64.store offset=64 │ │ - local.get 6 │ │ + i32.store offset=28 │ │ + local.get 7 │ │ local.get 2 │ │ - i32.store offset=60 │ │ - local.get 6 │ │ + i64.store offset=16 │ │ + local.get 7 │ │ local.get 3 │ │ - i32.store offset=56 │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 7 │ │ + i32.store offset=12 │ │ local.get 7 │ │ - call $_zip_buffer_left │ │ + local.get 4 │ │ + i32.store offset=8 │ │ + local.get 7 │ │ + i64.load offset=16 │ │ local.set 8 │ │ - i64.const 22 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ local.set 9 │ │ local.get 8 │ │ local.set 10 │ │ local.get 9 │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ - i64.lt_u │ │ + i64.le_u │ │ local.set 12 │ │ i32.const 1 │ │ local.set 13 │ │ local.get 12 │ │ local.get 13 │ │ i32.and │ │ local.set 14 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 14 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ + local.get 7 │ │ + i32.load offset=28 │ │ local.set 15 │ │ - i32.const 21 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ local.set 16 │ │ - i32.const 7 │ │ + local.get 7 │ │ + i64.load offset=16 │ │ local.set 17 │ │ - local.get 15 │ │ local.get 16 │ │ local.get 17 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ + i64.sub │ │ local.set 18 │ │ - local.get 6 │ │ + local.get 15 │ │ local.get 18 │ │ - i32.store offset=76 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 19 │ │ - local.get 19 │ │ - call $_zip_buffer_offset │ │ - local.set 20 │ │ - local.get 6 │ │ - local.get 20 │ │ - i64.store offset=8 │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 21 │ │ - i64.const 4 │ │ - local.set 22 │ │ - local.get 21 │ │ - local.get 22 │ │ - call $_zip_buffer_get │ │ - drop │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 23 │ │ - local.get 23 │ │ - call $_zip_buffer_get_32 │ │ - local.set 24 │ │ - block ;; label = @2 │ │ + call $_zip_buffer_set_offset │ │ + local.set 19 │ │ + i32.const 0 │ │ + local.set 20 │ │ + local.get 19 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.set 22 │ │ + local.get 21 │ │ + local.get 22 │ │ + i32.lt_s │ │ + local.set 23 │ │ + i32.const 1 │ │ + local.set 24 │ │ + local.get 23 │ │ local.get 24 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ + i32.and │ │ local.set 25 │ │ - i32.const 1 │ │ - local.set 26 │ │ - i32.const 0 │ │ - local.set 27 │ │ - local.get 25 │ │ - local.get 26 │ │ - local.get 27 │ │ - call $zip_error_set │ │ + block ;; label = @3 │ │ + block ;; label = @4 │ │ + local.get 25 │ │ + br_if 0 (;@4;) │ │ + local.get 7 │ │ + i32.load offset=28 │ │ + local.set 26 │ │ + i64.const 4 │ │ + local.set 27 │ │ + local.get 26 │ │ + local.get 27 │ │ + call $_zip_buffer_get │ │ + local.set 28 │ │ + local.get 7 │ │ + local.get 28 │ │ + i32.store offset=4 │ │ + i32.const 0 │ │ + local.set 29 │ │ + local.get 28 │ │ + local.set 30 │ │ + local.get 29 │ │ + local.set 31 │ │ + local.get 30 │ │ + local.get 31 │ │ + i32.eq │ │ + local.set 32 │ │ + i32.const 1 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.get 33 │ │ + i32.and │ │ + local.set 34 │ │ + local.get 34 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + end │ │ + i32.const 0 │ │ + local.set 35 │ │ + i32.const 1 │ │ + local.set 36 │ │ + local.get 35 │ │ + local.get 36 │ │ + i32.and │ │ + local.set 37 │ │ + local.get 7 │ │ + local.get 37 │ │ + i32.store8 offset=47 │ │ + br 2 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 38 │ │ + local.get 7 │ │ + i32.load offset=8 │ │ + local.set 39 │ │ + local.get 39 │ │ + i32.load align=1 │ │ + local.set 40 │ │ + local.get 38 │ │ + i32.load align=1 │ │ + local.set 41 │ │ + local.get 41 │ │ + local.get 40 │ │ + i32.ne │ │ + local.set 42 │ │ i32.const 0 │ │ - local.set 28 │ │ - local.get 6 │ │ - local.get 28 │ │ - i32.store offset=76 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 29 │ │ - local.get 29 │ │ - call $_zip_buffer_get_16 │ │ - local.set 30 │ │ - i32.const 65535 │ │ - local.set 31 │ │ - local.get 30 │ │ - local.get 31 │ │ - i32.and │ │ - local.set 32 │ │ - local.get 32 │ │ - i64.extend_i32_u │ │ - local.set 33 │ │ - local.get 6 │ │ - local.get 33 │ │ - i64.store offset=40 │ │ - local.get 6 │ │ - i32.load offset=72 │ │ - local.set 34 │ │ - local.get 34 │ │ - call $_zip_buffer_get_16 │ │ - local.set 35 │ │ - i32.const 65535 │ │ - local.set 36 │ │ - local.get 35 │ │ - local.get 36 │ │ - i32.and │ │ - local.set 37 │ │ - local.get 37 │ │ - i64.extend_i32_u │ │ - local.set 38 │ │ - local.get 6 │ │ - local.get 38 │ │ - i64.store offset=32 │ │ - local.get 6 │ │ - i64.load offset=32 │ │ - local.set 39 │ │ - local.get 6 │ │ - i64.load offset=40 │ │ - local.set 40 │ │ - local.get 39 │ │ - local.set 41 │ │ - local.get 40 │ │ - local.set 42 │ │ - local.get 41 │ │ - local.get 42 │ │ - i64.ne │ │ - local.set 43 │ │ - i32.const 1 │ │ - local.set 44 │ │ - local.get 43 │ │ - local.get 44 │ │ - i32.and │ │ - local.set 45 │ │ - block ;; label = @2 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.set 44 │ │ + local.get 43 │ │ + local.set 45 │ │ + local.get 44 │ │ local.get 45 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ + i32.eq │ │ local.set 46 │ │ - i32.const 19 │ │ + i32.const 1 │ │ local.set 47 │ │ - i32.const 0 │ │ - local.set 48 │ │ local.get 46 │ │ local.get 47 │ │ + i32.and │ │ + local.set 48 │ │ + local.get 7 │ │ local.get 48 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 49 │ │ - local.get 6 │ │ - local.get 49 │ │ - i32.store offset=76 │ │ + i32.store8 offset=47 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=72 │ │ + local.get 7 │ │ + i32.load offset=12 │ │ + local.set 49 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ local.set 50 │ │ - local.get 50 │ │ - call $_zip_buffer_get_32 │ │ + i32.const 0 │ │ local.set 51 │ │ + local.get 49 │ │ + local.get 50 │ │ local.get 51 │ │ + call $zip_source_seek │ │ local.set 52 │ │ - local.get 52 │ │ - i64.extend_i32_u │ │ + i32.const 0 │ │ local.set 53 │ │ - local.get 6 │ │ - local.get 53 │ │ - i64.store offset=24 │ │ - local.get 6 │ │ - i32.load offset=72 │ │ + local.get 52 │ │ local.set 54 │ │ - local.get 54 │ │ - call $_zip_buffer_get_32 │ │ + local.get 53 │ │ local.set 55 │ │ + local.get 54 │ │ local.get 55 │ │ + i32.lt_s │ │ local.set 56 │ │ - local.get 56 │ │ - i64.extend_i32_u │ │ + i32.const 1 │ │ local.set 57 │ │ - local.get 6 │ │ + local.get 56 │ │ local.get 57 │ │ - i64.store offset=16 │ │ - local.get 6 │ │ - i64.load offset=16 │ │ - local.set 58 │ │ - local.get 6 │ │ - i64.load offset=24 │ │ - local.set 59 │ │ - local.get 58 │ │ - local.get 59 │ │ - i64.add │ │ - local.set 60 │ │ - local.get 6 │ │ - i64.load offset=16 │ │ - local.set 61 │ │ - local.get 60 │ │ - local.set 62 │ │ - local.get 61 │ │ - local.set 63 │ │ - local.get 62 │ │ - local.get 63 │ │ - i64.lt_u │ │ - local.set 64 │ │ - i32.const 1 │ │ - local.set 65 │ │ - local.get 64 │ │ - local.get 65 │ │ i32.and │ │ - local.set 66 │ │ + local.set 58 │ │ block ;; label = @2 │ │ - local.get 66 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ - local.set 67 │ │ - i32.const 4 │ │ - local.set 68 │ │ - i32.const 22 │ │ - local.set 69 │ │ - local.get 67 │ │ - local.get 68 │ │ - local.get 69 │ │ - call $zip_error_set │ │ + block ;; label = @3 │ │ + local.get 58 │ │ + br_if 0 (;@3;) │ │ + local.get 7 │ │ + i32.load offset=12 │ │ + local.set 59 │ │ + local.get 7 │ │ + local.set 60 │ │ + i64.const 4 │ │ + local.set 61 │ │ + local.get 59 │ │ + local.get 60 │ │ + local.get 61 │ │ + call $zip_source_read │ │ + local.set 62 │ │ + i64.const 4 │ │ + local.set 63 │ │ + local.get 62 │ │ + local.set 64 │ │ + local.get 63 │ │ + local.set 65 │ │ + local.get 64 │ │ + local.get 65 │ │ + i64.ne │ │ + local.set 66 │ │ + i32.const 1 │ │ + local.set 67 │ │ + local.get 66 │ │ + local.get 67 │ │ + i32.and │ │ + local.set 68 │ │ + local.get 68 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + end │ │ i32.const 0 │ │ + local.set 69 │ │ + i32.const 1 │ │ local.set 70 │ │ - local.get 6 │ │ + local.get 69 │ │ local.get 70 │ │ - i32.store offset=76 │ │ + i32.and │ │ + local.set 71 │ │ + local.get 7 │ │ + local.get 71 │ │ + i32.store8 offset=47 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i64.load offset=16 │ │ - local.set 71 │ │ - local.get 6 │ │ - i64.load offset=24 │ │ + local.get 7 │ │ local.set 72 │ │ - local.get 71 │ │ - local.get 72 │ │ - i64.add │ │ + local.get 7 │ │ + i32.load offset=8 │ │ local.set 73 │ │ - local.get 6 │ │ - i64.load offset=64 │ │ + local.get 73 │ │ + i32.load align=1 │ │ local.set 74 │ │ - local.get 6 │ │ - i64.load offset=8 │ │ + local.get 72 │ │ + i32.load align=1 │ │ local.set 75 │ │ - local.get 74 │ │ local.get 75 │ │ - i64.add │ │ + local.get 74 │ │ + i32.ne │ │ local.set 76 │ │ - local.get 73 │ │ + i32.const 0 │ │ local.set 77 │ │ local.get 76 │ │ local.set 78 │ │ local.get 77 │ │ - local.get 78 │ │ - i64.gt_u │ │ local.set 79 │ │ - i32.const 1 │ │ - local.set 80 │ │ + local.get 78 │ │ local.get 79 │ │ + i32.eq │ │ + local.set 80 │ │ + i32.const 1 │ │ + local.set 81 │ │ local.get 80 │ │ + local.get 81 │ │ i32.and │ │ - local.set 81 │ │ + local.set 82 │ │ + local.get 7 │ │ + local.get 82 │ │ + i32.store8 offset=47 │ │ + end │ │ + local.get 7 │ │ + i32.load8_u offset=47 │ │ + local.set 83 │ │ + i32.const 1 │ │ + local.set 84 │ │ + local.get 83 │ │ + local.get 84 │ │ + i32.and │ │ + local.set 85 │ │ + i32.const 48 │ │ + local.set 86 │ │ + local.get 7 │ │ + local.get 86 │ │ + i32.add │ │ + local.set 87 │ │ + local.get 87 │ │ + global.set $__stack_pointer │ │ + local.get 85 │ │ + return) │ │ + (func $check_eocd (type 4) (param i32 i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 3 │ │ + i32.const 16 │ │ + local.set 4 │ │ + local.get 3 │ │ + local.get 4 │ │ + i32.sub │ │ + local.set 5 │ │ + local.get 5 │ │ + global.set $__stack_pointer │ │ + local.get 5 │ │ + local.get 0 │ │ + i32.store offset=8 │ │ + local.get 5 │ │ + local.get 1 │ │ + i32.store offset=4 │ │ + local.get 5 │ │ + local.get 2 │ │ + i32.store │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 6 │ │ + local.get 6 │ │ + i64.load offset=32 │ │ + local.set 7 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 8 │ │ + local.get 8 │ │ + i64.load offset=40 │ │ + local.set 9 │ │ + local.get 7 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.set 11 │ │ + local.get 10 │ │ + local.get 11 │ │ + i64.ne │ │ + local.set 12 │ │ + i32.const 1 │ │ + local.set 13 │ │ + local.get 12 │ │ + local.get 13 │ │ + i32.and │ │ + local.set 14 │ │ + block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 81 │ │ + block ;; label = @3 │ │ + local.get 14 │ │ + br_if 0 (;@3;) │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 15 │ │ + local.get 15 │ │ + i32.load offset=24 │ │ + local.set 16 │ │ + local.get 16 │ │ + br_if 0 (;@3;) │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 17 │ │ + local.get 17 │ │ + i32.load offset=28 │ │ + local.set 18 │ │ + local.get 18 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + end │ │ + local.get 5 │ │ + i32.load │ │ + local.set 19 │ │ + i32.const 1 │ │ + local.set 20 │ │ + i32.const 0 │ │ + local.set 21 │ │ + local.get 19 │ │ + local.get 20 │ │ + local.get 21 │ │ + call $zip_error_set │ │ + i32.const 0 │ │ + local.set 22 │ │ + i32.const 1 │ │ + local.set 23 │ │ + local.get 22 │ │ + local.get 23 │ │ + i32.and │ │ + local.set 24 │ │ + local.get 5 │ │ + local.get 24 │ │ + i32.store8 offset=15 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 25 │ │ + local.get 25 │ │ + i64.load offset=56 │ │ + local.set 26 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 27 │ │ + local.get 27 │ │ + i64.load offset=48 │ │ + local.set 28 │ │ + local.get 26 │ │ + local.get 28 │ │ + i64.add │ │ + local.set 29 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 30 │ │ + local.get 30 │ │ + i64.load offset=56 │ │ + local.set 31 │ │ + local.get 29 │ │ + local.set 32 │ │ + local.get 31 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.get 33 │ │ + i64.lt_u │ │ + local.set 34 │ │ + i32.const 1 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.get 35 │ │ + i32.and │ │ + local.set 36 │ │ + block ;; label = @2 │ │ + local.get 36 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ - local.set 82 │ │ - i32.const 21 │ │ - local.set 83 │ │ - i32.const 1 │ │ - local.set 84 │ │ - local.get 82 │ │ - local.get 83 │ │ - local.get 84 │ │ + local.get 5 │ │ + i32.load │ │ + local.set 37 │ │ + i32.const 4 │ │ + local.set 38 │ │ + i32.const 22 │ │ + local.set 39 │ │ + local.get 37 │ │ + local.get 38 │ │ + local.get 39 │ │ call $zip_error_set │ │ i32.const 0 │ │ - local.set 85 │ │ - local.get 6 │ │ - local.get 85 │ │ - i32.store offset=76 │ │ + local.set 40 │ │ + i32.const 1 │ │ + local.set 41 │ │ + local.get 40 │ │ + local.get 41 │ │ + i32.and │ │ + local.set 42 │ │ + local.get 5 │ │ + local.get 42 │ │ + i32.store8 offset=15 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=60 │ │ - local.set 86 │ │ + local.get 5 │ │ + i32.load offset=4 │ │ + local.set 43 │ │ i32.const 4 │ │ - local.set 87 │ │ - local.get 86 │ │ - local.get 87 │ │ + local.set 44 │ │ + local.get 43 │ │ + local.get 44 │ │ i32.and │ │ - local.set 88 │ │ + local.set 45 │ │ block ;; label = @2 │ │ - local.get 88 │ │ + local.get 45 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i64.load offset=16 │ │ - local.set 89 │ │ - local.get 6 │ │ - i64.load offset=24 │ │ - local.set 90 │ │ - local.get 89 │ │ - local.get 90 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 46 │ │ + local.get 46 │ │ + i64.load offset=56 │ │ + local.set 47 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 48 │ │ + local.get 48 │ │ + i64.load offset=48 │ │ + local.set 49 │ │ + local.get 47 │ │ + local.get 49 │ │ i64.add │ │ - local.set 91 │ │ - local.get 6 │ │ + local.set 50 │ │ + local.get 5 │ │ + i32.load offset=8 │ │ + local.set 51 │ │ + local.get 51 │ │ i64.load offset=64 │ │ - local.set 92 │ │ - local.get 6 │ │ - i64.load offset=8 │ │ - local.set 93 │ │ - local.get 92 │ │ - local.get 93 │ │ - i64.add │ │ - local.set 94 │ │ - local.get 91 │ │ - local.set 95 │ │ - local.get 94 │ │ - local.set 96 │ │ - local.get 95 │ │ - local.get 96 │ │ + local.set 52 │ │ + local.get 50 │ │ + local.set 53 │ │ + local.get 52 │ │ + local.set 54 │ │ + local.get 53 │ │ + local.get 54 │ │ i64.ne │ │ - local.set 97 │ │ + local.set 55 │ │ i32.const 1 │ │ - local.set 98 │ │ - local.get 97 │ │ - local.get 98 │ │ + local.set 56 │ │ + local.get 55 │ │ + local.get 56 │ │ i32.and │ │ - local.set 99 │ │ - local.get 99 │ │ + local.set 57 │ │ + local.get 57 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=56 │ │ - local.set 100 │ │ + local.get 5 │ │ + i32.load │ │ + local.set 58 │ │ i32.const 21 │ │ - local.set 101 │ │ + local.set 59 │ │ i32.const 3 │ │ - local.set 102 │ │ - local.get 100 │ │ - local.get 101 │ │ - local.get 102 │ │ + local.set 60 │ │ + local.get 58 │ │ + local.get 59 │ │ + local.get 60 │ │ call $zip_error_set │ │ i32.const 0 │ │ - local.set 103 │ │ - local.get 6 │ │ - local.get 103 │ │ - i32.store offset=76 │ │ + local.set 61 │ │ + i32.const 1 │ │ + local.set 62 │ │ + local.get 61 │ │ + local.get 62 │ │ + i32.and │ │ + local.set 63 │ │ + local.get 5 │ │ + local.get 63 │ │ + i32.store8 offset=15 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i64.load offset=32 │ │ - local.set 104 │ │ - local.get 6 │ │ - i32.load offset=56 │ │ - local.set 105 │ │ - local.get 104 │ │ - local.get 105 │ │ - call $_zip_cdir_new │ │ - local.set 106 │ │ - local.get 6 │ │ - local.get 106 │ │ - i32.store offset=52 │ │ - i32.const 0 │ │ - local.set 107 │ │ - local.get 106 │ │ - local.set 108 │ │ - local.get 107 │ │ - local.set 109 │ │ - local.get 108 │ │ - local.get 109 │ │ - i32.eq │ │ - local.set 110 │ │ i32.const 1 │ │ - local.set 111 │ │ - local.get 110 │ │ - local.get 111 │ │ + local.set 64 │ │ + i32.const 1 │ │ + local.set 65 │ │ + local.get 64 │ │ + local.get 65 │ │ i32.and │ │ - local.set 112 │ │ - block ;; label = @2 │ │ - local.get 112 │ │ - i32.eqz │ │ - br_if 0 (;@2;) │ │ - i32.const 0 │ │ - local.set 113 │ │ - local.get 6 │ │ - local.get 113 │ │ - i32.store offset=76 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 6 │ │ - i32.load offset=52 │ │ - local.set 114 │ │ - i32.const 0 │ │ - local.set 115 │ │ - local.get 114 │ │ - local.get 115 │ │ - i32.store8 offset=44 │ │ - local.get 6 │ │ - i64.load offset=24 │ │ - local.set 116 │ │ - local.get 6 │ │ - i32.load offset=52 │ │ - local.set 117 │ │ - local.get 117 │ │ - local.get 116 │ │ - i64.store offset=24 │ │ - local.get 6 │ │ - i64.load offset=16 │ │ - local.set 118 │ │ - local.get 6 │ │ - i32.load offset=52 │ │ - local.set 119 │ │ - local.get 119 │ │ - local.get 118 │ │ - i64.store offset=32 │ │ - local.get 6 │ │ - i32.load offset=52 │ │ - local.set 120 │ │ - local.get 6 │ │ - local.get 120 │ │ - i32.store offset=76 │ │ + local.set 66 │ │ + local.get 5 │ │ + local.get 66 │ │ + i32.store8 offset=15 │ │ end │ │ - local.get 6 │ │ - i32.load offset=76 │ │ - local.set 121 │ │ - i32.const 80 │ │ - local.set 122 │ │ - local.get 6 │ │ - local.get 122 │ │ + local.get 5 │ │ + i32.load8_u offset=15 │ │ + local.set 67 │ │ + i32.const 1 │ │ + local.set 68 │ │ + local.get 67 │ │ + local.get 68 │ │ + i32.and │ │ + local.set 69 │ │ + i32.const 16 │ │ + local.set 70 │ │ + local.get 5 │ │ + local.get 70 │ │ i32.add │ │ - local.set 123 │ │ - local.get 123 │ │ + local.set 71 │ │ + local.get 71 │ │ global.set $__stack_pointer │ │ - local.get 121 │ │ + local.get 69 │ │ return) │ │ (func $_zip_headercomp (type 6) (param i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ i32.const 16 │ │ local.set 3 │ │ @@ -287588,14 +289488,291 @@ │ │ local.get 3 │ │ local.get 22 │ │ i32.add │ │ local.set 23 │ │ local.get 23 │ │ global.set $__stack_pointer │ │ return) │ │ + (func $zip_realloc (type 81) (param i32 i32 i64 i64 i32) (result i32) │ │ + (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 5 │ │ + i32.const 64 │ │ + local.set 6 │ │ + local.get 5 │ │ + local.get 6 │ │ + i32.sub │ │ + local.set 7 │ │ + local.get 7 │ │ + global.set $__stack_pointer │ │ + local.get 7 │ │ + local.get 0 │ │ + i32.store offset=56 │ │ + local.get 7 │ │ + local.get 1 │ │ + i32.store offset=52 │ │ + local.get 7 │ │ + local.get 2 │ │ + i64.store offset=40 │ │ + local.get 7 │ │ + local.get 3 │ │ + i64.store offset=32 │ │ + local.get 7 │ │ + local.get 4 │ │ + i32.store offset=28 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ + local.set 8 │ │ + i64.const 0 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.set 11 │ │ + local.get 10 │ │ + local.get 11 │ │ + i64.eq │ │ + local.set 12 │ │ + i32.const 1 │ │ + local.set 13 │ │ + local.get 12 │ │ + local.get 13 │ │ + i32.and │ │ + local.set 14 │ │ + block ;; label = @1 │ │ + block ;; label = @2 │ │ + local.get 14 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + i32.const 1 │ │ + local.set 15 │ │ + i32.const 1 │ │ + local.set 16 │ │ + local.get 15 │ │ + local.get 16 │ │ + i32.and │ │ + local.set 17 │ │ + local.get 7 │ │ + local.get 17 │ │ + i32.store8 offset=63 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=52 │ │ + local.set 18 │ │ + local.get 18 │ │ + i64.load │ │ + local.set 19 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ + local.set 20 │ │ + local.get 19 │ │ + local.get 20 │ │ + i64.add │ │ + local.set 21 │ │ + local.get 7 │ │ + local.get 21 │ │ + i64.store offset=16 │ │ + local.get 7 │ │ + i64.load offset=16 │ │ + local.set 22 │ │ + local.get 7 │ │ + i64.load offset=32 │ │ + local.set 23 │ │ + local.get 22 │ │ + local.set 24 │ │ + local.get 23 │ │ + local.set 25 │ │ + local.get 24 │ │ + local.get 25 │ │ + i64.lt_u │ │ + local.set 26 │ │ + i32.const 1 │ │ + local.set 27 │ │ + local.get 26 │ │ + local.get 27 │ │ + i32.and │ │ + local.set 28 │ │ + block ;; label = @2 │ │ + block ;; label = @3 │ │ + local.get 28 │ │ + br_if 0 (;@3;) │ │ + local.get 7 │ │ + i64.load offset=16 │ │ + local.set 29 │ │ + local.get 7 │ │ + i64.load offset=40 │ │ + local.set 30 │ │ + i64.const 4294967295 │ │ + local.set 31 │ │ + local.get 31 │ │ + local.get 30 │ │ + i64.div_u │ │ + local.set 32 │ │ + local.get 29 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.set 34 │ │ + local.get 33 │ │ + local.get 34 │ │ + i64.gt_u │ │ + local.set 35 │ │ + i32.const 1 │ │ + local.set 36 │ │ + local.get 35 │ │ + local.get 36 │ │ + i32.and │ │ + local.set 37 │ │ + local.get 37 │ │ + i32.eqz │ │ + br_if 1 (;@2;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=28 │ │ + local.set 38 │ │ + i32.const 14 │ │ + local.set 39 │ │ + i32.const 0 │ │ + local.set 40 │ │ + local.get 38 │ │ + local.get 39 │ │ + local.get 40 │ │ + call $zip_error_set │ │ + i32.const 0 │ │ + local.set 41 │ │ + i32.const 1 │ │ + local.set 42 │ │ + local.get 41 │ │ + local.get 42 │ │ + i32.and │ │ + local.set 43 │ │ + local.get 7 │ │ + local.get 43 │ │ + i32.store8 offset=63 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=56 │ │ + local.set 44 │ │ + local.get 44 │ │ + i32.load │ │ + local.set 45 │ │ + local.get 7 │ │ + i64.load offset=16 │ │ + local.set 46 │ │ + local.get 7 │ │ + i64.load offset=40 │ │ + local.set 47 │ │ + local.get 46 │ │ + local.get 47 │ │ + i64.mul │ │ + local.set 48 │ │ + local.get 48 │ │ + i32.wrap_i64 │ │ + local.set 49 │ │ + local.get 45 │ │ + local.get 49 │ │ + call $dlrealloc │ │ + local.set 50 │ │ + local.get 7 │ │ + local.get 50 │ │ + i32.store offset=12 │ │ + i32.const 0 │ │ + local.set 51 │ │ + local.get 50 │ │ + local.set 52 │ │ + local.get 51 │ │ + local.set 53 │ │ + local.get 52 │ │ + local.get 53 │ │ + i32.eq │ │ + local.set 54 │ │ + i32.const 1 │ │ + local.set 55 │ │ + local.get 54 │ │ + local.get 55 │ │ + i32.and │ │ + local.set 56 │ │ + block ;; label = @2 │ │ + local.get 56 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + local.get 7 │ │ + i32.load offset=28 │ │ + local.set 57 │ │ + i32.const 14 │ │ + local.set 58 │ │ + i32.const 0 │ │ + local.set 59 │ │ + local.get 57 │ │ + local.get 58 │ │ + local.get 59 │ │ + call $zip_error_set │ │ + i32.const 0 │ │ + local.set 60 │ │ + i32.const 1 │ │ + local.set 61 │ │ + local.get 60 │ │ + local.get 61 │ │ + i32.and │ │ + local.set 62 │ │ + local.get 7 │ │ + local.get 62 │ │ + i32.store8 offset=63 │ │ + br 1 (;@1;) │ │ + end │ │ + local.get 7 │ │ + i32.load offset=12 │ │ + local.set 63 │ │ + local.get 7 │ │ + i32.load offset=56 │ │ + local.set 64 │ │ + local.get 64 │ │ + local.get 63 │ │ + i32.store │ │ + local.get 7 │ │ + i64.load offset=16 │ │ + local.set 65 │ │ + local.get 7 │ │ + i32.load offset=52 │ │ + local.set 66 │ │ + local.get 66 │ │ + local.get 65 │ │ + i64.store │ │ + i32.const 1 │ │ + local.set 67 │ │ + i32.const 1 │ │ + local.set 68 │ │ + local.get 67 │ │ + local.get 68 │ │ + i32.and │ │ + local.set 69 │ │ + local.get 7 │ │ + local.get 69 │ │ + i32.store8 offset=63 │ │ + end │ │ + local.get 7 │ │ + i32.load8_u offset=63 │ │ + local.set 70 │ │ + i32.const 1 │ │ + local.set 71 │ │ + local.get 70 │ │ + local.get 71 │ │ + i32.and │ │ + local.set 72 │ │ + i32.const 64 │ │ + local.set 73 │ │ + local.get 7 │ │ + local.get 73 │ │ + i32.add │ │ + local.set 74 │ │ + local.get 74 │ │ + global.set $__stack_pointer │ │ + local.get 72 │ │ + return) │ │ (func $zip_source_accept_empty (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ @@ -288926,15 +291103,15 @@ │ │ local.set 109 │ │ local.get 108 │ │ local.get 109 │ │ i32.add │ │ local.set 110 │ │ i32.const 21 │ │ local.set 111 │ │ - i32.const 2147483409 │ │ + i32.const 2147483411 │ │ local.set 112 │ │ local.get 110 │ │ local.get 111 │ │ local.get 112 │ │ call $zip_error_set │ │ i64.const -1 │ │ local.set 113 │ │ @@ -292344,15 +294521,15 @@ │ │ local.get 60 │ │ i32.add │ │ local.set 61 │ │ local.get 61 │ │ global.set $__stack_pointer │ │ local.get 59 │ │ return) │ │ - (func $zip_source_seek_compute_offset (type 78) (param i64 i64 i32 i64 i32) (result i64) │ │ + (func $zip_source_seek_compute_offset (type 82) (param i64 i64 i32 i64 i32) (result i64) │ │ (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i64 i64 i64 i32 i64 i64 i32 i64 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 64 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ @@ -294572,15 +296749,15 @@ │ │ local.get 83 │ │ i32.add │ │ local.set 84 │ │ local.get 84 │ │ global.set $__stack_pointer │ │ local.get 82 │ │ return) │ │ - (func $_zip_source_window_new (type 79) (param i32 i64 i64 i32 i64 i32 i32 i32 i64 i32 i32) (result i32) │ │ + (func $_zip_source_window_new (type 83) (param i32 i64 i64 i32 i64 i32 i32 i32 i64 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 11 │ │ i32.const 112 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ @@ -297328,226 +299505,181 @@ │ │ i32.add │ │ local.set 11 │ │ local.get 11 │ │ global.set $__stack_pointer │ │ local.get 9 │ │ return) │ │ (func $_zip_register_source (type 6) (param i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ - i32.const 32 │ │ + i32.const 16 │ │ local.set 3 │ │ local.get 2 │ │ local.get 3 │ │ i32.sub │ │ local.set 4 │ │ local.get 4 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ local.get 0 │ │ - i32.store offset=24 │ │ + i32.store offset=8 │ │ local.get 4 │ │ local.get 1 │ │ - i32.store offset=20 │ │ + i32.store offset=4 │ │ local.get 4 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 5 │ │ local.get 5 │ │ - i32.load offset=68 │ │ + i64.load offset=72 │ │ local.set 6 │ │ - i32.const 1 │ │ + i64.const 1 │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ - i32.add │ │ + i64.add │ │ local.set 8 │ │ local.get 4 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 9 │ │ local.get 9 │ │ - i32.load offset=72 │ │ + i64.load offset=80 │ │ local.set 10 │ │ local.get 8 │ │ local.set 11 │ │ local.get 10 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ - i32.ge_u │ │ + i64.ge_u │ │ local.set 13 │ │ i32.const 1 │ │ local.set 14 │ │ local.get 13 │ │ local.get 14 │ │ i32.and │ │ local.set 15 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 15 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ local.set 16 │ │ - local.get 16 │ │ - i32.load offset=72 │ │ + i32.const 88 │ │ local.set 17 │ │ - i32.const 10 │ │ - local.set 18 │ │ + local.get 16 │ │ local.get 17 │ │ - local.get 18 │ │ i32.add │ │ - local.set 19 │ │ - local.get 4 │ │ - local.get 19 │ │ - i32.store offset=12 │ │ + local.set 18 │ │ local.get 4 │ │ - i32.load offset=24 │ │ + i32.load offset=8 │ │ + local.set 19 │ │ + i32.const 80 │ │ local.set 20 │ │ + local.get 19 │ │ local.get 20 │ │ - i32.load offset=76 │ │ + i32.add │ │ local.set 21 │ │ local.get 4 │ │ - i32.load offset=12 │ │ + i32.load offset=8 │ │ local.set 22 │ │ - i32.const 2 │ │ + i32.const 8 │ │ local.set 23 │ │ local.get 22 │ │ local.get 23 │ │ - i32.shl │ │ + i32.add │ │ local.set 24 │ │ - local.get 21 │ │ - local.get 24 │ │ - call $dlrealloc │ │ + i64.const 4 │ │ local.set 25 │ │ - local.get 4 │ │ - local.get 25 │ │ - i32.store offset=16 │ │ - local.get 4 │ │ - i32.load offset=16 │ │ + i64.const 10 │ │ local.set 26 │ │ - i32.const 0 │ │ - local.set 27 │ │ + local.get 18 │ │ + local.get 21 │ │ + local.get 25 │ │ local.get 26 │ │ + local.get 24 │ │ + call $zip_realloc │ │ + local.set 27 │ │ + i32.const 1 │ │ local.set 28 │ │ local.get 27 │ │ - local.set 29 │ │ local.get 28 │ │ - local.get 29 │ │ - i32.eq │ │ - local.set 30 │ │ - i32.const 1 │ │ - local.set 31 │ │ - local.get 30 │ │ - local.get 31 │ │ i32.and │ │ - local.set 32 │ │ + local.set 29 │ │ block ;; label = @3 │ │ - local.get 32 │ │ - i32.eqz │ │ + local.get 29 │ │ br_if 0 (;@3;) │ │ - local.get 4 │ │ - i32.load offset=24 │ │ - local.set 33 │ │ - i32.const 8 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.get 34 │ │ - i32.add │ │ - local.set 35 │ │ - i32.const 14 │ │ - local.set 36 │ │ - i32.const 0 │ │ - local.set 37 │ │ - local.get 35 │ │ - local.get 36 │ │ - local.get 37 │ │ - call $zip_error_set │ │ i32.const -1 │ │ - local.set 38 │ │ + local.set 30 │ │ local.get 4 │ │ - local.get 38 │ │ - i32.store offset=28 │ │ + local.get 30 │ │ + i32.store offset=12 │ │ br 2 (;@1;) │ │ end │ │ - local.get 4 │ │ - i32.load offset=12 │ │ - local.set 39 │ │ - local.get 4 │ │ - i32.load offset=24 │ │ - local.set 40 │ │ - local.get 40 │ │ - local.get 39 │ │ - i32.store offset=72 │ │ - local.get 4 │ │ - i32.load offset=16 │ │ - local.set 41 │ │ - local.get 4 │ │ - i32.load offset=24 │ │ - local.set 42 │ │ - local.get 42 │ │ - local.get 41 │ │ - i32.store offset=76 │ │ end │ │ local.get 4 │ │ - i32.load offset=20 │ │ - local.set 43 │ │ + i32.load offset=4 │ │ + local.set 31 │ │ local.get 4 │ │ - i32.load offset=24 │ │ - local.set 44 │ │ - local.get 44 │ │ - i32.load offset=76 │ │ - local.set 45 │ │ + i32.load offset=8 │ │ + local.set 32 │ │ + local.get 32 │ │ + i32.load offset=88 │ │ + local.set 33 │ │ local.get 4 │ │ - i32.load offset=24 │ │ - local.set 46 │ │ - local.get 46 │ │ - i32.load offset=68 │ │ - local.set 47 │ │ - i32.const 1 │ │ - local.set 48 │ │ - local.get 47 │ │ - local.get 48 │ │ - i32.add │ │ - local.set 49 │ │ - local.get 46 │ │ - local.get 49 │ │ - i32.store offset=68 │ │ + i32.load offset=8 │ │ + local.set 34 │ │ + local.get 34 │ │ + i64.load offset=72 │ │ + local.set 35 │ │ + i64.const 1 │ │ + local.set 36 │ │ + local.get 35 │ │ + local.get 36 │ │ + i64.add │ │ + local.set 37 │ │ + local.get 34 │ │ + local.get 37 │ │ + i64.store offset=72 │ │ + local.get 35 │ │ + i32.wrap_i64 │ │ + local.set 38 │ │ i32.const 2 │ │ - local.set 50 │ │ - local.get 47 │ │ - local.get 50 │ │ + local.set 39 │ │ + local.get 38 │ │ + local.get 39 │ │ i32.shl │ │ - local.set 51 │ │ - local.get 45 │ │ - local.get 51 │ │ + local.set 40 │ │ + local.get 33 │ │ + local.get 40 │ │ i32.add │ │ - local.set 52 │ │ - local.get 52 │ │ - local.get 43 │ │ + local.set 41 │ │ + local.get 41 │ │ + local.get 31 │ │ i32.store │ │ i32.const 0 │ │ - local.set 53 │ │ + local.set 42 │ │ local.get 4 │ │ - local.get 53 │ │ - i32.store offset=28 │ │ + local.get 42 │ │ + i32.store offset=12 │ │ end │ │ local.get 4 │ │ - i32.load offset=28 │ │ - local.set 54 │ │ - i32.const 32 │ │ - local.set 55 │ │ + i32.load offset=12 │ │ + local.set 43 │ │ + i32.const 16 │ │ + local.set 44 │ │ local.get 4 │ │ - local.get 55 │ │ + local.get 44 │ │ i32.add │ │ - local.set 56 │ │ - local.get 56 │ │ + local.set 45 │ │ + local.get 45 │ │ global.set $__stack_pointer │ │ - local.get 54 │ │ + local.get 43 │ │ return) │ │ (func $_zip_source_invalidate (type 5) (param i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ @@ -297607,192 +299739,201 @@ │ │ local.get 15 │ │ i32.add │ │ local.set 16 │ │ local.get 16 │ │ global.set $__stack_pointer │ │ return) │ │ (func $_zip_deregister_source (type 1) (param i32 i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ i32.const 16 │ │ local.set 3 │ │ local.get 2 │ │ local.get 3 │ │ i32.sub │ │ local.set 4 │ │ local.get 4 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 4 │ │ local.get 1 │ │ i32.store offset=8 │ │ - i32.const 0 │ │ + i64.const 0 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ - i32.store offset=4 │ │ + i64.store │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ local.get 4 │ │ - i32.load offset=4 │ │ + i64.load │ │ local.set 6 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 7 │ │ local.get 7 │ │ - i32.load offset=68 │ │ + i64.load offset=72 │ │ local.set 8 │ │ local.get 6 │ │ local.set 9 │ │ local.get 8 │ │ local.set 10 │ │ local.get 9 │ │ local.get 10 │ │ - i32.lt_u │ │ + i64.lt_u │ │ local.set 11 │ │ i32.const 1 │ │ local.set 12 │ │ local.get 11 │ │ local.get 12 │ │ i32.and │ │ local.set 13 │ │ local.get 13 │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 14 │ │ local.get 14 │ │ - i32.load offset=76 │ │ + i32.load offset=88 │ │ local.set 15 │ │ local.get 4 │ │ - i32.load offset=4 │ │ + i64.load │ │ local.set 16 │ │ - i32.const 2 │ │ - local.set 17 │ │ local.get 16 │ │ - local.get 17 │ │ - i32.shl │ │ + i32.wrap_i64 │ │ + local.set 17 │ │ + i32.const 2 │ │ local.set 18 │ │ - local.get 15 │ │ + local.get 17 │ │ local.get 18 │ │ - i32.add │ │ + i32.shl │ │ local.set 19 │ │ + local.get 15 │ │ local.get 19 │ │ - i32.load │ │ + i32.add │ │ local.set 20 │ │ + local.get 20 │ │ + i32.load │ │ + local.set 21 │ │ local.get 4 │ │ i32.load offset=8 │ │ - local.set 21 │ │ - local.get 20 │ │ local.set 22 │ │ local.get 21 │ │ local.set 23 │ │ local.get 22 │ │ + local.set 24 │ │ local.get 23 │ │ + local.get 24 │ │ i32.eq │ │ - local.set 24 │ │ - i32.const 1 │ │ local.set 25 │ │ - local.get 24 │ │ + i32.const 1 │ │ + local.set 26 │ │ local.get 25 │ │ + local.get 26 │ │ i32.and │ │ - local.set 26 │ │ + local.set 27 │ │ block ;; label = @3 │ │ - local.get 26 │ │ + local.get 27 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ i32.load offset=12 │ │ - local.set 27 │ │ - local.get 27 │ │ - i32.load offset=76 │ │ local.set 28 │ │ + local.get 28 │ │ + i32.load offset=88 │ │ + local.set 29 │ │ local.get 4 │ │ i32.load offset=12 │ │ - local.set 29 │ │ - local.get 29 │ │ - i32.load offset=68 │ │ local.set 30 │ │ - i32.const 1 │ │ - local.set 31 │ │ local.get 30 │ │ - local.get 31 │ │ - i32.sub │ │ + i64.load offset=72 │ │ + local.set 31 │ │ + i64.const 1 │ │ local.set 32 │ │ - i32.const 2 │ │ - local.set 33 │ │ + local.get 31 │ │ local.get 32 │ │ + i64.sub │ │ + local.set 33 │ │ local.get 33 │ │ - i32.shl │ │ + i32.wrap_i64 │ │ local.set 34 │ │ - local.get 28 │ │ - local.get 34 │ │ - i32.add │ │ + i32.const 2 │ │ local.set 35 │ │ + local.get 34 │ │ local.get 35 │ │ - i32.load │ │ + i32.shl │ │ local.set 36 │ │ - local.get 4 │ │ - i32.load offset=12 │ │ + local.get 29 │ │ + local.get 36 │ │ + i32.add │ │ local.set 37 │ │ local.get 37 │ │ - i32.load offset=76 │ │ + i32.load │ │ local.set 38 │ │ local.get 4 │ │ - i32.load offset=4 │ │ + i32.load offset=12 │ │ local.set 39 │ │ - i32.const 2 │ │ - local.set 40 │ │ local.get 39 │ │ - local.get 40 │ │ - i32.shl │ │ + i32.load offset=88 │ │ + local.set 40 │ │ + local.get 4 │ │ + i64.load │ │ local.set 41 │ │ - local.get 38 │ │ local.get 41 │ │ - i32.add │ │ + i32.wrap_i64 │ │ local.set 42 │ │ - local.get 42 │ │ - local.get 36 │ │ - i32.store │ │ - local.get 4 │ │ - i32.load offset=12 │ │ + i32.const 2 │ │ local.set 43 │ │ + local.get 42 │ │ local.get 43 │ │ - i32.load offset=68 │ │ + i32.shl │ │ local.set 44 │ │ - i32.const -1 │ │ - local.set 45 │ │ + local.get 40 │ │ local.get 44 │ │ - local.get 45 │ │ i32.add │ │ + local.set 45 │ │ + local.get 45 │ │ + local.get 38 │ │ + i32.store │ │ + local.get 4 │ │ + i32.load offset=12 │ │ local.set 46 │ │ - local.get 43 │ │ local.get 46 │ │ - i32.store offset=68 │ │ + i64.load offset=72 │ │ + local.set 47 │ │ + i64.const -1 │ │ + local.set 48 │ │ + local.get 47 │ │ + local.get 48 │ │ + i64.add │ │ + local.set 49 │ │ + local.get 46 │ │ + local.get 49 │ │ + i64.store offset=72 │ │ br 2 (;@1;) │ │ end │ │ local.get 4 │ │ - i32.load offset=4 │ │ - local.set 47 │ │ - i32.const 1 │ │ - local.set 48 │ │ - local.get 47 │ │ - local.get 48 │ │ - i32.add │ │ - local.set 49 │ │ + i64.load │ │ + local.set 50 │ │ + i64.const 1 │ │ + local.set 51 │ │ + local.get 50 │ │ + local.get 51 │ │ + i64.add │ │ + local.set 52 │ │ local.get 4 │ │ - local.get 49 │ │ - i32.store offset=4 │ │ + local.get 52 │ │ + i64.store │ │ br 0 (;@2;) │ │ end │ │ end │ │ return) │ │ - (func $zip_source_buffer_with_attributes_create (type 80) (param i32 i64 i32 i32 i32) (result i32) │ │ + (func $zip_source_buffer_with_attributes_create (type 84) (param i32 i64 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 48 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ @@ -297950,15 +300091,15 @@ │ │ local.get 41 │ │ i32.add │ │ local.set 42 │ │ local.get 42 │ │ global.set $__stack_pointer │ │ local.get 40 │ │ return) │ │ - (func $zip_source_buffer_fragment_with_attributes_create (type 80) (param i32 i64 i32 i32 i32) (result i32) │ │ + (func $zip_source_buffer_fragment_with_attributes_create (type 84) (param i32 i64 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 48 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ @@ -300479,15 +302620,15 @@ │ │ i32.add │ │ local.set 288 │ │ local.get 288 │ │ global.set $__stack_pointer │ │ local.get 286 │ │ return) │ │ (func $buffer_grow_fragments (type 76) (param i32 i64 i32) (result i32) │ │ - (local i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i64 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 48 │ │ local.set 4 │ │ local.get 3 │ │ local.get 4 │ │ i32.sub │ │ @@ -300500,402 +302641,234 @@ │ │ local.get 5 │ │ local.get 1 │ │ i64.store offset=32 │ │ local.get 5 │ │ local.get 2 │ │ i32.store offset=28 │ │ local.get 5 │ │ - i64.load offset=32 │ │ - local.set 6 │ │ - local.get 5 │ │ i32.load offset=40 │ │ - local.set 7 │ │ - local.get 7 │ │ + local.set 6 │ │ + local.get 6 │ │ i64.load offset=16 │ │ + local.set 7 │ │ + i64.const 1 │ │ local.set 8 │ │ - local.get 6 │ │ - local.set 9 │ │ + local.get 7 │ │ local.get 8 │ │ - local.set 10 │ │ + i64.add │ │ + local.set 9 │ │ + local.get 5 │ │ local.get 9 │ │ - local.get 10 │ │ - i64.lt_u │ │ + i64.store offset=8 │ │ + local.get 5 │ │ + i64.load offset=32 │ │ + local.set 10 │ │ + local.get 5 │ │ + i32.load offset=40 │ │ local.set 11 │ │ - i32.const 1 │ │ - local.set 12 │ │ local.get 11 │ │ + i64.load offset=16 │ │ + local.set 12 │ │ + local.get 10 │ │ + local.set 13 │ │ local.get 12 │ │ + local.set 14 │ │ + local.get 13 │ │ + local.get 14 │ │ + i64.le_u │ │ + local.set 15 │ │ + i32.const 1 │ │ + local.set 16 │ │ + local.get 15 │ │ + local.get 16 │ │ i32.and │ │ - local.set 13 │ │ + local.set 17 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 13 │ │ + local.get 17 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 1 │ │ - local.set 14 │ │ + local.set 18 │ │ i32.const 1 │ │ - local.set 15 │ │ - local.get 14 │ │ - local.get 15 │ │ + local.set 19 │ │ + local.get 18 │ │ + local.get 19 │ │ i32.and │ │ - local.set 16 │ │ + local.set 20 │ │ local.get 5 │ │ - local.get 16 │ │ + local.get 20 │ │ i32.store8 offset=47 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ i64.load offset=32 │ │ - local.set 17 │ │ - i64.const 4 │ │ - local.set 18 │ │ - local.get 17 │ │ - local.get 18 │ │ - i64.shl │ │ - local.set 19 │ │ - local.get 5 │ │ - local.get 19 │ │ - i64.store offset=8 │ │ - local.get 5 │ │ - i64.load offset=32 │ │ - local.set 20 │ │ - i64.const 1 │ │ local.set 21 │ │ - local.get 20 │ │ - local.get 21 │ │ - i64.add │ │ + local.get 5 │ │ + i32.load offset=40 │ │ local.set 22 │ │ - i64.const 3 │ │ - local.set 23 │ │ local.get 22 │ │ + i64.load offset=16 │ │ + local.set 23 │ │ + local.get 21 │ │ local.get 23 │ │ - i64.shl │ │ + i64.sub │ │ local.set 24 │ │ local.get 5 │ │ local.get 24 │ │ - i64.store │ │ + i64.store offset=16 │ │ local.get 5 │ │ - i64.load offset=32 │ │ + i32.load offset=40 │ │ local.set 25 │ │ - i64.const -1 │ │ + local.get 5 │ │ + i32.load offset=40 │ │ local.set 26 │ │ - local.get 25 │ │ + i32.const 16 │ │ local.set 27 │ │ local.get 26 │ │ - local.set 28 │ │ local.get 27 │ │ - local.get 28 │ │ - i64.eq │ │ + i32.add │ │ + local.set 28 │ │ + local.get 5 │ │ + i64.load offset=16 │ │ local.set 29 │ │ - i32.const 1 │ │ + local.get 5 │ │ + i32.load offset=28 │ │ local.set 30 │ │ + i64.const 16 │ │ + local.set 31 │ │ + local.get 25 │ │ + local.get 28 │ │ + local.get 31 │ │ local.get 29 │ │ local.get 30 │ │ - i32.and │ │ - local.set 31 │ │ - block ;; label = @2 │ │ - block ;; label = @3 │ │ - local.get 31 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i64.load offset=8 │ │ - local.set 32 │ │ - local.get 5 │ │ - i64.load offset=32 │ │ - local.set 33 │ │ - local.get 32 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.set 35 │ │ - local.get 34 │ │ - local.get 35 │ │ - i64.lt_u │ │ - local.set 36 │ │ - i32.const 1 │ │ - local.set 37 │ │ - local.get 36 │ │ - local.get 37 │ │ - i32.and │ │ - local.set 38 │ │ - local.get 38 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i64.load offset=8 │ │ - local.set 39 │ │ - i64.const 4294967295 │ │ - local.set 40 │ │ - local.get 39 │ │ - local.set 41 │ │ - local.get 40 │ │ - local.set 42 │ │ - local.get 41 │ │ - local.get 42 │ │ - i64.gt_u │ │ - local.set 43 │ │ - i32.const 1 │ │ - local.set 44 │ │ - local.get 43 │ │ - local.get 44 │ │ - i32.and │ │ - local.set 45 │ │ - local.get 45 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i64.load │ │ - local.set 46 │ │ - local.get 5 │ │ - i64.load offset=32 │ │ - local.set 47 │ │ - local.get 46 │ │ - local.set 48 │ │ - local.get 47 │ │ - local.set 49 │ │ - local.get 48 │ │ - local.get 49 │ │ - i64.lt_u │ │ - local.set 50 │ │ - i32.const 1 │ │ - local.set 51 │ │ - local.get 50 │ │ - local.get 51 │ │ - i32.and │ │ - local.set 52 │ │ - local.get 52 │ │ - br_if 0 (;@3;) │ │ - local.get 5 │ │ - i64.load │ │ - local.set 53 │ │ - i64.const 4294967295 │ │ - local.set 54 │ │ - local.get 53 │ │ - local.set 55 │ │ - local.get 54 │ │ - local.set 56 │ │ - local.get 55 │ │ - local.get 56 │ │ - i64.gt_u │ │ - local.set 57 │ │ - i32.const 1 │ │ - local.set 58 │ │ - local.get 57 │ │ - local.get 58 │ │ - i32.and │ │ - local.set 59 │ │ - local.get 59 │ │ - i32.eqz │ │ - br_if 1 (;@2;) │ │ - end │ │ - local.get 5 │ │ - i32.load offset=28 │ │ - local.set 60 │ │ - i32.const 14 │ │ - local.set 61 │ │ - i32.const 0 │ │ - local.set 62 │ │ - local.get 60 │ │ - local.get 61 │ │ - local.get 62 │ │ - call $zip_error_set │ │ - i32.const 0 │ │ - local.set 63 │ │ - i32.const 1 │ │ - local.set 64 │ │ - local.get 63 │ │ - local.get 64 │ │ - i32.and │ │ - local.set 65 │ │ - local.get 5 │ │ - local.get 65 │ │ - i32.store8 offset=47 │ │ - br 1 (;@1;) │ │ - end │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 66 │ │ - local.get 66 │ │ - i32.load │ │ - local.set 67 │ │ - local.get 5 │ │ - i64.load offset=8 │ │ - local.set 68 │ │ - local.get 68 │ │ - i32.wrap_i64 │ │ - local.set 69 │ │ - local.get 67 │ │ - local.get 69 │ │ - call $dlrealloc │ │ - local.set 70 │ │ - local.get 5 │ │ - local.get 70 │ │ - i32.store offset=24 │ │ - i32.const 0 │ │ - local.set 71 │ │ - local.get 70 │ │ - local.set 72 │ │ - local.get 71 │ │ - local.set 73 │ │ - local.get 72 │ │ - local.get 73 │ │ - i32.eq │ │ - local.set 74 │ │ + call $zip_realloc │ │ + local.set 32 │ │ i32.const 1 │ │ - local.set 75 │ │ - local.get 74 │ │ - local.get 75 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.get 33 │ │ i32.and │ │ - local.set 76 │ │ + local.set 34 │ │ block ;; label = @2 │ │ - local.get 76 │ │ - i32.eqz │ │ + local.get 34 │ │ br_if 0 (;@2;) │ │ - local.get 5 │ │ - i32.load offset=28 │ │ - local.set 77 │ │ - i32.const 14 │ │ - local.set 78 │ │ - i32.const 0 │ │ - local.set 79 │ │ - local.get 77 │ │ - local.get 78 │ │ - local.get 79 │ │ - call $zip_error_set │ │ i32.const 0 │ │ - local.set 80 │ │ + local.set 35 │ │ i32.const 1 │ │ - local.set 81 │ │ - local.get 80 │ │ - local.get 81 │ │ + local.set 36 │ │ + local.get 35 │ │ + local.get 36 │ │ i32.and │ │ - local.set 82 │ │ + local.set 37 │ │ local.get 5 │ │ - local.get 82 │ │ + local.get 37 │ │ i32.store8 offset=47 │ │ br 1 (;@1;) │ │ end │ │ local.get 5 │ │ - i32.load offset=24 │ │ - local.set 83 │ │ - local.get 5 │ │ i32.load offset=40 │ │ - local.set 84 │ │ - local.get 84 │ │ - local.get 83 │ │ - i32.store │ │ + local.set 38 │ │ + i32.const 4 │ │ + local.set 39 │ │ + local.get 38 │ │ + local.get 39 │ │ + i32.add │ │ + local.set 40 │ │ local.get 5 │ │ - i32.load offset=40 │ │ - local.set 85 │ │ - local.get 85 │ │ - i32.load offset=4 │ │ - local.set 86 │ │ + i64.load offset=16 │ │ + local.set 41 │ │ local.get 5 │ │ - i64.load │ │ - local.set 87 │ │ - local.get 87 │ │ - i32.wrap_i64 │ │ - local.set 88 │ │ - local.get 86 │ │ - local.get 88 │ │ - call $dlrealloc │ │ - local.set 89 │ │ + i32.load offset=28 │ │ + local.set 42 │ │ + i32.const 8 │ │ + local.set 43 │ │ local.get 5 │ │ - local.get 89 │ │ - i32.store offset=20 │ │ - i32.const 0 │ │ - local.set 90 │ │ - local.get 89 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.set 92 │ │ - local.get 91 │ │ - local.get 92 │ │ - i32.eq │ │ - local.set 93 │ │ + local.get 43 │ │ + i32.add │ │ + local.set 44 │ │ + local.get 44 │ │ + local.set 45 │ │ + i64.const 8 │ │ + local.set 46 │ │ + local.get 40 │ │ + local.get 45 │ │ + local.get 46 │ │ + local.get 41 │ │ + local.get 42 │ │ + call $zip_realloc │ │ + local.set 47 │ │ i32.const 1 │ │ - local.set 94 │ │ - local.get 93 │ │ - local.get 94 │ │ + local.set 48 │ │ + local.get 47 │ │ + local.get 48 │ │ i32.and │ │ - local.set 95 │ │ + local.set 49 │ │ block ;; label = @2 │ │ - local.get 95 │ │ - i32.eqz │ │ + local.get 49 │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ - i32.load offset=28 │ │ - local.set 96 │ │ - i32.const 14 │ │ - local.set 97 │ │ - i32.const 0 │ │ - local.set 98 │ │ - local.get 96 │ │ - local.get 97 │ │ - local.get 98 │ │ - call $zip_error_set │ │ + i64.load offset=16 │ │ + local.set 50 │ │ + local.get 5 │ │ + i32.load offset=40 │ │ + local.set 51 │ │ + local.get 51 │ │ + i64.load offset=16 │ │ + local.set 52 │ │ + local.get 52 │ │ + local.get 50 │ │ + i64.sub │ │ + local.set 53 │ │ + local.get 51 │ │ + local.get 53 │ │ + i64.store offset=16 │ │ i32.const 0 │ │ - local.set 99 │ │ + local.set 54 │ │ i32.const 1 │ │ - local.set 100 │ │ - local.get 99 │ │ - local.get 100 │ │ + local.set 55 │ │ + local.get 54 │ │ + local.get 55 │ │ i32.and │ │ - local.set 101 │ │ + local.set 56 │ │ local.get 5 │ │ - local.get 101 │ │ + local.get 56 │ │ i32.store8 offset=47 │ │ br 1 (;@1;) │ │ end │ │ - local.get 5 │ │ - i32.load offset=20 │ │ - local.set 102 │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 103 │ │ - local.get 103 │ │ - local.get 102 │ │ - i32.store offset=4 │ │ - local.get 5 │ │ - i64.load offset=32 │ │ - local.set 104 │ │ - local.get 5 │ │ - i32.load offset=40 │ │ - local.set 105 │ │ - local.get 105 │ │ - local.get 104 │ │ - i64.store offset=16 │ │ i32.const 1 │ │ - local.set 106 │ │ + local.set 57 │ │ i32.const 1 │ │ - local.set 107 │ │ - local.get 106 │ │ - local.get 107 │ │ + local.set 58 │ │ + local.get 57 │ │ + local.get 58 │ │ i32.and │ │ - local.set 108 │ │ + local.set 59 │ │ local.get 5 │ │ - local.get 108 │ │ + local.get 59 │ │ i32.store8 offset=47 │ │ end │ │ local.get 5 │ │ i32.load8_u offset=47 │ │ - local.set 109 │ │ + local.set 60 │ │ i32.const 1 │ │ - local.set 110 │ │ - local.get 109 │ │ - local.get 110 │ │ + local.set 61 │ │ + local.get 60 │ │ + local.get 61 │ │ i32.and │ │ - local.set 111 │ │ + local.set 62 │ │ i32.const 48 │ │ - local.set 112 │ │ + local.set 63 │ │ local.get 5 │ │ - local.get 112 │ │ + local.get 63 │ │ i32.add │ │ - local.set 113 │ │ - local.get 113 │ │ + local.set 64 │ │ + local.get 64 │ │ global.set $__stack_pointer │ │ - local.get 111 │ │ + local.get 62 │ │ return) │ │ (func $buffer_clone (type 76) (param i32 i64 i32) (result i32) │ │ (local i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i64 i32 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 64 │ │ local.set 4 │ │ @@ -303695,15 +305668,15 @@ │ │ local.set 8 │ │ i32.const 878082192 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.store offset=8 │ │ return) │ │ - (func $_zip_pkware_encrypt (type 81) (param i32 i32 i32 i64) │ │ + (func $_zip_pkware_encrypt (type 85) (param i32 i32 i32 i64) │ │ (local i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 48 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ @@ -304138,15 +306111,15 @@ │ │ local.get 4 │ │ local.get 45 │ │ i32.add │ │ local.set 46 │ │ local.get 46 │ │ global.set $__stack_pointer │ │ return) │ │ - (func $_zip_pkware_decrypt (type 81) (param i32 i32 i32 i64) │ │ + (func $_zip_pkware_decrypt (type 85) (param i32 i32 i32 i64) │ │ (local i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 48 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ @@ -306816,15 +308789,15 @@ │ │ local.get 19 │ │ i32.add │ │ local.set 20 │ │ local.get 20 │ │ global.set $__stack_pointer │ │ return) │ │ (func $pkware_encrypt (type 16) (param i32 i32 i32 i64 i32) (result i64) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i32 i64 i32 i32 i64 i32 i64 i64 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i64 i32 i64 i32 i32 i64 i32 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 96 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.sub │ │ @@ -307407,15 +309380,15 @@ │ │ end │ │ local.get 7 │ │ i32.load offset=32 │ │ local.set 147 │ │ local.get 147 │ │ i64.load │ │ local.set 148 │ │ - i64.const 4 │ │ + i64.const 20 │ │ local.set 149 │ │ local.get 148 │ │ local.get 149 │ │ i64.or │ │ local.set 150 │ │ local.get 147 │ │ local.get 150 │ │ @@ -307424,239 +309397,255 @@ │ │ i32.load offset=32 │ │ local.set 151 │ │ i32.const 20 │ │ local.set 152 │ │ local.get 151 │ │ local.get 152 │ │ i32.store8 offset=11 │ │ - i64.const 0 │ │ - local.set 153 │ │ local.get 7 │ │ + i32.load offset=32 │ │ + local.set 153 │ │ + i32.const 8 │ │ + local.set 154 │ │ local.get 153 │ │ + local.get 154 │ │ + i32.store16 offset=16 │ │ + local.get 7 │ │ + i32.load offset=32 │ │ + local.set 155 │ │ + i32.const 8 │ │ + local.set 156 │ │ + local.get 155 │ │ + local.get 156 │ │ + i32.store16 offset=18 │ │ + i64.const 0 │ │ + local.set 157 │ │ + local.get 7 │ │ + local.get 157 │ │ i64.store offset=88 │ │ br 5 (;@1;) │ │ end │ │ local.get 7 │ │ i64.load offset=64 │ │ - local.set 154 │ │ - i64.const 4 │ │ - local.set 155 │ │ - local.get 154 │ │ - local.set 156 │ │ - local.get 155 │ │ - local.set 157 │ │ - local.get 156 │ │ - local.get 157 │ │ - i64.lt_u │ │ local.set 158 │ │ - i32.const 1 │ │ + i64.const 4 │ │ local.set 159 │ │ local.get 158 │ │ + local.set 160 │ │ local.get 159 │ │ + local.set 161 │ │ + local.get 160 │ │ + local.get 161 │ │ + i64.lt_u │ │ + local.set 162 │ │ + i32.const 1 │ │ + local.set 163 │ │ + local.get 162 │ │ + local.get 163 │ │ i32.and │ │ - local.set 160 │ │ + local.set 164 │ │ block ;; label = @6 │ │ - local.get 160 │ │ + local.get 164 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ local.get 7 │ │ i32.load offset=56 │ │ - local.set 161 │ │ + local.set 165 │ │ i32.const 28 │ │ - local.set 162 │ │ - local.get 161 │ │ - local.get 162 │ │ + local.set 166 │ │ + local.get 165 │ │ + local.get 166 │ │ i32.add │ │ - local.set 163 │ │ + local.set 167 │ │ i32.const 18 │ │ - local.set 164 │ │ + local.set 168 │ │ i32.const 0 │ │ - local.set 165 │ │ - local.get 163 │ │ - local.get 164 │ │ - local.get 165 │ │ + local.set 169 │ │ + local.get 167 │ │ + local.get 168 │ │ + local.get 169 │ │ call $zip_error_set │ │ i64.const -1 │ │ - local.set 166 │ │ + local.set 170 │ │ local.get 7 │ │ - local.get 166 │ │ + local.get 170 │ │ i64.store offset=88 │ │ br 5 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=76 │ │ - local.set 167 │ │ + local.set 171 │ │ local.get 7 │ │ i32.load offset=56 │ │ - local.set 168 │ │ + local.set 172 │ │ i32.const 22 │ │ - local.set 169 │ │ - local.get 168 │ │ - local.get 169 │ │ + local.set 173 │ │ + local.get 172 │ │ + local.get 173 │ │ i32.add │ │ - local.set 170 │ │ - local.get 170 │ │ + local.set 174 │ │ + local.get 174 │ │ i32.load align=1 │ │ - local.set 171 │ │ - local.get 167 │ │ + local.set 175 │ │ local.get 171 │ │ + local.get 175 │ │ i32.store align=1 │ │ i64.const 4 │ │ - local.set 172 │ │ + local.set 176 │ │ local.get 7 │ │ - local.get 172 │ │ + local.get 176 │ │ i64.store offset=88 │ │ br 4 (;@1;) │ │ end │ │ i32.const 28 │ │ - local.set 173 │ │ + local.set 177 │ │ local.get 7 │ │ - local.get 173 │ │ + local.get 177 │ │ i32.add │ │ - local.set 174 │ │ + local.set 178 │ │ i32.const -1 │ │ - local.set 175 │ │ - local.get 174 │ │ - local.get 175 │ │ + local.set 179 │ │ + local.get 178 │ │ + local.get 179 │ │ i32.store │ │ i32.const 24 │ │ - local.set 176 │ │ + local.set 180 │ │ local.get 7 │ │ - local.get 176 │ │ + local.get 180 │ │ i32.add │ │ - local.set 177 │ │ + local.set 181 │ │ i32.const 21 │ │ - local.set 178 │ │ - local.get 177 │ │ - local.get 178 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.get 182 │ │ i32.store │ │ i32.const 20 │ │ - local.set 179 │ │ + local.set 183 │ │ local.get 7 │ │ - local.get 179 │ │ + local.get 183 │ │ i32.add │ │ - local.set 180 │ │ + local.set 184 │ │ i32.const 19 │ │ - local.set 181 │ │ - local.get 180 │ │ - local.get 181 │ │ + local.set 185 │ │ + local.get 184 │ │ + local.get 185 │ │ i32.store │ │ i32.const 16 │ │ - local.set 182 │ │ + local.set 186 │ │ local.get 7 │ │ - local.get 182 │ │ + local.get 186 │ │ i32.add │ │ - local.set 183 │ │ + local.set 187 │ │ i32.const 5 │ │ - local.set 184 │ │ - local.get 183 │ │ - local.get 184 │ │ + local.set 188 │ │ + local.get 187 │ │ + local.get 188 │ │ i32.store │ │ i32.const 4 │ │ - local.set 185 │ │ + local.set 189 │ │ local.get 7 │ │ - local.get 185 │ │ + local.get 189 │ │ i32.store offset=12 │ │ i32.const 3 │ │ - local.set 186 │ │ + local.set 190 │ │ local.get 7 │ │ - local.get 186 │ │ + local.get 190 │ │ i32.store offset=8 │ │ i32.const 2 │ │ - local.set 187 │ │ + local.set 191 │ │ local.get 7 │ │ - local.get 187 │ │ + local.get 191 │ │ i32.store offset=4 │ │ i32.const 1 │ │ - local.set 188 │ │ + local.set 192 │ │ local.get 7 │ │ - local.get 188 │ │ + local.get 192 │ │ i32.store │ │ i32.const 0 │ │ - local.set 189 │ │ - local.get 189 │ │ + local.set 193 │ │ + local.get 193 │ │ local.get 7 │ │ call $zip_source_make_command_bitmap │ │ - local.set 190 │ │ + local.set 194 │ │ local.get 7 │ │ - local.get 190 │ │ + local.get 194 │ │ i64.store offset=88 │ │ br 3 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=56 │ │ - local.set 191 │ │ + local.set 195 │ │ i32.const 28 │ │ - local.set 192 │ │ - local.get 191 │ │ - local.get 192 │ │ + local.set 196 │ │ + local.get 195 │ │ + local.get 196 │ │ i32.add │ │ - local.set 193 │ │ + local.set 197 │ │ local.get 7 │ │ i32.load offset=76 │ │ - local.set 194 │ │ + local.set 198 │ │ local.get 7 │ │ i64.load offset=64 │ │ - local.set 195 │ │ - local.get 193 │ │ - local.get 194 │ │ - local.get 195 │ │ + local.set 199 │ │ + local.get 197 │ │ + local.get 198 │ │ + local.get 199 │ │ call $zip_error_to_data │ │ - local.set 196 │ │ + local.set 200 │ │ local.get 7 │ │ - local.get 196 │ │ + local.get 200 │ │ i64.store offset=88 │ │ br 2 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=56 │ │ - local.set 197 │ │ - local.get 197 │ │ + local.set 201 │ │ + local.get 201 │ │ call $trad_pkware_free.1 │ │ i64.const 0 │ │ - local.set 198 │ │ + local.set 202 │ │ local.get 7 │ │ - local.get 198 │ │ + local.get 202 │ │ i64.store offset=88 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=84 │ │ - local.set 199 │ │ + local.set 203 │ │ local.get 7 │ │ i32.load offset=76 │ │ - local.set 200 │ │ + local.set 204 │ │ local.get 7 │ │ i64.load offset=64 │ │ - local.set 201 │ │ + local.set 205 │ │ local.get 7 │ │ i32.load offset=60 │ │ - local.set 202 │ │ - local.get 199 │ │ - local.get 200 │ │ - local.get 201 │ │ - local.get 202 │ │ + local.set 206 │ │ + local.get 203 │ │ + local.get 204 │ │ + local.get 205 │ │ + local.get 206 │ │ call $zip_source_pass_to_lower_layer │ │ - local.set 203 │ │ + local.set 207 │ │ local.get 7 │ │ - local.get 203 │ │ + local.get 207 │ │ i64.store offset=88 │ │ end │ │ local.get 7 │ │ i64.load offset=88 │ │ - local.set 204 │ │ + local.set 208 │ │ i32.const 96 │ │ - local.set 205 │ │ + local.set 209 │ │ local.get 7 │ │ - local.get 205 │ │ + local.get 209 │ │ i32.add │ │ - local.set 206 │ │ - local.get 206 │ │ + local.set 210 │ │ + local.get 210 │ │ global.set $__stack_pointer │ │ - local.get 204 │ │ + local.get 208 │ │ return) │ │ (func $encrypt_header (type 6) (param i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ i32.const 16 │ │ local.set 3 │ │ @@ -307931,15 +309920,15 @@ │ │ i32.store offset=12 │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 13 │ │ local.get 13 │ │ return) │ │ - (func $maximum_compressed_size (type 82) (param i64) (result i64) │ │ + (func $maximum_compressed_size (type 86) (param i64) (result i64) │ │ (local i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 32 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ @@ -308587,15 +310576,15 @@ │ │ local.set 25 │ │ i32.const 8 │ │ local.set 26 │ │ i32.const -15 │ │ local.set 27 │ │ i32.const 0 │ │ local.set 28 │ │ - i32.const 16975 │ │ + i32.const 17278 │ │ local.set 29 │ │ i32.const 56 │ │ local.set 30 │ │ local.get 21 │ │ local.get 23 │ │ local.get 26 │ │ local.get 27 │ │ @@ -308617,15 +310606,15 @@ │ │ local.set 33 │ │ local.get 32 │ │ local.get 33 │ │ i32.add │ │ local.set 34 │ │ i32.const -15 │ │ local.set 35 │ │ - i32.const 16975 │ │ + i32.const 17278 │ │ local.set 36 │ │ i32.const 56 │ │ local.set 37 │ │ local.get 34 │ │ local.get 35 │ │ local.get 36 │ │ local.get 37 │ │ @@ -308992,16 +310981,16 @@ │ │ local.get 40 │ │ i32.add │ │ local.set 41 │ │ local.get 41 │ │ global.set $__stack_pointer │ │ local.get 39 │ │ return) │ │ - (func $end_of_input (type 5) (param i32) │ │ - (local i32 i32 i32 i32 i32 i32) │ │ + (func $end_of_input (type 10) (param i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ i32.sub │ │ @@ -309019,14 +311008,37 @@ │ │ i32.load offset=8 │ │ local.set 5 │ │ i32.const 1 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.store8 offset=16 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 7 │ │ + local.get 7 │ │ + i32.load offset=24 │ │ + local.set 8 │ │ + i32.const 0 │ │ + local.set 9 │ │ + local.get 8 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.set 11 │ │ + local.get 10 │ │ + local.get 11 │ │ + i32.ne │ │ + local.set 12 │ │ + i32.const 1 │ │ + local.set 13 │ │ + local.get 12 │ │ + local.get 13 │ │ + i32.and │ │ + local.set 14 │ │ + local.get 14 │ │ return) │ │ (func $process (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 3 │ │ i32.const 32 │ │ local.set 4 │ │ @@ -309357,15 +311369,15 @@ │ │ i32.add │ │ local.set 13 │ │ local.get 13 │ │ global.set $__stack_pointer │ │ local.get 11 │ │ return) │ │ (func $_zip_get_compression_algorithm (type 6) (param i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ i32.const 32 │ │ local.set 3 │ │ local.get 2 │ │ local.get 3 │ │ i32.sub │ │ @@ -309395,228 +311407,205 @@ │ │ local.set 11 │ │ local.get 10 │ │ local.get 11 │ │ i32.and │ │ local.set 12 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - block ;; label = @3 │ │ - local.get 12 │ │ - br_if 0 (;@3;) │ │ - local.get 4 │ │ - i32.load offset=24 │ │ - local.set 13 │ │ - i32.const -2 │ │ - local.set 14 │ │ - local.get 13 │ │ - local.set 15 │ │ - local.get 14 │ │ - local.set 16 │ │ - local.get 15 │ │ - local.get 16 │ │ - i32.eq │ │ - local.set 17 │ │ - i32.const 1 │ │ - local.set 18 │ │ - local.get 17 │ │ - local.get 18 │ │ - i32.and │ │ - local.set 19 │ │ - local.get 19 │ │ - i32.eqz │ │ - br_if 1 (;@2;) │ │ - end │ │ + local.get 12 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ i32.const 8 │ │ - local.set 20 │ │ - local.get 20 │ │ - local.set 21 │ │ + local.set 13 │ │ + local.get 13 │ │ + local.set 14 │ │ br 1 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=24 │ │ - local.set 22 │ │ - local.get 22 │ │ - local.set 21 │ │ + local.set 15 │ │ + local.get 15 │ │ + local.set 14 │ │ end │ │ - local.get 21 │ │ - local.set 23 │ │ + local.get 14 │ │ + local.set 16 │ │ local.get 4 │ │ - local.get 23 │ │ + local.get 16 │ │ i32.store16 offset=14 │ │ i32.const 0 │ │ - local.set 24 │ │ + local.set 17 │ │ local.get 4 │ │ - local.get 24 │ │ + local.get 17 │ │ i32.store offset=16 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ loop ;; label = @3 │ │ local.get 4 │ │ i32.load offset=16 │ │ - local.set 25 │ │ + local.set 18 │ │ i32.const 0 │ │ - local.set 26 │ │ - local.get 26 │ │ - i32.load offset=75280 │ │ - local.set 27 │ │ - local.get 25 │ │ - local.set 28 │ │ - local.get 27 │ │ - local.set 29 │ │ - local.get 28 │ │ - local.get 29 │ │ + local.set 19 │ │ + local.get 19 │ │ + i32.load offset=75648 │ │ + local.set 20 │ │ + local.get 18 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.set 22 │ │ + local.get 21 │ │ + local.get 22 │ │ i32.lt_u │ │ - local.set 30 │ │ + local.set 23 │ │ i32.const 1 │ │ - local.set 31 │ │ - local.get 30 │ │ - local.get 31 │ │ + local.set 24 │ │ + local.get 23 │ │ + local.get 24 │ │ i32.and │ │ - local.set 32 │ │ - local.get 32 │ │ + local.set 25 │ │ + local.get 25 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ local.get 4 │ │ i32.load offset=16 │ │ - local.set 33 │ │ - i32.const 75284 │ │ - local.set 34 │ │ + local.set 26 │ │ + i32.const 75652 │ │ + local.set 27 │ │ i32.const 12 │ │ - local.set 35 │ │ - local.get 33 │ │ - local.get 35 │ │ + local.set 28 │ │ + local.get 26 │ │ + local.get 28 │ │ i32.mul │ │ - local.set 36 │ │ - local.get 34 │ │ - local.get 36 │ │ + local.set 29 │ │ + local.get 27 │ │ + local.get 29 │ │ i32.add │ │ - local.set 37 │ │ - local.get 37 │ │ + local.set 30 │ │ + local.get 30 │ │ i32.load16_u │ │ - local.set 38 │ │ + local.set 31 │ │ i32.const 65535 │ │ - local.set 39 │ │ - local.get 38 │ │ - local.get 39 │ │ + local.set 32 │ │ + local.get 31 │ │ + local.get 32 │ │ i32.and │ │ - local.set 40 │ │ + local.set 33 │ │ local.get 4 │ │ i32.load16_u offset=14 │ │ - local.set 41 │ │ + local.set 34 │ │ i32.const 65535 │ │ - local.set 42 │ │ - local.get 41 │ │ - local.get 42 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.get 35 │ │ i32.and │ │ - local.set 43 │ │ - local.get 40 │ │ - local.set 44 │ │ - local.get 43 │ │ - local.set 45 │ │ - local.get 44 │ │ - local.get 45 │ │ + local.set 36 │ │ + local.get 33 │ │ + local.set 37 │ │ + local.get 36 │ │ + local.set 38 │ │ + local.get 37 │ │ + local.get 38 │ │ i32.eq │ │ - local.set 46 │ │ + local.set 39 │ │ i32.const 1 │ │ - local.set 47 │ │ - local.get 46 │ │ - local.get 47 │ │ + local.set 40 │ │ + local.get 39 │ │ + local.get 40 │ │ i32.and │ │ - local.set 48 │ │ + local.set 41 │ │ block ;; label = @4 │ │ - local.get 48 │ │ + local.get 41 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.load8_u offset=23 │ │ - local.set 49 │ │ + local.set 42 │ │ i32.const 1 │ │ - local.set 50 │ │ - local.get 49 │ │ - local.get 50 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.get 43 │ │ i32.and │ │ - local.set 51 │ │ + local.set 44 │ │ block ;; label = @5 │ │ - local.get 51 │ │ + local.get 44 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 4 │ │ i32.load offset=16 │ │ - local.set 52 │ │ - i32.const 75284 │ │ - local.set 53 │ │ + local.set 45 │ │ + i32.const 75652 │ │ + local.set 46 │ │ i32.const 12 │ │ - local.set 54 │ │ - local.get 52 │ │ - local.get 54 │ │ + local.set 47 │ │ + local.get 45 │ │ + local.get 47 │ │ i32.mul │ │ - local.set 55 │ │ - local.get 53 │ │ - local.get 55 │ │ + local.set 48 │ │ + local.get 46 │ │ + local.get 48 │ │ i32.add │ │ - local.set 56 │ │ - local.get 56 │ │ + local.set 49 │ │ + local.get 49 │ │ i32.load offset=4 │ │ - local.set 57 │ │ + local.set 50 │ │ local.get 4 │ │ - local.get 57 │ │ + local.get 50 │ │ i32.store offset=28 │ │ br 4 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=16 │ │ - local.set 58 │ │ - i32.const 75284 │ │ - local.set 59 │ │ + local.set 51 │ │ + i32.const 75652 │ │ + local.set 52 │ │ i32.const 12 │ │ - local.set 60 │ │ - local.get 58 │ │ - local.get 60 │ │ + local.set 53 │ │ + local.get 51 │ │ + local.get 53 │ │ i32.mul │ │ - local.set 61 │ │ - local.get 59 │ │ - local.get 61 │ │ + local.set 54 │ │ + local.get 52 │ │ + local.get 54 │ │ i32.add │ │ - local.set 62 │ │ - local.get 62 │ │ + local.set 55 │ │ + local.get 55 │ │ i32.load offset=8 │ │ - local.set 63 │ │ + local.set 56 │ │ local.get 4 │ │ - local.get 63 │ │ + local.get 56 │ │ i32.store offset=28 │ │ br 3 (;@1;) │ │ end │ │ local.get 4 │ │ i32.load offset=16 │ │ - local.set 64 │ │ + local.set 57 │ │ i32.const 1 │ │ - local.set 65 │ │ - local.get 64 │ │ - local.get 65 │ │ + local.set 58 │ │ + local.get 57 │ │ + local.get 58 │ │ i32.add │ │ - local.set 66 │ │ + local.set 59 │ │ local.get 4 │ │ - local.get 66 │ │ + local.get 59 │ │ i32.store offset=16 │ │ br 0 (;@3;) │ │ end │ │ end │ │ i32.const 0 │ │ - local.set 67 │ │ + local.set 60 │ │ local.get 4 │ │ - local.get 67 │ │ + local.get 60 │ │ i32.store offset=28 │ │ end │ │ local.get 4 │ │ i32.load offset=28 │ │ - local.set 68 │ │ - local.get 68 │ │ + local.set 61 │ │ + local.get 61 │ │ return) │ │ (func $compression_source_new (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 48 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.sub │ │ @@ -309764,519 +311753,514 @@ │ │ local.set 41 │ │ local.get 7 │ │ i32.load offset=24 │ │ local.set 42 │ │ local.get 7 │ │ i32.load offset=12 │ │ local.set 43 │ │ - i32.const 1 │ │ + local.get 7 │ │ + i32.load offset=40 │ │ local.set 44 │ │ - local.get 41 │ │ local.get 44 │ │ - i32.and │ │ + i32.load offset=4 │ │ local.set 45 │ │ - local.get 40 │ │ - local.get 45 │ │ - local.get 42 │ │ - local.get 43 │ │ - call $context_new │ │ + i32.const 4 │ │ local.set 46 │ │ - local.get 7 │ │ + local.get 45 │ │ local.get 46 │ │ - i32.store offset=20 │ │ - i32.const 0 │ │ + i32.and │ │ local.set 47 │ │ - local.get 46 │ │ + i32.const 0 │ │ local.set 48 │ │ local.get 47 │ │ local.set 49 │ │ local.get 48 │ │ - local.get 49 │ │ - i32.eq │ │ local.set 50 │ │ - i32.const 1 │ │ - local.set 51 │ │ + local.get 49 │ │ local.get 50 │ │ + i32.ne │ │ + local.set 51 │ │ + i32.const 1 │ │ + local.set 52 │ │ + local.get 41 │ │ + local.get 52 │ │ + i32.and │ │ + local.set 53 │ │ + i32.const 1 │ │ + local.set 54 │ │ local.get 51 │ │ + local.get 54 │ │ i32.and │ │ - local.set 52 │ │ + local.set 55 │ │ + local.get 40 │ │ + local.get 53 │ │ + local.get 42 │ │ + local.get 43 │ │ + local.get 55 │ │ + call $context_new │ │ + local.set 56 │ │ + local.get 7 │ │ + local.get 56 │ │ + i32.store offset=20 │ │ + i32.const 0 │ │ + local.set 57 │ │ + local.get 56 │ │ + local.set 58 │ │ + local.get 57 │ │ + local.set 59 │ │ + local.get 58 │ │ + local.get 59 │ │ + i32.eq │ │ + local.set 60 │ │ + i32.const 1 │ │ + local.set 61 │ │ + local.get 60 │ │ + local.get 61 │ │ + i32.and │ │ + local.set 62 │ │ block ;; label = @2 │ │ - local.get 52 │ │ + local.get 62 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 7 │ │ i32.load offset=40 │ │ - local.set 53 │ │ + local.set 63 │ │ i32.const 8 │ │ - local.set 54 │ │ - local.get 53 │ │ - local.get 54 │ │ + local.set 64 │ │ + local.get 63 │ │ + local.get 64 │ │ i32.add │ │ - local.set 55 │ │ + local.set 65 │ │ i32.const 14 │ │ - local.set 56 │ │ + local.set 66 │ │ i32.const 0 │ │ - local.set 57 │ │ - local.get 55 │ │ - local.get 56 │ │ - local.get 57 │ │ + local.set 67 │ │ + local.get 65 │ │ + local.get 66 │ │ + local.get 67 │ │ call $zip_error_set │ │ i32.const 0 │ │ - local.set 58 │ │ + local.set 68 │ │ local.get 7 │ │ - local.get 58 │ │ + local.get 68 │ │ i32.store offset=44 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=40 │ │ - local.set 59 │ │ + local.set 69 │ │ local.get 7 │ │ i32.load offset=36 │ │ - local.set 60 │ │ + local.set 70 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 61 │ │ + local.set 71 │ │ i32.const 429 │ │ - local.set 62 │ │ - local.get 59 │ │ - local.get 60 │ │ - local.get 62 │ │ - local.get 61 │ │ + local.set 72 │ │ + local.get 69 │ │ + local.get 70 │ │ + local.get 72 │ │ + local.get 71 │ │ call $zip_source_layered │ │ - local.set 63 │ │ + local.set 73 │ │ local.get 7 │ │ - local.get 63 │ │ + local.get 73 │ │ i32.store offset=16 │ │ i32.const 0 │ │ - local.set 64 │ │ - local.get 63 │ │ - local.set 65 │ │ - local.get 64 │ │ - local.set 66 │ │ - local.get 65 │ │ - local.get 66 │ │ + local.set 74 │ │ + local.get 73 │ │ + local.set 75 │ │ + local.get 74 │ │ + local.set 76 │ │ + local.get 75 │ │ + local.get 76 │ │ i32.eq │ │ - local.set 67 │ │ + local.set 77 │ │ i32.const 1 │ │ - local.set 68 │ │ - local.get 67 │ │ - local.get 68 │ │ + local.set 78 │ │ + local.get 77 │ │ + local.get 78 │ │ i32.and │ │ - local.set 69 │ │ + local.set 79 │ │ block ;; label = @2 │ │ - local.get 69 │ │ + local.get 79 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 70 │ │ - local.get 70 │ │ + local.set 80 │ │ + local.get 80 │ │ call $context_free │ │ i32.const 0 │ │ - local.set 71 │ │ + local.set 81 │ │ local.get 7 │ │ - local.get 71 │ │ + local.get 81 │ │ i32.store offset=44 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=16 │ │ - local.set 72 │ │ + local.set 82 │ │ local.get 7 │ │ - local.get 72 │ │ + local.get 82 │ │ i32.store offset=44 │ │ end │ │ local.get 7 │ │ i32.load offset=44 │ │ - local.set 73 │ │ + local.set 83 │ │ i32.const 48 │ │ - local.set 74 │ │ + local.set 84 │ │ local.get 7 │ │ - local.get 74 │ │ + local.get 84 │ │ i32.add │ │ - local.set 75 │ │ - local.get 75 │ │ + local.set 85 │ │ + local.get 85 │ │ global.set $__stack_pointer │ │ - local.get 73 │ │ + local.get 83 │ │ return) │ │ - (func $context_new (type 14) (param i32 i32 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $context_new (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ - local.set 4 │ │ - i32.const 32 │ │ local.set 5 │ │ - local.get 4 │ │ - local.get 5 │ │ - i32.sub │ │ + i32.const 32 │ │ local.set 6 │ │ + local.get 5 │ │ local.get 6 │ │ + i32.sub │ │ + local.set 7 │ │ + local.get 7 │ │ global.set $__stack_pointer │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 0 │ │ i32.store offset=24 │ │ local.get 1 │ │ - local.set 7 │ │ - local.get 6 │ │ + local.set 8 │ │ local.get 7 │ │ + local.get 8 │ │ i32.store8 offset=23 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 2 │ │ i32.store offset=16 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 3 │ │ i32.store offset=12 │ │ - i32.const 8240 │ │ - local.set 8 │ │ - local.get 8 │ │ - call $dlmalloc │ │ + local.get 4 │ │ local.set 9 │ │ - local.get 6 │ │ + local.get 7 │ │ local.get 9 │ │ - i32.store offset=8 │ │ - i32.const 0 │ │ + i32.store8 offset=11 │ │ + i32.const 8240 │ │ local.set 10 │ │ - local.get 9 │ │ - local.set 11 │ │ local.get 10 │ │ + call $dlmalloc │ │ + local.set 11 │ │ + local.get 7 │ │ + local.get 11 │ │ + i32.store offset=4 │ │ + i32.const 0 │ │ local.set 12 │ │ local.get 11 │ │ - local.get 12 │ │ - i32.eq │ │ local.set 13 │ │ - i32.const 1 │ │ + local.get 12 │ │ local.set 14 │ │ local.get 13 │ │ local.get 14 │ │ - i32.and │ │ + i32.eq │ │ local.set 15 │ │ + i32.const 1 │ │ + local.set 16 │ │ + local.get 15 │ │ + local.get 16 │ │ + i32.and │ │ + local.set 17 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ - local.get 15 │ │ + local.get 17 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - local.set 16 │ │ - local.get 6 │ │ - local.get 16 │ │ + local.set 18 │ │ + local.get 7 │ │ + local.get 18 │ │ i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 17 │ │ - local.get 17 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 19 │ │ + local.get 19 │ │ call $zip_error_init │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load8_u offset=23 │ │ - local.set 18 │ │ + local.set 20 │ │ i32.const 1 │ │ - local.set 19 │ │ - local.get 18 │ │ - local.get 19 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.get 21 │ │ i32.and │ │ - local.set 20 │ │ + local.set 22 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - local.get 20 │ │ + local.get 22 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=24 │ │ - local.set 21 │ │ - i32.const -1 │ │ - local.set 22 │ │ - local.get 21 │ │ local.set 23 │ │ - local.get 22 │ │ + i32.const -1 │ │ local.set 24 │ │ local.get 23 │ │ - local.get 24 │ │ - i32.eq │ │ local.set 25 │ │ - i32.const 1 │ │ + local.get 24 │ │ local.set 26 │ │ - i32.const 1 │ │ - local.set 27 │ │ local.get 25 │ │ + local.get 26 │ │ + i32.eq │ │ + local.set 27 │ │ + i32.const 1 │ │ + local.set 28 │ │ local.get 27 │ │ + local.get 28 │ │ i32.and │ │ - local.set 28 │ │ - local.get 26 │ │ local.set 29 │ │ - block ;; label = @4 │ │ - local.get 28 │ │ - br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 30 │ │ - i32.const -2 │ │ - local.set 31 │ │ - local.get 30 │ │ - local.set 32 │ │ - local.get 31 │ │ - local.set 33 │ │ - local.get 32 │ │ - local.get 33 │ │ - i32.eq │ │ - local.set 34 │ │ - local.get 34 │ │ - local.set 29 │ │ - end │ │ local.get 29 │ │ - local.set 35 │ │ - i32.const 1 │ │ - local.set 36 │ │ - local.get 35 │ │ - local.get 36 │ │ - i32.and │ │ - local.set 37 │ │ - local.get 37 │ │ - local.set 38 │ │ + local.set 30 │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ - local.set 39 │ │ - local.get 39 │ │ - local.set 38 │ │ + local.set 31 │ │ + local.get 31 │ │ + local.set 30 │ │ end │ │ + local.get 30 │ │ + local.set 32 │ │ + i32.const 0 │ │ + local.set 33 │ │ + local.get 32 │ │ + local.set 34 │ │ + local.get 33 │ │ + local.set 35 │ │ + local.get 34 │ │ + local.get 35 │ │ + i32.ne │ │ + local.set 36 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 37 │ │ + i32.const 1 │ │ + local.set 38 │ │ + local.get 36 │ │ local.get 38 │ │ + i32.and │ │ + local.set 39 │ │ + local.get 37 │ │ + local.get 39 │ │ + i32.store8 offset=14 │ │ + local.get 7 │ │ + i32.load offset=12 │ │ local.set 40 │ │ - i32.const 0 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 41 │ │ + local.get 41 │ │ local.get 40 │ │ + i32.store offset=8232 │ │ + local.get 7 │ │ + i32.load offset=24 │ │ local.set 42 │ │ - local.get 41 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 43 │ │ - local.get 42 │ │ local.get 43 │ │ - i32.ne │ │ + local.get 42 │ │ + i32.store offset=20 │ │ + local.get 7 │ │ + i32.load8_u offset=23 │ │ local.set 44 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 45 │ │ i32.const 1 │ │ local.set 46 │ │ local.get 44 │ │ local.get 46 │ │ i32.and │ │ local.set 47 │ │ local.get 45 │ │ local.get 47 │ │ - i32.store8 offset=14 │ │ - local.get 6 │ │ - i32.load offset=12 │ │ + i32.store8 offset=16 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 48 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.const 0 │ │ local.set 49 │ │ - local.get 49 │ │ local.get 48 │ │ - i32.store offset=8232 │ │ - local.get 6 │ │ - i32.load offset=24 │ │ + local.get 49 │ │ + i32.store8 offset=12 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 50 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.const 0 │ │ local.set 51 │ │ - local.get 51 │ │ local.get 50 │ │ - i32.store offset=20 │ │ - local.get 6 │ │ - i32.load8_u offset=23 │ │ + local.get 51 │ │ + i32.store8 offset=13 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 52 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.const 0 │ │ local.set 53 │ │ - i32.const 1 │ │ - local.set 54 │ │ local.get 52 │ │ - local.get 54 │ │ - i32.and │ │ - local.set 55 │ │ local.get 53 │ │ - local.get 55 │ │ - i32.store8 offset=16 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.store8 offset=15 │ │ + local.get 7 │ │ + i32.load8_u offset=11 │ │ + local.set 54 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 55 │ │ + i32.const 1 │ │ local.set 56 │ │ - i32.const 0 │ │ - local.set 57 │ │ + local.get 54 │ │ local.get 56 │ │ + i32.and │ │ + local.set 57 │ │ + local.get 55 │ │ local.get 57 │ │ - i32.store8 offset=12 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.store8 offset=17 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ local.set 58 │ │ - i32.const 0 │ │ - local.set 59 │ │ local.get 58 │ │ + i32.load offset=8232 │ │ + local.set 59 │ │ local.get 59 │ │ - i32.store8 offset=13 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.load offset=4 │ │ local.set 60 │ │ - i32.const 0 │ │ + local.get 7 │ │ + i32.load offset=24 │ │ local.set 61 │ │ - local.get 60 │ │ - local.get 61 │ │ - i32.store8 offset=15 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ + i32.const -1 │ │ local.set 62 │ │ - local.get 62 │ │ - i32.load offset=8232 │ │ + local.get 61 │ │ local.set 63 │ │ - local.get 63 │ │ - i32.load offset=4 │ │ + local.get 62 │ │ local.set 64 │ │ - local.get 6 │ │ - i32.load offset=24 │ │ + local.get 63 │ │ + local.get 64 │ │ + i32.eq │ │ local.set 65 │ │ - i32.const -1 │ │ + i32.const 1 │ │ local.set 66 │ │ local.get 65 │ │ - local.set 67 │ │ local.get 66 │ │ - local.set 68 │ │ - local.get 67 │ │ - local.get 68 │ │ - i32.eq │ │ - local.set 69 │ │ - i32.const 1 │ │ - local.set 70 │ │ - local.get 69 │ │ - local.get 70 │ │ i32.and │ │ - local.set 71 │ │ + local.set 67 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - block ;; label = @4 │ │ - local.get 71 │ │ - br_if 0 (;@4;) │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 72 │ │ - i32.const -2 │ │ - local.set 73 │ │ - local.get 72 │ │ - local.set 74 │ │ - local.get 73 │ │ - local.set 75 │ │ - local.get 74 │ │ - local.get 75 │ │ - i32.eq │ │ - local.set 76 │ │ - i32.const 1 │ │ - local.set 77 │ │ - local.get 76 │ │ - local.get 77 │ │ - i32.and │ │ - local.set 78 │ │ - local.get 78 │ │ - i32.eqz │ │ - br_if 1 (;@3;) │ │ - end │ │ + local.get 67 │ │ + i32.eqz │ │ + br_if 0 (;@3;) │ │ i32.const 8 │ │ - local.set 79 │ │ - local.get 79 │ │ - local.set 80 │ │ + local.set 68 │ │ + local.get 68 │ │ + local.set 69 │ │ br 1 (;@2;) │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=24 │ │ - local.set 81 │ │ - local.get 81 │ │ - local.set 80 │ │ + local.set 70 │ │ + local.get 70 │ │ + local.set 69 │ │ end │ │ - local.get 80 │ │ - local.set 82 │ │ - local.get 6 │ │ + local.get 69 │ │ + local.set 71 │ │ + local.get 7 │ │ i32.load offset=16 │ │ - local.set 83 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 84 │ │ + local.set 72 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 73 │ │ i32.const 65535 │ │ - local.set 85 │ │ - local.get 82 │ │ - local.get 85 │ │ + local.set 74 │ │ + local.get 71 │ │ + local.get 74 │ │ i32.and │ │ - local.set 86 │ │ - local.get 86 │ │ - local.get 83 │ │ - local.get 84 │ │ - local.get 64 │ │ + local.set 75 │ │ + local.get 75 │ │ + local.get 72 │ │ + local.get 73 │ │ + local.get 60 │ │ call_indirect (type 4) │ │ - local.set 87 │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 88 │ │ - local.get 88 │ │ - local.get 87 │ │ + local.set 76 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 77 │ │ + local.get 77 │ │ + local.get 76 │ │ i32.store offset=8236 │ │ i32.const 0 │ │ - local.set 89 │ │ - local.get 87 │ │ - local.set 90 │ │ - local.get 89 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.get 91 │ │ + local.set 78 │ │ + local.get 76 │ │ + local.set 79 │ │ + local.get 78 │ │ + local.set 80 │ │ + local.get 79 │ │ + local.get 80 │ │ i32.eq │ │ - local.set 92 │ │ + local.set 81 │ │ i32.const 1 │ │ - local.set 93 │ │ - local.get 92 │ │ - local.get 93 │ │ + local.set 82 │ │ + local.get 81 │ │ + local.get 82 │ │ i32.and │ │ - local.set 94 │ │ + local.set 83 │ │ block ;; label = @2 │ │ - local.get 94 │ │ + local.get 83 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 95 │ │ - local.get 95 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 84 │ │ + local.get 84 │ │ call $zip_error_fini │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 96 │ │ - local.get 96 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 85 │ │ + local.get 85 │ │ call $dlfree │ │ i32.const 0 │ │ - local.set 97 │ │ - local.get 6 │ │ - local.get 97 │ │ + local.set 86 │ │ + local.get 7 │ │ + local.get 86 │ │ i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ - local.get 6 │ │ - i32.load offset=8 │ │ - local.set 98 │ │ - local.get 6 │ │ - local.get 98 │ │ + local.get 7 │ │ + i32.load offset=4 │ │ + local.set 87 │ │ + local.get 7 │ │ + local.get 87 │ │ i32.store offset=28 │ │ end │ │ - local.get 6 │ │ + local.get 7 │ │ i32.load offset=28 │ │ - local.set 99 │ │ + local.set 88 │ │ i32.const 32 │ │ - local.set 100 │ │ - local.get 6 │ │ - local.get 100 │ │ + local.set 89 │ │ + local.get 7 │ │ + local.get 89 │ │ i32.add │ │ - local.set 101 │ │ - local.get 101 │ │ + local.set 90 │ │ + local.get 90 │ │ global.set $__stack_pointer │ │ - local.get 99 │ │ + local.get 88 │ │ return) │ │ (func $compress_callback (type 16) (param i32 i32 i32 i64 i32) (result i64) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i64 i32 i32 i64 i64 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i64 i64 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i64 i32 i32 i64 i64 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i32 i32 i64 i32 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 5 │ │ i32.const 144 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ i32.sub │ │ @@ -310660,457 +312644,431 @@ │ │ local.set 98 │ │ local.get 97 │ │ local.get 98 │ │ i32.and │ │ local.set 99 │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ - block ;; label = @14 │ │ - local.get 99 │ │ - br_if 0 (;@14;) │ │ - local.get 7 │ │ - i32.load offset=104 │ │ - local.set 100 │ │ - local.get 100 │ │ - i32.load offset=20 │ │ - local.set 101 │ │ - i32.const -2 │ │ - local.set 102 │ │ - local.get 101 │ │ - local.set 103 │ │ - local.get 102 │ │ - local.set 104 │ │ - local.get 103 │ │ - local.get 104 │ │ - i32.eq │ │ - local.set 105 │ │ - i32.const 1 │ │ - local.set 106 │ │ - local.get 105 │ │ - local.get 106 │ │ - i32.and │ │ - local.set 107 │ │ - local.get 107 │ │ - i32.eqz │ │ - br_if 1 (;@13;) │ │ - end │ │ + local.get 99 │ │ + i32.eqz │ │ + br_if 0 (;@13;) │ │ i32.const 8 │ │ - local.set 108 │ │ - local.get 108 │ │ - local.set 109 │ │ + local.set 100 │ │ + local.get 100 │ │ + local.set 101 │ │ br 1 (;@12;) │ │ end │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 110 │ │ - local.get 110 │ │ + local.set 102 │ │ + local.get 102 │ │ i32.load offset=20 │ │ - local.set 111 │ │ - local.get 111 │ │ - local.set 109 │ │ + local.set 103 │ │ + local.get 103 │ │ + local.set 101 │ │ end │ │ - local.get 109 │ │ - local.set 112 │ │ + local.get 101 │ │ + local.set 104 │ │ i32.const 65535 │ │ - local.set 113 │ │ - local.get 112 │ │ - local.get 113 │ │ + local.set 105 │ │ + local.get 104 │ │ + local.get 105 │ │ i32.and │ │ - local.set 114 │ │ - local.get 114 │ │ + local.set 106 │ │ + local.get 106 │ │ local.set 91 │ │ end │ │ local.get 91 │ │ - local.set 115 │ │ + local.set 107 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 116 │ │ - local.get 116 │ │ - local.get 115 │ │ + local.set 108 │ │ + local.get 108 │ │ + local.get 107 │ │ i32.store16 offset=48 │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 117 │ │ - local.get 117 │ │ + local.set 109 │ │ + local.get 109 │ │ i64.load offset=24 │ │ - local.set 118 │ │ + local.set 110 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 119 │ │ - local.get 119 │ │ - local.get 118 │ │ + local.set 111 │ │ + local.get 111 │ │ + local.get 110 │ │ i64.store offset=32 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 120 │ │ - local.get 120 │ │ + local.set 112 │ │ + local.get 112 │ │ i64.load │ │ - local.set 121 │ │ + local.set 113 │ │ i64.const 72 │ │ - local.set 122 │ │ - local.get 121 │ │ - local.get 122 │ │ + local.set 114 │ │ + local.get 113 │ │ + local.get 114 │ │ i64.or │ │ - local.set 123 │ │ - local.get 120 │ │ - local.get 123 │ │ + local.set 115 │ │ + local.get 112 │ │ + local.get 115 │ │ i64.store │ │ br 1 (;@9;) │ │ end │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 124 │ │ - local.get 124 │ │ + local.set 116 │ │ + local.get 116 │ │ i64.load │ │ - local.set 125 │ │ + local.set 117 │ │ i64.const 4294967223 │ │ - local.set 126 │ │ - local.get 125 │ │ - local.get 126 │ │ + local.set 118 │ │ + local.get 117 │ │ + local.get 118 │ │ i64.and │ │ - local.set 127 │ │ - local.get 124 │ │ - local.get 127 │ │ + local.set 119 │ │ + local.get 116 │ │ + local.get 119 │ │ i64.store │ │ end │ │ br 1 (;@7;) │ │ end │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 128 │ │ + local.set 120 │ │ i32.const 0 │ │ - local.set 129 │ │ - local.get 128 │ │ - local.get 129 │ │ + local.set 121 │ │ + local.get 120 │ │ + local.get 121 │ │ i32.store16 offset=48 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 130 │ │ - local.get 130 │ │ + local.set 122 │ │ + local.get 122 │ │ i64.load │ │ - local.set 131 │ │ + local.set 123 │ │ i64.const 64 │ │ - local.set 132 │ │ - local.get 131 │ │ - local.get 132 │ │ + local.set 124 │ │ + local.get 123 │ │ + local.get 124 │ │ i64.or │ │ - local.set 133 │ │ - local.get 130 │ │ - local.get 133 │ │ + local.set 125 │ │ + local.get 122 │ │ + local.get 125 │ │ i64.store │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 134 │ │ - local.get 134 │ │ + local.set 126 │ │ + local.get 126 │ │ i64.load │ │ - local.set 135 │ │ + local.set 127 │ │ i64.const 4294967287 │ │ - local.set 136 │ │ - local.get 135 │ │ - local.get 136 │ │ + local.set 128 │ │ + local.get 127 │ │ + local.get 128 │ │ i64.and │ │ - local.set 137 │ │ - local.get 134 │ │ - local.get 137 │ │ + local.set 129 │ │ + local.get 126 │ │ + local.get 129 │ │ i64.store │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 138 │ │ - local.get 138 │ │ + local.set 130 │ │ + local.get 130 │ │ i32.load8_u offset=13 │ │ - local.set 139 │ │ + local.set 131 │ │ i32.const 1 │ │ - local.set 140 │ │ - local.get 139 │ │ - local.get 140 │ │ + local.set 132 │ │ + local.get 131 │ │ + local.get 132 │ │ i32.and │ │ - local.set 141 │ │ + local.set 133 │ │ block ;; label = @8 │ │ - local.get 141 │ │ + local.get 133 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 142 │ │ - local.get 142 │ │ + local.set 134 │ │ + local.get 134 │ │ i64.load offset=24 │ │ - local.set 143 │ │ + local.set 135 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 144 │ │ - local.get 144 │ │ - local.get 143 │ │ + local.set 136 │ │ + local.get 136 │ │ + local.get 135 │ │ i64.store offset=24 │ │ local.get 7 │ │ i32.load offset=20 │ │ - local.set 145 │ │ - local.get 145 │ │ + local.set 137 │ │ + local.get 137 │ │ i64.load │ │ - local.set 146 │ │ + local.set 138 │ │ i64.const 4 │ │ - local.set 147 │ │ - local.get 146 │ │ - local.get 147 │ │ + local.set 139 │ │ + local.get 138 │ │ + local.get 139 │ │ i64.or │ │ - local.set 148 │ │ - local.get 145 │ │ - local.get 148 │ │ + local.set 140 │ │ + local.get 137 │ │ + local.get 140 │ │ i64.store │ │ end │ │ end │ │ i64.const 0 │ │ - local.set 149 │ │ + local.set 141 │ │ local.get 7 │ │ - local.get 149 │ │ + local.get 141 │ │ i64.store offset=136 │ │ br 5 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 150 │ │ + local.set 142 │ │ local.get 7 │ │ i32.load offset=124 │ │ - local.set 151 │ │ + local.set 143 │ │ local.get 7 │ │ i64.load offset=112 │ │ - local.set 152 │ │ - local.get 150 │ │ - local.get 151 │ │ - local.get 152 │ │ + local.set 144 │ │ + local.get 142 │ │ + local.get 143 │ │ + local.get 144 │ │ call $zip_error_to_data │ │ - local.set 153 │ │ + local.set 145 │ │ local.get 7 │ │ - local.get 153 │ │ + local.get 145 │ │ i64.store offset=136 │ │ br 4 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 154 │ │ - local.get 154 │ │ + local.set 146 │ │ + local.get 146 │ │ call $context_free │ │ i64.const 0 │ │ - local.set 155 │ │ + local.set 147 │ │ local.get 7 │ │ - local.get 155 │ │ + local.get 147 │ │ i64.store offset=136 │ │ br 3 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=124 │ │ - local.set 156 │ │ + local.set 148 │ │ local.get 7 │ │ - local.get 156 │ │ + local.get 148 │ │ i32.store offset=16 │ │ local.get 7 │ │ i64.load offset=112 │ │ - local.set 157 │ │ + local.set 149 │ │ i64.const 24 │ │ - local.set 158 │ │ - local.get 157 │ │ - local.set 159 │ │ - local.get 158 │ │ - local.set 160 │ │ - local.get 159 │ │ - local.get 160 │ │ + local.set 150 │ │ + local.get 149 │ │ + local.set 151 │ │ + local.get 150 │ │ + local.set 152 │ │ + local.get 151 │ │ + local.get 152 │ │ i64.lt_u │ │ - local.set 161 │ │ + local.set 153 │ │ i32.const 1 │ │ - local.set 162 │ │ - local.get 161 │ │ - local.get 162 │ │ + local.set 154 │ │ + local.get 153 │ │ + local.get 154 │ │ i32.and │ │ - local.set 163 │ │ + local.set 155 │ │ block ;; label = @4 │ │ - local.get 163 │ │ + local.get 155 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 164 │ │ + local.set 156 │ │ i32.const 18 │ │ - local.set 165 │ │ + local.set 157 │ │ i32.const 0 │ │ - local.set 166 │ │ - local.get 164 │ │ - local.get 165 │ │ - local.get 166 │ │ + local.set 158 │ │ + local.get 156 │ │ + local.get 157 │ │ + local.get 158 │ │ call $zip_error_set │ │ i64.const -1 │ │ - local.set 167 │ │ + local.set 159 │ │ local.get 7 │ │ - local.get 167 │ │ + local.get 159 │ │ i64.store offset=136 │ │ br 3 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=16 │ │ - local.set 168 │ │ - local.get 168 │ │ + local.set 160 │ │ + local.get 160 │ │ i64.load │ │ - local.set 169 │ │ + local.set 161 │ │ i64.const 20 │ │ - local.set 170 │ │ - local.get 169 │ │ - local.get 170 │ │ + local.set 162 │ │ + local.get 161 │ │ + local.get 162 │ │ i64.or │ │ - local.set 171 │ │ - local.get 168 │ │ - local.get 171 │ │ + local.set 163 │ │ + local.get 160 │ │ + local.get 163 │ │ i64.store │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 172 │ │ - local.get 172 │ │ + local.set 164 │ │ + local.get 164 │ │ i32.load offset=8232 │ │ - local.set 173 │ │ - local.get 173 │ │ + local.set 165 │ │ + local.get 165 │ │ i32.load8_u offset=16 │ │ - local.set 174 │ │ + local.set 166 │ │ local.get 7 │ │ i32.load offset=16 │ │ - local.set 175 │ │ - local.get 175 │ │ - local.get 174 │ │ + local.set 167 │ │ + local.get 167 │ │ + local.get 166 │ │ i32.store8 offset=11 │ │ local.get 7 │ │ i32.load offset=16 │ │ - local.set 176 │ │ - i32.const 2102 │ │ - local.set 177 │ │ - local.get 176 │ │ - local.get 177 │ │ + local.set 168 │ │ + i32.const 2110 │ │ + local.set 169 │ │ + local.get 168 │ │ + local.get 169 │ │ i32.store16 offset=18 │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 178 │ │ - local.get 178 │ │ + local.set 170 │ │ + local.get 170 │ │ i32.load8_u offset=15 │ │ - local.set 179 │ │ + local.set 171 │ │ i32.const 1 │ │ - local.set 180 │ │ - local.get 179 │ │ - local.get 180 │ │ + local.set 172 │ │ + local.get 171 │ │ + local.get 172 │ │ i32.and │ │ - local.set 181 │ │ + local.set 173 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ - local.get 181 │ │ + local.get 173 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ - local.set 182 │ │ - local.get 182 │ │ - local.set 183 │ │ + local.set 174 │ │ + local.get 174 │ │ + local.set 175 │ │ br 1 (;@4;) │ │ end │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 184 │ │ - local.get 184 │ │ + local.set 176 │ │ + local.get 176 │ │ i32.load offset=8232 │ │ - local.set 185 │ │ - local.get 185 │ │ + local.set 177 │ │ + local.get 177 │ │ i32.load offset=12 │ │ - local.set 186 │ │ + local.set 178 │ │ local.get 7 │ │ i32.load offset=104 │ │ - local.set 187 │ │ - local.get 187 │ │ + local.set 179 │ │ + local.get 179 │ │ i32.load offset=8236 │ │ - local.set 188 │ │ - local.get 188 │ │ - local.get 186 │ │ + local.set 180 │ │ + local.get 180 │ │ + local.get 178 │ │ call_indirect (type 10) │ │ - local.set 189 │ │ + local.set 181 │ │ i32.const 65535 │ │ - local.set 190 │ │ - local.get 189 │ │ - local.get 190 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.get 182 │ │ i32.and │ │ - local.set 191 │ │ - local.get 191 │ │ local.set 183 │ │ + local.get 183 │ │ + local.set 175 │ │ end │ │ - local.get 183 │ │ - local.set 192 │ │ + local.get 175 │ │ + local.set 184 │ │ local.get 7 │ │ i32.load offset=16 │ │ - local.set 193 │ │ - local.get 193 │ │ - local.get 192 │ │ + local.set 185 │ │ + local.get 185 │ │ + local.get 184 │ │ i32.store16 offset=16 │ │ i64.const 24 │ │ - local.set 194 │ │ + local.set 186 │ │ local.get 7 │ │ - local.get 194 │ │ + local.get 186 │ │ i64.store offset=136 │ │ br 2 (;@1;) │ │ end │ │ i32.const -1 │ │ - local.set 195 │ │ + local.set 187 │ │ local.get 7 │ │ - local.get 195 │ │ + local.get 187 │ │ i32.store offset=4 │ │ i32.const 20 │ │ - local.set 196 │ │ + local.set 188 │ │ local.get 7 │ │ - local.get 196 │ │ + local.get 188 │ │ i32.store │ │ i32.const 19 │ │ - local.set 197 │ │ - local.get 197 │ │ + local.set 189 │ │ + local.get 189 │ │ local.get 7 │ │ call $zip_source_make_command_bitmap │ │ - local.set 198 │ │ + local.set 190 │ │ i64.const 63 │ │ - local.set 199 │ │ - local.get 198 │ │ - local.get 199 │ │ + local.set 191 │ │ + local.get 190 │ │ + local.get 191 │ │ i64.or │ │ - local.set 200 │ │ + local.set 192 │ │ local.get 7 │ │ - local.get 200 │ │ + local.get 192 │ │ i64.store offset=136 │ │ br 1 (;@1;) │ │ end │ │ local.get 7 │ │ i32.load offset=132 │ │ - local.set 201 │ │ + local.set 193 │ │ local.get 7 │ │ i32.load offset=124 │ │ - local.set 202 │ │ + local.set 194 │ │ local.get 7 │ │ i64.load offset=112 │ │ - local.set 203 │ │ + local.set 195 │ │ local.get 7 │ │ i32.load offset=108 │ │ - local.set 204 │ │ - local.get 201 │ │ - local.get 202 │ │ - local.get 203 │ │ - local.get 204 │ │ + local.set 196 │ │ + local.get 193 │ │ + local.get 194 │ │ + local.get 195 │ │ + local.get 196 │ │ call $zip_source_pass_to_lower_layer │ │ - local.set 205 │ │ + local.set 197 │ │ local.get 7 │ │ - local.get 205 │ │ + local.get 197 │ │ i64.store offset=136 │ │ end │ │ local.get 7 │ │ i64.load offset=136 │ │ - local.set 206 │ │ + local.set 198 │ │ i32.const 144 │ │ - local.set 207 │ │ + local.set 199 │ │ local.get 7 │ │ - local.get 207 │ │ + local.get 199 │ │ i32.add │ │ - local.set 208 │ │ - local.get 208 │ │ + local.set 200 │ │ + local.get 200 │ │ global.set $__stack_pointer │ │ - local.get 206 │ │ + local.get 198 │ │ return) │ │ (func $context_free (type 5) (param i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ @@ -311240,16 +313198,16 @@ │ │ local.get 14 │ │ i32.add │ │ local.set 15 │ │ local.get 15 │ │ global.set $__stack_pointer │ │ local.get 13 │ │ return) │ │ - (func $compress_read (type 83) (param i32 i32 i32 i64) (result i64) │ │ - (local i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32) │ │ + (func $compress_read (type 87) (param i32 i32 i32 i64) (result i64) │ │ + (local i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 64 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ i32.sub │ │ @@ -311513,541 +313471,733 @@ │ │ local.get 66 │ │ local.get 67 │ │ i32.and │ │ local.set 68 │ │ block ;; label = @8 │ │ local.get 68 │ │ br_if 0 (;@8;) │ │ + local.get 6 │ │ + i32.load offset=52 │ │ + local.set 69 │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 70 │ │ + i32.const 40 │ │ + local.set 71 │ │ + local.get 70 │ │ + local.get 71 │ │ + i32.add │ │ + local.set 72 │ │ + i64.const 1 │ │ + local.set 73 │ │ + local.get 69 │ │ + local.get 72 │ │ + local.get 73 │ │ + call $zip_source_read │ │ + local.set 74 │ │ + local.get 6 │ │ + local.get 74 │ │ + i64.store offset=16 │ │ + local.get 6 │ │ + i64.load offset=16 │ │ + local.set 75 │ │ + i64.const 0 │ │ + local.set 76 │ │ + local.get 75 │ │ + local.set 77 │ │ + local.get 76 │ │ + local.set 78 │ │ + local.get 77 │ │ + local.get 78 │ │ + i64.lt_s │ │ + local.set 79 │ │ + i32.const 1 │ │ + local.set 80 │ │ + local.get 79 │ │ + local.get 80 │ │ + i32.and │ │ + local.set 81 │ │ + block ;; label = @9 │ │ + local.get 81 │ │ + i32.eqz │ │ + br_if 0 (;@9;) │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 82 │ │ + local.get 6 │ │ + i32.load offset=52 │ │ + local.set 83 │ │ + local.get 82 │ │ + local.get 83 │ │ + call $zip_error_set_from_source │ │ + i32.const 1 │ │ + local.set 84 │ │ + local.get 6 │ │ + local.get 84 │ │ + i32.store8 offset=27 │ │ + br 5 (;@4;) │ │ + end │ │ + local.get 6 │ │ + i64.load offset=16 │ │ + local.set 85 │ │ + i64.const 0 │ │ + local.set 86 │ │ + local.get 85 │ │ + local.set 87 │ │ + local.get 86 │ │ + local.set 88 │ │ + local.get 87 │ │ + local.get 88 │ │ + i64.eq │ │ + local.set 89 │ │ + i32.const 1 │ │ + local.set 90 │ │ + local.get 89 │ │ + local.get 90 │ │ + i32.and │ │ + local.set 91 │ │ + block ;; label = @9 │ │ + local.get 91 │ │ + i32.eqz │ │ + br_if 0 (;@9;) │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 92 │ │ + i32.const 1 │ │ + local.set 93 │ │ + local.get 92 │ │ + local.get 93 │ │ + i32.store8 offset=12 │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 94 │ │ + local.get 94 │ │ + i32.load offset=8232 │ │ + local.set 95 │ │ + local.get 95 │ │ + i32.load offset=32 │ │ + local.set 96 │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 97 │ │ + local.get 97 │ │ + i32.load offset=8236 │ │ + local.set 98 │ │ + local.get 98 │ │ + local.get 96 │ │ + call_indirect (type 10) │ │ + local.set 99 │ │ + i32.const 1 │ │ + local.set 100 │ │ + i32.const 0 │ │ + local.set 101 │ │ + i32.const 1 │ │ + local.set 102 │ │ + local.get 99 │ │ + local.get 102 │ │ + i32.and │ │ + local.set 103 │ │ + local.get 100 │ │ + local.get 101 │ │ + local.get 103 │ │ + select │ │ + local.set 104 │ │ + local.get 104 │ │ + local.set 105 │ │ + local.get 105 │ │ + i64.extend_i32_s │ │ + local.set 106 │ │ + local.get 6 │ │ + local.get 106 │ │ + i64.store offset=16 │ │ + end │ │ + local.get 6 │ │ + i64.load offset=16 │ │ + local.set 107 │ │ + i64.const 0 │ │ + local.set 108 │ │ + local.get 107 │ │ + local.set 109 │ │ + local.get 108 │ │ + local.set 110 │ │ + local.get 109 │ │ + local.get 110 │ │ + i64.gt_s │ │ + local.set 111 │ │ + i32.const 1 │ │ + local.set 112 │ │ + local.get 111 │ │ + local.get 112 │ │ + i32.and │ │ + local.set 113 │ │ + block ;; label = @9 │ │ + local.get 113 │ │ + i32.eqz │ │ + br_if 0 (;@9;) │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 114 │ │ + local.get 114 │ │ + i32.load8_u offset=17 │ │ + local.set 115 │ │ + i32.const 1 │ │ + local.set 116 │ │ + local.get 115 │ │ + local.get 116 │ │ + i32.and │ │ + local.set 117 │ │ + local.get 117 │ │ + i32.eqz │ │ + br_if 0 (;@9;) │ │ + local.get 6 │ │ + i32.load offset=48 │ │ + local.set 118 │ │ + i32.const 21 │ │ + local.set 119 │ │ + i32.const 25 │ │ + local.set 120 │ │ + local.get 118 │ │ + local.get 119 │ │ + local.get 120 │ │ + call $zip_error_set │ │ + i32.const 1 │ │ + local.set 121 │ │ + local.get 6 │ │ + local.get 121 │ │ + i32.store8 offset=27 │ │ + br 5 (;@4;) │ │ + end │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 69 │ │ - local.get 69 │ │ + local.set 122 │ │ + local.get 122 │ │ i64.load offset=32 │ │ - local.set 70 │ │ + local.set 123 │ │ i64.const 0 │ │ - local.set 71 │ │ - local.get 70 │ │ - local.set 72 │ │ - local.get 71 │ │ - local.set 73 │ │ - local.get 72 │ │ - local.get 73 │ │ + local.set 124 │ │ + local.get 123 │ │ + local.set 125 │ │ + local.get 124 │ │ + local.set 126 │ │ + local.get 125 │ │ + local.get 126 │ │ i64.lt_s │ │ - local.set 74 │ │ + local.set 127 │ │ i32.const 1 │ │ - local.set 75 │ │ - local.get 74 │ │ - local.get 75 │ │ + local.set 128 │ │ + local.get 127 │ │ + local.get 128 │ │ i32.and │ │ - local.set 76 │ │ + local.set 129 │ │ block ;; label = @8 │ │ - local.get 76 │ │ + local.get 129 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 77 │ │ + local.set 130 │ │ i32.const 20 │ │ - local.set 78 │ │ + local.set 131 │ │ i32.const 0 │ │ - local.set 79 │ │ - local.get 77 │ │ - local.get 78 │ │ - local.get 79 │ │ + local.set 132 │ │ + local.get 130 │ │ + local.get 131 │ │ + local.get 132 │ │ call $zip_error_set │ │ i32.const 1 │ │ - local.set 80 │ │ + local.set 133 │ │ local.get 6 │ │ - local.get 80 │ │ + local.get 133 │ │ i32.store8 offset=27 │ │ br 4 (;@4;) │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 81 │ │ - local.get 81 │ │ + local.set 134 │ │ + local.get 134 │ │ i32.load8_u offset=14 │ │ - local.set 82 │ │ + local.set 135 │ │ i32.const 1 │ │ - local.set 83 │ │ - local.get 82 │ │ - local.get 83 │ │ + local.set 136 │ │ + local.get 135 │ │ + local.get 136 │ │ i32.and │ │ - local.set 84 │ │ + local.set 137 │ │ block ;; label = @8 │ │ - local.get 84 │ │ + local.get 137 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 85 │ │ - local.get 85 │ │ + local.set 138 │ │ + local.get 138 │ │ i64.load offset=32 │ │ - local.set 86 │ │ + local.set 139 │ │ local.get 6 │ │ i64.load offset=8 │ │ - local.set 87 │ │ - local.get 86 │ │ - local.set 88 │ │ - local.get 87 │ │ - local.set 89 │ │ - local.get 88 │ │ - local.get 89 │ │ + local.set 140 │ │ + local.get 139 │ │ + local.set 141 │ │ + local.get 140 │ │ + local.set 142 │ │ + local.get 141 │ │ + local.get 142 │ │ i64.le_u │ │ - local.set 90 │ │ + local.set 143 │ │ i32.const 1 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.get 91 │ │ + local.set 144 │ │ + local.get 143 │ │ + local.get 144 │ │ i32.and │ │ - local.set 92 │ │ - local.get 92 │ │ + local.set 145 │ │ + local.get 145 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 93 │ │ + local.set 146 │ │ i32.const 1 │ │ - local.set 94 │ │ - local.get 93 │ │ - local.get 94 │ │ + local.set 147 │ │ + local.get 146 │ │ + local.get 147 │ │ i32.store8 offset=15 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 95 │ │ - local.get 95 │ │ + local.set 148 │ │ + local.get 148 │ │ i64.load offset=32 │ │ - local.set 96 │ │ + local.set 149 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 97 │ │ - local.get 97 │ │ - local.get 96 │ │ + local.set 150 │ │ + local.get 150 │ │ + local.get 149 │ │ i64.store offset=24 │ │ local.get 6 │ │ i32.load offset=44 │ │ - local.set 98 │ │ + local.set 151 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 99 │ │ + local.set 152 │ │ i32.const 40 │ │ - local.set 100 │ │ - local.get 99 │ │ - local.get 100 │ │ + local.set 153 │ │ + local.get 152 │ │ + local.get 153 │ │ i32.add │ │ - local.set 101 │ │ + local.set 154 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 102 │ │ - local.get 102 │ │ + local.set 155 │ │ + local.get 155 │ │ i64.load offset=24 │ │ - local.set 103 │ │ - local.get 103 │ │ + local.set 156 │ │ + local.get 156 │ │ i32.wrap_i64 │ │ - local.set 104 │ │ - local.get 98 │ │ - local.get 101 │ │ - local.get 104 │ │ + local.set 157 │ │ + local.get 151 │ │ + local.get 154 │ │ + local.get 157 │ │ call $__memcpy │ │ drop │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 105 │ │ - local.get 105 │ │ + local.set 158 │ │ + local.get 158 │ │ i64.load offset=24 │ │ - local.set 106 │ │ + local.set 159 │ │ local.get 6 │ │ - local.get 106 │ │ + local.get 159 │ │ i64.store offset=56 │ │ br 7 (;@1;) │ │ end │ │ i32.const 1 │ │ - local.set 107 │ │ + local.set 160 │ │ local.get 6 │ │ - local.get 107 │ │ + local.get 160 │ │ i32.store8 offset=27 │ │ br 3 (;@4;) │ │ end │ │ br 2 (;@4;) │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 108 │ │ - local.get 108 │ │ + local.set 161 │ │ + local.get 161 │ │ i32.load8_u offset=12 │ │ - local.set 109 │ │ + local.set 162 │ │ i32.const 1 │ │ - local.set 110 │ │ - local.get 109 │ │ - local.get 110 │ │ + local.set 163 │ │ + local.get 162 │ │ + local.get 163 │ │ i32.and │ │ - local.set 111 │ │ + local.set 164 │ │ block ;; label = @6 │ │ - local.get 111 │ │ + local.get 164 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 1 │ │ - local.set 112 │ │ + local.set 165 │ │ local.get 6 │ │ - local.get 112 │ │ + local.get 165 │ │ i32.store8 offset=27 │ │ br 2 (;@4;) │ │ end │ │ local.get 6 │ │ i32.load offset=52 │ │ - local.set 113 │ │ + local.set 166 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 114 │ │ + local.set 167 │ │ i32.const 40 │ │ - local.set 115 │ │ - local.get 114 │ │ - local.get 115 │ │ + local.set 168 │ │ + local.get 167 │ │ + local.get 168 │ │ i32.add │ │ - local.set 116 │ │ + local.set 169 │ │ i64.const 8192 │ │ - local.set 117 │ │ - local.get 113 │ │ - local.get 116 │ │ - local.get 117 │ │ + local.set 170 │ │ + local.get 166 │ │ + local.get 169 │ │ + local.get 170 │ │ call $zip_source_read │ │ - local.set 118 │ │ + local.set 171 │ │ local.get 6 │ │ - local.get 118 │ │ + local.get 171 │ │ i64.store offset=16 │ │ i64.const 0 │ │ - local.set 119 │ │ - local.get 118 │ │ - local.set 120 │ │ - local.get 119 │ │ - local.set 121 │ │ - local.get 120 │ │ - local.get 121 │ │ + local.set 172 │ │ + local.get 171 │ │ + local.set 173 │ │ + local.get 172 │ │ + local.set 174 │ │ + local.get 173 │ │ + local.get 174 │ │ i64.lt_s │ │ - local.set 122 │ │ + local.set 175 │ │ i32.const 1 │ │ - local.set 123 │ │ - local.get 122 │ │ - local.get 123 │ │ + local.set 176 │ │ + local.get 175 │ │ + local.get 176 │ │ i32.and │ │ - local.set 124 │ │ + local.set 177 │ │ block ;; label = @6 │ │ - local.get 124 │ │ + local.get 177 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 125 │ │ + local.set 178 │ │ local.get 6 │ │ i32.load offset=52 │ │ - local.set 126 │ │ - local.get 125 │ │ - local.get 126 │ │ + local.set 179 │ │ + local.get 178 │ │ + local.get 179 │ │ call $zip_error_set_from_source │ │ i32.const 1 │ │ - local.set 127 │ │ + local.set 180 │ │ local.get 6 │ │ - local.get 127 │ │ + local.get 180 │ │ i32.store8 offset=27 │ │ br 2 (;@4;) │ │ end │ │ local.get 6 │ │ i64.load offset=16 │ │ - local.set 128 │ │ + local.set 181 │ │ i64.const 0 │ │ - local.set 129 │ │ - local.get 128 │ │ - local.set 130 │ │ - local.get 129 │ │ - local.set 131 │ │ - local.get 130 │ │ - local.get 131 │ │ + local.set 182 │ │ + local.get 181 │ │ + local.set 183 │ │ + local.get 182 │ │ + local.set 184 │ │ + local.get 183 │ │ + local.get 184 │ │ i64.eq │ │ - local.set 132 │ │ + local.set 185 │ │ i32.const 1 │ │ - local.set 133 │ │ - local.get 132 │ │ - local.get 133 │ │ + local.set 186 │ │ + local.get 185 │ │ + local.get 186 │ │ i32.and │ │ - local.set 134 │ │ + local.set 187 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ - local.get 134 │ │ + local.get 187 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 135 │ │ + local.set 188 │ │ i32.const 1 │ │ - local.set 136 │ │ - local.get 135 │ │ - local.get 136 │ │ + local.set 189 │ │ + local.get 188 │ │ + local.get 189 │ │ i32.store8 offset=12 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 137 │ │ - local.get 137 │ │ + local.set 190 │ │ + local.get 190 │ │ i32.load offset=8232 │ │ - local.set 138 │ │ - local.get 138 │ │ + local.set 191 │ │ + local.get 191 │ │ i32.load offset=32 │ │ - local.set 139 │ │ + local.set 192 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 140 │ │ - local.get 140 │ │ + local.set 193 │ │ + local.get 193 │ │ i32.load offset=8236 │ │ - local.set 141 │ │ - local.get 141 │ │ - local.get 139 │ │ - call_indirect (type 5) │ │ + local.set 194 │ │ + local.get 194 │ │ + local.get 192 │ │ + call_indirect (type 10) │ │ + drop │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 142 │ │ - local.get 142 │ │ + local.set 195 │ │ + local.get 195 │ │ i64.load offset=32 │ │ - local.set 143 │ │ + local.set 196 │ │ i64.const 0 │ │ - local.set 144 │ │ - local.get 143 │ │ - local.set 145 │ │ - local.get 144 │ │ - local.set 146 │ │ - local.get 145 │ │ - local.get 146 │ │ + local.set 197 │ │ + local.get 196 │ │ + local.set 198 │ │ + local.get 197 │ │ + local.set 199 │ │ + local.get 198 │ │ + local.get 199 │ │ i64.lt_s │ │ - local.set 147 │ │ + local.set 200 │ │ i32.const 1 │ │ - local.set 148 │ │ - local.get 147 │ │ - local.get 148 │ │ + local.set 201 │ │ + local.get 200 │ │ + local.get 201 │ │ i32.and │ │ - local.set 149 │ │ + local.set 202 │ │ block ;; label = @8 │ │ - local.get 149 │ │ + local.get 202 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 150 │ │ + local.set 203 │ │ i64.const 0 │ │ - local.set 151 │ │ - local.get 150 │ │ - local.get 151 │ │ + local.set 204 │ │ + local.get 203 │ │ + local.get 204 │ │ i64.store offset=32 │ │ end │ │ br 1 (;@6;) │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 152 │ │ - local.get 152 │ │ + local.set 205 │ │ + local.get 205 │ │ i64.load offset=32 │ │ - local.set 153 │ │ + local.set 206 │ │ i64.const 0 │ │ - local.set 154 │ │ - local.get 153 │ │ - local.set 155 │ │ - local.get 154 │ │ - local.set 156 │ │ - local.get 155 │ │ - local.get 156 │ │ + local.set 207 │ │ + local.get 206 │ │ + local.set 208 │ │ + local.get 207 │ │ + local.set 209 │ │ + local.get 208 │ │ + local.get 209 │ │ i64.ge_s │ │ - local.set 157 │ │ + local.set 210 │ │ i32.const 1 │ │ - local.set 158 │ │ - local.get 157 │ │ - local.get 158 │ │ + local.set 211 │ │ + local.get 210 │ │ + local.get 211 │ │ i32.and │ │ - local.set 159 │ │ + local.set 212 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ - local.get 159 │ │ + local.get 212 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 160 │ │ + local.set 213 │ │ i32.const 0 │ │ - local.set 161 │ │ - local.get 160 │ │ - local.get 161 │ │ + local.set 214 │ │ + local.get 213 │ │ + local.get 214 │ │ i32.store8 offset=14 │ │ br 1 (;@7;) │ │ end │ │ local.get 6 │ │ i64.load offset=16 │ │ - local.set 162 │ │ + local.set 215 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 163 │ │ - local.get 163 │ │ - local.get 162 │ │ + local.set 216 │ │ + local.get 216 │ │ + local.get 215 │ │ i64.store offset=32 │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 164 │ │ - local.get 164 │ │ + local.set 217 │ │ + local.get 217 │ │ i32.load offset=8232 │ │ - local.set 165 │ │ - local.get 165 │ │ + local.set 218 │ │ + local.get 218 │ │ i32.load offset=28 │ │ - local.set 166 │ │ + local.set 219 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 167 │ │ - local.get 167 │ │ + local.set 220 │ │ + local.get 220 │ │ i32.load offset=8236 │ │ - local.set 168 │ │ + local.set 221 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 169 │ │ + local.set 222 │ │ i32.const 40 │ │ - local.set 170 │ │ - local.get 169 │ │ - local.get 170 │ │ + local.set 223 │ │ + local.get 222 │ │ + local.get 223 │ │ i32.add │ │ - local.set 171 │ │ + local.set 224 │ │ local.get 6 │ │ i64.load offset=16 │ │ - local.set 172 │ │ - local.get 168 │ │ - local.get 171 │ │ - local.get 172 │ │ - local.get 166 │ │ + local.set 225 │ │ + local.get 221 │ │ + local.get 224 │ │ + local.get 225 │ │ + local.get 219 │ │ call_indirect (type 17) │ │ drop │ │ end │ │ br 1 (;@4;) │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 173 │ │ - local.get 173 │ │ + local.set 226 │ │ + local.get 226 │ │ call $zip_error_code_zip │ │ - local.set 174 │ │ + local.set 227 │ │ block ;; label = @5 │ │ - local.get 174 │ │ + local.get 227 │ │ br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 175 │ │ + local.set 228 │ │ i32.const 20 │ │ - local.set 176 │ │ + local.set 229 │ │ i32.const 0 │ │ - local.set 177 │ │ - local.get 175 │ │ - local.get 176 │ │ - local.get 177 │ │ + local.set 230 │ │ + local.get 228 │ │ + local.get 229 │ │ + local.get 230 │ │ call $zip_error_set │ │ end │ │ i32.const 1 │ │ - local.set 178 │ │ + local.set 231 │ │ local.get 6 │ │ - local.get 178 │ │ + local.get 231 │ │ i32.store8 offset=27 │ │ end │ │ br 1 (;@2;) │ │ end │ │ end │ │ local.get 6 │ │ i64.load offset=8 │ │ - local.set 179 │ │ + local.set 232 │ │ i64.const 0 │ │ - local.set 180 │ │ - local.get 179 │ │ - local.set 181 │ │ - local.get 180 │ │ - local.set 182 │ │ - local.get 181 │ │ - local.get 182 │ │ + local.set 233 │ │ + local.get 232 │ │ + local.set 234 │ │ + local.get 233 │ │ + local.set 235 │ │ + local.get 234 │ │ + local.get 235 │ │ i64.gt_u │ │ - local.set 183 │ │ + local.set 236 │ │ i32.const 1 │ │ - local.set 184 │ │ - local.get 183 │ │ - local.get 184 │ │ + local.set 237 │ │ + local.get 236 │ │ + local.get 237 │ │ i32.and │ │ - local.set 185 │ │ + local.set 238 │ │ block ;; label = @2 │ │ - local.get 185 │ │ + local.get 238 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 186 │ │ + local.set 239 │ │ i32.const 0 │ │ - local.set 187 │ │ - local.get 186 │ │ - local.get 187 │ │ + local.set 240 │ │ + local.get 239 │ │ + local.get 240 │ │ i32.store8 offset=14 │ │ local.get 6 │ │ i64.load offset=8 │ │ - local.set 188 │ │ + local.set 241 │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 189 │ │ - local.get 189 │ │ + local.set 242 │ │ + local.get 242 │ │ i64.load offset=24 │ │ - local.set 190 │ │ - local.get 190 │ │ - local.get 188 │ │ + local.set 243 │ │ + local.get 243 │ │ + local.get 241 │ │ i64.add │ │ - local.set 191 │ │ - local.get 189 │ │ - local.get 191 │ │ + local.set 244 │ │ + local.get 242 │ │ + local.get 244 │ │ i64.store offset=24 │ │ local.get 6 │ │ i64.load offset=8 │ │ - local.set 192 │ │ + local.set 245 │ │ local.get 6 │ │ - local.get 192 │ │ + local.get 245 │ │ i64.store offset=56 │ │ br 1 (;@1;) │ │ end │ │ local.get 6 │ │ i32.load offset=48 │ │ - local.set 193 │ │ - local.get 193 │ │ + local.set 246 │ │ + local.get 246 │ │ call $zip_error_code_zip │ │ - local.set 194 │ │ + local.set 247 │ │ i32.const 0 │ │ - local.set 195 │ │ + local.set 248 │ │ i32.const -1 │ │ - local.set 196 │ │ - local.get 196 │ │ - local.get 195 │ │ - local.get 194 │ │ + local.set 249 │ │ + local.get 249 │ │ + local.get 248 │ │ + local.get 247 │ │ select │ │ - local.set 197 │ │ - local.get 197 │ │ - local.set 198 │ │ - local.get 198 │ │ + local.set 250 │ │ + local.get 250 │ │ + local.set 251 │ │ + local.get 251 │ │ i64.extend_i32_s │ │ - local.set 199 │ │ + local.set 252 │ │ local.get 6 │ │ - local.get 199 │ │ + local.get 252 │ │ i64.store offset=56 │ │ end │ │ local.get 6 │ │ i64.load offset=56 │ │ - local.set 200 │ │ + local.set 253 │ │ i32.const 64 │ │ - local.set 201 │ │ + local.set 254 │ │ local.get 6 │ │ - local.get 201 │ │ + local.get 254 │ │ i32.add │ │ - local.set 202 │ │ - local.get 202 │ │ + local.set 255 │ │ + local.get 255 │ │ global.set $__stack_pointer │ │ - local.get 200 │ │ + local.get 253 │ │ return) │ │ - (func $zip_source_zip_file_create (type 84) (param i32 i64 i32 i64 i64 i32 i32) (result i32) │ │ + (func $zip_source_zip_file_create (type 88) (param i32 i64 i32 i64 i64 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i64 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i32 i64 i64 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 7 │ │ i32.const 320 │ │ local.set 8 │ │ local.get 7 │ │ local.get 8 │ │ @@ -314822,15 +316972,15 @@ │ │ local.set 27 │ │ local.get 27 │ │ local.get 26 │ │ i32.store16 offset=16 │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 28 │ │ - i32.const 2102 │ │ + i32.const 2110 │ │ local.set 29 │ │ local.get 28 │ │ local.get 29 │ │ i32.store16 offset=18 │ │ i32.const 16 │ │ local.set 30 │ │ local.get 4 │ │ @@ -315035,15 +317185,15 @@ │ │ i32.add │ │ local.set 35 │ │ local.get 35 │ │ global.set $__stack_pointer │ │ local.get 33 │ │ return) │ │ (func $zip_stat_index (type 33) (param i32 i64 i32 i32) (result i32) │ │ - (local i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 48 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ i32.sub │ │ @@ -315313,730 +317463,714 @@ │ │ local.set 76 │ │ local.get 75 │ │ local.get 76 │ │ i32.and │ │ local.set 77 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ - block ;; label = @6 │ │ - local.get 77 │ │ - br_if 0 (;@6;) │ │ - local.get 6 │ │ - i32.load offset=16 │ │ - local.set 78 │ │ - local.get 78 │ │ - i32.load offset=16 │ │ - local.set 79 │ │ - i32.const -2 │ │ - local.set 80 │ │ - local.get 79 │ │ - local.set 81 │ │ - local.get 80 │ │ - local.set 82 │ │ - local.get 81 │ │ - local.get 82 │ │ - i32.eq │ │ - local.set 83 │ │ - i32.const 1 │ │ - local.set 84 │ │ - local.get 83 │ │ - local.get 84 │ │ - i32.and │ │ - local.set 85 │ │ - local.get 85 │ │ - i32.eqz │ │ - br_if 1 (;@5;) │ │ - end │ │ + local.get 77 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 86 │ │ - local.get 86 │ │ + local.set 78 │ │ + local.get 78 │ │ i64.load │ │ - local.set 87 │ │ + local.set 79 │ │ i64.const 64 │ │ - local.set 88 │ │ - local.get 87 │ │ - local.get 88 │ │ + local.set 80 │ │ + local.get 79 │ │ + local.get 80 │ │ i64.and │ │ - local.set 89 │ │ + local.set 81 │ │ i64.const 0 │ │ - local.set 90 │ │ - local.get 89 │ │ - local.set 91 │ │ - local.get 90 │ │ - local.set 92 │ │ - local.get 91 │ │ - local.get 92 │ │ + local.set 82 │ │ + local.get 81 │ │ + local.set 83 │ │ + local.get 82 │ │ + local.set 84 │ │ + local.get 83 │ │ + local.get 84 │ │ i64.ne │ │ - local.set 93 │ │ + local.set 85 │ │ i32.const 1 │ │ - local.set 94 │ │ - local.get 93 │ │ - local.get 94 │ │ + local.set 86 │ │ + local.get 85 │ │ + local.get 86 │ │ i32.and │ │ - local.set 95 │ │ + local.set 87 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ - local.get 95 │ │ + local.get 87 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 96 │ │ - local.get 96 │ │ + local.set 88 │ │ + local.get 88 │ │ i32.load16_u offset=48 │ │ - local.set 97 │ │ + local.set 89 │ │ i32.const 65535 │ │ - local.set 98 │ │ - local.get 97 │ │ - local.get 98 │ │ + local.set 90 │ │ + local.get 89 │ │ + local.get 90 │ │ i32.and │ │ - local.set 99 │ │ - local.get 99 │ │ + local.set 91 │ │ + local.get 91 │ │ br_if 1 (;@6;) │ │ end │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 100 │ │ - local.get 100 │ │ + local.set 92 │ │ + local.get 92 │ │ i64.load │ │ - local.set 101 │ │ + local.set 93 │ │ i64.const 4294967223 │ │ - local.set 102 │ │ - local.get 101 │ │ - local.get 102 │ │ + local.set 94 │ │ + local.get 93 │ │ + local.get 94 │ │ i64.and │ │ - local.set 103 │ │ - local.get 100 │ │ - local.get 103 │ │ + local.set 95 │ │ + local.get 92 │ │ + local.get 95 │ │ i64.store │ │ end │ │ br 1 (;@4;) │ │ end │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 104 │ │ - local.get 104 │ │ + local.set 96 │ │ + local.get 96 │ │ i64.load │ │ - local.set 105 │ │ + local.set 97 │ │ i64.const 64 │ │ - local.set 106 │ │ - local.get 105 │ │ - local.get 106 │ │ + local.set 98 │ │ + local.get 97 │ │ + local.get 98 │ │ i64.and │ │ - local.set 107 │ │ + local.set 99 │ │ i64.const 0 │ │ - local.set 108 │ │ - local.get 107 │ │ - local.set 109 │ │ - local.get 108 │ │ - local.set 110 │ │ - local.get 109 │ │ - local.get 110 │ │ + local.set 100 │ │ + local.get 99 │ │ + local.set 101 │ │ + local.get 100 │ │ + local.set 102 │ │ + local.get 101 │ │ + local.get 102 │ │ i64.ne │ │ - local.set 111 │ │ + local.set 103 │ │ i32.const 1 │ │ - local.set 112 │ │ - local.get 111 │ │ - local.get 112 │ │ + local.set 104 │ │ + local.get 103 │ │ + local.get 104 │ │ i32.and │ │ - local.set 113 │ │ + local.set 105 │ │ block ;; label = @5 │ │ - local.get 113 │ │ + local.get 105 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 114 │ │ - local.get 114 │ │ + local.set 106 │ │ + local.get 106 │ │ i32.load16_u offset=48 │ │ - local.set 115 │ │ + local.set 107 │ │ i32.const 65535 │ │ - local.set 116 │ │ - local.get 115 │ │ - local.get 116 │ │ + local.set 108 │ │ + local.get 107 │ │ + local.get 108 │ │ i32.and │ │ - local.set 117 │ │ + local.set 109 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 118 │ │ - local.get 118 │ │ + local.set 110 │ │ + local.get 110 │ │ i32.load offset=16 │ │ - local.set 119 │ │ - local.get 117 │ │ - local.set 120 │ │ - local.get 119 │ │ - local.set 121 │ │ - local.get 120 │ │ - local.get 121 │ │ + local.set 111 │ │ + local.get 109 │ │ + local.set 112 │ │ + local.get 111 │ │ + local.set 113 │ │ + local.get 112 │ │ + local.get 113 │ │ i32.ne │ │ - local.set 122 │ │ + local.set 114 │ │ i32.const 1 │ │ - local.set 123 │ │ - local.get 122 │ │ - local.get 123 │ │ + local.set 115 │ │ + local.get 114 │ │ + local.get 115 │ │ i32.and │ │ - local.set 124 │ │ - local.get 124 │ │ + local.set 116 │ │ + local.get 116 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 125 │ │ - local.get 125 │ │ + local.set 117 │ │ + local.get 117 │ │ i64.load │ │ - local.set 126 │ │ + local.set 118 │ │ i64.const 4294967287 │ │ - local.set 127 │ │ - local.get 126 │ │ - local.get 127 │ │ + local.set 119 │ │ + local.get 118 │ │ + local.get 119 │ │ i64.and │ │ - local.set 128 │ │ - local.get 125 │ │ - local.get 128 │ │ + local.set 120 │ │ + local.get 117 │ │ + local.get 120 │ │ i64.store │ │ end │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 129 │ │ - local.get 129 │ │ + local.set 121 │ │ + local.get 121 │ │ i64.load │ │ - local.set 130 │ │ + local.set 122 │ │ i64.const 64 │ │ - local.set 131 │ │ - local.get 130 │ │ - local.get 131 │ │ + local.set 123 │ │ + local.get 122 │ │ + local.get 123 │ │ i64.or │ │ - local.set 132 │ │ - local.get 129 │ │ - local.get 132 │ │ + local.set 124 │ │ + local.get 121 │ │ + local.get 124 │ │ i64.store │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 133 │ │ - local.get 133 │ │ + local.set 125 │ │ + local.get 125 │ │ i32.load offset=16 │ │ - local.set 134 │ │ + local.set 126 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 135 │ │ - local.get 135 │ │ - local.get 134 │ │ + local.set 127 │ │ + local.get 127 │ │ + local.get 126 │ │ i32.store16 offset=48 │ │ end │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 136 │ │ - local.get 136 │ │ + local.set 128 │ │ + local.get 128 │ │ i64.load │ │ - local.set 137 │ │ + local.set 129 │ │ i64.const 68 │ │ - local.set 138 │ │ - local.get 137 │ │ - local.get 138 │ │ + local.set 130 │ │ + local.get 129 │ │ + local.get 130 │ │ i64.and │ │ - local.set 139 │ │ + local.set 131 │ │ i64.const 68 │ │ - local.set 140 │ │ - local.get 139 │ │ - local.set 141 │ │ - local.get 140 │ │ - local.set 142 │ │ - local.get 141 │ │ - local.get 142 │ │ + local.set 132 │ │ + local.get 131 │ │ + local.set 133 │ │ + local.get 132 │ │ + local.set 134 │ │ + local.get 133 │ │ + local.get 134 │ │ i64.eq │ │ - local.set 143 │ │ + local.set 135 │ │ i32.const 1 │ │ - local.set 144 │ │ - local.get 143 │ │ - local.get 144 │ │ + local.set 136 │ │ + local.get 135 │ │ + local.get 136 │ │ i32.and │ │ - local.set 145 │ │ + local.set 137 │ │ block ;; label = @4 │ │ - local.get 145 │ │ + local.get 137 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 146 │ │ - local.get 146 │ │ + local.set 138 │ │ + local.get 138 │ │ i32.load16_u offset=48 │ │ - local.set 147 │ │ + local.set 139 │ │ i32.const 65535 │ │ - local.set 148 │ │ - local.get 147 │ │ - local.get 148 │ │ + local.set 140 │ │ + local.get 139 │ │ + local.get 140 │ │ i32.and │ │ - local.set 149 │ │ - local.get 149 │ │ + local.set 141 │ │ + local.get 141 │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 150 │ │ - local.get 150 │ │ + local.set 142 │ │ + local.get 142 │ │ i64.load │ │ - local.set 151 │ │ + local.set 143 │ │ i64.const 8 │ │ - local.set 152 │ │ - local.get 151 │ │ - local.get 152 │ │ + local.set 144 │ │ + local.get 143 │ │ + local.get 144 │ │ i64.or │ │ - local.set 153 │ │ - local.get 150 │ │ - local.get 153 │ │ + local.set 145 │ │ + local.get 142 │ │ + local.get 145 │ │ i64.store │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 154 │ │ - local.get 154 │ │ + local.set 146 │ │ + local.get 146 │ │ i64.load offset=24 │ │ - local.set 155 │ │ + local.set 147 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 156 │ │ - local.get 156 │ │ - local.get 155 │ │ + local.set 148 │ │ + local.get 148 │ │ + local.get 147 │ │ i64.store offset=32 │ │ end │ │ local.get 6 │ │ i32.load offset=12 │ │ - local.set 157 │ │ - local.get 157 │ │ + local.set 149 │ │ + local.get 149 │ │ i32.load offset=4 │ │ - local.set 158 │ │ + local.set 150 │ │ i32.const 0 │ │ - local.set 159 │ │ - local.get 158 │ │ - local.set 160 │ │ - local.get 159 │ │ - local.set 161 │ │ - local.get 160 │ │ - local.get 161 │ │ + local.set 151 │ │ + local.get 150 │ │ + local.set 152 │ │ + local.get 151 │ │ + local.set 153 │ │ + local.get 152 │ │ + local.get 153 │ │ i32.ne │ │ - local.set 162 │ │ + local.set 154 │ │ i32.const 1 │ │ - local.set 163 │ │ - local.get 162 │ │ - local.get 163 │ │ + local.set 155 │ │ + local.get 154 │ │ + local.get 155 │ │ i32.and │ │ - local.set 164 │ │ + local.set 156 │ │ block ;; label = @4 │ │ - local.get 164 │ │ + local.get 156 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=12 │ │ - local.set 165 │ │ - local.get 165 │ │ + local.set 157 │ │ + local.get 157 │ │ i32.load offset=4 │ │ - local.set 166 │ │ - local.get 166 │ │ + local.set 158 │ │ + local.get 158 │ │ i32.load │ │ - local.set 167 │ │ + local.set 159 │ │ i32.const 32 │ │ - local.set 168 │ │ - local.get 167 │ │ - local.get 168 │ │ + local.set 160 │ │ + local.get 159 │ │ + local.get 160 │ │ i32.and │ │ - local.set 169 │ │ - local.get 169 │ │ + local.set 161 │ │ + local.get 161 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 170 │ │ - i32.const 20 │ │ - local.set 171 │ │ - local.get 170 │ │ - local.get 171 │ │ - i32.add │ │ - local.set 172 │ │ - local.get 172 │ │ - call $_zip_d2u_time │ │ - local.set 173 │ │ + local.set 162 │ │ + local.get 162 │ │ + call $zip_dirent_get_last_mod_mtime │ │ + local.set 163 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 174 │ │ - local.get 174 │ │ - local.get 173 │ │ + local.set 164 │ │ + local.get 164 │ │ + local.get 163 │ │ i32.store offset=40 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 175 │ │ - local.get 175 │ │ + local.set 165 │ │ + local.get 165 │ │ i64.load │ │ - local.set 176 │ │ + local.set 166 │ │ i64.const 16 │ │ - local.set 177 │ │ - local.get 176 │ │ - local.get 177 │ │ + local.set 167 │ │ + local.get 166 │ │ + local.get 167 │ │ i64.or │ │ - local.set 178 │ │ - local.get 175 │ │ - local.get 178 │ │ + local.set 168 │ │ + local.get 165 │ │ + local.get 168 │ │ i64.store │ │ end │ │ br 1 (;@2;) │ │ end │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 179 │ │ - local.get 179 │ │ + local.set 169 │ │ + local.get 169 │ │ call $zip_stat_init │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 180 │ │ - local.get 180 │ │ + local.set 170 │ │ + local.get 170 │ │ i32.load offset=24 │ │ - local.set 181 │ │ + local.set 171 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 182 │ │ - local.get 182 │ │ - local.get 181 │ │ + local.set 172 │ │ + local.get 172 │ │ + local.get 171 │ │ i32.store offset=44 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 183 │ │ - local.get 183 │ │ + local.set 173 │ │ + local.get 173 │ │ i64.load offset=40 │ │ - local.set 184 │ │ + local.set 174 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 185 │ │ - local.get 185 │ │ - local.get 184 │ │ + local.set 175 │ │ + local.get 175 │ │ + local.get 174 │ │ i64.store offset=24 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 186 │ │ - i32.const 20 │ │ - local.set 187 │ │ - local.get 186 │ │ - local.get 187 │ │ - i32.add │ │ - local.set 188 │ │ - local.get 188 │ │ - call $_zip_d2u_time │ │ - local.set 189 │ │ + local.set 176 │ │ + local.get 176 │ │ + call $zip_dirent_get_last_mod_mtime │ │ + local.set 177 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 190 │ │ - local.get 190 │ │ - local.get 189 │ │ + local.set 178 │ │ + local.get 178 │ │ + local.get 177 │ │ i32.store offset=40 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 191 │ │ - local.get 191 │ │ + local.set 179 │ │ + local.get 179 │ │ i64.load offset=32 │ │ - local.set 192 │ │ + local.set 180 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 193 │ │ - local.get 193 │ │ - local.get 192 │ │ + local.set 181 │ │ + local.get 181 │ │ + local.get 180 │ │ i64.store offset=32 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 194 │ │ - local.get 194 │ │ + local.set 182 │ │ + local.get 182 │ │ i32.load offset=16 │ │ - local.set 195 │ │ + local.set 183 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 196 │ │ - local.get 196 │ │ - local.get 195 │ │ + local.set 184 │ │ + local.get 184 │ │ + local.get 183 │ │ i32.store16 offset=48 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 197 │ │ - local.get 197 │ │ + local.set 185 │ │ + local.get 185 │ │ i32.load16_u offset=84 │ │ - local.set 198 │ │ + local.set 186 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 199 │ │ - local.get 199 │ │ - local.get 198 │ │ + local.set 187 │ │ + local.get 187 │ │ + local.get 186 │ │ i32.store16 offset=50 │ │ local.get 6 │ │ i32.load offset=16 │ │ - local.set 200 │ │ - local.get 200 │ │ + local.set 188 │ │ + local.get 188 │ │ i32.load8_u offset=6 │ │ - local.set 201 │ │ + local.set 189 │ │ i32.const 32 │ │ - local.set 202 │ │ + local.set 190 │ │ i32.const 0 │ │ - local.set 203 │ │ + local.set 191 │ │ i32.const 1 │ │ - local.set 204 │ │ - local.get 201 │ │ - local.get 204 │ │ + local.set 192 │ │ + local.get 189 │ │ + local.get 192 │ │ i32.and │ │ - local.set 205 │ │ - local.get 202 │ │ - local.get 203 │ │ - local.get 205 │ │ + local.set 193 │ │ + local.get 190 │ │ + local.get 191 │ │ + local.get 193 │ │ select │ │ - local.set 206 │ │ + local.set 194 │ │ i32.const 4 │ │ - local.set 207 │ │ - local.get 206 │ │ - local.get 207 │ │ + local.set 195 │ │ + local.get 194 │ │ + local.get 195 │ │ i32.or │ │ - local.set 208 │ │ + local.set 196 │ │ i32.const 16 │ │ - local.set 209 │ │ - local.get 208 │ │ - local.get 209 │ │ + local.set 197 │ │ + local.get 196 │ │ + local.get 197 │ │ i32.or │ │ - local.set 210 │ │ + local.set 198 │ │ i32.const 8 │ │ - local.set 211 │ │ - local.get 210 │ │ - local.get 211 │ │ + local.set 199 │ │ + local.get 198 │ │ + local.get 199 │ │ i32.or │ │ - local.set 212 │ │ + local.set 200 │ │ i32.const 64 │ │ - local.set 213 │ │ - local.get 212 │ │ - local.get 213 │ │ + local.set 201 │ │ + local.get 200 │ │ + local.get 201 │ │ i32.or │ │ - local.set 214 │ │ + local.set 202 │ │ i32.const 128 │ │ - local.set 215 │ │ - local.get 214 │ │ - local.get 215 │ │ + local.set 203 │ │ + local.get 202 │ │ + local.get 203 │ │ i32.or │ │ - local.set 216 │ │ - local.get 216 │ │ - local.set 217 │ │ - local.get 217 │ │ + local.set 204 │ │ + local.get 204 │ │ + local.set 205 │ │ + local.get 205 │ │ i64.extend_i32_u │ │ - local.set 218 │ │ + local.set 206 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 219 │ │ - local.get 219 │ │ - local.get 218 │ │ + local.set 207 │ │ + local.get 207 │ │ + local.get 206 │ │ i64.store │ │ local.get 6 │ │ i32.load offset=12 │ │ - local.set 220 │ │ - local.get 220 │ │ + local.set 208 │ │ + local.get 208 │ │ i32.load offset=4 │ │ - local.set 221 │ │ + local.set 209 │ │ i32.const 0 │ │ - local.set 222 │ │ - local.get 221 │ │ - local.set 223 │ │ - local.get 222 │ │ - local.set 224 │ │ - local.get 223 │ │ - local.get 224 │ │ + local.set 210 │ │ + local.get 209 │ │ + local.set 211 │ │ + local.get 210 │ │ + local.set 212 │ │ + local.get 211 │ │ + local.get 212 │ │ i32.ne │ │ - local.set 225 │ │ + local.set 213 │ │ i32.const 1 │ │ - local.set 226 │ │ - local.get 225 │ │ - local.get 226 │ │ + local.set 214 │ │ + local.get 213 │ │ + local.get 214 │ │ i32.and │ │ - local.set 227 │ │ + local.set 215 │ │ block ;; label = @3 │ │ - local.get 227 │ │ + local.get 215 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ i32.load offset=12 │ │ - local.set 228 │ │ - local.get 228 │ │ + local.set 216 │ │ + local.get 216 │ │ i32.load offset=4 │ │ - local.set 229 │ │ - local.get 229 │ │ + local.set 217 │ │ + local.get 217 │ │ i32.load │ │ - local.set 230 │ │ + local.set 218 │ │ i32.const 1 │ │ - local.set 231 │ │ - local.get 230 │ │ - local.get 231 │ │ + local.set 219 │ │ + local.get 218 │ │ + local.get 219 │ │ i32.and │ │ - local.set 232 │ │ - local.get 232 │ │ + local.set 220 │ │ + local.get 220 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 233 │ │ - local.get 233 │ │ + local.set 221 │ │ + local.get 221 │ │ i64.load │ │ - local.set 234 │ │ + local.set 222 │ │ i64.const 4294967287 │ │ - local.set 235 │ │ - local.get 234 │ │ - local.get 235 │ │ + local.set 223 │ │ + local.get 222 │ │ + local.get 223 │ │ i64.and │ │ - local.set 236 │ │ - local.get 233 │ │ - local.get 236 │ │ + local.set 224 │ │ + local.get 221 │ │ + local.get 224 │ │ i64.store │ │ end │ │ end │ │ local.get 6 │ │ i32.load offset=40 │ │ - local.set 237 │ │ - local.get 237 │ │ + local.set 225 │ │ + local.get 225 │ │ i32.load offset=24 │ │ - local.set 238 │ │ + local.set 226 │ │ i32.const 8 │ │ - local.set 239 │ │ - local.get 238 │ │ - local.get 239 │ │ + local.set 227 │ │ + local.get 226 │ │ + local.get 227 │ │ i32.and │ │ - local.set 240 │ │ + local.set 228 │ │ block ;; label = @2 │ │ - local.get 240 │ │ + local.get 228 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ i32.load offset=28 │ │ - local.set 241 │ │ + local.set 229 │ │ i32.const 8 │ │ - local.set 242 │ │ - local.get 241 │ │ - local.get 242 │ │ + local.set 230 │ │ + local.get 229 │ │ + local.get 230 │ │ i32.and │ │ - local.set 243 │ │ - local.get 243 │ │ + local.set 231 │ │ + local.get 231 │ │ br_if 0 (;@2;) │ │ - i32.const 8 │ │ - local.set 244 │ │ local.get 6 │ │ - local.get 244 │ │ - i32.add │ │ + i32.load offset=40 │ │ + local.set 232 │ │ + local.get 232 │ │ + i32.load offset=104 │ │ + local.set 233 │ │ + block ;; label = @3 │ │ + local.get 233 │ │ + br_if 0 (;@3;) │ │ + i32.const 8 │ │ + local.set 234 │ │ + local.get 6 │ │ + local.get 234 │ │ + i32.add │ │ + local.set 235 │ │ + local.get 235 │ │ + local.set 236 │ │ + i32.const 0 │ │ + local.set 237 │ │ + local.get 237 │ │ + i32.load offset=27666 align=2 │ │ + local.set 238 │ │ + local.get 236 │ │ + local.get 238 │ │ + i32.store align=2 │ │ + i32.const 8 │ │ + local.set 239 │ │ + local.get 6 │ │ + local.get 239 │ │ + i32.add │ │ + local.set 240 │ │ + local.get 240 │ │ + local.set 241 │ │ + local.get 241 │ │ + call $_zip_d2u_time │ │ + local.set 242 │ │ + local.get 6 │ │ + i32.load offset=40 │ │ + local.set 243 │ │ + local.get 243 │ │ + local.get 242 │ │ + i32.store offset=104 │ │ + end │ │ + local.get 6 │ │ + i32.load offset=24 │ │ + local.set 244 │ │ + i32.const 8 │ │ local.set 245 │ │ + local.get 244 │ │ local.get 245 │ │ + i32.store16 offset=48 │ │ + local.get 6 │ │ + i32.load offset=40 │ │ local.set 246 │ │ - i32.const 0 │ │ + local.get 246 │ │ + i32.load offset=104 │ │ local.set 247 │ │ - local.get 247 │ │ - i32.load offset=27346 align=2 │ │ + local.get 6 │ │ + i32.load offset=24 │ │ local.set 248 │ │ - local.get 246 │ │ local.get 248 │ │ - i32.store align=2 │ │ + local.get 247 │ │ + i32.store offset=40 │ │ local.get 6 │ │ i32.load offset=24 │ │ local.set 249 │ │ - i32.const 8 │ │ - local.set 250 │ │ local.get 249 │ │ - local.get 250 │ │ - i32.store16 offset=48 │ │ - i32.const 8 │ │ + i64.load │ │ + local.set 250 │ │ + i64.const 80 │ │ local.set 251 │ │ - local.get 6 │ │ + local.get 250 │ │ local.get 251 │ │ - i32.add │ │ + i64.or │ │ local.set 252 │ │ + local.get 249 │ │ local.get 252 │ │ + i64.store │ │ + local.get 6 │ │ + i32.load offset=24 │ │ local.set 253 │ │ local.get 253 │ │ - call $_zip_d2u_time │ │ + i64.load │ │ local.set 254 │ │ - local.get 6 │ │ - i32.load offset=24 │ │ + i64.const 4294967287 │ │ local.set 255 │ │ - local.get 255 │ │ local.get 254 │ │ - i32.store offset=40 │ │ - local.get 6 │ │ - i32.load offset=24 │ │ + local.get 255 │ │ + i64.and │ │ local.set 256 │ │ + local.get 253 │ │ local.get 256 │ │ - i64.load │ │ - local.set 257 │ │ - i64.const 80 │ │ - local.set 258 │ │ - local.get 257 │ │ - local.get 258 │ │ - i64.or │ │ - local.set 259 │ │ - local.get 256 │ │ - local.get 259 │ │ - i64.store │ │ - local.get 6 │ │ - i32.load offset=24 │ │ - local.set 260 │ │ - local.get 260 │ │ - i64.load │ │ - local.set 261 │ │ - i64.const 4294967287 │ │ - local.set 262 │ │ - local.get 261 │ │ - local.get 262 │ │ - i64.and │ │ - local.set 263 │ │ - local.get 260 │ │ - local.get 263 │ │ i64.store │ │ end │ │ local.get 6 │ │ i64.load offset=32 │ │ - local.set 264 │ │ + local.set 257 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 265 │ │ - local.get 265 │ │ - local.get 264 │ │ + local.set 258 │ │ + local.get 258 │ │ + local.get 257 │ │ i64.store offset=16 │ │ local.get 6 │ │ i32.load offset=20 │ │ - local.set 266 │ │ + local.set 259 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 267 │ │ - local.get 267 │ │ - local.get 266 │ │ + local.set 260 │ │ + local.get 260 │ │ + local.get 259 │ │ i32.store offset=8 │ │ local.get 6 │ │ i32.load offset=24 │ │ - local.set 268 │ │ - local.get 268 │ │ + local.set 261 │ │ + local.get 261 │ │ i64.load │ │ - local.set 269 │ │ + local.set 262 │ │ i64.const 3 │ │ - local.set 270 │ │ - local.get 269 │ │ - local.get 270 │ │ + local.set 263 │ │ + local.get 262 │ │ + local.get 263 │ │ i64.or │ │ - local.set 271 │ │ - local.get 268 │ │ - local.get 271 │ │ + local.set 264 │ │ + local.get 261 │ │ + local.get 264 │ │ i64.store │ │ i32.const 0 │ │ - local.set 272 │ │ + local.set 265 │ │ local.get 6 │ │ - local.get 272 │ │ + local.get 265 │ │ i32.store offset=44 │ │ end │ │ local.get 6 │ │ i32.load offset=44 │ │ - local.set 273 │ │ + local.set 266 │ │ i32.const 48 │ │ - local.set 274 │ │ + local.set 267 │ │ local.get 6 │ │ - local.get 274 │ │ + local.get 267 │ │ i32.add │ │ - local.set 275 │ │ - local.get 275 │ │ + local.set 268 │ │ + local.get 268 │ │ global.set $__stack_pointer │ │ - local.get 273 │ │ + local.get 266 │ │ return) │ │ (func $zip_stat_init (type 5) (param i32) │ │ (local i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ @@ -316962,15 +319096,15 @@ │ │ local.set 21 │ │ i32.const 0 │ │ local.set 22 │ │ local.get 21 │ │ local.get 22 │ │ i32.store │ │ end │ │ - i32.const 27350 │ │ + i32.const 27670 │ │ local.set 23 │ │ local.get 6 │ │ local.get 23 │ │ i32.store offset=28 │ │ br 1 (;@1;) │ │ end │ │ local.get 6 │ │ @@ -317300,14 +319434,189 @@ │ │ local.get 112 │ │ i32.add │ │ local.set 113 │ │ local.get 113 │ │ global.set $__stack_pointer │ │ local.get 111 │ │ return) │ │ + (func $_zip_string_is_ascii (type 10) (param i32) (result i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + global.get $__stack_pointer │ │ + local.set 1 │ │ + i32.const 16 │ │ + local.set 2 │ │ + local.get 1 │ │ + local.get 2 │ │ + i32.sub │ │ + local.set 3 │ │ + local.get 3 │ │ + local.get 0 │ │ + i32.store offset=8 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 4 │ │ + local.get 4 │ │ + i32.load offset=8 │ │ + local.set 5 │ │ + i32.const 1 │ │ + local.set 6 │ │ + local.get 5 │ │ + local.set 7 │ │ + local.get 6 │ │ + local.set 8 │ │ + local.get 7 │ │ + local.get 8 │ │ + i32.ne │ │ + local.set 9 │ │ + i32.const 1 │ │ + local.set 10 │ │ + local.get 9 │ │ + local.get 10 │ │ + i32.and │ │ + local.set 11 │ │ + block ;; label = @1 │ │ + block ;; label = @2 │ │ + local.get 11 │ │ + i32.eqz │ │ + br_if 0 (;@2;) │ │ + i32.const 0 │ │ + local.set 12 │ │ + local.get 3 │ │ + local.get 12 │ │ + i32.store16 offset=6 │ │ + block ;; label = @3 │ │ + loop ;; label = @4 │ │ + local.get 3 │ │ + i32.load16_u offset=6 │ │ + local.set 13 │ │ + i32.const 65535 │ │ + local.set 14 │ │ + local.get 13 │ │ + local.get 14 │ │ + i32.and │ │ + local.set 15 │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 16 │ │ + local.get 16 │ │ + i32.load16_u offset=4 │ │ + local.set 17 │ │ + i32.const 65535 │ │ + local.set 18 │ │ + local.get 17 │ │ + local.get 18 │ │ + i32.and │ │ + local.set 19 │ │ + local.get 15 │ │ + local.set 20 │ │ + local.get 19 │ │ + local.set 21 │ │ + local.get 20 │ │ + local.get 21 │ │ + i32.lt_s │ │ + local.set 22 │ │ + i32.const 1 │ │ + local.set 23 │ │ + local.get 22 │ │ + local.get 23 │ │ + i32.and │ │ + local.set 24 │ │ + local.get 24 │ │ + i32.eqz │ │ + br_if 1 (;@3;) │ │ + local.get 3 │ │ + i32.load offset=8 │ │ + local.set 25 │ │ + local.get 25 │ │ + i32.load │ │ + local.set 26 │ │ + local.get 3 │ │ + i32.load16_u offset=6 │ │ + local.set 27 │ │ + i32.const 65535 │ │ + local.set 28 │ │ + local.get 27 │ │ + local.get 28 │ │ + i32.and │ │ + local.set 29 │ │ + local.get 26 │ │ + local.get 29 │ │ + i32.add │ │ + local.set 30 │ │ + local.get 30 │ │ + i32.load8_u │ │ + local.set 31 │ │ + i32.const 255 │ │ + local.set 32 │ │ + local.get 31 │ │ + local.get 32 │ │ + i32.and │ │ + local.set 33 │ │ + i32.const 128 │ │ + local.set 34 │ │ + local.get 33 │ │ + local.get 34 │ │ + i32.and │ │ + local.set 35 │ │ + block ;; label = @5 │ │ + local.get 35 │ │ + i32.eqz │ │ + br_if 0 (;@5;) │ │ + i32.const 0 │ │ + local.set 36 │ │ + i32.const 1 │ │ + local.set 37 │ │ + local.get 36 │ │ + local.get 37 │ │ + i32.and │ │ + local.set 38 │ │ + local.get 3 │ │ + local.get 38 │ │ + i32.store8 offset=15 │ │ + br 4 (;@1;) │ │ + end │ │ + local.get 3 │ │ + i32.load16_u offset=6 │ │ + local.set 39 │ │ + i32.const 1 │ │ + local.set 40 │ │ + local.get 39 │ │ + local.get 40 │ │ + i32.add │ │ + local.set 41 │ │ + local.get 3 │ │ + local.get 41 │ │ + i32.store16 offset=6 │ │ + br 0 (;@4;) │ │ + end │ │ + end │ │ + end │ │ + i32.const 1 │ │ + local.set 42 │ │ + i32.const 1 │ │ + local.set 43 │ │ + local.get 42 │ │ + local.get 43 │ │ + i32.and │ │ + local.set 44 │ │ + local.get 3 │ │ + local.get 44 │ │ + i32.store8 offset=15 │ │ + end │ │ + local.get 3 │ │ + i32.load8_u offset=15 │ │ + local.set 45 │ │ + i32.const 1 │ │ + local.set 46 │ │ + local.get 45 │ │ + local.get 46 │ │ + i32.and │ │ + local.set 47 │ │ + local.get 47 │ │ + return) │ │ (func $_zip_string_length (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ @@ -317747,15 +320056,15 @@ │ │ i32.add │ │ local.set 91 │ │ local.get 91 │ │ global.set $__stack_pointer │ │ local.get 89 │ │ return) │ │ (func $_zip_unchange_data (type 5) (param i32) │ │ - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 1 │ │ i32.const 16 │ │ local.set 2 │ │ local.get 1 │ │ local.get 2 │ │ i32.sub │ │ @@ -317807,146 +320116,26 @@ │ │ local.get 14 │ │ local.get 15 │ │ i32.store offset=8 │ │ end │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ - local.get 16 │ │ - i32.load offset=4 │ │ - local.set 17 │ │ i32.const 0 │ │ - local.set 18 │ │ + local.set 17 │ │ + local.get 16 │ │ local.get 17 │ │ - local.set 19 │ │ - local.get 18 │ │ - local.set 20 │ │ - local.get 19 │ │ - local.get 20 │ │ - i32.ne │ │ - local.set 21 │ │ - i32.const 1 │ │ - local.set 22 │ │ - local.get 21 │ │ - local.get 22 │ │ - i32.and │ │ - local.set 23 │ │ - block ;; label = @1 │ │ - local.get 23 │ │ - i32.eqz │ │ - br_if 0 (;@1;) │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 24 │ │ - local.get 24 │ │ - i32.load offset=4 │ │ - local.set 25 │ │ - local.get 25 │ │ - i32.load │ │ - local.set 26 │ │ - i32.const 1 │ │ - local.set 27 │ │ - local.get 26 │ │ - local.get 27 │ │ - i32.and │ │ - local.set 28 │ │ - local.get 28 │ │ - i32.eqz │ │ - br_if 0 (;@1;) │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 29 │ │ - local.get 29 │ │ - i32.load offset=4 │ │ - local.set 30 │ │ - local.get 30 │ │ - i32.load offset=16 │ │ - local.set 31 │ │ - i32.const -2 │ │ - local.set 32 │ │ - local.get 31 │ │ - local.set 33 │ │ - local.get 32 │ │ - local.set 34 │ │ - local.get 33 │ │ - local.get 34 │ │ - i32.eq │ │ - local.set 35 │ │ - i32.const 1 │ │ - local.set 36 │ │ - local.get 35 │ │ - local.get 36 │ │ - i32.and │ │ - local.set 37 │ │ - local.get 37 │ │ - i32.eqz │ │ - br_if 0 (;@1;) │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 38 │ │ - local.get 38 │ │ - i32.load offset=4 │ │ - local.set 39 │ │ - local.get 39 │ │ - i32.load │ │ - local.set 40 │ │ - i32.const -2 │ │ - local.set 41 │ │ - local.get 40 │ │ - local.get 41 │ │ - i32.and │ │ - local.set 42 │ │ - local.get 39 │ │ - local.get 42 │ │ - i32.store │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 43 │ │ - local.get 43 │ │ - i32.load offset=4 │ │ - local.set 44 │ │ - local.get 44 │ │ - i32.load │ │ - local.set 45 │ │ - block ;; label = @2 │ │ - local.get 45 │ │ - br_if 0 (;@2;) │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 46 │ │ - local.get 46 │ │ - i32.load offset=4 │ │ - local.set 47 │ │ - local.get 47 │ │ - call $_zip_dirent_free │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 48 │ │ - i32.const 0 │ │ - local.set 49 │ │ - local.get 48 │ │ - local.get 49 │ │ - i32.store offset=4 │ │ - end │ │ - end │ │ - local.get 3 │ │ - i32.load offset=12 │ │ - local.set 50 │ │ - i32.const 0 │ │ - local.set 51 │ │ - local.get 50 │ │ - local.get 51 │ │ i32.store8 offset=12 │ │ i32.const 16 │ │ - local.set 52 │ │ + local.set 18 │ │ local.get 3 │ │ - local.get 52 │ │ + local.get 18 │ │ i32.add │ │ - local.set 53 │ │ - local.get 53 │ │ + local.set 19 │ │ + local.get 19 │ │ global.set $__stack_pointer │ │ return) │ │ (func $_zip_guess_encoding (type 6) (param i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 2 │ │ i32.const 48 │ │ @@ -318980,15 +321169,15 @@ │ │ local.set 31 │ │ i32.const 255 │ │ local.set 32 │ │ local.get 31 │ │ local.get 32 │ │ i32.and │ │ local.set 33 │ │ - i32.const 27360 │ │ + i32.const 27680 │ │ local.set 34 │ │ i32.const 1 │ │ local.set 35 │ │ local.get 33 │ │ local.get 35 │ │ i32.shl │ │ local.set 36 │ │ @@ -319130,15 +321319,15 @@ │ │ local.set 71 │ │ i32.const 255 │ │ local.set 72 │ │ local.get 71 │ │ local.get 72 │ │ i32.and │ │ local.set 73 │ │ - i32.const 27360 │ │ + i32.const 27680 │ │ local.set 74 │ │ i32.const 1 │ │ local.set 75 │ │ local.get 73 │ │ local.get 75 │ │ i32.shl │ │ local.set 76 │ │ @@ -319743,15 +321932,15 @@ │ │ i32.store offset=12 │ │ end │ │ local.get 4 │ │ i32.load offset=12 │ │ local.set 100 │ │ local.get 100 │ │ return) │ │ - (func $zip_source_file_common_new (type 85) (param i32 i32 i64 i64 i32 i32 i32 i32) (result i32) │ │ + (func $zip_source_file_common_new (type 89) (param i32 i32 i64 i64 i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i64 i32 i64 i32 i64 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i64 i32 i64 i64 i32 i32 i64 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i32 i64 i64 i64 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i64 i64 i32 i32 i32 i32 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 8 │ │ i32.const 96 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ @@ -323980,15 +326169,15 @@ │ │ local.get 19 │ │ i32.add │ │ local.set 20 │ │ local.get 20 │ │ global.set $__stack_pointer │ │ local.get 18 │ │ return) │ │ - (func $zip_source_file_create (type 86) (param i32 i64 i64 i32) (result i32) │ │ + (func $zip_source_file_create (type 90) (param i32 i64 i64 i32) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ local.set 4 │ │ i32.const 32 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ @@ -324083,15 +326272,15 @@ │ │ i64.load offset=8 │ │ local.set 27 │ │ local.get 6 │ │ i32.load offset=4 │ │ local.set 28 │ │ i32.const 0 │ │ local.set 29 │ │ - i32.const 75296 │ │ + i32.const 75664 │ │ local.set 30 │ │ local.get 25 │ │ local.get 29 │ │ local.get 26 │ │ local.get 27 │ │ local.get 29 │ │ local.get 30 │ │ @@ -324321,15 +326510,15 @@ │ │ local.get 16 │ │ i64.store offset=8 │ │ br 1 (;@1;) │ │ end │ │ local.get 3 │ │ i32.load │ │ local.set 17 │ │ - i32.const 14028 │ │ + i32.const 14297 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ call $__fdopen │ │ local.set 19 │ │ local.get 3 │ │ i32.load offset=4 │ │ @@ -325325,17 +327514,17 @@ │ │ end │ │ local.get 4 │ │ i32.load offset=16 │ │ local.set 27 │ │ local.get 4 │ │ i32.load8_u offset=23 │ │ local.set 28 │ │ - i32.const 14028 │ │ + i32.const 14297 │ │ local.set 29 │ │ - i32.const 13971 │ │ + i32.const 14240 │ │ local.set 30 │ │ i32.const 1 │ │ local.set 31 │ │ local.get 28 │ │ local.get 31 │ │ i32.and │ │ local.set 32 │ │ @@ -325744,15 +327933,15 @@ │ │ global.set $__stack_pointer │ │ local.get 4 │ │ local.get 0 │ │ i32.store offset=8 │ │ local.get 4 │ │ local.get 1 │ │ i32.store16 offset=6 │ │ - i32.const 6914 │ │ + i32.const 6963 │ │ local.set 5 │ │ i32.const 0 │ │ local.set 6 │ │ local.get 5 │ │ local.get 6 │ │ local.get 6 │ │ call $open │ │ @@ -325947,15 +328136,15 @@ │ │ local.get 12 │ │ i32.store offset=12 │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 13 │ │ local.get 13 │ │ - i32.load8_u offset=87992 │ │ + i32.load8_u offset=88360 │ │ local.set 14 │ │ i32.const 1 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ i32.and │ │ local.set 16 │ │ @@ -325971,15 +328160,15 @@ │ │ call $srand │ │ i32.const 1 │ │ local.set 19 │ │ i32.const 0 │ │ local.set 20 │ │ local.get 20 │ │ local.get 19 │ │ - i32.store8 offset=87992 │ │ + i32.store8 offset=88360 │ │ end │ │ call $rand │ │ local.set 21 │ │ local.get 2 │ │ local.get 21 │ │ i32.store offset=12 │ │ end │ │ @@ -326186,15 +328375,15 @@ │ │ local.set 52 │ │ i32.const 255 │ │ local.set 53 │ │ local.get 52 │ │ local.get 53 │ │ i32.and │ │ local.set 54 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 55 │ │ i32.const 2 │ │ local.set 56 │ │ local.get 54 │ │ local.get 56 │ │ i32.shl │ │ local.set 57 │ │ @@ -326435,15 +328624,15 @@ │ │ local.set 113 │ │ i32.const 255 │ │ local.set 114 │ │ local.get 113 │ │ local.get 114 │ │ i32.and │ │ local.set 115 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 116 │ │ i32.const 2 │ │ local.set 117 │ │ local.get 115 │ │ local.get 117 │ │ i32.shl │ │ local.set 118 │ │ @@ -326462,15 +328651,15 @@ │ │ local.set 121 │ │ i32.const 255 │ │ local.set 122 │ │ local.get 121 │ │ local.get 122 │ │ i32.and │ │ local.set 123 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 124 │ │ i32.const 2 │ │ local.set 125 │ │ local.get 123 │ │ local.get 125 │ │ i32.shl │ │ local.set 126 │ │ @@ -326489,15 +328678,15 @@ │ │ local.set 129 │ │ i32.const 255 │ │ local.set 130 │ │ local.get 129 │ │ local.get 130 │ │ i32.and │ │ local.set 131 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 132 │ │ i32.const 2 │ │ local.set 133 │ │ local.get 131 │ │ local.get 133 │ │ i32.shl │ │ local.set 134 │ │ @@ -326516,15 +328705,15 @@ │ │ local.set 137 │ │ i32.const 255 │ │ local.set 138 │ │ local.get 137 │ │ local.get 138 │ │ i32.and │ │ local.set 139 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 140 │ │ i32.const 2 │ │ local.set 141 │ │ local.get 139 │ │ local.get 141 │ │ i32.shl │ │ local.set 142 │ │ @@ -326543,15 +328732,15 @@ │ │ local.set 145 │ │ i32.const 255 │ │ local.set 146 │ │ local.get 145 │ │ local.get 146 │ │ i32.and │ │ local.set 147 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 148 │ │ i32.const 2 │ │ local.set 149 │ │ local.get 147 │ │ local.get 149 │ │ i32.shl │ │ local.set 150 │ │ @@ -326593,15 +328782,15 @@ │ │ local.set 160 │ │ local.get 160 │ │ i32.eqz │ │ br_if 1 (;@7;) │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 161 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 162 │ │ i32.const 10 │ │ local.set 163 │ │ local.get 161 │ │ local.get 163 │ │ i32.shl │ │ local.set 164 │ │ @@ -326653,15 +328842,15 @@ │ │ local.set 178 │ │ local.get 5 │ │ local.get 178 │ │ i32.store offset=92 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 179 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 180 │ │ i32.const 10 │ │ local.set 181 │ │ local.get 179 │ │ local.get 181 │ │ i32.shl │ │ local.set 182 │ │ @@ -326713,15 +328902,15 @@ │ │ local.set 196 │ │ local.get 5 │ │ local.get 196 │ │ i32.store offset=84 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 197 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 198 │ │ i32.const 10 │ │ local.set 199 │ │ local.get 197 │ │ local.get 199 │ │ i32.shl │ │ local.set 200 │ │ @@ -326773,15 +328962,15 @@ │ │ local.set 214 │ │ local.get 5 │ │ local.get 214 │ │ i32.store offset=76 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 215 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 216 │ │ i32.const 10 │ │ local.set 217 │ │ local.get 215 │ │ local.get 217 │ │ i32.shl │ │ local.set 218 │ │ @@ -326833,15 +329022,15 @@ │ │ local.set 232 │ │ local.get 5 │ │ local.get 232 │ │ i32.store offset=68 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 233 │ │ - i32.const 29376 │ │ + i32.const 29744 │ │ local.set 234 │ │ i32.const 10 │ │ local.set 235 │ │ local.get 233 │ │ local.get 235 │ │ i32.shl │ │ local.set 236 │ │ @@ -327192,15 +329381,15 @@ │ │ local.set 322 │ │ i32.const 255 │ │ local.set 323 │ │ local.get 322 │ │ local.get 323 │ │ i32.and │ │ local.set 324 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 325 │ │ i32.const 2 │ │ local.set 326 │ │ local.get 324 │ │ local.get 326 │ │ i32.shl │ │ local.set 327 │ │ @@ -327219,15 +329408,15 @@ │ │ local.set 330 │ │ i32.const 255 │ │ local.set 331 │ │ local.get 330 │ │ local.get 331 │ │ i32.and │ │ local.set 332 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 333 │ │ i32.const 2 │ │ local.set 334 │ │ local.get 332 │ │ local.get 334 │ │ i32.shl │ │ local.set 335 │ │ @@ -327246,15 +329435,15 @@ │ │ local.set 338 │ │ i32.const 255 │ │ local.set 339 │ │ local.get 338 │ │ local.get 339 │ │ i32.and │ │ local.set 340 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 341 │ │ i32.const 2 │ │ local.set 342 │ │ local.get 340 │ │ local.get 342 │ │ i32.shl │ │ local.set 343 │ │ @@ -327273,15 +329462,15 @@ │ │ local.set 346 │ │ i32.const 255 │ │ local.set 347 │ │ local.get 346 │ │ local.get 347 │ │ i32.and │ │ local.set 348 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 349 │ │ i32.const 2 │ │ local.set 350 │ │ local.get 348 │ │ local.get 350 │ │ i32.shl │ │ local.set 351 │ │ @@ -327300,15 +329489,15 @@ │ │ local.set 354 │ │ i32.const 255 │ │ local.set 355 │ │ local.get 354 │ │ local.get 355 │ │ i32.and │ │ local.set 356 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 357 │ │ i32.const 2 │ │ local.set 358 │ │ local.get 356 │ │ local.get 358 │ │ i32.shl │ │ local.set 359 │ │ @@ -327350,15 +329539,15 @@ │ │ local.set 369 │ │ local.get 369 │ │ i32.eqz │ │ br_if 1 (;@6;) │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 370 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 371 │ │ i32.const 10 │ │ local.set 372 │ │ local.get 370 │ │ local.get 372 │ │ i32.shl │ │ local.set 373 │ │ @@ -327410,15 +329599,15 @@ │ │ local.set 387 │ │ local.get 5 │ │ local.get 387 │ │ i32.store offset=52 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 388 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 389 │ │ i32.const 10 │ │ local.set 390 │ │ local.get 388 │ │ local.get 390 │ │ i32.shl │ │ local.set 391 │ │ @@ -327470,15 +329659,15 @@ │ │ local.set 405 │ │ local.get 5 │ │ local.get 405 │ │ i32.store offset=40 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 406 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 407 │ │ i32.const 10 │ │ local.set 408 │ │ local.get 406 │ │ local.get 408 │ │ i32.shl │ │ local.set 409 │ │ @@ -327530,15 +329719,15 @@ │ │ local.set 423 │ │ local.get 5 │ │ local.get 423 │ │ i32.store offset=32 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 424 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 425 │ │ i32.const 10 │ │ local.set 426 │ │ local.get 424 │ │ local.get 426 │ │ i32.shl │ │ local.set 427 │ │ @@ -327590,15 +329779,15 @@ │ │ local.set 441 │ │ local.get 5 │ │ local.get 441 │ │ i32.store offset=24 │ │ local.get 5 │ │ i32.load offset=96 │ │ local.set 442 │ │ - i32.const 33472 │ │ + i32.const 33840 │ │ local.set 443 │ │ i32.const 10 │ │ local.set 444 │ │ local.get 442 │ │ local.get 444 │ │ i32.shl │ │ local.set 445 │ │ @@ -327896,15 +330085,15 @@ │ │ local.set 522 │ │ i32.const 255 │ │ local.set 523 │ │ local.get 522 │ │ local.get 523 │ │ i32.and │ │ local.set 524 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 525 │ │ i32.const 2 │ │ local.set 526 │ │ local.get 524 │ │ local.get 526 │ │ i32.shl │ │ local.set 527 │ │ @@ -327961,15 +330150,15 @@ │ │ local.set 541 │ │ i32.const 255 │ │ local.set 542 │ │ local.get 541 │ │ local.get 542 │ │ i32.and │ │ local.set 543 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 544 │ │ i32.const 2 │ │ local.set 545 │ │ local.get 543 │ │ local.get 545 │ │ i32.shl │ │ local.set 546 │ │ @@ -328026,15 +330215,15 @@ │ │ local.set 560 │ │ i32.const 255 │ │ local.set 561 │ │ local.get 560 │ │ local.get 561 │ │ i32.and │ │ local.set 562 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 563 │ │ i32.const 2 │ │ local.set 564 │ │ local.get 562 │ │ local.get 564 │ │ i32.shl │ │ local.set 565 │ │ @@ -328091,15 +330280,15 @@ │ │ local.set 579 │ │ i32.const 255 │ │ local.set 580 │ │ local.get 579 │ │ local.get 580 │ │ i32.and │ │ local.set 581 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 582 │ │ i32.const 2 │ │ local.set 583 │ │ local.get 581 │ │ local.get 583 │ │ i32.shl │ │ local.set 584 │ │ @@ -328156,15 +330345,15 @@ │ │ local.set 598 │ │ i32.const 255 │ │ local.set 599 │ │ local.get 598 │ │ local.get 599 │ │ i32.and │ │ local.set 600 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 601 │ │ i32.const 2 │ │ local.set 602 │ │ local.get 600 │ │ local.get 602 │ │ i32.shl │ │ local.set 603 │ │ @@ -328221,15 +330410,15 @@ │ │ local.set 617 │ │ i32.const 255 │ │ local.set 618 │ │ local.get 617 │ │ local.get 618 │ │ i32.and │ │ local.set 619 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 620 │ │ i32.const 2 │ │ local.set 621 │ │ local.get 619 │ │ local.get 621 │ │ i32.shl │ │ local.set 622 │ │ @@ -328286,15 +330475,15 @@ │ │ local.set 636 │ │ i32.const 255 │ │ local.set 637 │ │ local.get 636 │ │ local.get 637 │ │ i32.and │ │ local.set 638 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 639 │ │ i32.const 2 │ │ local.set 640 │ │ local.get 638 │ │ local.get 640 │ │ i32.shl │ │ local.set 641 │ │ @@ -328351,15 +330540,15 @@ │ │ local.set 655 │ │ i32.const 255 │ │ local.set 656 │ │ local.get 655 │ │ local.get 656 │ │ i32.and │ │ local.set 657 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 658 │ │ i32.const 2 │ │ local.set 659 │ │ local.get 657 │ │ local.get 659 │ │ i32.shl │ │ local.set 660 │ │ @@ -328439,15 +330628,15 @@ │ │ local.set 678 │ │ i32.const 255 │ │ local.set 679 │ │ local.get 678 │ │ local.get 679 │ │ i32.and │ │ local.set 680 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 681 │ │ i32.const 2 │ │ local.set 682 │ │ local.get 680 │ │ local.get 682 │ │ i32.shl │ │ local.set 683 │ │ @@ -328550,15 +330739,15 @@ │ │ local.set 15 │ │ i32.const 255 │ │ local.set 16 │ │ local.get 15 │ │ local.get 16 │ │ i32.and │ │ local.set 17 │ │ - i32.const 28352 │ │ + i32.const 28720 │ │ local.set 18 │ │ i32.const 2 │ │ local.set 19 │ │ local.get 17 │ │ local.get 19 │ │ i32.shl │ │ local.set 20 │ │ @@ -328745,15 +330934,15 @@ │ │ local.set 17 │ │ i32.const 255 │ │ local.set 18 │ │ local.get 17 │ │ local.get 18 │ │ i32.and │ │ local.set 19 │ │ - i32.const 37568 │ │ + i32.const 37936 │ │ local.set 20 │ │ i32.const 2 │ │ local.set 21 │ │ local.get 19 │ │ local.get 21 │ │ i32.shl │ │ local.set 22 │ │ @@ -330736,15 +332925,15 @@ │ │ local.get 22 │ │ local.get 21 │ │ i32.shr_s │ │ local.set 23 │ │ i32.const 0 │ │ local.set 24 │ │ local.get 24 │ │ - i32.load8_u offset=38592 │ │ + i32.load8_u offset=38960 │ │ local.set 25 │ │ i32.const 24 │ │ local.set 26 │ │ local.get 25 │ │ local.get 26 │ │ i32.shl │ │ local.set 27 │ │ @@ -331836,15 +334025,15 @@ │ │ local.set 340 │ │ local.get 339 │ │ local.get 340 │ │ i32.store offset=4 │ │ i32.const 0 │ │ local.set 341 │ │ local.get 341 │ │ - i32.load offset=43976 │ │ + i32.load offset=44344 │ │ local.set 342 │ │ local.get 10 │ │ i32.load offset=40 │ │ local.set 343 │ │ local.get 343 │ │ local.get 342 │ │ i32.store offset=24 │ │ @@ -333082,15 +335271,15 @@ │ │ drop │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 28 │ │ local.get 28 │ │ i32.load offset=132 │ │ local.set 29 │ │ - i32.const 38608 │ │ + i32.const 38976 │ │ local.set 30 │ │ i32.const 12 │ │ local.set 31 │ │ local.get 29 │ │ local.get 31 │ │ i32.mul │ │ local.set 32 │ │ @@ -333115,15 +335304,15 @@ │ │ i32.store offset=128 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 38 │ │ local.get 38 │ │ i32.load offset=132 │ │ local.set 39 │ │ - i32.const 38608 │ │ + i32.const 38976 │ │ local.set 40 │ │ i32.const 12 │ │ local.set 41 │ │ local.get 39 │ │ local.get 41 │ │ i32.mul │ │ local.set 42 │ │ @@ -333148,15 +335337,15 @@ │ │ i32.store offset=140 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 48 │ │ local.get 48 │ │ i32.load offset=132 │ │ local.set 49 │ │ - i32.const 38608 │ │ + i32.const 38976 │ │ local.set 50 │ │ i32.const 12 │ │ local.set 51 │ │ local.get 49 │ │ local.get 51 │ │ i32.mul │ │ local.set 52 │ │ @@ -333181,15 +335370,15 @@ │ │ i32.store offset=144 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 58 │ │ local.get 58 │ │ i32.load offset=132 │ │ local.set 59 │ │ - i32.const 38608 │ │ + i32.const 38976 │ │ local.set 60 │ │ i32.const 12 │ │ local.set 61 │ │ local.get 59 │ │ local.get 61 │ │ i32.mul │ │ local.set 62 │ │ @@ -335107,15 +337296,15 @@ │ │ local.get 56 │ │ i32.eqz │ │ br_if 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 57 │ │ local.get 57 │ │ - i32.load offset=43968 │ │ + i32.load offset=44336 │ │ local.set 58 │ │ local.get 4 │ │ i32.load offset=56 │ │ local.set 59 │ │ local.get 59 │ │ local.get 58 │ │ i32.store offset=24 │ │ @@ -335134,15 +337323,15 @@ │ │ local.set 62 │ │ block ;; label = @2 │ │ local.get 62 │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 63 │ │ local.get 63 │ │ - i32.load offset=43980 │ │ + i32.load offset=44348 │ │ local.set 64 │ │ local.get 4 │ │ i32.load offset=56 │ │ local.set 65 │ │ local.get 65 │ │ local.get 64 │ │ i32.store offset=24 │ │ @@ -335342,15 +337531,15 @@ │ │ local.set 120 │ │ local.get 120 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ local.set 121 │ │ local.get 121 │ │ - i32.load offset=43980 │ │ + i32.load offset=44348 │ │ local.set 122 │ │ local.get 4 │ │ i32.load offset=56 │ │ local.set 123 │ │ local.get 123 │ │ local.get 122 │ │ i32.store offset=24 │ │ @@ -335396,15 +337585,15 @@ │ │ local.set 134 │ │ local.get 134 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 135 │ │ local.get 135 │ │ - i32.load offset=43980 │ │ + i32.load offset=44348 │ │ local.set 136 │ │ local.get 4 │ │ i32.load offset=56 │ │ local.set 137 │ │ local.get 137 │ │ local.get 136 │ │ i32.store offset=24 │ │ @@ -338757,15 +340946,15 @@ │ │ end │ │ local.get 4 │ │ i32.load offset=44 │ │ local.set 1053 │ │ local.get 1053 │ │ i32.load offset=132 │ │ local.set 1054 │ │ - i32.const 38608 │ │ + i32.const 38976 │ │ local.set 1055 │ │ i32.const 12 │ │ local.set 1056 │ │ local.get 1054 │ │ local.get 1056 │ │ i32.mul │ │ local.set 1057 │ │ @@ -344052,15 +346241,15 @@ │ │ i32.store16 offset=16 │ │ local.get 4 │ │ i32.load offset=40 │ │ local.set 263 │ │ local.get 4 │ │ i32.load8_u offset=19 │ │ local.set 264 │ │ - i32.const 41728 │ │ + i32.const 42096 │ │ local.set 265 │ │ local.get 265 │ │ local.get 264 │ │ i32.add │ │ local.set 266 │ │ local.get 266 │ │ i32.load8_u │ │ @@ -344136,15 +346325,15 @@ │ │ i32.const 65535 │ │ local.set 288 │ │ local.get 287 │ │ local.get 288 │ │ i32.and │ │ local.set 289 │ │ local.get 289 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 290 │ │ i32.const 255 │ │ local.set 291 │ │ local.get 290 │ │ local.get 291 │ │ i32.and │ │ local.set 292 │ │ @@ -344170,15 +346359,15 @@ │ │ i32.const 256 │ │ local.set 299 │ │ local.get 298 │ │ local.get 299 │ │ i32.add │ │ local.set 300 │ │ local.get 300 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 301 │ │ i32.const 255 │ │ local.set 302 │ │ local.get 301 │ │ local.get 302 │ │ i32.and │ │ local.set 303 │ │ @@ -345428,15 +347617,15 @@ │ │ i32.store16 offset=8 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 140 │ │ local.get 4 │ │ i32.load8_u offset=11 │ │ local.set 141 │ │ - i32.const 41728 │ │ + i32.const 42096 │ │ local.set 142 │ │ local.get 142 │ │ local.get 141 │ │ i32.add │ │ local.set 143 │ │ local.get 143 │ │ i32.load8_u │ │ @@ -345512,15 +347701,15 @@ │ │ i32.const 65535 │ │ local.set 165 │ │ local.get 164 │ │ local.get 165 │ │ i32.and │ │ local.set 166 │ │ local.get 166 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 167 │ │ i32.const 255 │ │ local.set 168 │ │ local.get 167 │ │ local.get 168 │ │ i32.and │ │ local.set 169 │ │ @@ -345546,15 +347735,15 @@ │ │ i32.const 256 │ │ local.set 176 │ │ local.get 175 │ │ local.get 176 │ │ i32.add │ │ local.set 177 │ │ local.get 177 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 178 │ │ i32.const 255 │ │ local.set 179 │ │ local.get 178 │ │ local.get 179 │ │ i32.and │ │ local.set 180 │ │ @@ -348815,15 +351004,15 @@ │ │ i32.store16 offset=4 │ │ local.get 4 │ │ i32.load offset=24 │ │ local.set 209 │ │ local.get 4 │ │ i32.load8_u offset=7 │ │ local.set 210 │ │ - i32.const 41728 │ │ + i32.const 42096 │ │ local.set 211 │ │ local.get 211 │ │ local.get 210 │ │ i32.add │ │ local.set 212 │ │ local.get 212 │ │ i32.load8_u │ │ @@ -348899,15 +351088,15 @@ │ │ i32.const 65535 │ │ local.set 234 │ │ local.get 233 │ │ local.get 234 │ │ i32.and │ │ local.set 235 │ │ local.get 235 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 236 │ │ i32.const 255 │ │ local.set 237 │ │ local.get 236 │ │ local.get 237 │ │ i32.and │ │ local.set 238 │ │ @@ -348933,15 +351122,15 @@ │ │ i32.const 256 │ │ local.set 245 │ │ local.get 244 │ │ local.get 245 │ │ i32.add │ │ local.set 246 │ │ local.get 246 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 247 │ │ i32.const 255 │ │ local.set 248 │ │ local.get 247 │ │ local.get 248 │ │ i32.and │ │ local.set 249 │ │ @@ -351284,15 +353473,15 @@ │ │ local.get 17 │ │ local.get 16 │ │ i32.shr_s │ │ local.set 18 │ │ i32.const 0 │ │ local.set 19 │ │ local.get 19 │ │ - i32.load8_u offset=16975 │ │ + i32.load8_u offset=17278 │ │ local.set 20 │ │ i32.const 24 │ │ local.set 21 │ │ local.get 20 │ │ local.get 21 │ │ i32.shl │ │ local.set 22 │ │ @@ -352228,15 +354417,15 @@ │ │ local.get 145 │ │ i32.eqz │ │ br_if 1 (;@37;) │ │ end │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 146 │ │ - i32.const 7549 │ │ + i32.const 7598 │ │ local.set 147 │ │ local.get 146 │ │ local.get 147 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 148 │ │ @@ -352275,15 +354464,15 @@ │ │ block ;; label = @37 │ │ local.get 158 │ │ i32.eqz │ │ br_if 0 (;@37;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 159 │ │ - i32.const 11234 │ │ + i32.const 11503 │ │ local.set 160 │ │ local.get 159 │ │ local.get 160 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 161 │ │ @@ -352404,15 +354593,15 @@ │ │ local.get 192 │ │ i32.eqz │ │ br_if 1 (;@37;) │ │ end │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 193 │ │ - i32.const 9024 │ │ + i32.const 9158 │ │ local.set 194 │ │ local.get 193 │ │ local.get 194 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 195 │ │ @@ -352638,15 +354827,15 @@ │ │ block ;; label = @36 │ │ local.get 251 │ │ i32.eqz │ │ br_if 0 (;@36;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 252 │ │ - i32.const 11234 │ │ + i32.const 11503 │ │ local.set 253 │ │ local.get 252 │ │ local.get 253 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 254 │ │ @@ -352672,15 +354861,15 @@ │ │ block ;; label = @36 │ │ local.get 259 │ │ i32.eqz │ │ br_if 0 (;@36;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 260 │ │ - i32.const 3086 │ │ + i32.const 3135 │ │ local.set 261 │ │ local.get 260 │ │ local.get 261 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 262 │ │ @@ -354925,15 +357114,15 @@ │ │ local.set 844 │ │ local.get 844 │ │ i32.eqz │ │ br_if 0 (;@30;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 845 │ │ - i32.const 8037 │ │ + i32.const 8086 │ │ local.set 846 │ │ local.get 845 │ │ local.get 846 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 847 │ │ @@ -355694,15 +357883,15 @@ │ │ local.get 1034 │ │ i32.store offset=4 │ │ br 1 (;@25;) │ │ end │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1035 │ │ - i32.const 9736 │ │ + i32.const 9870 │ │ local.set 1036 │ │ local.get 1035 │ │ local.get 1036 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1037 │ │ @@ -355914,15 +358103,15 @@ │ │ block ;; label = @24 │ │ local.get 1091 │ │ i32.eqz │ │ br_if 0 (;@24;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1092 │ │ - i32.const 3881 │ │ + i32.const 3930 │ │ local.set 1093 │ │ local.get 1092 │ │ local.get 1093 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1094 │ │ @@ -356464,15 +358653,15 @@ │ │ local.get 1229 │ │ i32.eqz │ │ br_if 1 (;@21;) │ │ end │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1230 │ │ - i32.const 3845 │ │ + i32.const 3894 │ │ local.set 1231 │ │ local.get 1230 │ │ local.get 1231 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1232 │ │ @@ -356657,15 +358846,15 @@ │ │ local.get 1278 │ │ local.get 1279 │ │ i32.add │ │ local.set 1280 │ │ local.get 1277 │ │ local.get 1280 │ │ i32.store offset=108 │ │ - i32.const 38736 │ │ + i32.const 39104 │ │ local.set 1281 │ │ i32.const 1 │ │ local.set 1282 │ │ local.get 1278 │ │ local.get 1282 │ │ i32.shl │ │ local.set 1283 │ │ @@ -356769,15 +358958,15 @@ │ │ local.get 1309 │ │ local.get 1310 │ │ i32.add │ │ local.set 1311 │ │ local.get 1308 │ │ local.get 1311 │ │ i32.store offset=108 │ │ - i32.const 38736 │ │ + i32.const 39104 │ │ local.set 1312 │ │ i32.const 1 │ │ local.set 1313 │ │ local.get 1309 │ │ local.get 1313 │ │ i32.shl │ │ local.set 1314 │ │ @@ -356904,15 +359093,15 @@ │ │ block ;; label = @20 │ │ local.get 1347 │ │ i32.eqz │ │ br_if 0 (;@20;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1348 │ │ - i32.const 3061 │ │ + i32.const 3110 │ │ local.set 1349 │ │ local.get 1348 │ │ local.get 1349 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1350 │ │ @@ -357439,15 +359628,15 @@ │ │ local.set 1489 │ │ block ;; label = @24 │ │ local.get 1489 │ │ br_if 0 (;@24;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1490 │ │ - i32.const 3367 │ │ + i32.const 3416 │ │ local.set 1491 │ │ local.get 1490 │ │ local.get 1491 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1492 │ │ @@ -358015,15 +360204,15 @@ │ │ block ;; label = @22 │ │ local.get 1640 │ │ i32.eqz │ │ br_if 0 (;@22;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1641 │ │ - i32.const 3367 │ │ + i32.const 3416 │ │ local.set 1642 │ │ local.get 1641 │ │ local.get 1642 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1643 │ │ @@ -358140,15 +360329,15 @@ │ │ local.set 1670 │ │ block ;; label = @19 │ │ local.get 1670 │ │ br_if 0 (;@19;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1671 │ │ - i32.const 7512 │ │ + i32.const 7561 │ │ local.set 1672 │ │ local.get 1671 │ │ local.get 1672 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1673 │ │ @@ -358255,15 +360444,15 @@ │ │ block ;; label = @19 │ │ local.get 1700 │ │ i32.eqz │ │ br_if 0 (;@19;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1701 │ │ - i32.const 3033 │ │ + i32.const 3082 │ │ local.set 1702 │ │ local.get 1701 │ │ local.get 1702 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1703 │ │ @@ -358371,15 +360560,15 @@ │ │ block ;; label = @19 │ │ local.get 1731 │ │ i32.eqz │ │ br_if 0 (;@19;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1732 │ │ - i32.const 3111 │ │ + i32.const 3160 │ │ local.set 1733 │ │ local.get 1732 │ │ local.get 1733 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1734 │ │ @@ -359284,15 +361473,15 @@ │ │ block ;; label = @17 │ │ local.get 1971 │ │ i32.eqz │ │ br_if 0 (;@17;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 1972 │ │ - i32.const 11065 │ │ + i32.const 11334 │ │ local.set 1973 │ │ local.get 1972 │ │ local.get 1973 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 1974 │ │ @@ -360113,15 +362302,15 @@ │ │ block ;; label = @15 │ │ local.get 2191 │ │ i32.eqz │ │ br_if 0 (;@15;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 2192 │ │ - i32.const 11093 │ │ + i32.const 11362 │ │ local.set 2193 │ │ local.get 2192 │ │ local.get 2193 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 2194 │ │ @@ -360488,15 +362677,15 @@ │ │ block ;; label = @16 │ │ local.get 2286 │ │ i32.eqz │ │ br_if 0 (;@16;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 2287 │ │ - i32.const 7653 │ │ + i32.const 7702 │ │ local.set 2288 │ │ local.get 2287 │ │ local.get 2288 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 2289 │ │ @@ -361261,15 +363450,15 @@ │ │ local.set 2480 │ │ local.get 2480 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 2481 │ │ - i32.const 7595 │ │ + i32.const 7644 │ │ local.set 2482 │ │ local.get 2481 │ │ local.get 2482 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 2483 │ │ @@ -361463,15 +363652,15 @@ │ │ local.set 2530 │ │ local.get 2530 │ │ i32.eqz │ │ br_if 0 (;@11;) │ │ local.get 4 │ │ i32.load offset=88 │ │ local.set 2531 │ │ - i32.const 7572 │ │ + i32.const 7621 │ │ local.set 2532 │ │ local.get 2531 │ │ local.get 2532 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=80 │ │ local.set 2533 │ │ @@ -362160,15 +364349,15 @@ │ │ local.set 3 │ │ local.get 3 │ │ local.get 0 │ │ i32.store offset=12 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 4 │ │ - i32.const 38784 │ │ + i32.const 39152 │ │ local.set 5 │ │ local.get 4 │ │ local.get 5 │ │ i32.store offset=80 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 6 │ │ @@ -362176,15 +364365,15 @@ │ │ local.set 7 │ │ local.get 6 │ │ local.get 7 │ │ i32.store offset=88 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 8 │ │ - i32.const 40832 │ │ + i32.const 41200 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.store offset=84 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ @@ -363879,37 +366068,37 @@ │ │ i32.const 20 │ │ local.set 261 │ │ local.get 8 │ │ local.get 261 │ │ i32.store offset=72 │ │ br 2 (;@2;) │ │ end │ │ - i32.const 40960 │ │ + i32.const 41328 │ │ local.set 262 │ │ local.get 8 │ │ local.get 262 │ │ i32.store offset=80 │ │ - i32.const 41024 │ │ + i32.const 41392 │ │ local.set 263 │ │ local.get 8 │ │ local.get 263 │ │ i32.store offset=76 │ │ i32.const 257 │ │ local.set 264 │ │ local.get 8 │ │ local.get 264 │ │ i32.store offset=72 │ │ br 1 (;@2;) │ │ end │ │ - i32.const 41088 │ │ + i32.const 41456 │ │ local.set 265 │ │ local.get 8 │ │ local.get 265 │ │ i32.store offset=80 │ │ - i32.const 41152 │ │ + i32.const 41520 │ │ local.set 266 │ │ local.get 8 │ │ local.get 266 │ │ i32.store offset=76 │ │ i32.const 0 │ │ local.set 267 │ │ local.get 8 │ │ @@ -366434,15 +368623,15 @@ │ │ block ;; label = @13 │ │ local.get 305 │ │ i32.eqz │ │ br_if 0 (;@13;) │ │ local.get 4 │ │ i32.load offset=92 │ │ local.set 306 │ │ - i32.const 7653 │ │ + i32.const 7702 │ │ local.set 307 │ │ local.get 306 │ │ local.get 307 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=84 │ │ local.set 308 │ │ @@ -367519,15 +369708,15 @@ │ │ i32.store offset=20 │ │ br 1 (;@8;) │ │ end │ │ end │ │ local.get 4 │ │ i32.load offset=92 │ │ local.set 568 │ │ - i32.const 11093 │ │ + i32.const 11362 │ │ local.set 569 │ │ local.get 568 │ │ local.get 569 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=84 │ │ local.set 570 │ │ @@ -367637,15 +369826,15 @@ │ │ local.get 597 │ │ i32.store offset=4 │ │ br 3 (;@2;) │ │ end │ │ local.get 4 │ │ i32.load offset=92 │ │ local.set 598 │ │ - i32.const 11065 │ │ + i32.const 11334 │ │ local.set 599 │ │ local.get 598 │ │ local.get 599 │ │ i32.store offset=24 │ │ local.get 4 │ │ i32.load offset=84 │ │ local.set 600 │ │ @@ -368000,15 +370189,15 @@ │ │ local.set 7 │ │ local.get 7 │ │ local.get 6 │ │ i32.store offset=2840 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 8 │ │ - i32.const 41984 │ │ + i32.const 42352 │ │ local.set 9 │ │ local.get 8 │ │ local.get 9 │ │ i32.store offset=2848 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 10 │ │ @@ -368023,15 +370212,15 @@ │ │ local.set 13 │ │ local.get 13 │ │ local.get 12 │ │ i32.store offset=2852 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 14 │ │ - i32.const 42004 │ │ + i32.const 42372 │ │ local.set 15 │ │ local.get 14 │ │ local.get 15 │ │ i32.store offset=2860 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 16 │ │ @@ -368046,15 +370235,15 @@ │ │ local.set 19 │ │ local.get 19 │ │ local.get 18 │ │ i32.store offset=2864 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 20 │ │ - i32.const 42024 │ │ + i32.const 42392 │ │ local.set 21 │ │ local.get 20 │ │ local.get 21 │ │ i32.store offset=2872 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.set 22 │ │ @@ -369706,15 +371895,15 @@ │ │ local.get 78 │ │ local.get 80 │ │ i32.store offset=5820 │ │ end │ │ i32.const 0 │ │ local.set 81 │ │ local.get 81 │ │ - i32.load16_u offset=43074 │ │ + i32.load16_u offset=43442 │ │ local.set 82 │ │ i32.const 65535 │ │ local.set 83 │ │ local.get 82 │ │ local.get 83 │ │ i32.and │ │ local.set 84 │ │ @@ -369754,15 +371943,15 @@ │ │ block ;; label = @2 │ │ local.get 94 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 95 │ │ local.get 95 │ │ - i32.load16_u offset=43072 │ │ + i32.load16_u offset=43440 │ │ local.set 96 │ │ i32.const 65535 │ │ local.set 97 │ │ local.get 96 │ │ local.get 97 │ │ i32.and │ │ local.set 98 │ │ @@ -369953,15 +372142,15 @@ │ │ local.get 150 │ │ i32.store offset=5820 │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 151 │ │ local.get 151 │ │ - i32.load16_u offset=43072 │ │ + i32.load16_u offset=43440 │ │ local.set 152 │ │ i32.const 65535 │ │ local.set 153 │ │ local.get 152 │ │ local.get 153 │ │ i32.and │ │ local.set 154 │ │ @@ -370687,17 +372876,17 @@ │ │ local.get 181 │ │ local.get 183 │ │ i32.store offset=5820 │ │ end │ │ local.get 6 │ │ i32.load offset=44 │ │ local.set 184 │ │ - i32.const 42048 │ │ + i32.const 42416 │ │ local.set 185 │ │ - i32.const 43200 │ │ + i32.const 43568 │ │ local.set 186 │ │ local.get 184 │ │ local.get 185 │ │ local.get 186 │ │ call $compress_block │ │ br 1 (;@2;) │ │ end │ │ @@ -372593,15 +374782,15 @@ │ │ local.get 29 │ │ i32.add │ │ local.set 30 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 31 │ │ local.get 31 │ │ - i32.load8_u offset=43664 │ │ + i32.load8_u offset=44032 │ │ local.set 32 │ │ i32.const 255 │ │ local.set 33 │ │ local.get 32 │ │ local.get 33 │ │ i32.and │ │ local.set 34 │ │ @@ -373221,15 +375410,15 @@ │ │ end │ │ br 1 (;@3;) │ │ end │ │ local.get 5 │ │ i32.load offset=60 │ │ local.set 143 │ │ local.get 143 │ │ - i32.load8_u offset=41728 │ │ + i32.load8_u offset=42096 │ │ local.set 144 │ │ i32.const 255 │ │ local.set 145 │ │ local.get 144 │ │ local.get 145 │ │ i32.and │ │ local.set 146 │ │ @@ -373617,15 +375806,15 @@ │ │ local.get 254 │ │ local.get 256 │ │ i32.store offset=5820 │ │ end │ │ local.get 5 │ │ i32.load offset=52 │ │ local.set 257 │ │ - i32.const 43328 │ │ + i32.const 43696 │ │ local.set 258 │ │ i32.const 2 │ │ local.set 259 │ │ local.get 257 │ │ local.get 259 │ │ i32.shl │ │ local.set 260 │ │ @@ -373645,15 +375834,15 @@ │ │ block ;; label = @4 │ │ local.get 263 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=52 │ │ local.set 264 │ │ - i32.const 43696 │ │ + i32.const 44064 │ │ local.set 265 │ │ i32.const 2 │ │ local.set 266 │ │ local.get 264 │ │ local.get 266 │ │ i32.shl │ │ local.set 267 │ │ @@ -373997,15 +376186,15 @@ │ │ local.get 360 │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.load offset=64 │ │ local.set 361 │ │ local.get 361 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 362 │ │ i32.const 255 │ │ local.set 363 │ │ local.get 362 │ │ local.get 363 │ │ i32.and │ │ local.set 364 │ │ @@ -374025,15 +376214,15 @@ │ │ i32.const 256 │ │ local.set 369 │ │ local.get 368 │ │ local.get 369 │ │ i32.add │ │ local.set 370 │ │ local.get 370 │ │ - i32.load8_u offset=41216 │ │ + i32.load8_u offset=41584 │ │ local.set 371 │ │ i32.const 255 │ │ local.set 372 │ │ local.get 371 │ │ local.get 372 │ │ i32.and │ │ local.set 373 │ │ @@ -374390,15 +376579,15 @@ │ │ local.get 470 │ │ local.get 472 │ │ i32.store offset=5820 │ │ end │ │ local.get 5 │ │ i32.load offset=52 │ │ local.set 473 │ │ - i32.const 43456 │ │ + i32.const 43824 │ │ local.set 474 │ │ i32.const 2 │ │ local.set 475 │ │ local.get 473 │ │ local.get 475 │ │ i32.shl │ │ local.set 476 │ │ @@ -374418,15 +376607,15 @@ │ │ block ;; label = @4 │ │ local.get 479 │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ i32.load offset=52 │ │ local.set 480 │ │ - i32.const 43824 │ │ + i32.const 44192 │ │ local.set 481 │ │ i32.const 2 │ │ local.set 482 │ │ local.get 480 │ │ local.get 482 │ │ i32.shl │ │ local.set 483 │ │ @@ -376063,15 +378252,15 @@ │ │ local.get 276 │ │ i32.add │ │ local.set 277 │ │ local.get 6 │ │ i32.load offset=44 │ │ local.set 278 │ │ local.get 278 │ │ - i32.load8_u offset=43664 │ │ + i32.load8_u offset=44032 │ │ local.set 279 │ │ i32.const 255 │ │ local.set 280 │ │ local.get 279 │ │ local.get 280 │ │ i32.and │ │ local.set 281 │ │ @@ -376291,15 +378480,15 @@ │ │ local.get 341 │ │ i32.add │ │ local.set 342 │ │ local.get 6 │ │ i32.load offset=44 │ │ local.set 343 │ │ local.get 343 │ │ - i32.load8_u offset=43664 │ │ + i32.load8_u offset=44032 │ │ local.set 344 │ │ i32.const 255 │ │ local.set 345 │ │ local.get 344 │ │ local.get 345 │ │ i32.and │ │ local.set 346 │ │ @@ -382437,15 +384626,15 @@ │ │ i32.sub │ │ local.set 22 │ │ local.get 22 │ │ local.set 19 │ │ end │ │ local.get 19 │ │ local.set 23 │ │ - i32.const 43952 │ │ + i32.const 44320 │ │ local.set 24 │ │ i32.const 2 │ │ local.set 25 │ │ local.get 23 │ │ local.get 25 │ │ i32.shl │ │ local.set 26 │ │ @@ -382531,27 +384720,27 @@ │ │ local.get 6 │ │ i32.add │ │ local.set 7 │ │ local.get 7 │ │ global.set $__stack_pointer │ │ return) │ │ (func $__errno_location (type 9) (result i32) │ │ - i32.const 87996) │ │ + i32.const 88364) │ │ (func $__fdopen (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ - i32.const 14032 │ │ + i32.const 14301 │ │ local.get 1 │ │ i32.load8_s │ │ call $strchr │ │ br_if 0 (;@4;) │ │ call $__errno_location │ │ i32.const 28 │ │ i32.store │ │ @@ -382671,15 +384860,15 @@ │ │ i32.const 450 │ │ i32.store offset=32 │ │ local.get 3 │ │ i32.const 451 │ │ i32.store offset=12 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load8_u offset=88065 │ │ + i32.load8_u offset=88433 │ │ br_if 0 (;@2;) │ │ local.get 3 │ │ i32.const -1 │ │ i32.store offset=76 │ │ end │ │ local.get 3 │ │ call $__ofl_add │ │ @@ -383009,15 +385198,15 @@ │ │ (func $access (type 6) (param i32 i32) (result i32) │ │ i32.const -100 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ call $__syscall_faccessat │ │ call $__syscall_ret) │ │ - (func $acos (type 87) (param f64) (result f64) │ │ + (func $acos (type 91) (param f64) (result f64) │ │ (local i64 i32 f64 f64) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i64.const 32 │ │ i64.shr_u │ │ @@ -383134,15 +385323,15 @@ │ │ f64.add │ │ local.tee 0 │ │ local.get 0 │ │ f64.add │ │ local.set 3 │ │ end │ │ local.get 3) │ │ - (func $R (type 87) (param f64) (result f64) │ │ + (func $R (type 91) (param f64) (result f64) │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ f64.const 0x1.23de10dfdf709p-15 (;=3.47933e-05;) │ │ f64.mul │ │ @@ -383176,15 +385365,15 @@ │ │ f64.mul │ │ f64.const -0x1.33a271c8a2d4bp+1 (;=-2.40339;) │ │ f64.add │ │ f64.mul │ │ f64.const 0x1p+0 (;=1;) │ │ f64.add │ │ f64.div) │ │ - (func $asin (type 87) (param f64) (result f64) │ │ + (func $asin (type 91) (param f64) (result f64) │ │ (local i64 i32 f64 f64 f64) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i64.const 32 │ │ i64.shr_u │ │ @@ -383313,15 +385502,15 @@ │ │ local.get 1 │ │ i64.const 0 │ │ i64.lt_s │ │ select │ │ local.set 0 │ │ end │ │ local.get 0) │ │ - (func $R.1 (type 87) (param f64) (result f64) │ │ + (func $R.1 (type 91) (param f64) (result f64) │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ local.get 0 │ │ f64.const 0x1.23de10dfdf709p-15 (;=3.47933e-05;) │ │ f64.mul │ │ @@ -383355,15 +385544,15 @@ │ │ f64.mul │ │ f64.const -0x1.33a271c8a2d4bp+1 (;=-2.40339;) │ │ f64.add │ │ f64.mul │ │ f64.const 0x1p+0 (;=1;) │ │ f64.add │ │ f64.div) │ │ - (func $atan (type 87) (param f64) (result f64) │ │ + (func $atan (type 91) (param f64) (result f64) │ │ (local i64 i32 i32 f64 f64 f64) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i64.const 32 │ │ i64.shr_u │ │ @@ -383538,24 +385727,24 @@ │ │ f64.sub │ │ return │ │ end │ │ local.get 3 │ │ i32.const 3 │ │ i32.shl │ │ local.tee 2 │ │ - i32.const 44000 │ │ + i32.const 44368 │ │ i32.add │ │ f64.load │ │ local.get 0 │ │ local.get 6 │ │ local.get 5 │ │ f64.add │ │ f64.mul │ │ local.get 2 │ │ - i32.const 44032 │ │ + i32.const 44400 │ │ i32.add │ │ f64.load │ │ f64.sub │ │ local.get 0 │ │ f64.sub │ │ f64.sub │ │ local.tee 0 │ │ @@ -383564,18 +385753,18 @@ │ │ local.get 1 │ │ i64.const 0 │ │ i64.lt_s │ │ select │ │ local.set 0 │ │ end │ │ local.get 0) │ │ - (func $__DOUBLE_BITS (type 88) (param f64) (result i64) │ │ + (func $__DOUBLE_BITS (type 92) (param f64) (result i64) │ │ local.get 0 │ │ i64.reinterpret_f64) │ │ - (func $atan2 (type 89) (param f64 f64) (result f64) │ │ + (func $atan2 (type 93) (param f64 f64) (result f64) │ │ (local i64 i32 i32 i32 i32 i32 f64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ call $__DOUBLE_BITS.1 │ │ i64.const 9223372036854775807 │ │ i64.and │ │ @@ -383676,15 +385865,15 @@ │ │ local.get 6 │ │ i32.const 2146435072 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ local.get 7 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 44064 │ │ + i32.const 44432 │ │ i32.add │ │ f64.load │ │ return │ │ end │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 6 │ │ @@ -383747,21 +385936,21 @@ │ │ f64.const -0x1.921fb54442d18p+1 (;=-3.14159;) │ │ f64.add │ │ return │ │ end │ │ local.get 7 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 44096 │ │ + i32.const 44464 │ │ i32.add │ │ f64.load │ │ local.set 8 │ │ end │ │ local.get 8) │ │ - (func $__DOUBLE_BITS.1 (type 88) (param f64) (result i64) │ │ + (func $__DOUBLE_BITS.1 (type 92) (param f64) (result i64) │ │ local.get 0 │ │ i64.reinterpret_f64) │ │ (func $__lockfile (type 10) (param i32) (result i32) │ │ i32.const 1) │ │ (func $__unlockfile (type 5) (param i32)) │ │ (func $clearerr (type 5) (param i32) │ │ (local i32) │ │ @@ -383802,15 +385991,15 @@ │ │ call $__wasi_fd_close │ │ local.tee 0 │ │ local.get 0 │ │ i32.const 27 │ │ i32.eq │ │ select │ │ call $__wasi_syscall_ret) │ │ - (func $__cos (type 89) (param f64 f64) (result f64) │ │ + (func $__cos (type 93) (param f64 f64) (result f64) │ │ (local f64 f64 f64) │ │ f64.const 0x1p+0 (;=1;) │ │ local.get 0 │ │ local.get 0 │ │ f64.mul │ │ local.tee 2 │ │ f64.const 0x1p-1 (;=0.5;) │ │ @@ -383883,15 +386072,15 @@ │ │ local.get 2 │ │ i32.add │ │ local.set 8 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 44128 │ │ + i32.const 44496 │ │ i32.add │ │ i32.load │ │ local.tee 9 │ │ local.get 3 │ │ i32.const -1 │ │ i32.add │ │ local.tee 10 │ │ @@ -383919,15 +386108,15 @@ │ │ f64.const 0x0p+0 (;=0;) │ │ local.set 12 │ │ br 1 (;@3;) │ │ end │ │ local.get 2 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 44144 │ │ + i32.const 44512 │ │ i32.add │ │ i32.load │ │ f64.convert_i32_s │ │ local.set 12 │ │ end │ │ local.get 5 │ │ i32.const 320 │ │ @@ -384454,15 +386643,15 @@ │ │ i32.const 1 │ │ i32.add │ │ local.tee 11 │ │ local.get 7 │ │ i32.add │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 44144 │ │ + i32.const 44512 │ │ i32.add │ │ i32.load │ │ f64.convert_i32_s │ │ f64.store │ │ i32.const 0 │ │ local.set 2 │ │ f64.const 0x0p+0 (;=0;) │ │ @@ -384678,15 +386867,15 @@ │ │ i32.const 0 │ │ local.set 2 │ │ block ;; label = @3 │ │ loop ;; label = @4 │ │ local.get 2 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 46912 │ │ + i32.const 47280 │ │ i32.add │ │ f64.load │ │ local.get 5 │ │ local.get 2 │ │ local.get 6 │ │ i32.add │ │ i32.const 3 │ │ @@ -385046,15 +387235,15 @@ │ │ local.get 5 │ │ i32.const 560 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 20 │ │ i32.const 7 │ │ i32.and) │ │ - (func $__rem_pio2 (type 90) (param f64 i32) (result i32) │ │ + (func $__rem_pio2 (type 94) (param f64 i32) (result i32) │ │ (local i32 i64 i32 i32 f64 f64 f64 f64 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 48 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -385621,15 +387810,15 @@ │ │ f64.store offset=8 │ │ end │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 4) │ │ - (func $__sin (type 91) (param f64 f64 i32) (result f64) │ │ + (func $__sin (type 95) (param f64 f64 i32) (result f64) │ │ (local f64 f64 f64) │ │ local.get 0 │ │ local.get 0 │ │ f64.mul │ │ local.tee 3 │ │ local.get 3 │ │ local.get 3 │ │ @@ -385683,15 +387872,15 @@ │ │ local.get 1 │ │ f64.sub │ │ local.get 5 │ │ f64.const 0x1.5555555555549p-3 (;=0.166667;) │ │ f64.mul │ │ f64.add │ │ f64.sub) │ │ - (func $cos (type 87) (param f64) (result f64) │ │ + (func $cos (type 91) (param f64) (result f64) │ │ (local i32 i32 f64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -386226,60 +388415,60 @@ │ │ i32.const 31 │ │ i32.gt_u │ │ br_if 0 (;@2;) │ │ end │ │ end │ │ local.get 0) │ │ (func $tzset (type 11) │ │ - i32.const 88000 │ │ - i32.const 88004 │ │ - i32.const 88008 │ │ + i32.const 88368 │ │ + i32.const 88372 │ │ + i32.const 88376 │ │ call $_tzset_js) │ │ (func $mktime (type 10) (param i32) (result i32) │ │ call $tzset │ │ local.get 0 │ │ call $_mktime_js) │ │ (func $__localtime_r (type 6) (param i32 i32) (result i32) │ │ call $tzset │ │ local.get 0 │ │ local.get 1 │ │ call $_localtime_js │ │ local.get 1 │ │ - i32.const 88008 │ │ + i32.const 88376 │ │ i32.const 4 │ │ i32.add │ │ - i32.const 88008 │ │ + i32.const 88376 │ │ local.get 1 │ │ i32.load offset=32 │ │ select │ │ i32.load │ │ i32.store offset=40 │ │ local.get 1) │ │ (func $__gmtime_r (type 6) (param i32 i32) (result i32) │ │ call $tzset │ │ local.get 0 │ │ local.get 1 │ │ call $_gmtime_js │ │ local.get 1 │ │ - i32.const 15788 │ │ + i32.const 16091 │ │ i32.store offset=40 │ │ local.get 1 │ │ i64.const 0 │ │ i64.store offset=32 align=4 │ │ local.get 1) │ │ - (func $__math_xflow (type 92) (param i32 f64) (result f64) │ │ + (func $__math_xflow (type 96) (param i32 f64) (result f64) │ │ local.get 1 │ │ f64.neg │ │ local.get 1 │ │ local.get 0 │ │ select │ │ call $fp_barrier │ │ local.get 1 │ │ f64.mul) │ │ - (func $fp_barrier (type 87) (param f64) (result f64) │ │ + (func $fp_barrier (type 91) (param f64) (result f64) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ local.get 0 │ │ f64.store offset=8 │ │ @@ -386289,15 +388478,15 @@ │ │ local.get 0 │ │ f64.const 0x1p-767 (;=1.28823e-231;) │ │ call $__math_xflow) │ │ (func $__math_oflow (type 46) (param i32) (result f64) │ │ local.get 0 │ │ f64.const 0x1p+769 (;=3.10504e+231;) │ │ call $__math_xflow) │ │ - (func $exp (type 87) (param f64) (result f64) │ │ + (func $exp (type 91) (param f64) (result f64) │ │ (local i64 i32 i32 f64 f64 i64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ @@ -386358,77 +388547,77 @@ │ │ return │ │ end │ │ i32.const 0 │ │ call $__math_oflow │ │ return │ │ end │ │ i32.const 0 │ │ - f64.load offset=46976 │ │ + f64.load offset=47344 │ │ local.get 0 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=46984 │ │ + f64.load offset=47352 │ │ local.tee 4 │ │ f64.add │ │ local.tee 5 │ │ local.get 4 │ │ f64.sub │ │ local.tee 4 │ │ i32.const 0 │ │ - f64.load offset=47000 │ │ + f64.load offset=47368 │ │ f64.mul │ │ local.get 4 │ │ i32.const 0 │ │ - f64.load offset=46992 │ │ + f64.load offset=47360 │ │ f64.mul │ │ local.get 0 │ │ f64.add │ │ f64.add │ │ local.tee 0 │ │ local.get 0 │ │ f64.mul │ │ local.tee 4 │ │ local.get 4 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=47032 │ │ + f64.load offset=47400 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=47024 │ │ + f64.load offset=47392 │ │ f64.add │ │ f64.mul │ │ local.get 4 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=47016 │ │ + f64.load offset=47384 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=47008 │ │ + f64.load offset=47376 │ │ f64.add │ │ f64.mul │ │ local.get 5 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i32.wrap_i64 │ │ i32.const 4 │ │ i32.shl │ │ i32.const 2032 │ │ i32.and │ │ local.tee 2 │ │ - i32.const 47088 │ │ + i32.const 47456 │ │ i32.add │ │ f64.load │ │ local.get 0 │ │ f64.add │ │ f64.add │ │ f64.add │ │ local.set 0 │ │ local.get 2 │ │ - i32.const 47096 │ │ + i32.const 47464 │ │ i32.add │ │ i64.load │ │ local.get 1 │ │ i64.const 45 │ │ i64.shl │ │ i64.add │ │ local.set 6 │ │ @@ -386447,15 +388636,15 @@ │ │ local.get 0 │ │ f64.mul │ │ local.get 4 │ │ f64.add │ │ local.set 4 │ │ end │ │ local.get 4) │ │ - (func $specialcase (type 93) (param f64 i64 i64) (result f64) │ │ + (func $specialcase (type 97) (param f64 i64 i64) (result f64) │ │ (local i32 f64 f64 f64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.set 3 │ │ block ;; label = @1 │ │ local.get 2 │ │ @@ -386527,15 +388716,15 @@ │ │ f64.eq │ │ select │ │ local.set 0 │ │ end │ │ local.get 0 │ │ f64.const 0x1p-1022 (;=2.22507e-308;) │ │ f64.mul) │ │ - (func $fabs (type 87) (param f64) (result f64) │ │ + (func $fabs (type 91) (param f64) (result f64) │ │ local.get 0 │ │ f64.abs) │ │ (func $fchmod (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ @@ -386725,29 +388914,29 @@ │ │ block ;; label = @1 │ │ local.get 0 │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ local.set 1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=75936 │ │ + i32.load offset=76304 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75936 │ │ + i32.load offset=76304 │ │ call $fflush │ │ local.set 1 │ │ end │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=75632 │ │ + i32.load offset=76000 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75632 │ │ + i32.load offset=76000 │ │ call $fflush │ │ local.get 1 │ │ i32.or │ │ local.set 1 │ │ end │ │ block ;; label = @2 │ │ call $__ofl_lock │ │ @@ -386888,21 +389077,21 @@ │ │ local.get 0 │ │ i32.load offset=56 │ │ local.tee 0 │ │ br_if 0 (;@2;) │ │ end │ │ end │ │ i32.const 0 │ │ - i32.load offset=75784 │ │ + i32.load offset=76152 │ │ call $close_file.1 │ │ i32.const 0 │ │ - i32.load offset=75936 │ │ + i32.load offset=76304 │ │ call $close_file.1 │ │ i32.const 0 │ │ - i32.load offset=75632 │ │ + i32.load offset=76000 │ │ call $close_file.1) │ │ (func $close_file.1 (type 5) (param i32) │ │ (local i32 i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ @@ -387280,18 +389469,18 @@ │ │ call $__errno_location │ │ i32.const 8 │ │ i32.store │ │ i32.const -1 │ │ local.set 1 │ │ end │ │ local.get 1) │ │ - (func $floor (type 87) (param f64) (result f64) │ │ + (func $floor (type 91) (param f64) (result f64) │ │ local.get 0 │ │ f64.floor) │ │ - (func $fmod (type 89) (param f64 f64) (result f64) │ │ + (func $fmod (type 93) (param f64 f64) (result f64) │ │ (local i64 i64 i64 i32 i64 i32) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ i64.reinterpret_f64 │ │ local.tee 2 │ │ i64.const 1 │ │ @@ -387622,15 +389811,15 @@ │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ - i32.const 14032 │ │ + i32.const 14301 │ │ local.get 1 │ │ i32.load8_s │ │ call $strchr │ │ br_if 0 (;@3;) │ │ call $__errno_location │ │ i32.const 28 │ │ i32.store │ │ @@ -388240,15 +390429,15 @@ │ │ local.set 2 │ │ end │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 2) │ │ - (func $frexp (type 94) (param f64 i32) (result f64) │ │ + (func $frexp (type 98) (param f64 i32) (result f64) │ │ (local i64 i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 2 │ │ i64.const 52 │ │ i64.shr_u │ │ @@ -388416,15 +390605,15 @@ │ │ i32.gt_s │ │ br_if 0 (;@1;) │ │ i32.const -8 │ │ call $__syscall_ret │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.get 1 │ │ i32.const 4096 │ │ call $fstatat) │ │ (func $fstatat (type 14) (param i32 i32 i32 i32) (result i32) │ │ (local i32) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -388911,44 +391100,44 @@ │ │ i32.load offset=12 │ │ i32.const 2 │ │ i32.shl │ │ i32.const 4 │ │ i32.add │ │ call $dlmalloc │ │ local.tee 1 │ │ - i32.store offset=88016 │ │ + i32.store offset=88384 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.load offset=8 │ │ call $dlmalloc │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=88016 │ │ + i32.load offset=88384 │ │ local.get 0 │ │ i32.load offset=12 │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ i32.const 0 │ │ i32.store │ │ i32.const 0 │ │ - i32.load offset=88016 │ │ + i32.load offset=88384 │ │ local.get 1 │ │ call $__wasi_environ_get │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=88016 │ │ + i32.store offset=88384 │ │ end │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ (func $getenv (type 10) (param i32) (result i32) │ │ (local i32 i32 i32 i32) │ │ @@ -388968,15 +391157,15 @@ │ │ block ;; label = @1 │ │ local.get 0 │ │ local.get 1 │ │ i32.add │ │ i32.load8_u │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=88016 │ │ + i32.load offset=88384 │ │ local.tee 3 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.load │ │ local.tee 4 │ │ i32.eqz │ │ @@ -389015,15 +391204,15 @@ │ │ i32.const 1 │ │ i32.add │ │ local.set 2 │ │ end │ │ local.get 2) │ │ (func $gmtime (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 88020 │ │ + i32.const 88388 │ │ call $__gmtime_r) │ │ (func $isalnum (type 10) (param i32) (result i32) │ │ (local i32) │ │ i32.const 1 │ │ local.set 1 │ │ block ;; label = @1 │ │ local.get 0 │ │ @@ -389112,15 +391301,15 @@ │ │ call $isdigit │ │ i32.const 0 │ │ i32.ne │ │ i32.or) │ │ (func $__isxdigit_l (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ call $isxdigit) │ │ - (func $ldexp (type 94) (param f64 i32) (result f64) │ │ + (func $ldexp (type 98) (param f64 i32) (result f64) │ │ local.get 0 │ │ local.get 1 │ │ call $scalbn) │ │ (func $emscripten_futex_wake (type 6) (param i32 i32) (result i32) │ │ i32.const 0) │ │ (func $__pthread_mutex_lock (type 10) (param i32) (result i32) │ │ i32.const 0) │ │ @@ -389129,18 +391318,18 @@ │ │ (func $pthread_cond_wait (type 6) (param i32 i32) (result i32) │ │ i32.const 0) │ │ (func $pthread_cond_broadcast (type 10) (param i32) (result i32) │ │ i32.const 0) │ │ (func $__lock (type 5) (param i32)) │ │ (func $__unlock (type 5) (param i32)) │ │ (func $localeconv (type 9) (result i32) │ │ - i32.const 49136) │ │ + i32.const 49504) │ │ (func $localtime (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 88120 │ │ + i32.const 88488 │ │ call $__localtime_r) │ │ (func $__math_divzero (type 46) (param i32) (result f64) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ @@ -389149,22 +391338,22 @@ │ │ local.get 0 │ │ select │ │ f64.store offset=8 │ │ local.get 1 │ │ f64.load offset=8 │ │ f64.const 0x0p+0 (;=0;) │ │ f64.div) │ │ - (func $__math_invalid (type 87) (param f64) (result f64) │ │ + (func $__math_invalid (type 91) (param f64) (result f64) │ │ local.get 0 │ │ local.get 0 │ │ f64.sub │ │ local.tee 0 │ │ local.get 0 │ │ f64.div) │ │ - (func $log (type 87) (param f64) (result f64) │ │ + (func $log (type 91) (param f64) (result f64) │ │ (local i64 f64 f64 f64 f64 f64 f64 i32 i64) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i64.const -4606619468846596096 │ │ i64.add │ │ @@ -389191,15 +391380,15 @@ │ │ f64.add │ │ local.get 2 │ │ f64.sub │ │ local.tee 2 │ │ local.get 2 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51440 │ │ + f64.load offset=51808 │ │ local.tee 3 │ │ f64.mul │ │ local.tee 4 │ │ f64.add │ │ local.tee 5 │ │ local.get 0 │ │ local.get 0 │ │ @@ -389208,54 +391397,54 @@ │ │ local.tee 6 │ │ f64.mul │ │ local.tee 7 │ │ local.get 7 │ │ local.get 7 │ │ local.get 7 │ │ i32.const 0 │ │ - f64.load offset=51520 │ │ + f64.load offset=51888 │ │ f64.mul │ │ local.get 6 │ │ i32.const 0 │ │ - f64.load offset=51512 │ │ + f64.load offset=51880 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=51504 │ │ + f64.load offset=51872 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51496 │ │ + f64.load offset=51864 │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 6 │ │ i32.const 0 │ │ - f64.load offset=51488 │ │ + f64.load offset=51856 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=51480 │ │ + f64.load offset=51848 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51472 │ │ + f64.load offset=51840 │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 6 │ │ i32.const 0 │ │ - f64.load offset=51464 │ │ + f64.load offset=51832 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=51456 │ │ + f64.load offset=51824 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51448 │ │ + f64.load offset=51816 │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ local.get 2 │ │ f64.sub │ │ @@ -389333,47 +391522,47 @@ │ │ local.tee 9 │ │ i64.const 52 │ │ i64.shr_s │ │ i32.wrap_i64 │ │ f64.convert_i32_s │ │ local.tee 6 │ │ i32.const 0 │ │ - f64.load offset=51384 │ │ + f64.load offset=51752 │ │ f64.mul │ │ local.get 9 │ │ i64.const 45 │ │ i64.shr_u │ │ i32.wrap_i64 │ │ i32.const 127 │ │ i32.and │ │ i32.const 4 │ │ i32.shl │ │ local.tee 8 │ │ - i32.const 51536 │ │ + i32.const 51904 │ │ i32.add │ │ f64.load │ │ f64.add │ │ local.tee 7 │ │ local.get 8 │ │ - i32.const 51528 │ │ + i32.const 51896 │ │ i32.add │ │ f64.load │ │ local.get 1 │ │ local.get 9 │ │ i64.const -4503599627370496 │ │ i64.and │ │ i64.sub │ │ f64.reinterpret_i64 │ │ local.get 8 │ │ - i32.const 53576 │ │ + i32.const 53944 │ │ i32.add │ │ f64.load │ │ f64.sub │ │ local.get 8 │ │ - i32.const 53584 │ │ + i32.const 53952 │ │ i32.add │ │ f64.load │ │ f64.sub │ │ f64.mul │ │ local.tee 0 │ │ f64.add │ │ local.tee 3 │ │ @@ -389382,50 +391571,50 @@ │ │ local.get 0 │ │ f64.mul │ │ local.tee 2 │ │ f64.mul │ │ local.get 2 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=51432 │ │ + f64.load offset=51800 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51424 │ │ + f64.load offset=51792 │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=51416 │ │ + f64.load offset=51784 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=51408 │ │ + f64.load offset=51776 │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 2 │ │ i32.const 0 │ │ - f64.load offset=51400 │ │ + f64.load offset=51768 │ │ f64.mul │ │ local.get 6 │ │ i32.const 0 │ │ - f64.load offset=51392 │ │ + f64.load offset=51760 │ │ f64.mul │ │ local.get 0 │ │ local.get 7 │ │ local.get 3 │ │ f64.sub │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.add │ │ local.set 0 │ │ end │ │ local.get 0) │ │ - (func $log10 (type 87) (param f64) (result f64) │ │ + (func $log10 (type 91) (param f64) (result f64) │ │ (local i64 i32 i32 i32 f64 f64 f64 f64 f64 f64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 0 │ │ @@ -389616,15 +391805,15 @@ │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.add │ │ local.set 0 │ │ end │ │ local.get 0) │ │ - (func $log2 (type 87) (param f64) (result f64) │ │ + (func $log2 (type 91) (param f64) (result f64) │ │ (local i64 f64 f64 f64 f64 f64 f64 f64 i32 i64) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 1 │ │ i64.const -4606800540372828160 │ │ i64.add │ │ @@ -389636,15 +391825,15 @@ │ │ i64.const 4607182418800017408 │ │ i64.ne │ │ br_if 0 (;@2;) │ │ f64.const 0x0p+0 (;=0;) │ │ return │ │ end │ │ i32.const 0 │ │ - f64.load offset=49192 │ │ + f64.load offset=49560 │ │ local.tee 2 │ │ local.get 0 │ │ f64.const -0x1p+0 (;=-1;) │ │ f64.add │ │ local.tee 0 │ │ i64.reinterpret_f64 │ │ i64.const -4294967296 │ │ @@ -389655,73 +391844,73 @@ │ │ local.tee 4 │ │ local.get 0 │ │ local.get 0 │ │ f64.mul │ │ local.tee 5 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49264 │ │ + f64.load offset=49632 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49256 │ │ + f64.load offset=49624 │ │ f64.add │ │ f64.mul │ │ local.tee 6 │ │ f64.add │ │ local.tee 7 │ │ local.get 5 │ │ local.get 5 │ │ f64.mul │ │ local.tee 8 │ │ local.get 8 │ │ local.get 5 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49328 │ │ + f64.load offset=49696 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49320 │ │ + f64.load offset=49688 │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49312 │ │ + f64.load offset=49680 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49304 │ │ + f64.load offset=49672 │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 5 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49296 │ │ + f64.load offset=49664 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49288 │ │ + f64.load offset=49656 │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49280 │ │ + f64.load offset=49648 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49272 │ │ + f64.load offset=49640 │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ local.get 3 │ │ f64.sub │ │ local.get 2 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49200 │ │ + f64.load offset=49568 │ │ f64.mul │ │ f64.add │ │ local.get 6 │ │ local.get 4 │ │ local.get 7 │ │ f64.sub │ │ f64.add │ │ @@ -389790,44 +391979,44 @@ │ │ i64.shr_u │ │ i32.wrap_i64 │ │ i32.const 63 │ │ i32.and │ │ i32.const 4 │ │ i32.shl │ │ local.tee 9 │ │ - i32.const 49344 │ │ + i32.const 49712 │ │ i32.add │ │ f64.load │ │ local.get 10 │ │ i64.const 52 │ │ i64.shr_s │ │ i32.wrap_i64 │ │ f64.convert_i32_s │ │ f64.add │ │ local.tee 2 │ │ i32.const 0 │ │ - f64.load offset=49192 │ │ + f64.load offset=49560 │ │ local.tee 3 │ │ local.get 9 │ │ - i32.const 49336 │ │ + i32.const 49704 │ │ i32.add │ │ f64.load │ │ local.get 1 │ │ local.get 10 │ │ i64.const -4503599627370496 │ │ i64.and │ │ i64.sub │ │ f64.reinterpret_i64 │ │ local.get 9 │ │ - i32.const 50360 │ │ + i32.const 50728 │ │ i32.add │ │ f64.load │ │ f64.sub │ │ local.get 9 │ │ - i32.const 50368 │ │ + i32.const 50736 │ │ i32.add │ │ f64.load │ │ f64.sub │ │ f64.mul │ │ local.tee 0 │ │ i64.reinterpret_f64 │ │ i64.const -4294967296 │ │ @@ -389843,46 +392032,46 @@ │ │ f64.mul │ │ local.tee 5 │ │ local.get 5 │ │ local.get 5 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49248 │ │ + f64.load offset=49616 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49240 │ │ + f64.load offset=49608 │ │ f64.add │ │ f64.mul │ │ local.get 5 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49232 │ │ + f64.load offset=49600 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49224 │ │ + f64.load offset=49592 │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=49216 │ │ + f64.load offset=49584 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49208 │ │ + f64.load offset=49576 │ │ f64.add │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ local.get 4 │ │ f64.sub │ │ local.get 3 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=49200 │ │ + f64.load offset=49568 │ │ local.get 0 │ │ f64.mul │ │ f64.add │ │ local.get 6 │ │ local.get 2 │ │ local.get 7 │ │ f64.sub │ │ @@ -390125,19 +392314,19 @@ │ │ i32.const 0) │ │ (func $mkdir (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $__syscall_mkdir │ │ call $__syscall_ret) │ │ (func $__ofl_lock (type 9) (result i32) │ │ - i32.const 88164 │ │ + i32.const 88532 │ │ call $__lock │ │ - i32.const 88168) │ │ + i32.const 88536) │ │ (func $__ofl_unlock (type 11) │ │ - i32.const 88164 │ │ + i32.const 88532 │ │ call $__unlock) │ │ (func $__ofl_add (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ local.get 0 │ │ call $__ofl_lock │ │ local.tee 1 │ │ i32.load │ │ @@ -390200,15 +392389,15 @@ │ │ call $__syscall_ret │ │ local.set 1 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 1) │ │ - (func $pow (type 89) (param f64 f64) (result f64) │ │ + (func $pow (type 93) (param f64 f64) (result f64) │ │ (local i32 i64 i32 i32 i32 i64 i32 i32 i64 f64 f64 f64 f64 f64 f64 f64 f64 f64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ local.get 1 │ │ @@ -390466,41 +392655,41 @@ │ │ i64.shr_u │ │ i32.wrap_i64 │ │ i32.const 127 │ │ i32.and │ │ i32.const 5 │ │ i32.shl │ │ local.tee 6 │ │ - i32.const 55696 │ │ + i32.const 56064 │ │ i32.add │ │ f64.load │ │ local.tee 13 │ │ f64.mul │ │ f64.const -0x1p+0 (;=-1;) │ │ f64.add │ │ local.tee 0 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=55640 │ │ + f64.load offset=56008 │ │ local.tee 14 │ │ f64.mul │ │ local.tee 15 │ │ f64.mul │ │ local.tee 16 │ │ local.get 3 │ │ i64.const 52 │ │ i64.shr_s │ │ i32.wrap_i64 │ │ f64.convert_i32_s │ │ local.tee 17 │ │ i32.const 0 │ │ - f64.load offset=55624 │ │ + f64.load offset=55992 │ │ f64.mul │ │ local.get 6 │ │ - i32.const 55712 │ │ + i32.const 56080 │ │ i32.add │ │ f64.load │ │ f64.add │ │ local.tee 18 │ │ local.get 0 │ │ local.get 13 │ │ local.get 7 │ │ @@ -390526,18 +392715,18 @@ │ │ local.get 0 │ │ f64.mul │ │ local.tee 14 │ │ f64.add │ │ f64.mul │ │ local.get 17 │ │ i32.const 0 │ │ - f64.load offset=55632 │ │ + f64.load offset=56000 │ │ f64.mul │ │ local.get 6 │ │ - i32.const 55720 │ │ + i32.const 56088 │ │ i32.add │ │ f64.load │ │ f64.add │ │ local.get 0 │ │ local.get 18 │ │ local.get 11 │ │ f64.sub │ │ @@ -390551,35 +392740,35 @@ │ │ f64.mul │ │ local.tee 11 │ │ f64.mul │ │ local.get 11 │ │ local.get 11 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=55688 │ │ + f64.load offset=56056 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=55680 │ │ + f64.load offset=56048 │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=55672 │ │ + f64.load offset=56040 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=55664 │ │ + f64.load offset=56032 │ │ f64.add │ │ f64.add │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=55656 │ │ + f64.load offset=56024 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=55648 │ │ + f64.load offset=56016 │ │ f64.add │ │ f64.add │ │ f64.mul │ │ f64.add │ │ local.tee 15 │ │ f64.add │ │ local.tee 11 │ │ @@ -390657,77 +392846,77 @@ │ │ f64.sub │ │ f64.add │ │ local.get 1 │ │ f64.mul │ │ f64.add │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=46976 │ │ + f64.load offset=47344 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=46984 │ │ + f64.load offset=47352 │ │ local.tee 1 │ │ f64.add │ │ local.tee 11 │ │ local.get 1 │ │ f64.sub │ │ local.tee 1 │ │ i32.const 0 │ │ - f64.load offset=47000 │ │ + f64.load offset=47368 │ │ f64.mul │ │ local.get 1 │ │ i32.const 0 │ │ - f64.load offset=46992 │ │ + f64.load offset=47360 │ │ f64.mul │ │ local.get 0 │ │ f64.add │ │ f64.add │ │ f64.add │ │ local.tee 0 │ │ local.get 0 │ │ f64.mul │ │ local.tee 1 │ │ local.get 1 │ │ f64.mul │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=47032 │ │ + f64.load offset=47400 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=47024 │ │ + f64.load offset=47392 │ │ f64.add │ │ f64.mul │ │ local.get 1 │ │ local.get 0 │ │ i32.const 0 │ │ - f64.load offset=47016 │ │ + f64.load offset=47384 │ │ f64.mul │ │ i32.const 0 │ │ - f64.load offset=47008 │ │ + f64.load offset=47376 │ │ f64.add │ │ f64.mul │ │ local.get 11 │ │ i64.reinterpret_f64 │ │ local.tee 7 │ │ i32.wrap_i64 │ │ i32.const 4 │ │ i32.shl │ │ i32.const 2032 │ │ i32.and │ │ local.tee 8 │ │ - i32.const 47088 │ │ + i32.const 47456 │ │ i32.add │ │ f64.load │ │ local.get 0 │ │ f64.add │ │ f64.add │ │ f64.add │ │ local.set 0 │ │ local.get 8 │ │ - i32.const 47096 │ │ + i32.const 47464 │ │ i32.add │ │ i64.load │ │ local.get 7 │ │ local.get 9 │ │ i64.extend_i32_u │ │ i64.add │ │ i64.const 45 │ │ @@ -390801,15 +392990,15 @@ │ │ local.get 0 │ │ i64.and │ │ i64.eqz │ │ select │ │ local.set 1 │ │ end │ │ local.get 1) │ │ - (func $specialcase.1 (type 93) (param f64 i64 i64) (result f64) │ │ + (func $specialcase.1 (type 97) (param f64 i64 i64) (result f64) │ │ (local i32 f64 f64 f64 f64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -390912,15 +393101,15 @@ │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=12 │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ local.get 0 │ │ local.get 1 │ │ call $vfiprintf │ │ local.set 1 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -390932,15 +393121,15 @@ │ │ local.set 2 │ │ loop ;; label = @1 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ local.tee 3 │ │ local.get 2 │ │ - i32.const 17182 │ │ + i32.const 17485 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 2 │ │ i32.const 14 │ │ i32.ne │ │ local.set 4 │ │ @@ -391016,31 +393205,31 @@ │ │ i32.const 0 │ │ i32.store8 offset=15) │ │ (func $__syscall_getpid (type 9) (result i32) │ │ i32.const 42) │ │ (func $getpid (type 9) (result i32) │ │ call $__syscall_getpid) │ │ (func $__get_tp (type 9) (result i32) │ │ - i32.const 88172) │ │ + i32.const 88540) │ │ (func $init_pthread_self (type 11) │ │ i32.const 0 │ │ - i32.const 88096 │ │ - i32.store offset=88260 │ │ + i32.const 88464 │ │ + i32.store offset=88628 │ │ i32.const 0 │ │ call $getpid │ │ - i32.store offset=88188) │ │ + i32.store offset=88556) │ │ (func $putchar (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $do_putc.1) │ │ (func $do_putc.1 (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=75868 │ │ + i32.load offset=76236 │ │ local.tee 1 │ │ i32.const 0 │ │ i32.lt_s │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ @@ -391054,80 +393243,80 @@ │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 255 │ │ i32.and │ │ local.tee 1 │ │ i32.const 0 │ │ - i32.load offset=75872 │ │ + i32.load offset=76240 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75812 │ │ + i32.load offset=76180 │ │ local.tee 2 │ │ i32.const 0 │ │ - i32.load offset=75808 │ │ + i32.load offset=76176 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ - i32.store offset=75812 │ │ + i32.store offset=76180 │ │ local.get 2 │ │ local.get 0 │ │ i32.store8 │ │ local.get 1 │ │ return │ │ end │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ local.get 1 │ │ call $__overflow │ │ return │ │ end │ │ local.get 0 │ │ call $locking_putc.1) │ │ (func $locking_putc.1 (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ block ;; label = @1 │ │ call $a_cas.2 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ call $__lockfile │ │ drop │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 255 │ │ i32.and │ │ local.tee 1 │ │ i32.const 0 │ │ - i32.load offset=75872 │ │ + i32.load offset=76240 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75812 │ │ + i32.load offset=76180 │ │ local.tee 2 │ │ i32.const 0 │ │ - i32.load offset=75808 │ │ + i32.load offset=76176 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ - i32.store offset=75812 │ │ + i32.store offset=76180 │ │ local.get 2 │ │ local.get 0 │ │ i32.store8 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ local.get 1 │ │ call $__overflow │ │ local.set 1 │ │ end │ │ block ;; label = @1 │ │ call $a_swap.2 │ │ i32.const 1073741824 │ │ @@ -391137,32 +393326,32 @@ │ │ call $__wake.2 │ │ end │ │ local.get 1) │ │ (func $a_cas.2 (type 9) (result i32) │ │ (local i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=75868 │ │ + i32.load offset=76236 │ │ local.tee 0 │ │ i32.const 1073741823 │ │ local.get 0 │ │ select │ │ - i32.store offset=75868 │ │ + i32.store offset=76236 │ │ local.get 0) │ │ (func $a_swap.2 (type 9) (result i32) │ │ (local i32) │ │ i32.const 0 │ │ - i32.load offset=75868 │ │ + i32.load offset=76236 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=75868 │ │ + i32.store offset=76236 │ │ local.get 0) │ │ (func $__wake.2 (type 11) │ │ - i32.const 75868 │ │ + i32.const 76236 │ │ i32.const 1 │ │ call $emscripten_futex_wake │ │ drop) │ │ (func $fputs (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ call $strlen │ │ @@ -391179,112 +393368,112 @@ │ │ select) │ │ (func $puts (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ local.set 1 │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=75868 │ │ + i32.load offset=76236 │ │ i32.const 0 │ │ i32.lt_s │ │ br_if 0 (;@1;) │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ call $__lockfile │ │ local.set 1 │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ call $fputs │ │ i32.const 0 │ │ i32.ge_s │ │ br_if 0 (;@2;) │ │ i32.const -1 │ │ local.set 0 │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=75872 │ │ + i32.load offset=76240 │ │ i32.const 10 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75812 │ │ + i32.load offset=76180 │ │ local.tee 2 │ │ i32.const 0 │ │ - i32.load offset=75808 │ │ + i32.load offset=76176 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.set 0 │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ - i32.store offset=75812 │ │ + i32.store offset=76180 │ │ local.get 2 │ │ i32.const 10 │ │ i32.store8 │ │ br 1 (;@1;) │ │ end │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ i32.const 10 │ │ call $__overflow │ │ i32.const 31 │ │ i32.shr_s │ │ local.set 0 │ │ end │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ call $__unlockfile │ │ end │ │ local.get 0) │ │ (func $srand (type 5) (param i32) │ │ i32.const 0 │ │ local.get 0 │ │ i32.const -1 │ │ i32.add │ │ i64.extend_i32_u │ │ - i64.store offset=88288) │ │ + i64.store offset=88656) │ │ (func $rand (type 9) (result i32) │ │ (local i64) │ │ i32.const 0 │ │ i32.const 0 │ │ - i64.load offset=88288 │ │ + i64.load offset=88656 │ │ i64.const 6364136223846793005 │ │ i64.mul │ │ i64.const 1 │ │ i64.add │ │ local.tee 0 │ │ - i64.store offset=88288 │ │ + i64.store offset=88656 │ │ local.get 0 │ │ i64.const 33 │ │ i64.shr_u │ │ i32.wrap_i64) │ │ (func $srandom (type 5) (param i32) │ │ - i32.const 88296 │ │ + i32.const 88664 │ │ call $__lock │ │ local.get 0 │ │ call $__srandom │ │ - i32.const 88296 │ │ + i32.const 88664 │ │ call $__unlock) │ │ (func $__srandom (type 5) (param i32) │ │ (local i32 i32 i32 i64) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=75348 │ │ + i32.load offset=75716 │ │ local.tee 1 │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=75352 │ │ + i32.load offset=75720 │ │ local.get 0 │ │ i32.store │ │ return │ │ end │ │ i32.const 0 │ │ i32.const 3 │ │ i32.const 3 │ │ @@ -391293,33 +393482,33 @@ │ │ i32.const 7 │ │ i32.eq │ │ select │ │ local.get 1 │ │ i32.const 31 │ │ i32.eq │ │ select │ │ - i32.store offset=75356 │ │ + i32.store offset=75724 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=88300 │ │ + i32.store offset=88668 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 0 │ │ i32.gt_s │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ - i32.load offset=75352 │ │ + i32.load offset=75720 │ │ local.set 2 │ │ br 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=75352 │ │ + i32.load offset=75720 │ │ local.set 2 │ │ local.get 0 │ │ i64.extend_i32_u │ │ local.set 4 │ │ loop ;; label = @2 │ │ local.get 2 │ │ local.get 3 │ │ @@ -391343,54 +393532,54 @@ │ │ end │ │ local.get 2 │ │ local.get 2 │ │ i32.load │ │ i32.const 1 │ │ i32.or │ │ i32.store) │ │ - (func $lcg64 (type 82) (param i64) (result i64) │ │ + (func $lcg64 (type 86) (param i64) (result i64) │ │ local.get 0 │ │ i64.const 6364136223846793005 │ │ i64.mul │ │ i64.const 1 │ │ i64.add) │ │ (func $random (type 9) (result i32) │ │ (local i32 i32 i32 i32) │ │ - i32.const 88296 │ │ + i32.const 88664 │ │ call $__lock │ │ i32.const 0 │ │ - i32.load offset=75352 │ │ + i32.load offset=75720 │ │ local.set 0 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=75348 │ │ + i32.load offset=75716 │ │ local.tee 1 │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ call $lcg31 │ │ local.tee 1 │ │ i32.store │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=75356 │ │ + i32.load offset=75724 │ │ local.tee 2 │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ local.tee 3 │ │ local.get 3 │ │ i32.load │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=88300 │ │ + i32.load offset=88668 │ │ local.tee 3 │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ i32.load │ │ i32.add │ │ local.tee 0 │ │ @@ -391401,32 +393590,32 @@ │ │ i32.const 1 │ │ i32.add │ │ local.tee 3 │ │ local.get 3 │ │ local.get 1 │ │ i32.eq │ │ select │ │ - i32.store offset=88300 │ │ + i32.store offset=88668 │ │ i32.const 0 │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ local.tee 2 │ │ local.get 2 │ │ local.get 1 │ │ i32.eq │ │ select │ │ - i32.store offset=75356 │ │ + i32.store offset=75724 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shr_u │ │ local.set 1 │ │ end │ │ - i32.const 88296 │ │ + i32.const 88664 │ │ call $__unlock │ │ local.get 1) │ │ (func $lcg31 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 1103515245 │ │ i32.mul │ │ i32.const 12345 │ │ @@ -391484,15 +393673,15 @@ │ │ local.get 1 │ │ call $__syscall_ret) │ │ (func $rename (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $__syscall_rename │ │ call $__syscall_ret) │ │ - (func $scalbn (type 94) (param f64 i32) (result f64) │ │ + (func $scalbn (type 98) (param f64 i32) (result f64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1024 │ │ i32.lt_s │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ @@ -391793,48 +393982,48 @@ │ │ (func $__get_locale (type 6) (param i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.load8_u │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ - i32.const 16230 │ │ + i32.const 16533 │ │ call $getenv │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ i32.load8_u │ │ br_if 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 12 │ │ i32.mul │ │ - i32.const 59904 │ │ + i32.const 60272 │ │ i32.add │ │ call $getenv │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ i32.load8_u │ │ br_if 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ - i32.const 16282 │ │ + i32.const 16585 │ │ call $getenv │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ i32.load8_u │ │ br_if 1 (;@1;) │ │ end │ │ - i32.const 16783 │ │ + i32.const 17086 │ │ local.set 1 │ │ end │ │ i32.const 0 │ │ local.set 2 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ loop ;; label = @3 │ │ @@ -391860,15 +394049,15 @@ │ │ br_if 0 (;@3;) │ │ br 2 (;@1;) │ │ end │ │ end │ │ local.get 2 │ │ local.set 3 │ │ end │ │ - i32.const 16783 │ │ + i32.const 17086 │ │ local.set 4 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 1 │ │ @@ -391891,42 +394080,42 @@ │ │ end │ │ local.get 4 │ │ i32.load8_u offset=1 │ │ i32.eqz │ │ br_if 1 (;@3;) │ │ end │ │ local.get 4 │ │ - i32.const 16783 │ │ + i32.const 17086 │ │ call $strcmp │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 4 │ │ - i32.const 15764 │ │ + i32.const 16067 │ │ call $strcmp │ │ br_if 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ local.get 0 │ │ br_if 0 (;@3;) │ │ - i32.const 59812 │ │ + i32.const 60180 │ │ local.set 2 │ │ local.get 4 │ │ i32.load8_u offset=1 │ │ i32.const 46 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ end │ │ i32.const 0 │ │ return │ │ end │ │ i32.const 0 │ │ local.set 1 │ │ block ;; label = @2 │ │ i32.const 0 │ │ - i32.load offset=88308 │ │ + i32.load offset=88676 │ │ local.tee 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ loop ;; label = @3 │ │ local.get 4 │ │ local.get 2 │ │ i32.const 8 │ │ @@ -391944,15 +394133,15 @@ │ │ i32.const 36 │ │ call $dlmalloc │ │ local.tee 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=59812 align=4 │ │ + i64.load offset=60180 align=4 │ │ i64.store align=4 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ local.tee 1 │ │ local.get 4 │ │ local.get 3 │ │ @@ -391961,24 +394150,24 @@ │ │ local.get 1 │ │ local.get 3 │ │ i32.add │ │ i32.const 0 │ │ i32.store8 │ │ local.get 2 │ │ i32.const 0 │ │ - i32.load offset=88308 │ │ + i32.load offset=88676 │ │ i32.store offset=32 │ │ i32.const 0 │ │ local.get 2 │ │ - i32.store offset=88308 │ │ + i32.store offset=88676 │ │ local.get 2 │ │ local.set 1 │ │ end │ │ local.get 1 │ │ - i32.const 59812 │ │ + i32.const 60180 │ │ local.get 0 │ │ local.get 1 │ │ i32.or │ │ select │ │ local.set 2 │ │ end │ │ local.get 2) │ │ @@ -391992,38 +394181,38 @@ │ │ i32.const 0 │ │ local.set 3 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 6 │ │ i32.gt_u │ │ br_if 0 (;@1;) │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__lock │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 6 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=60000 │ │ + i64.load offset=60368 │ │ i64.store │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=59992 │ │ + i64.load offset=60360 │ │ i64.store offset=8 │ │ local.get 2 │ │ i32.const 0 │ │ - i64.load offset=59984 │ │ + i64.load offset=60352 │ │ i64.store │ │ i32.const 0 │ │ local.set 0 │ │ loop ;; label = @4 │ │ block ;; label = @5 │ │ local.get 1 │ │ i32.const 59 │ │ @@ -392058,15 +394247,15 @@ │ │ local.get 0 │ │ local.get 2 │ │ call $__get_locale │ │ local.tee 3 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__unlock │ │ i32.const 0 │ │ local.set 3 │ │ br 4 (;@1;) │ │ end │ │ local.get 2 │ │ i32.const 24 │ │ @@ -392084,50 +394273,50 @@ │ │ i32.const 6 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ end │ │ i32.const 0 │ │ local.get 2 │ │ i64.load offset=24 │ │ - i64.store offset=88096 align=4 │ │ + i64.store offset=88464 align=4 │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 40 │ │ i32.add │ │ i64.load │ │ - i64.store offset=88112 align=4 │ │ + i64.store offset=88480 align=4 │ │ i32.const 0 │ │ local.get 2 │ │ i32.const 32 │ │ i32.add │ │ i64.load │ │ - i64.store offset=88104 align=4 │ │ + i64.store offset=88472 align=4 │ │ end │ │ - i32.const 88320 │ │ + i32.const 88688 │ │ local.set 1 │ │ i32.const 0 │ │ local.set 5 │ │ i32.const 0 │ │ local.set 0 │ │ loop ;; label = @3 │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 88096 │ │ + i32.const 88464 │ │ i32.add │ │ i32.load │ │ local.tee 4 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 16411 │ │ + i32.const 16714 │ │ local.get 4 │ │ select │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=88096 │ │ + i32.load offset=88464 │ │ local.set 6 │ │ local.get 1 │ │ local.get 3 │ │ local.get 3 │ │ call $strlen │ │ local.tee 7 │ │ call $__memcpy │ │ @@ -392155,18 +394344,18 @@ │ │ i32.const 6 │ │ i32.ne │ │ br_if 0 (;@3;) │ │ end │ │ local.get 7 │ │ i32.const 0 │ │ i32.store8 │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__unlock │ │ local.get 3 │ │ - i32.const 88320 │ │ + i32.const 88688 │ │ local.get 5 │ │ i32.const 6 │ │ i32.eq │ │ select │ │ local.set 3 │ │ br 1 (;@1;) │ │ end │ │ @@ -392179,41 +394368,41 @@ │ │ local.get 0 │ │ local.get 1 │ │ call $__get_locale │ │ local.tee 1 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__unlock │ │ br 3 (;@1;) │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 88096 │ │ + i32.const 88464 │ │ i32.add │ │ local.get 1 │ │ i32.store │ │ br 1 (;@2;) │ │ end │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 88096 │ │ + i32.const 88464 │ │ i32.add │ │ i32.load │ │ local.set 1 │ │ end │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__unlock │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 16411 │ │ + i32.const 16714 │ │ local.get 1 │ │ select │ │ local.set 3 │ │ end │ │ local.get 2 │ │ i32.const 48 │ │ i32.add │ │ @@ -392279,15 +394468,15 @@ │ │ i32.const 64 │ │ i32.or │ │ i32.store │ │ i32.const 0 │ │ local.set 4 │ │ end │ │ local.get 4) │ │ - (func $sin (type 87) (param f64) (result f64) │ │ + (func $sin (type 91) (param f64) (result f64) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -392393,15 +394582,15 @@ │ │ call $vsnprintf │ │ local.set 3 │ │ local.get 4 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 3) │ │ - (func $sqrt (type 87) (param f64) (result f64) │ │ + (func $sqrt (type 91) (param f64) (result f64) │ │ local.get 0 │ │ f64.sqrt) │ │ (func $stat (type 6) (param i32 i32) (result i32) │ │ i32.const -100 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 0 │ │ @@ -392737,18 +394926,18 @@ │ │ local.get 0 │ │ local.get 0 │ │ i32.const 149 │ │ i32.gt_u │ │ select │ │ i32.const 1 │ │ i32.shl │ │ - i32.const 61856 │ │ + i32.const 62224 │ │ i32.add │ │ i32.load16_u │ │ - i32.const 60020 │ │ + i32.const 60388 │ │ i32.add │ │ local.get 1 │ │ i32.load offset=20 │ │ call $__lctrans) │ │ (func $strerror (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $__get_tp │ │ @@ -394342,15 +396531,15 @@ │ │ local.get 1 │ │ i32.const -1 │ │ i32.add │ │ local.get 2 │ │ i32.store8 │ │ end │ │ local.get 2) │ │ - (func $copysignl (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $copysignl (type 99) (param i32 i64 i64 i64 i64) │ │ local.get 0 │ │ local.get 1 │ │ i64.store │ │ local.get 0 │ │ local.get 4 │ │ i64.const 48 │ │ i64.shr_u │ │ @@ -394368,15 +396557,15 @@ │ │ i64.const 48 │ │ i64.shl │ │ local.get 2 │ │ i64.const 281474976710655 │ │ i64.and │ │ i64.or │ │ i64.store offset=8) │ │ - (func $scalbnl (type 96) (param i32 i64 i64 i32) │ │ + (func $scalbnl (type 100) (param i32 i64 i64 i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 80 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -394525,15 +396714,15 @@ │ │ local.get 4 │ │ i64.load │ │ i64.store │ │ local.get 4 │ │ i32.const 80 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $__fpclassifyl (type 97) (param i64 i64) (result i32) │ │ + (func $__fpclassifyl (type 101) (param i64 i64) (result i32) │ │ (local i64 i32 i32) │ │ local.get 1 │ │ i64.const 281474976710655 │ │ i64.and │ │ local.set 2 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -394563,15 +396752,15 @@ │ │ local.get 2 │ │ local.get 0 │ │ i64.or │ │ i64.eqz │ │ local.set 4 │ │ end │ │ local.get 4) │ │ - (func $fmodl (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $fmodl (type 99) (param i32 i64 i64 i64 i64) │ │ (local i32 i32 i32 i32 i64 i64 i64) │ │ global.get $__stack_pointer │ │ i32.const 128 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -394977,15 +397166,15 @@ │ │ local.get 0 │ │ local.get 2 │ │ i64.store offset=8 │ │ local.get 5 │ │ i32.const 128 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $fabsl (type 98) (param i32 i64 i64) │ │ + (func $fabsl (type 102) (param i32 i64 i64) │ │ local.get 0 │ │ local.get 2 │ │ i64.const 9223372036854775807 │ │ i64.and │ │ i64.store offset=8 │ │ local.get 0 │ │ local.get 1 │ │ @@ -395009,20 +397198,20 @@ │ │ i32.const 4 │ │ i32.add │ │ local.set 6 │ │ local.get 2 │ │ i32.const 2 │ │ i32.shl │ │ local.tee 2 │ │ - i32.const 62220 │ │ + i32.const 62588 │ │ i32.add │ │ i32.load │ │ local.set 7 │ │ local.get 2 │ │ - i32.const 62208 │ │ + i32.const 62576 │ │ i32.add │ │ i32.load │ │ local.set 8 │ │ loop ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 1 │ │ @@ -395230,15 +397419,15 @@ │ │ i32.const 0 │ │ local.set 10 │ │ loop ;; label = @6 │ │ local.get 2 │ │ i32.const 32 │ │ i32.or │ │ local.get 10 │ │ - i32.const 6863 │ │ + i32.const 6912 │ │ i32.add │ │ i32.load8_s │ │ i32.ne │ │ br_if 1 (;@5;) │ │ block ;; label = @7 │ │ local.get 10 │ │ i32.const 1 │ │ @@ -397256,15 +399445,15 @@ │ │ i32.const 224 │ │ i32.add │ │ i32.const 8 │ │ local.get 8 │ │ i32.sub │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 62176 │ │ + i32.const 62544 │ │ i32.add │ │ i32.load │ │ call $__floatsitf │ │ local.get 7 │ │ i32.const 208 │ │ i32.add │ │ local.get 7 │ │ @@ -397348,15 +399537,15 @@ │ │ call $__multf3 │ │ local.get 7 │ │ i32.const 304 │ │ i32.add │ │ local.get 8 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 62136 │ │ + i32.const 62504 │ │ i32.add │ │ i32.load │ │ call $__floatsitf │ │ local.get 7 │ │ i32.const 288 │ │ i32.add │ │ local.get 7 │ │ @@ -397438,15 +399627,15 @@ │ │ end │ │ i32.const 1000000000 │ │ i32.const 8 │ │ local.get 6 │ │ i32.sub │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 62176 │ │ + i32.const 62544 │ │ i32.add │ │ i32.load │ │ local.tee 12 │ │ i32.div_s │ │ local.set 19 │ │ i32.const 0 │ │ local.set 14 │ │ @@ -397761,15 +399950,15 @@ │ │ i32.shl │ │ i32.add │ │ i32.load │ │ local.tee 15 │ │ local.get 1 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 62160 │ │ + i32.const 62528 │ │ i32.add │ │ i32.load │ │ local.tee 14 │ │ i32.lt_u │ │ br_if 1 (;@8;) │ │ local.get 15 │ │ local.get 14 │ │ @@ -398965,15 +401154,15 @@ │ │ local.get 0 │ │ local.get 4 │ │ i64.store │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $strtof_l (type 99) (param i32 i32 i32) (result f32) │ │ + (func $strtof_l (type 103) (param i32 i32 i32) (result f32) │ │ local.get 0 │ │ local.get 1 │ │ call $strtof) │ │ (func $strtod_l (type 31) (param i32 i32 i32) (result f64) │ │ local.get 0 │ │ local.get 1 │ │ call $strtod) │ │ @@ -399015,15 +401204,15 @@ │ │ local.get 0 │ │ i32.sub │ │ i32.store │ │ i32.const -1 │ │ local.set 0 │ │ end │ │ local.get 0) │ │ - (func $__tan (type 91) (param f64 f64 i32) (result f64) │ │ + (func $__tan (type 95) (param f64 f64 i32) (result f64) │ │ (local i64 i32 i32 i32 f64 f64 f64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i64.reinterpret_f64 │ │ local.tee 3 │ │ i64.const 32 │ │ @@ -399200,15 +401389,15 @@ │ │ f64.add │ │ f64.mul │ │ local.get 1 │ │ f64.add │ │ local.set 9 │ │ end │ │ local.get 9) │ │ - (func $tan (type 87) (param f64) (result f64) │ │ + (func $tan (type 91) (param f64) (result f64) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -399333,23 +401522,23 @@ │ │ i32.sub │ │ local.tee 0 │ │ global.set $__stack_pointer │ │ local.get 0 │ │ i32.const 32 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=62256 │ │ + i32.load offset=62624 │ │ i32.store │ │ local.get 0 │ │ i32.const 0 │ │ - i64.load offset=62248 │ │ + i64.load offset=62616 │ │ i64.store offset=24 │ │ local.get 0 │ │ i32.const 0 │ │ - i64.load offset=62240 │ │ + i64.load offset=62608 │ │ i64.store offset=16 │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ i32.const 13 │ │ i32.or │ │ local.set 1 │ │ @@ -399388,15 +401577,15 @@ │ │ end │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ call $__syscall_unlink │ │ drop │ │ local.get 3 │ │ - i32.const 17460 │ │ + i32.const 17763 │ │ call $__fdopen │ │ local.tee 2 │ │ br_if 1 (;@1;) │ │ local.get 3 │ │ call $__wasi_fd_close │ │ drop │ │ end │ │ @@ -399413,23 +401602,23 @@ │ │ global.get $__stack_pointer │ │ i32.const 128 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=62287 align=1 │ │ + i32.load offset=62655 align=1 │ │ i32.store offset=111 align=1 │ │ local.get 1 │ │ i32.const 0 │ │ - i64.load offset=62280 │ │ + i64.load offset=62648 │ │ i64.store offset=104 │ │ local.get 1 │ │ i32.const 0 │ │ - i64.load offset=62272 │ │ + i64.load offset=62640 │ │ i64.store offset=96 │ │ local.get 1 │ │ i32.const 96 │ │ i32.add │ │ i32.const 12 │ │ i32.or │ │ local.set 2 │ │ @@ -399467,15 +401656,15 @@ │ │ br_if 0 (;@3;) │ │ end │ │ i32.const 0 │ │ local.set 3 │ │ br 1 (;@1;) │ │ end │ │ local.get 0 │ │ - i32.const 90560 │ │ + i32.const 90928 │ │ local.get 0 │ │ select │ │ local.get 1 │ │ i32.const 96 │ │ i32.add │ │ call $strcpy │ │ local.set 3 │ │ @@ -400226,15 +402415,15 @@ │ │ local.get 18 │ │ local.set 1 │ │ local.get 14 │ │ local.get 15 │ │ i32.const 58 │ │ i32.mul │ │ i32.add │ │ - i32.const 62239 │ │ + i32.const 62607 │ │ i32.add │ │ i32.load8_u │ │ local.tee 14 │ │ i32.const -1 │ │ i32.add │ │ i32.const 8 │ │ i32.lt_u │ │ @@ -400600,15 +402789,15 @@ │ │ br 11 (;@8;) │ │ end │ │ i32.const 0 │ │ local.set 17 │ │ local.get 7 │ │ i32.load offset=64 │ │ local.tee 1 │ │ - i32.const 17953 │ │ + i32.const 18256 │ │ local.get 1 │ │ select │ │ local.set 12 │ │ local.get 12 │ │ local.get 12 │ │ i32.const 2147483647 │ │ local.get 20 │ │ @@ -401346,30 +403535,30 @@ │ │ return │ │ end │ │ local.get 0 │ │ local.get 2 │ │ local.get 3 │ │ call_indirect (type 1) │ │ end) │ │ - (func $fmt_x (type 100) (param i64 i32 i32) (result i32) │ │ + (func $fmt_x (type 104) (param i64 i32 i32) (result i32) │ │ (local i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.eqz │ │ br_if 0 (;@1;) │ │ loop ;; label = @2 │ │ local.get 1 │ │ i32.const -1 │ │ i32.add │ │ local.tee 1 │ │ local.get 0 │ │ i32.wrap_i64 │ │ i32.const 15 │ │ i32.and │ │ - i32.const 62768 │ │ + i32.const 63136 │ │ i32.add │ │ i32.load8_u │ │ local.get 2 │ │ i32.or │ │ i32.store8 │ │ local.get 0 │ │ i64.const 15 │ │ @@ -401627,23 +403816,23 @@ │ │ i32.and │ │ call $pad │ │ local.get 0 │ │ local.get 10 │ │ local.get 9 │ │ call $out │ │ local.get 0 │ │ - i32.const 6863 │ │ - i32.const 16059 │ │ + i32.const 6912 │ │ + i32.const 16362 │ │ local.get 5 │ │ i32.const 32 │ │ i32.and │ │ local.tee 12 │ │ select │ │ - i32.const 8895 │ │ - i32.const 16287 │ │ + i32.const 9029 │ │ + i32.const 16590 │ │ local.get 12 │ │ select │ │ local.get 1 │ │ local.get 1 │ │ f64.ne │ │ select │ │ i32.const 3 │ │ @@ -402708,15 +404897,15 @@ │ │ br_if 0 (;@7;) │ │ end │ │ block ;; label = @7 │ │ local.get 24 │ │ i32.eqz │ │ br_if 0 (;@7;) │ │ local.get 0 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ i32.const 1 │ │ call $out │ │ end │ │ local.get 19 │ │ local.get 12 │ │ i32.ge_u │ │ br_if 1 (;@5;) │ │ @@ -402864,15 +405053,15 @@ │ │ local.set 11 │ │ local.get 16 │ │ local.get 23 │ │ i32.or │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 0 │ │ - i32.const 17430 │ │ + i32.const 17733 │ │ i32.const 1 │ │ call $out │ │ end │ │ local.get 0 │ │ local.get 11 │ │ local.get 3 │ │ local.get 11 │ │ @@ -403081,15 +405270,15 @@ │ │ br 1 (;@3;) │ │ end │ │ i32.const -2147483648 │ │ local.set 12 │ │ end │ │ local.get 11 │ │ local.get 12 │ │ - i32.const 62768 │ │ + i32.const 63136 │ │ i32.add │ │ i32.load8_u │ │ local.get 19 │ │ i32.or │ │ i32.store8 │ │ local.get 1 │ │ local.get 12 │ │ @@ -403257,26 +405446,26 @@ │ │ i64.load │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ i64.load │ │ call $__trunctfdf2 │ │ f64.store) │ │ - (func $__DOUBLE_BITS.2 (type 88) (param f64) (result i64) │ │ + (func $__DOUBLE_BITS.2 (type 92) (param f64) (result i64) │ │ local.get 0 │ │ i64.reinterpret_f64) │ │ (func $vfiprintf (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 0 │ │ i32.const 0 │ │ call $__vfprintf_internal) │ │ (func $vprintf (type 6) (param i32 i32) (result i32) │ │ - i32.const 75792 │ │ + i32.const 76160 │ │ local.get 0 │ │ local.get 1 │ │ call $vfprintf) │ │ (func $vsnprintf (type 14) (param i32 i32 i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 160 │ │ @@ -403657,15 +405846,15 @@ │ │ block ;; label = @12 │ │ local.get 0 │ │ i32.const 244 │ │ i32.gt_u │ │ br_if 0 (;@12;) │ │ block ;; label = @13 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 2 │ │ i32.const 16 │ │ local.get 0 │ │ i32.const 11 │ │ i32.add │ │ i32.const -8 │ │ i32.and │ │ @@ -403690,39 +405879,39 @@ │ │ i32.and │ │ local.get 4 │ │ i32.add │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ local.tee 6 │ │ - i32.const 90628 │ │ + i32.const 90996 │ │ i32.add │ │ i32.load │ │ local.tee 4 │ │ i32.const 8 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @14 │ │ block ;; label = @15 │ │ local.get 4 │ │ i32.load offset=8 │ │ local.tee 3 │ │ local.get 6 │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ local.get 2 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 1 (;@14;) │ │ end │ │ local.get 3 │ │ local.get 6 │ │ i32.store offset=12 │ │ local.get 6 │ │ local.get 3 │ │ @@ -403745,15 +405934,15 @@ │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ br 12 (;@1;) │ │ end │ │ local.get 3 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.tee 7 │ │ i32.le_u │ │ br_if 1 (;@11;) │ │ block ;; label = @13 │ │ local.get 0 │ │ i32.eqz │ │ br_if 0 (;@13;) │ │ @@ -403828,34 +406017,34 @@ │ │ local.get 4 │ │ i32.shr_u │ │ i32.add │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ local.tee 6 │ │ - i32.const 90628 │ │ + i32.const 90996 │ │ i32.add │ │ i32.load │ │ local.tee 4 │ │ i32.load offset=8 │ │ local.tee 0 │ │ local.get 6 │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ local.get 2 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ local.tee 2 │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 1 (;@14;) │ │ end │ │ local.get 0 │ │ local.get 6 │ │ i32.store offset=12 │ │ local.get 6 │ │ local.get 0 │ │ @@ -403895,34 +406084,34 @@ │ │ br_if 0 (;@14;) │ │ local.get 7 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 8 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.set 4 │ │ block ;; label = @15 │ │ block ;; label = @16 │ │ local.get 2 │ │ i32.const 1 │ │ local.get 8 │ │ i32.shl │ │ local.tee 8 │ │ i32.and │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ local.get 2 │ │ local.get 8 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 3 │ │ local.set 8 │ │ br 1 (;@15;) │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ @@ -403938,22 +406127,22 @@ │ │ i32.store offset=12 │ │ local.get 4 │ │ local.get 8 │ │ i32.store offset=8 │ │ end │ │ i32.const 0 │ │ local.get 6 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ local.get 5 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ br 12 (;@1;) │ │ end │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 9 │ │ i32.eqz │ │ br_if 1 (;@11;) │ │ local.get 9 │ │ i32.const 0 │ │ local.get 9 │ │ i32.sub │ │ @@ -404008,15 +406197,15 @@ │ │ i32.or │ │ local.get 0 │ │ local.get 4 │ │ i32.shr_u │ │ i32.add │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ i32.load │ │ local.tee 6 │ │ i32.load offset=4 │ │ i32.const -8 │ │ i32.and │ │ local.get 3 │ │ @@ -404070,15 +406259,15 @@ │ │ local.get 6 │ │ i32.load offset=12 │ │ local.tee 8 │ │ local.get 6 │ │ i32.eq │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 6 │ │ i32.load offset=8 │ │ local.tee 0 │ │ i32.gt_u │ │ drop │ │ local.get 0 │ │ local.get 8 │ │ @@ -404141,15 +406330,15 @@ │ │ i32.const 11 │ │ i32.add │ │ local.tee 0 │ │ i32.const -8 │ │ i32.and │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 7 │ │ i32.eqz │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ local.set 11 │ │ block ;; label = @12 │ │ local.get 3 │ │ @@ -404225,15 +406414,15 @@ │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ block ;; label = @14 │ │ block ;; label = @15 │ │ local.get 11 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ i32.load │ │ local.tee 5 │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ local.set 0 │ │ i32.const 0 │ │ @@ -404390,15 +406579,15 @@ │ │ i32.or │ │ local.get 0 │ │ local.get 5 │ │ i32.shr_u │ │ i32.add │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ i32.load │ │ local.set 0 │ │ end │ │ local.get 0 │ │ i32.eqz │ │ br_if 1 (;@12;) │ │ @@ -404442,15 +406631,15 @@ │ │ end │ │ end │ │ local.get 8 │ │ i32.eqz │ │ br_if 0 (;@11;) │ │ local.get 4 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.get 3 │ │ i32.sub │ │ i32.ge_u │ │ br_if 0 (;@11;) │ │ local.get 8 │ │ i32.load offset=24 │ │ local.set 11 │ │ @@ -404458,15 +406647,15 @@ │ │ local.get 8 │ │ i32.load offset=12 │ │ local.tee 6 │ │ local.get 8 │ │ i32.eq │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 8 │ │ i32.load offset=8 │ │ local.tee 0 │ │ i32.gt_u │ │ drop │ │ local.get 0 │ │ local.get 6 │ │ @@ -404517,40 +406706,40 @@ │ │ local.get 2 │ │ i32.const 0 │ │ i32.store │ │ br 8 (;@3;) │ │ end │ │ block ;; label = @11 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.tee 0 │ │ local.get 3 │ │ i32.lt_u │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.set 4 │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ local.get 0 │ │ local.get 3 │ │ i32.sub │ │ local.tee 5 │ │ i32.const 16 │ │ i32.lt_u │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ local.get 5 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ i32.const 0 │ │ local.get 4 │ │ local.get 3 │ │ i32.add │ │ local.tee 6 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ local.get 6 │ │ local.get 5 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 0 │ │ @@ -404562,18 +406751,18 @@ │ │ i32.const 3 │ │ i32.or │ │ i32.store offset=4 │ │ br 1 (;@12;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 4 │ │ local.get 0 │ │ i32.const 3 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 0 │ │ @@ -404589,33 +406778,33 @@ │ │ i32.const 8 │ │ i32.add │ │ local.set 0 │ │ br 10 (;@1;) │ │ end │ │ block ;; label = @11 │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.tee 6 │ │ local.get 3 │ │ i32.le_u │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 3 │ │ i32.sub │ │ local.tee 4 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.tee 0 │ │ local.get 3 │ │ i32.add │ │ local.tee 5 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ local.get 5 │ │ local.get 4 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 0 │ │ local.get 3 │ │ @@ -404627,43 +406816,43 @@ │ │ i32.add │ │ local.set 0 │ │ br 10 (;@1;) │ │ end │ │ block ;; label = @11 │ │ block ;; label = @12 │ │ i32.const 0 │ │ - i32.load offset=91052 │ │ + i32.load offset=91420 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ - i32.load offset=91060 │ │ + i32.load offset=91428 │ │ local.set 4 │ │ br 1 (;@11;) │ │ end │ │ i32.const 0 │ │ i64.const -1 │ │ - i64.store offset=91064 align=4 │ │ + i64.store offset=91432 align=4 │ │ i32.const 0 │ │ i64.const 17592186048512 │ │ - i64.store offset=91056 align=4 │ │ + i64.store offset=91424 align=4 │ │ i32.const 0 │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ i32.const -16 │ │ i32.and │ │ i32.const 1431655768 │ │ i32.xor │ │ - i32.store offset=91052 │ │ + i32.store offset=91420 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91072 │ │ + i32.store offset=91440 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91024 │ │ + i32.store offset=91392 │ │ i32.const 4096 │ │ local.set 4 │ │ end │ │ i32.const 0 │ │ local.set 0 │ │ local.get 4 │ │ local.get 3 │ │ @@ -404681,46 +406870,46 @@ │ │ local.get 3 │ │ i32.le_u │ │ br_if 9 (;@1;) │ │ i32.const 0 │ │ local.set 0 │ │ block ;; label = @11 │ │ i32.const 0 │ │ - i32.load offset=91020 │ │ + i32.load offset=91388 │ │ local.tee 4 │ │ i32.eqz │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ - i32.load offset=91012 │ │ + i32.load offset=91380 │ │ local.tee 5 │ │ local.get 8 │ │ i32.add │ │ local.tee 9 │ │ local.get 5 │ │ i32.le_u │ │ br_if 10 (;@1;) │ │ local.get 9 │ │ local.get 4 │ │ i32.gt_u │ │ br_if 10 (;@1;) │ │ end │ │ i32.const 0 │ │ - i32.load8_u offset=91024 │ │ + i32.load8_u offset=91392 │ │ i32.const 4 │ │ i32.and │ │ br_if 4 (;@6;) │ │ block ;; label = @11 │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.tee 4 │ │ i32.eqz │ │ br_if 0 (;@13;) │ │ - i32.const 91028 │ │ + i32.const 91396 │ │ local.set 0 │ │ loop ;; label = @14 │ │ block ;; label = @15 │ │ local.get 0 │ │ i32.load │ │ local.tee 5 │ │ local.get 4 │ │ @@ -404746,15 +406935,15 @@ │ │ i32.const -1 │ │ i32.eq │ │ br_if 5 (;@7;) │ │ local.get 8 │ │ local.set 2 │ │ block ;; label = @13 │ │ i32.const 0 │ │ - i32.load offset=91056 │ │ + i32.load offset=91424 │ │ local.tee 0 │ │ i32.const -1 │ │ i32.add │ │ local.tee 4 │ │ local.get 6 │ │ i32.and │ │ i32.eqz │ │ @@ -404778,20 +406967,20 @@ │ │ br_if 5 (;@7;) │ │ local.get 2 │ │ i32.const 2147483646 │ │ i32.gt_u │ │ br_if 5 (;@7;) │ │ block ;; label = @13 │ │ i32.const 0 │ │ - i32.load offset=91020 │ │ + i32.load offset=91388 │ │ local.tee 0 │ │ i32.eqz │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ - i32.load offset=91012 │ │ + i32.load offset=91380 │ │ local.tee 4 │ │ local.get 2 │ │ i32.add │ │ local.tee 5 │ │ local.get 4 │ │ i32.le_u │ │ br_if 6 (;@7;) │ │ @@ -404842,15 +407031,15 @@ │ │ i32.le_u │ │ br_if 0 (;@11;) │ │ block ;; label = @12 │ │ local.get 7 │ │ local.get 2 │ │ i32.sub │ │ i32.const 0 │ │ - i32.load offset=91060 │ │ + i32.load offset=91428 │ │ local.tee 4 │ │ i32.add │ │ i32.const 0 │ │ local.get 4 │ │ i32.sub │ │ i32.and │ │ local.tee 4 │ │ @@ -404901,18 +407090,18 @@ │ │ local.get 6 │ │ i32.const -1 │ │ i32.ne │ │ br_if 2 (;@5;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91024 │ │ + i32.load offset=91392 │ │ i32.const 4 │ │ i32.or │ │ - i32.store offset=91024 │ │ + i32.store offset=91392 │ │ end │ │ local.get 8 │ │ i32.const 2147483646 │ │ i32.gt_u │ │ br_if 1 (;@4;) │ │ local.get 8 │ │ call $sbrk │ │ @@ -404940,39 +407129,39 @@ │ │ i32.const 40 │ │ i32.add │ │ i32.le_u │ │ br_if 1 (;@4;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91012 │ │ + i32.load offset=91380 │ │ local.get 2 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=91012 │ │ + i32.store offset=91380 │ │ block ;; label = @5 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=91016 │ │ + i32.load offset=91384 │ │ i32.le_u │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=91016 │ │ + i32.store offset=91384 │ │ end │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.tee 4 │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ - i32.const 91028 │ │ + i32.const 91396 │ │ local.set 0 │ │ loop ;; label = @9 │ │ local.get 6 │ │ local.get 0 │ │ i32.load │ │ local.tee 5 │ │ local.get 0 │ │ @@ -404987,59 +407176,59 @@ │ │ br_if 0 (;@9;) │ │ br 3 (;@6;) │ │ end │ │ end │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.tee 0 │ │ i32.eqz │ │ br_if 0 (;@9;) │ │ local.get 6 │ │ local.get 0 │ │ i32.ge_u │ │ br_if 1 (;@8;) │ │ end │ │ i32.const 0 │ │ local.get 6 │ │ - i32.store offset=90596 │ │ + i32.store offset=90964 │ │ end │ │ i32.const 0 │ │ local.set 0 │ │ i32.const 0 │ │ local.get 2 │ │ - i32.store offset=91032 │ │ + i32.store offset=91400 │ │ i32.const 0 │ │ local.get 6 │ │ - i32.store offset=91028 │ │ + i32.store offset=91396 │ │ i32.const 0 │ │ i32.const -1 │ │ - i32.store offset=90612 │ │ + i32.store offset=90980 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91052 │ │ - i32.store offset=90616 │ │ + i32.load offset=91420 │ │ + i32.store offset=90984 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91040 │ │ + i32.store offset=91408 │ │ loop ;; label = @8 │ │ local.get 0 │ │ i32.const 3 │ │ i32.shl │ │ local.tee 4 │ │ - i32.const 90628 │ │ + i32.const 90996 │ │ i32.add │ │ local.get 4 │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 5 │ │ i32.store │ │ local.get 4 │ │ - i32.const 90632 │ │ + i32.const 91000 │ │ i32.add │ │ local.get 5 │ │ i32.store │ │ local.get 0 │ │ i32.const 1 │ │ i32.add │ │ local.tee 0 │ │ @@ -405063,35 +407252,35 @@ │ │ i32.add │ │ i32.const 7 │ │ i32.and │ │ select │ │ local.tee 4 │ │ i32.sub │ │ local.tee 5 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ i32.const 0 │ │ local.get 6 │ │ local.get 4 │ │ i32.add │ │ local.tee 4 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 0 │ │ i32.add │ │ i32.const 40 │ │ i32.store offset=4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91068 │ │ - i32.store offset=90608 │ │ + i32.load offset=91436 │ │ + i32.store offset=90976 │ │ br 2 (;@5;) │ │ end │ │ local.get 0 │ │ i32.load8_u offset=12 │ │ i32.const 8 │ │ i32.and │ │ br_if 0 (;@6;) │ │ @@ -405121,59 +407310,59 @@ │ │ i32.add │ │ i32.const 7 │ │ i32.and │ │ select │ │ local.tee 0 │ │ i32.add │ │ local.tee 5 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.get 2 │ │ i32.add │ │ local.tee 6 │ │ local.get 0 │ │ i32.sub │ │ local.tee 0 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ local.get 5 │ │ local.get 0 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 4 │ │ local.get 6 │ │ i32.add │ │ i32.const 40 │ │ i32.store offset=4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91068 │ │ - i32.store offset=90608 │ │ + i32.load offset=91436 │ │ + i32.store offset=90976 │ │ br 1 (;@5;) │ │ end │ │ block ;; label = @6 │ │ local.get 6 │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.tee 8 │ │ i32.ge_u │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ local.get 6 │ │ - i32.store offset=90596 │ │ + i32.store offset=90964 │ │ local.get 6 │ │ local.set 8 │ │ end │ │ local.get 6 │ │ local.get 2 │ │ i32.add │ │ local.set 5 │ │ - i32.const 91028 │ │ + i32.const 91396 │ │ local.set 0 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ @@ -405194,15 +407383,15 @@ │ │ local.get 0 │ │ i32.load8_u offset=12 │ │ i32.const 8 │ │ i32.and │ │ i32.eqz │ │ br_if 1 (;@10;) │ │ end │ │ - i32.const 91028 │ │ + i32.const 91396 │ │ local.set 0 │ │ loop ;; label = @11 │ │ block ;; label = @12 │ │ local.get 0 │ │ i32.load │ │ local.tee 5 │ │ local.get 4 │ │ @@ -405275,45 +407464,45 @@ │ │ block ;; label = @10 │ │ local.get 4 │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@10;) │ │ i32.const 0 │ │ local.get 3 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.get 5 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ br 3 (;@7;) │ │ end │ │ block ;; label = @10 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@10;) │ │ i32.const 0 │ │ local.get 3 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.get 5 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 3 │ │ local.get 0 │ │ @@ -405346,34 +407535,34 @@ │ │ local.tee 4 │ │ local.get 0 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 8 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ block ;; label = @13 │ │ local.get 2 │ │ i32.load offset=12 │ │ local.tee 0 │ │ local.get 4 │ │ i32.ne │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 8 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 2 (;@11;) │ │ end │ │ local.get 0 │ │ local.get 6 │ │ i32.eq │ │ drop │ │ local.get 4 │ │ @@ -405458,34 +407647,34 @@ │ │ block ;; label = @12 │ │ block ;; label = @13 │ │ local.get 2 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 0 │ │ i32.load │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@13;) │ │ local.get 0 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@11;) │ │ end │ │ local.get 9 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 9 │ │ i32.load offset=16 │ │ @@ -405561,33 +407750,33 @@ │ │ br_if 0 (;@10;) │ │ local.get 5 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 4 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @11 │ │ block ;; label = @12 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 5 │ │ i32.const 1 │ │ local.get 4 │ │ i32.shl │ │ local.tee 4 │ │ i32.and │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ local.get 5 │ │ local.get 4 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 0 │ │ local.set 4 │ │ br 1 (;@11;) │ │ end │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 4 │ │ @@ -405674,33 +407863,33 @@ │ │ i32.store offset=28 │ │ local.get 3 │ │ i64.const 0 │ │ i64.store offset=16 align=4 │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.set 4 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 0 │ │ i32.shl │ │ local.tee 8 │ │ i32.and │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 8 │ │ i32.or │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ local.get 4 │ │ local.get 3 │ │ i32.store │ │ local.get 3 │ │ local.get 4 │ │ i32.store offset=24 │ │ br 1 (;@10;) │ │ @@ -405781,35 +407970,35 @@ │ │ i32.add │ │ i32.const 7 │ │ i32.and │ │ select │ │ local.tee 8 │ │ i32.sub │ │ local.tee 11 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ i32.const 0 │ │ local.get 6 │ │ local.get 8 │ │ i32.add │ │ local.tee 8 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ local.get 8 │ │ local.get 11 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 6 │ │ local.get 0 │ │ i32.add │ │ i32.const 40 │ │ i32.store offset=4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91068 │ │ - i32.store offset=90608 │ │ + i32.load offset=91436 │ │ + i32.store offset=90976 │ │ local.get 4 │ │ local.get 5 │ │ i32.const 39 │ │ local.get 5 │ │ i32.sub │ │ i32.const 7 │ │ i32.and │ │ @@ -405833,34 +408022,34 @@ │ │ local.tee 8 │ │ i32.const 27 │ │ i32.store offset=4 │ │ local.get 8 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=91036 align=4 │ │ + i64.load offset=91404 align=4 │ │ i64.store align=4 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=91028 align=4 │ │ + i64.load offset=91396 align=4 │ │ i64.store offset=8 align=4 │ │ i32.const 0 │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ - i32.store offset=91036 │ │ + i32.store offset=91404 │ │ i32.const 0 │ │ local.get 2 │ │ - i32.store offset=91032 │ │ + i32.store offset=91400 │ │ i32.const 0 │ │ local.get 6 │ │ - i32.store offset=91028 │ │ + i32.store offset=91396 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91040 │ │ + i32.store offset=91408 │ │ local.get 8 │ │ i32.const 24 │ │ i32.add │ │ local.set 0 │ │ loop ;; label = @9 │ │ local.get 0 │ │ i32.const 7 │ │ @@ -405906,33 +408095,33 @@ │ │ br_if 0 (;@9;) │ │ local.get 2 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 5 │ │ i32.shl │ │ local.tee 5 │ │ i32.and │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 5 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 0 │ │ local.set 5 │ │ br 1 (;@10;) │ │ end │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 5 │ │ @@ -406021,33 +408210,33 @@ │ │ i32.const 28 │ │ i32.add │ │ local.get 0 │ │ i32.store │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.set 5 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 0 │ │ i32.shl │ │ local.tee 8 │ │ i32.and │ │ br_if 0 (;@10;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 8 │ │ i32.or │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ local.get 5 │ │ local.get 4 │ │ i32.store │ │ local.get 4 │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ @@ -406157,33 +408346,33 @@ │ │ local.get 5 │ │ i32.store offset=12 │ │ local.get 4 │ │ local.get 0 │ │ i32.store offset=8 │ │ end │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.tee 0 │ │ local.get 3 │ │ i32.le_u │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 0 │ │ local.get 3 │ │ i32.sub │ │ local.tee 4 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.tee 0 │ │ local.get 3 │ │ i32.add │ │ local.tee 5 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ local.get 5 │ │ local.get 4 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 0 │ │ local.get 3 │ │ @@ -406211,15 +408400,15 @@ │ │ block ;; label = @5 │ │ local.get 8 │ │ local.get 8 │ │ i32.load offset=28 │ │ local.tee 5 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 0 │ │ i32.load │ │ i32.ne │ │ br_if 0 (;@5;) │ │ local.get 0 │ │ local.get 6 │ │ @@ -406229,15 +408418,15 @@ │ │ i32.const 0 │ │ local.get 7 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ local.tee 7 │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@3;) │ │ end │ │ local.get 11 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 11 │ │ i32.load offset=16 │ │ @@ -406333,33 +408522,33 @@ │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 4 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 5 │ │ i32.const 1 │ │ local.get 4 │ │ i32.shl │ │ local.tee 4 │ │ i32.and │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ local.get 5 │ │ local.get 4 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 0 │ │ local.set 4 │ │ br 1 (;@5;) │ │ end │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 4 │ │ @@ -406446,15 +408635,15 @@ │ │ i32.store offset=28 │ │ local.get 6 │ │ i64.const 0 │ │ i64.store offset=16 align=4 │ │ local.get 0 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.set 5 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 7 │ │ i32.const 1 │ │ @@ -406463,15 +408652,15 @@ │ │ local.tee 3 │ │ i32.and │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ local.get 7 │ │ local.get 3 │ │ i32.or │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ local.get 5 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ local.get 5 │ │ i32.store offset=24 │ │ br 1 (;@5;) │ │ @@ -406568,15 +408757,15 @@ │ │ block ;; label = @4 │ │ local.get 6 │ │ local.get 6 │ │ i32.load offset=28 │ │ local.tee 5 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 0 │ │ i32.load │ │ i32.ne │ │ br_if 0 (;@4;) │ │ local.get 0 │ │ local.get 8 │ │ @@ -406585,15 +408774,15 @@ │ │ br_if 1 (;@3;) │ │ i32.const 0 │ │ local.get 9 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@2;) │ │ end │ │ local.get 10 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 10 │ │ i32.load offset=16 │ │ @@ -406688,34 +408877,34 @@ │ │ br_if 0 (;@3;) │ │ local.get 7 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 8 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.set 0 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ i32.const 1 │ │ local.get 8 │ │ i32.shl │ │ local.tee 8 │ │ local.get 2 │ │ i32.and │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ local.get 8 │ │ local.get 2 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 3 │ │ local.set 8 │ │ br 1 (;@4;) │ │ end │ │ local.get 3 │ │ i32.load offset=8 │ │ local.set 8 │ │ @@ -406731,18 +408920,18 @@ │ │ i32.store offset=12 │ │ local.get 0 │ │ local.get 8 │ │ i32.store offset=8 │ │ end │ │ i32.const 0 │ │ local.get 5 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ local.get 4 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ end │ │ local.get 6 │ │ i32.const 8 │ │ i32.add │ │ local.set 0 │ │ end │ │ local.get 1 │ │ @@ -406783,25 +408972,25 @@ │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ local.tee 2 │ │ i32.sub │ │ local.tee 1 │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.tee 4 │ │ i32.lt_u │ │ br_if 1 (;@1;) │ │ local.get 2 │ │ local.get 0 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @3 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 255 │ │ i32.gt_u │ │ @@ -406811,34 +409000,34 @@ │ │ local.tee 4 │ │ local.get 2 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ block ;; label = @5 │ │ local.get 1 │ │ i32.load offset=12 │ │ local.tee 2 │ │ local.get 4 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 3 (;@2;) │ │ end │ │ local.get 2 │ │ local.get 6 │ │ i32.eq │ │ drop │ │ local.get 4 │ │ @@ -406923,34 +409112,34 @@ │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 1 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 2 │ │ i32.load │ │ local.get 1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ local.get 2 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 3 (;@2;) │ │ end │ │ local.get 7 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 7 │ │ i32.load offset=16 │ │ @@ -407001,15 +409190,15 @@ │ │ i32.const 3 │ │ i32.and │ │ i32.const 3 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 3 │ │ local.get 2 │ │ i32.const -2 │ │ i32.and │ │ i32.store offset=4 │ │ local.get 1 │ │ local.get 0 │ │ @@ -407038,62 +409227,62 @@ │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.const 2 │ │ i32.and │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.get 3 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.get 0 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ local.get 1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ i32.ne │ │ br_if 3 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ return │ │ end │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 3 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.get 0 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 1 │ │ local.get 0 │ │ @@ -407119,34 +409308,34 @@ │ │ local.tee 4 │ │ local.get 2 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ block ;; label = @6 │ │ local.get 3 │ │ i32.load offset=12 │ │ local.tee 2 │ │ local.get 4 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 2 (;@4;) │ │ end │ │ local.get 2 │ │ local.get 6 │ │ i32.eq │ │ drop │ │ local.get 4 │ │ @@ -407165,15 +409354,15 @@ │ │ local.get 3 │ │ i32.load offset=12 │ │ local.tee 6 │ │ local.get 3 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 3 │ │ i32.load offset=8 │ │ local.tee 2 │ │ i32.gt_u │ │ drop │ │ local.get 2 │ │ local.get 6 │ │ @@ -407232,34 +409421,34 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 3 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 2 │ │ i32.load │ │ local.get 3 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ local.get 2 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@4;) │ │ end │ │ local.get 7 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 7 │ │ i32.load offset=16 │ │ @@ -407311,20 +409500,20 @@ │ │ local.get 1 │ │ local.get 0 │ │ i32.add │ │ local.get 0 │ │ i32.store │ │ local.get 1 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ return │ │ end │ │ local.get 3 │ │ local.get 2 │ │ i32.const -2 │ │ i32.and │ │ i32.store offset=4 │ │ @@ -407346,33 +409535,33 @@ │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 2 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 0 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 4 │ │ i32.const 1 │ │ local.get 2 │ │ i32.shl │ │ local.tee 2 │ │ i32.and │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 4 │ │ local.get 2 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 0 │ │ local.set 2 │ │ br 1 (;@3;) │ │ end │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 2 │ │ @@ -407461,35 +409650,35 @@ │ │ i32.const 28 │ │ i32.add │ │ local.get 2 │ │ i32.store │ │ local.get 2 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.set 4 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 2 │ │ i32.shl │ │ local.tee 3 │ │ i32.and │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 3 │ │ i32.or │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ local.get 4 │ │ local.get 1 │ │ i32.store │ │ local.get 1 │ │ i32.const 24 │ │ i32.add │ │ local.get 4 │ │ @@ -407576,22 +409765,22 @@ │ │ i32.store offset=12 │ │ local.get 1 │ │ local.get 0 │ │ i32.store offset=8 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90612 │ │ + i32.load offset=90980 │ │ i32.const -1 │ │ i32.add │ │ local.tee 1 │ │ i32.const -1 │ │ local.get 1 │ │ select │ │ - i32.store offset=90612 │ │ + i32.store offset=90980 │ │ end) │ │ (func $dlrealloc (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ @@ -407698,15 +409887,15 @@ │ │ br_if 0 (;@3;) │ │ local.get 0 │ │ local.set 4 │ │ local.get 3 │ │ local.get 1 │ │ i32.sub │ │ i32.const 0 │ │ - i32.load offset=91060 │ │ + i32.load offset=91428 │ │ i32.const 1 │ │ i32.shl │ │ i32.le_u │ │ br_if 2 (;@1;) │ │ end │ │ i32.const 0 │ │ return │ │ @@ -407756,20 +409945,20 @@ │ │ call $dispose_chunk │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 4 │ │ block ;; label = @3 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.get 5 │ │ i32.ne │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.get 3 │ │ i32.add │ │ local.tee 3 │ │ local.get 1 │ │ i32.le_u │ │ br_if 2 (;@1;) │ │ local.get 0 │ │ @@ -407790,30 +409979,30 @@ │ │ i32.sub │ │ local.tee 1 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ i32.const 0 │ │ local.get 2 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ br 1 (;@2;) │ │ end │ │ block ;; label = @3 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 5 │ │ i32.ne │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.get 3 │ │ i32.add │ │ local.tee 3 │ │ local.get 1 │ │ i32.lt_u │ │ br_if 2 (;@1;) │ │ block ;; label = @4 │ │ @@ -407877,18 +410066,18 @@ │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ local.set 1 │ │ end │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ local.get 4 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ local.set 4 │ │ local.get 5 │ │ i32.load offset=4 │ │ local.tee 6 │ │ @@ -407919,34 +410108,34 @@ │ │ local.tee 3 │ │ local.get 6 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 9 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.load offset=12 │ │ local.tee 4 │ │ local.get 3 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 9 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 2 (;@3;) │ │ end │ │ local.get 4 │ │ local.get 6 │ │ i32.eq │ │ drop │ │ local.get 3 │ │ @@ -407965,15 +410154,15 @@ │ │ local.get 5 │ │ i32.load offset=12 │ │ local.tee 6 │ │ local.get 5 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 5 │ │ i32.load offset=8 │ │ local.tee 3 │ │ i32.gt_u │ │ drop │ │ local.get 3 │ │ local.get 6 │ │ @@ -408032,34 +410221,34 @@ │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 3 │ │ i32.load │ │ local.get 5 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ local.get 3 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@3;) │ │ end │ │ local.get 10 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 10 │ │ i32.load offset=16 │ │ @@ -408186,15 +410375,15 @@ │ │ local.tee 3 │ │ local.get 1 │ │ i32.add │ │ local.set 1 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 0 │ │ local.get 3 │ │ i32.sub │ │ local.tee 0 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ block ;; label = @5 │ │ @@ -408207,48 +410396,48 @@ │ │ local.tee 4 │ │ local.get 3 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ local.get 0 │ │ i32.load offset=12 │ │ local.tee 3 │ │ local.get 4 │ │ i32.ne │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 3 (;@2;) │ │ end │ │ local.get 0 │ │ i32.load offset=24 │ │ local.set 7 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 0 │ │ i32.load offset=12 │ │ local.tee 6 │ │ local.get 0 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 0 │ │ i32.load offset=8 │ │ local.tee 3 │ │ i32.gt_u │ │ drop │ │ local.get 3 │ │ local.get 6 │ │ @@ -408307,34 +410496,34 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 0 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 3 │ │ i32.load │ │ local.get 0 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 4 (;@2;) │ │ end │ │ local.get 7 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 7 │ │ i32.load offset=16 │ │ @@ -408385,15 +410574,15 @@ │ │ i32.const 3 │ │ i32.and │ │ i32.const 3 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 2 │ │ local.get 3 │ │ i32.const -2 │ │ i32.and │ │ i32.store offset=4 │ │ local.get 0 │ │ local.get 1 │ │ @@ -408422,62 +410611,62 @@ │ │ i32.load offset=4 │ │ local.tee 3 │ │ i32.const 2 │ │ i32.and │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90604 │ │ + i32.load offset=90972 │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=90604 │ │ + i32.store offset=90972 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90592 │ │ + i32.load offset=90960 │ │ local.get 1 │ │ i32.add │ │ local.tee 1 │ │ - i32.store offset=90592 │ │ + i32.store offset=90960 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ i32.ne │ │ br_if 3 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ return │ │ end │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=90600 │ │ + i32.store offset=90968 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90588 │ │ + i32.load offset=90956 │ │ local.get 1 │ │ i32.add │ │ local.tee 1 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 1 │ │ i32.or │ │ i32.store offset=4 │ │ local.get 0 │ │ local.get 1 │ │ @@ -408503,34 +410692,34 @@ │ │ local.tee 4 │ │ local.get 3 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 5 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.tee 6 │ │ i32.eq │ │ drop │ │ block ;; label = @6 │ │ local.get 2 │ │ i32.load offset=12 │ │ local.tee 3 │ │ local.get 4 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ i32.const -2 │ │ local.get 5 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ br 2 (;@4;) │ │ end │ │ local.get 3 │ │ local.get 6 │ │ i32.eq │ │ drop │ │ local.get 4 │ │ @@ -408549,15 +410738,15 @@ │ │ local.get 2 │ │ i32.load offset=12 │ │ local.tee 6 │ │ local.get 2 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ - i32.load offset=90596 │ │ + i32.load offset=90964 │ │ local.get 2 │ │ i32.load offset=8 │ │ local.tee 3 │ │ i32.gt_u │ │ drop │ │ local.get 3 │ │ local.get 6 │ │ @@ -408616,34 +410805,34 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 2 │ │ i32.load offset=28 │ │ local.tee 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.tee 3 │ │ i32.load │ │ local.get 2 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ local.get 6 │ │ i32.store │ │ local.get 6 │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ i32.const -2 │ │ local.get 4 │ │ i32.rotl │ │ i32.and │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ br 2 (;@4;) │ │ end │ │ local.get 7 │ │ i32.const 16 │ │ i32.const 20 │ │ local.get 7 │ │ i32.load offset=16 │ │ @@ -408695,20 +410884,20 @@ │ │ local.get 0 │ │ local.get 1 │ │ i32.add │ │ local.get 1 │ │ i32.store │ │ local.get 0 │ │ i32.const 0 │ │ - i32.load offset=90600 │ │ + i32.load offset=90968 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=90588 │ │ + i32.store offset=90956 │ │ return │ │ end │ │ local.get 2 │ │ local.get 3 │ │ i32.const -2 │ │ i32.and │ │ i32.store offset=4 │ │ @@ -408730,33 +410919,33 @@ │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ i32.const 3 │ │ i32.shr_u │ │ local.tee 3 │ │ i32.const 3 │ │ i32.shl │ │ - i32.const 90620 │ │ + i32.const 90988 │ │ i32.add │ │ local.set 1 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90580 │ │ + i32.load offset=90948 │ │ local.tee 4 │ │ i32.const 1 │ │ local.get 3 │ │ i32.shl │ │ local.tee 3 │ │ i32.and │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 4 │ │ local.get 3 │ │ i32.or │ │ - i32.store offset=90580 │ │ + i32.store offset=90948 │ │ local.get 1 │ │ local.set 3 │ │ br 1 (;@3;) │ │ end │ │ local.get 1 │ │ i32.load offset=8 │ │ local.set 3 │ │ @@ -408845,34 +411034,34 @@ │ │ i32.const 28 │ │ i32.add │ │ local.get 3 │ │ i32.store │ │ local.get 3 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 90884 │ │ + i32.const 91252 │ │ i32.add │ │ local.set 4 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ i32.const 0 │ │ - i32.load offset=90584 │ │ + i32.load offset=90952 │ │ local.tee 6 │ │ i32.const 1 │ │ local.get 3 │ │ i32.shl │ │ local.tee 2 │ │ i32.and │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.get 6 │ │ local.get 2 │ │ i32.or │ │ - i32.store offset=90584 │ │ + i32.store offset=90952 │ │ local.get 4 │ │ local.get 0 │ │ i32.store │ │ local.get 0 │ │ i32.const 24 │ │ i32.add │ │ local.get 4 │ │ @@ -409020,15 +411209,15 @@ │ │ (func $emscripten_get_heap_size (type 9) (result i32) │ │ memory.size │ │ i32.const 16 │ │ i32.shl) │ │ (func $sbrk (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ - i32.load offset=75940 │ │ + i32.load offset=76308 │ │ local.tee 1 │ │ local.get 0 │ │ i32.const 3 │ │ i32.add │ │ i32.const -4 │ │ i32.and │ │ local.tee 2 │ │ @@ -409052,23 +411241,23 @@ │ │ local.get 0 │ │ call $emscripten_resize_heap │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ end │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=75940 │ │ + i32.store offset=76308 │ │ local.get 1 │ │ return │ │ end │ │ call $__errno_location │ │ i32.const 48 │ │ i32.store │ │ i32.const -1) │ │ - (func $__addtf3 (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $__addtf3 (type 99) (param i32 i64 i64 i64 i64) │ │ (local i32 i64 i32 i64 i64 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 112 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ @@ -409731,15 +411920,15 @@ │ │ local.get 0 │ │ local.get 4 │ │ i64.store offset=8 │ │ local.get 5 │ │ i32.const 112 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $__ashlti3 (type 96) (param i32 i64 i64 i32) │ │ + (func $__ashlti3 (type 100) (param i32 i64 i64 i32) │ │ (local i64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.const 64 │ │ i32.and │ │ i32.eqz │ │ @@ -409778,15 +411967,15 @@ │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.store │ │ local.get 0 │ │ local.get 2 │ │ i64.store offset=8) │ │ - (func $__letf2 (type 101) (param i64 i64 i64 i64) (result i32) │ │ + (func $__letf2 (type 105) (param i64 i64 i64 i64) (result i32) │ │ (local i32 i64 i64) │ │ i32.const 1 │ │ local.set 4 │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.const 0 │ │ i64.ne │ │ @@ -409881,15 +412070,15 @@ │ │ i64.xor │ │ i64.or │ │ i64.const 0 │ │ i64.ne │ │ local.set 4 │ │ end │ │ local.get 4) │ │ - (func $__getf2 (type 101) (param i64 i64 i64 i64) (result i32) │ │ + (func $__getf2 (type 105) (param i64 i64 i64 i64) (result i32) │ │ (local i32 i64 i64) │ │ i32.const -1 │ │ local.set 4 │ │ block ;; label = @1 │ │ local.get 0 │ │ i64.const 0 │ │ i64.ne │ │ @@ -409980,15 +412169,15 @@ │ │ i64.xor │ │ i64.or │ │ i64.const 0 │ │ i64.ne │ │ local.set 4 │ │ end │ │ local.get 4) │ │ - (func $__divtf3 (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $__divtf3 (type 99) (param i32 i64 i64 i64 i64) │ │ (local i32 i64 i64 i64 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) │ │ global.get $__stack_pointer │ │ i32.const 336 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ @@ -411055,34 +413244,34 @@ │ │ local.get 5 │ │ i32.const 336 │ │ i32.add │ │ global.set $__stack_pointer) │ │ (func $setThrew (type 1) (param i32 i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ local.get 1 │ │ - i32.store offset=91080 │ │ + i32.store offset=91448 │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ end) │ │ (func $saveSetjmp (type 14) (param i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ i32.const 0 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=91084 │ │ + i32.load offset=91452 │ │ i32.const 1 │ │ i32.add │ │ local.tee 5 │ │ - i32.store offset=91084 │ │ + i32.store offset=91452 │ │ local.get 0 │ │ local.get 5 │ │ i32.store │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ @@ -411299,15 +413488,15 @@ │ │ i64.and │ │ i64.or │ │ i64.store offset=8 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $__extendsftf2 (type 102) (param i32 f32) │ │ + (func $__extendsftf2 (type 106) (param i32 f32) │ │ (local i32 i32 i32 i64 i64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -411529,15 +413718,15 @@ │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ (func $__fe_getround (type 9) (result i32) │ │ i32.const 0) │ │ (func $__fe_raise_inexact (type 9) (result i32) │ │ i32.const 0) │ │ - (func $__lshrti3 (type 96) (param i32 i64 i64 i32) │ │ + (func $__lshrti3 (type 100) (param i32 i64 i64 i32) │ │ (local i64) │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.const 64 │ │ i32.and │ │ i32.eqz │ │ @@ -411576,15 +413765,15 @@ │ │ end │ │ local.get 0 │ │ local.get 1 │ │ i64.store │ │ local.get 0 │ │ local.get 2 │ │ i64.store offset=8) │ │ - (func $__multf3 (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $__multf3 (type 99) (param i32 i64 i64 i64 i64) │ │ (local i32 i64 i64 i64 i64 i32 i32 i32 i64 i32 i64 i64 i64 i64 i64 i64 i64 i64 i64 i64) │ │ global.get $__stack_pointer │ │ i32.const 96 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 4 │ │ @@ -412290,15 +414479,15 @@ │ │ local.get 0 │ │ local.get 7 │ │ i64.store offset=8 │ │ local.get 5 │ │ i32.const 96 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $__multi3 (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $__multi3 (type 99) (param i32 i64 i64 i64 i64) │ │ (local i64) │ │ local.get 0 │ │ local.get 4 │ │ local.get 1 │ │ i64.mul │ │ local.get 2 │ │ local.get 3 │ │ @@ -412351,15 +414540,15 @@ │ │ i64.const 32 │ │ i64.shl │ │ local.get 5 │ │ i64.const 4294967295 │ │ i64.and │ │ i64.or │ │ i64.store) │ │ - (func $__subtf3 (type 95) (param i32 i64 i64 i64 i64) │ │ + (func $__subtf3 (type 99) (param i32 i64 i64 i64 i64) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ @@ -412382,15 +414571,15 @@ │ │ local.get 0 │ │ local.get 1 │ │ i64.store │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $__trunctfdf2 (type 103) (param i64 i64) (result f64) │ │ + (func $__trunctfdf2 (type 107) (param i64 i64) (result f64) │ │ (local i32 i64 i64 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -412567,15 +414756,15 @@ │ │ global.set $__stack_pointer │ │ local.get 4 │ │ local.get 1 │ │ i64.const -9223372036854775808 │ │ i64.and │ │ i64.or │ │ f64.reinterpret_i64) │ │ - (func $__trunctfsf2 (type 104) (param i64 i64) (result f32) │ │ + (func $__trunctfsf2 (type 108) (param i64 i64) (result f32) │ │ (local i32 i64 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -413031,15 +415220,15 @@ │ │ local.get 0 │ │ call $std::__2::basic_ios_>::~basic_ios__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::basic_streambuf_>::~basic_streambuf__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 62784 │ │ + i32.const 63152 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ @@ -413049,15 +415238,15 @@ │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::~basic_streambuf__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::basic_streambuf_>::basic_streambuf__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 62784 │ │ + i32.const 63152 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::locale::locale__ │ │ @@ -413075,15 +415264,15 @@ │ │ local.get 0 │ │ i64.const 0 │ │ i64.store offset=8 align=4 │ │ local.get 0) │ │ (func $std::__2::basic_streambuf_>::imbue_std::__2::locale_const&_ (type 1) (param i32 i32)) │ │ (func $std::__2::basic_streambuf_>::setbuf_char*__long_ (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0) │ │ - (func $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ (type 105) (param i32 i32 i64 i32 i32) │ │ + (func $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ (type 109) (param i32 i32 i64 i32 i32) │ │ local.get 0 │ │ i64.const -1 │ │ call $std::__2::fpos<__mbstate_t>::fpos_long_long_ │ │ drop) │ │ (func $std::__2::fpos<__mbstate_t>::fpos_long_long_ (type 60) (param i32 i64) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ @@ -413376,15 +415565,15 @@ │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 4) │ │ (func $std::__2::basic_streambuf_>::overflow_int_ (type 6) (param i32 i32) (result i32) │ │ call $std::__2::char_traits::eof__) │ │ (func $std::__2::basic_streambuf_>::~basic_streambuf__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 62848 │ │ + i32.const 63216 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ @@ -413394,15 +415583,15 @@ │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::~basic_streambuf__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::basic_streambuf_>::basic_streambuf__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 62848 │ │ + i32.const 63216 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::locale::locale__ │ │ @@ -413420,15 +415609,15 @@ │ │ local.get 0 │ │ i64.const 0 │ │ i64.store offset=8 align=4 │ │ local.get 0) │ │ (func $std::__2::basic_streambuf_>::imbue_std::__2::locale_const&_ (type 1) (param i32 i32)) │ │ (func $std::__2::basic_streambuf_>::setbuf_wchar_t*__long_ (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0) │ │ - (func $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ (type 105) (param i32 i32 i64 i32 i32) │ │ + (func $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ (type 109) (param i32 i32 i64 i32 i32) │ │ local.get 0 │ │ i64.const -1 │ │ call $std::__2::fpos<__mbstate_t>::fpos_long_long_ │ │ drop) │ │ (func $std::__2::basic_streambuf_>::seekpos_std::__2::fpos<__mbstate_t>__unsigned_int_ (type 0) (param i32 i32 i32 i32) │ │ local.get 0 │ │ i64.const -1 │ │ @@ -413545,27 +415734,27 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 457 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -413722,15 +415911,15 @@ │ │ local.get 4) │ │ (func $std::__2::basic_streambuf_>::overflow_unsigned_int_ (type 6) (param i32 i32) (result i32) │ │ call $std::__2::char_traits::eof__) │ │ (func $std::__2::basic_istream_>::~basic_istream__ (type 6) (param i32 i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::basic_istream_>::~basic_istream__.1 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 62952 │ │ + i32.const 63320 │ │ call $std::__2::basic_istream_>::~basic_istream__ │ │ local.tee 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::basic_ios_>::~basic_ios__ │ │ drop │ │ local.get 0) │ │ @@ -413773,27 +415962,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 458 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 2 │ │ @@ -413801,28 +415990,28 @@ │ │ i32.eq │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ @@ -413833,45 +416022,45 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 458 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @7 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 459 │ │ local.get 3 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ local.get 3 │ │ i32.const -1 │ │ i32.ne │ │ @@ -413880,27 +416069,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ i32.const 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@5;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -413941,26 +416130,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 1 │ │ @@ -413972,23 +416161,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ call $__resumeException │ │ @@ -414002,15 +416191,15 @@ │ │ call $std::terminate__ │ │ unreachable) │ │ (func $std::__2::ios_base::flags___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.load offset=4) │ │ (func $std::__2::ctype_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $bool_std::__2::operator!=_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::istreambuf_iterator_>::equal_std::__2::istreambuf_iterator_>_const&__const │ │ i32.const 1 │ │ i32.xor) │ │ @@ -414177,15 +416366,15 @@ │ │ call $std::__2::__libcpp_numeric_limits::max__) │ │ (func $std::__2::__libcpp_numeric_limits::max__ (type 9) (result i32) │ │ i32.const 2147483647) │ │ (func $std::__2::basic_istream_>::~basic_istream__ (type 6) (param i32 i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::basic_istream_>::~basic_istream__.1 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 63000 │ │ + i32.const 63368 │ │ call $std::__2::basic_istream_>::~basic_istream__ │ │ local.tee 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::basic_ios_>::~basic_ios__ │ │ drop │ │ local.get 0) │ │ @@ -414234,28 +416423,28 @@ │ │ i32.load │ │ i32.add │ │ call $std::__2::basic_ios_>::rdbuf___const │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 461 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ block ;; label = @5 │ │ @@ -414272,25 +416461,25 @@ │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::basic_ios_>::rdbuf___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 462 │ │ local.get 2 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ local.get 3 │ │ i32.const -1 │ │ @@ -414300,27 +416489,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 463 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ i32.const 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -414354,26 +416543,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 2 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 1 │ │ @@ -414385,23 +416574,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ call $__resumeException │ │ @@ -414412,15 +416601,15 @@ │ │ drop │ │ call $getTempRet0 │ │ drop │ │ call $std::terminate__ │ │ unreachable) │ │ (func $std::__2::ctype_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92388 │ │ + i32.const 92756 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $bool_std::__2::operator!=_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::istreambuf_iterator_>::equal_std::__2::istreambuf_iterator_>_const&__const │ │ i32.const 1 │ │ i32.xor) │ │ @@ -414548,15 +416737,15 @@ │ │ i32.store │ │ local.get 1 │ │ call $std::__2::char_traits::to_int_type_wchar_t_) │ │ (func $std::__2::basic_ostream_>::~basic_ostream__ (type 6) (param i32 i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::basic_ostream_>::~basic_ostream__.1 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 63048 │ │ + i32.const 63416 │ │ call $std::__2::basic_ostream_>::~basic_ostream__ │ │ local.tee 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::basic_ios_>::~basic_ios__ │ │ drop │ │ local.get 0) │ │ @@ -414635,27 +416824,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 458 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 2 │ │ @@ -414667,27 +416856,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 464 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ @@ -414713,45 +416902,45 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 458 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 459 │ │ local.get 2 │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const -1 │ │ i32.ne │ │ @@ -414762,27 +416951,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ i32.const 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -414790,23 +416979,23 @@ │ │ call $getTempRet0 │ │ drop │ │ local.get 1 │ │ call $__cxa_begin_catch │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -414816,39 +417005,39 @@ │ │ drop │ │ call $getTempRet0 │ │ drop │ │ call $std::terminate__ │ │ unreachable) │ │ (func $std::__2::num_put_>_>_const&_std::__2::use_facet_>_>_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92224 │ │ + i32.const 92592 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::ostreambuf_iterator_>::ostreambuf_iterator_std::__2::basic_ostream_>&_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 1 │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 458 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ local.get 2 │ │ @@ -414903,46 +417092,46 @@ │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ local.get 0 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ @@ -414992,28 +417181,28 @@ │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 2 │ │ i32.const 24 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ @@ -415038,52 +417227,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 467 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -415099,52 +417288,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 468 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ local.tee 6 │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 5 │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 469 │ │ local.get 4 │ │ local.get 3 │ │ local.get 6 │ │ local.get 7 │ │ local.get 1 │ │ call $invoke_iiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=16 │ │ @@ -415158,27 +417347,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ i32.const 5 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@5;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ local.set 3 │ │ @@ -415238,26 +417427,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 2 │ │ @@ -415269,23 +417458,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ call $__resumeException │ │ @@ -415303,28 +417492,28 @@ │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 2 │ │ i32.const 24 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ @@ -415340,52 +417529,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 467 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -415401,52 +417590,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 468 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ local.tee 6 │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 5 │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 470 │ │ local.get 4 │ │ local.get 3 │ │ local.get 6 │ │ local.get 7 │ │ local.get 1 │ │ call $invoke_iiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=16 │ │ @@ -415460,27 +417649,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ i32.const 5 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@5;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ local.set 3 │ │ @@ -415540,26 +417729,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 2 │ │ @@ -415571,23 +417760,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ call $__resumeException │ │ @@ -415605,28 +417794,28 @@ │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 2 │ │ i32.const 24 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ @@ -415642,52 +417831,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 467 │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ @@ -415703,52 +417892,52 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 468 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ local.tee 6 │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 5 │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 470 │ │ local.get 4 │ │ local.get 3 │ │ local.get 6 │ │ local.get 7 │ │ local.get 1 │ │ call $invoke_iiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 2 │ │ local.get 1 │ │ i32.store offset=16 │ │ @@ -415762,27 +417951,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ i32.const 5 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@5;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ local.set 3 │ │ @@ -415842,26 +418031,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 2 │ │ @@ -415873,23 +418062,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ call $__resumeException │ │ @@ -415931,28 +418120,28 @@ │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 2 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 137 │ │ local.get 2 │ │ i32.const 8 │ │ i32.add │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ @@ -415968,26 +418157,26 @@ │ │ local.get 0 │ │ call $std::__2::ostreambuf_iterator_>::ostreambuf_iterator_std::__2::basic_ostream_>&_ │ │ local.tee 4 │ │ call $std::__2::ostreambuf_iterator_>::operator*__ │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 471 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @6 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@6;) │ │ local.get 4 │ │ call $std::__2::ostreambuf_iterator_>::failed___const │ │ @@ -415997,27 +418186,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 460 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ i32.const 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -416051,26 +418240,26 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 141 │ │ local.get 0 │ │ local.get 3 │ │ i32.add │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ call $__cxa_end_catch │ │ end │ │ local.get 2 │ │ @@ -416082,23 +418271,23 @@ │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ call $__resumeException │ │ @@ -416111,15 +418300,15 @@ │ │ drop │ │ call $std::terminate__ │ │ unreachable) │ │ (func $std::__2::basic_ostream_>::~basic_ostream__ (type 6) (param i32 i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::basic_ostream_>::~basic_ostream__.1 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 63096 │ │ + i32.const 63464 │ │ call $std::__2::basic_ostream_>::~basic_ostream__ │ │ local.tee 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::basic_ios_>::~basic_ios__ │ │ drop │ │ local.get 0) │ │ @@ -416243,25 +418432,25 @@ │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::basic_ios_>::rdbuf___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 462 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ i32.const -1 │ │ @@ -416273,27 +418462,27 @@ │ │ i32.load │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 463 │ │ local.get 1 │ │ local.get 2 │ │ i32.add │ │ i32.const 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@2;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -416301,23 +418490,23 @@ │ │ call $getTempRet0 │ │ drop │ │ local.get 1 │ │ call $__cxa_begin_catch │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -416366,29 +418555,29 @@ │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 472 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::__zero__ │ │ @@ -416768,15 +418957,15 @@ │ │ end │ │ local.get 0) │ │ (func $std::__2::basic_string__std::__2::allocator_>::c_str___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::data___const) │ │ (func $std::__2::codecvt_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92404 │ │ + i32.const 92772 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::codecvt::always_noconv___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=28 │ │ call_indirect (type 10)) │ │ @@ -416801,15 +418990,15 @@ │ │ (local i32) │ │ i32.const 4 │ │ call $__cxa_allocate_exception │ │ local.tee 0 │ │ call $std::bad_cast::bad_cast__ │ │ drop │ │ local.get 0 │ │ - i32.const 75176 │ │ + i32.const 75544 │ │ i32.const 473 │ │ call $__cxa_throw │ │ unreachable) │ │ (func $unsigned_long_const&_std::__2::min_>_unsigned_long_const&__unsigned_long_const&__std::__2::__less_ (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ @@ -416876,26 +419065,26 @@ │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $std::__2::allocator::deallocate_char*__unsigned_long_) │ │ (func $std::__2::allocator::deallocate_char*__unsigned_long_ (type 2) (param i32 i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 474 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 1 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ return │ │ end │ │ @@ -417151,15 +419340,15 @@ │ │ (func $std::__2::allocator::allocate_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ call $unsigned_long_std::__2::allocator_traits_>::max_size__void>_std::__2::allocator_const&_ │ │ local.get 1 │ │ i32.ge_u │ │ br_if 0 (;@1;) │ │ - i32.const 9115 │ │ + i32.const 9249 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable │ │ end │ │ local.get 1 │ │ i32.const 1 │ │ call $std::__2::__libcpp_allocate_unsigned_long__unsigned_long_) │ │ (func $std::__2::allocator::max_size___const (type 10) (param i32) (result i32) │ │ @@ -417169,15 +419358,15 @@ │ │ call $void*_std::__2::__libcpp_operator_new_unsigned_long_) │ │ (func $void*_std::__2::__libcpp_operator_new_unsigned_long_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $operator_new_unsigned_long_) │ │ (func $__cxa_atexit (type 4) (param i32 i32 i32) (result i32) │ │ i32.const 0) │ │ (func $std::__2::__iostream_category::name___const (type 10) (param i32) (result i32) │ │ - i32.const 7059) │ │ + i32.const 7108) │ │ (func $std::__2::__iostream_category::message_int__const (type 2) (param i32 i32 i32) │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ @@ -417187,15 +419376,15 @@ │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $std::__2::__do_message::message_int__const │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 4823 │ │ + i32.const 4872 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop) │ │ (func $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ @@ -417220,28 +419409,28 @@ │ │ local.get 0) │ │ (func $std::__2::char_traits::length_char_const*_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $strlen) │ │ (func $std::__2::iostream_category__ (type 9) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=91088 │ │ + i32.load8_u offset=91456 │ │ br_if 0 (;@1;) │ │ i32.const 523 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=91088 │ │ + i32.store8 offset=91456 │ │ end │ │ - i32.const 75944) │ │ + i32.const 76312) │ │ (func $__cxx_global_array_dtor (type 5) (param i32) │ │ - i32.const 75944 │ │ + i32.const 76312 │ │ call $std::__2::error_category::~error_category__ │ │ drop) │ │ (func $std::__2::ios_base::failure::failure_char_const*__std::__2::error_code_const&_ (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ @@ -417257,15 +419446,15 @@ │ │ i64.store offset=8 │ │ local.get 0 │ │ local.get 3 │ │ local.get 1 │ │ call $std::__2::system_error::system_error_std::__2::error_code__char_const*_ │ │ drop │ │ local.get 0 │ │ - i32.const 63692 │ │ + i32.const 64060 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ @@ -417336,15 +419525,15 @@ │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.load offset=20 │ │ local.get 1 │ │ i32.and │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ - i32.const 5738 │ │ + i32.const 5787 │ │ call $std::__2::__throw_failure_char_const*_ │ │ unreachable │ │ end) │ │ (func $unsigned_long_const&_std::__2::max_>_unsigned_long_const&__unsigned_long_const&__std::__2::__less_ (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ @@ -417365,31 +419554,31 @@ │ │ local.get 1 │ │ local.get 0 │ │ local.get 3 │ │ select) │ │ (func $std::__2::ios_base::~ios_base__ (type 10) (param i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ - i32.const 63712 │ │ + i32.const 64080 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 524 │ │ local.get 0 │ │ i32.const 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.const 28 │ │ @@ -417439,34 +419628,34 @@ │ │ i32.add │ │ i32.const 1 │ │ i32.const 0 │ │ call $std::__2::error_code::error_code_std::__2::io_errc__std::__2::enable_if::value__void>::type*_ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 525 │ │ local.get 2 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ - i32.const 63784 │ │ + i32.const 64152 │ │ i32.const 526 │ │ call $__cxa_throw │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ call $getTempRet0 │ │ @@ -417552,15 +419741,15 @@ │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::make_error_code_std::__2::io_errc_ (type 1) (param i32 i32) │ │ call $std::__2::iostream_category__ │ │ drop │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 75944 │ │ + i32.const 76312 │ │ call $std::__2::error_code::error_code_int__std::__2::error_category_const&_ │ │ drop) │ │ (func $std::__2::error_code::error_code_int__std::__2::error_category_const&_ (type 4) (param i32 i32 i32) (result i32) │ │ local.get 0 │ │ local.get 2 │ │ i32.store offset=4 │ │ local.get 0 │ │ @@ -417575,166 +419764,166 @@ │ │ call $void__*&&std::__2::forward_std::__2::remove_reference::type&___void*_ │ │ i32.load │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__compressed_pair_elem::__get__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $__cxx_global_var_init (type 11) │ │ - i32.const 91772 │ │ + i32.const 92140 │ │ call $std::__2::ios_base::Init::Init__ │ │ drop │ │ i32.const 538 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop) │ │ (func $__cxx_global_array_dtor.1 (type 5) (param i32) │ │ - i32.const 91772 │ │ + i32.const 92140 │ │ call $std::__2::ios_base::Init::~Init__ │ │ drop) │ │ (func $std::__2::DoIOSInit::DoIOSInit__ (type 10) (param i32) (result i32) │ │ (local i32) │ │ - i32.const 91776 │ │ + i32.const 92144 │ │ i32.const 0 │ │ - i32.load offset=60012 │ │ + i32.load offset=60380 │ │ local.tee 1 │ │ - i32.const 91832 │ │ + i32.const 92200 │ │ call $std::__2::__stdinbuf::__stdinbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91092 │ │ - i32.const 91776 │ │ + i32.const 91460 │ │ + i32.const 92144 │ │ call $std::__2::basic_istream_>::basic_istream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91840 │ │ + i32.const 92208 │ │ local.get 1 │ │ - i32.const 91896 │ │ + i32.const 92264 │ │ call $std::__2::__stdinbuf::__stdinbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91180 │ │ - i32.const 91840 │ │ + i32.const 91548 │ │ + i32.const 92208 │ │ call $std::__2::basic_istream_>::basic_istream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91904 │ │ + i32.const 92272 │ │ i32.const 0 │ │ - i32.load offset=60016 │ │ + i32.load offset=60384 │ │ local.tee 1 │ │ - i32.const 91952 │ │ + i32.const 92320 │ │ call $std::__2::__stdoutbuf::__stdoutbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91268 │ │ - i32.const 91904 │ │ + i32.const 91636 │ │ + i32.const 92272 │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91960 │ │ + i32.const 92328 │ │ local.get 1 │ │ - i32.const 92008 │ │ + i32.const 92376 │ │ call $std::__2::__stdoutbuf::__stdoutbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91352 │ │ - i32.const 91960 │ │ + i32.const 91720 │ │ + i32.const 92328 │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 92016 │ │ + i32.const 92384 │ │ i32.const 0 │ │ - i32.load offset=60008 │ │ + i32.load offset=60376 │ │ local.tee 1 │ │ - i32.const 92064 │ │ + i32.const 92432 │ │ call $std::__2::__stdoutbuf::__stdoutbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91436 │ │ - i32.const 92016 │ │ + i32.const 91804 │ │ + i32.const 92384 │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91604 │ │ - i32.const 91436 │ │ + i32.const 91972 │ │ + i32.const 91804 │ │ i32.const 0 │ │ - i32.load offset=91436 │ │ + i32.load offset=91804 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::basic_ios_>::rdbuf___const │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 92072 │ │ + i32.const 92440 │ │ local.get 1 │ │ - i32.const 92120 │ │ + i32.const 92488 │ │ call $std::__2::__stdoutbuf::__stdoutbuf__IO_FILE*____mbstate_t*_ │ │ drop │ │ - i32.const 91520 │ │ - i32.const 92072 │ │ + i32.const 91888 │ │ + i32.const 92440 │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91688 │ │ - i32.const 91520 │ │ + i32.const 92056 │ │ + i32.const 91888 │ │ i32.const 0 │ │ - i32.load offset=91520 │ │ + i32.load offset=91888 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::basic_ios_>::rdbuf___const │ │ call $std::__2::basic_ostream_>::basic_ostream_std::__2::basic_streambuf_>*_ │ │ drop │ │ - i32.const 91092 │ │ + i32.const 91460 │ │ i32.const 0 │ │ - i32.load offset=91092 │ │ + i32.load offset=91460 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ - i32.const 91268 │ │ + i32.const 91636 │ │ call $std::__2::basic_ios_>::tie_std::__2::basic_ostream_>*_ │ │ drop │ │ - i32.const 91180 │ │ + i32.const 91548 │ │ i32.const 0 │ │ - i32.load offset=91180 │ │ + i32.load offset=91548 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ - i32.const 91352 │ │ + i32.const 91720 │ │ call $std::__2::basic_ios_>::tie_std::__2::basic_ostream_>*_ │ │ drop │ │ - i32.const 91436 │ │ + i32.const 91804 │ │ i32.const 0 │ │ - i32.load offset=91436 │ │ + i32.load offset=91804 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::unitbuf_std::__2::ios_base&_ │ │ drop │ │ - i32.const 91520 │ │ + i32.const 91888 │ │ i32.const 0 │ │ - i32.load offset=91520 │ │ + i32.load offset=91888 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ call $std::__2::unitbuf_std::__2::ios_base&_ │ │ drop │ │ - i32.const 91436 │ │ + i32.const 91804 │ │ i32.const 0 │ │ - i32.load offset=91436 │ │ + i32.load offset=91804 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ - i32.const 91268 │ │ + i32.const 91636 │ │ call $std::__2::basic_ios_>::tie_std::__2::basic_ostream_>*_ │ │ drop │ │ - i32.const 91520 │ │ + i32.const 91888 │ │ i32.const 0 │ │ - i32.load offset=91520 │ │ + i32.load offset=91888 │ │ i32.const -12 │ │ i32.add │ │ i32.load │ │ i32.add │ │ - i32.const 91352 │ │ + i32.const 91720 │ │ call $std::__2::basic_ios_>::tie_std::__2::basic_ostream_>*_ │ │ drop │ │ local.get 0) │ │ (func $std::__2::__stdinbuf::__stdinbuf__IO_FILE*____mbstate_t*_ (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ @@ -417747,15 +419936,15 @@ │ │ local.get 0 │ │ local.get 2 │ │ i32.store offset=40 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 63840 │ │ + i32.const 64208 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ call $std::__2::char_traits::eof__ │ │ local.set 1 │ │ local.get 0 │ │ i32.const 0 │ │ @@ -417770,27 +419959,27 @@ │ │ call $std::__2::basic_streambuf_>::getloc___const │ │ local.get 0 │ │ i32.load │ │ i32.load offset=8 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ @@ -417823,39 +420012,39 @@ │ │ (local i32) │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::basic_ios_>::basic_ios__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 62912 │ │ + i32.const 63280 │ │ i32.const 12 │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ - i32.const 62912 │ │ + i32.const 63280 │ │ i32.const 32 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 0 │ │ i32.store offset=4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 539 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -417883,15 +420072,15 @@ │ │ local.get 0 │ │ local.get 2 │ │ i32.store offset=40 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 63940 │ │ + i32.const 64308 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ call $std::__2::char_traits::eof__ │ │ local.set 1 │ │ local.get 0 │ │ i32.const 0 │ │ @@ -417906,27 +420095,27 @@ │ │ call $std::__2::basic_streambuf_>::getloc___const │ │ local.get 0 │ │ i32.load │ │ i32.load offset=8 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ @@ -417959,39 +420148,39 @@ │ │ (local i32) │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::basic_ios_>::basic_ios__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 62960 │ │ + i32.const 63328 │ │ i32.const 12 │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ - i32.const 62960 │ │ + i32.const 63328 │ │ i32.const 32 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 0 │ │ i32.store offset=4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 540 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -418016,38 +420205,38 @@ │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::basic_streambuf__ │ │ local.set 4 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 64040 │ │ + i32.const 64408 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 4 │ │ call $std::__2::basic_streambuf_>::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 541 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ @@ -418090,36 +420279,36 @@ │ │ (local i32) │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::basic_ios_>::basic_ios__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 63008 │ │ + i32.const 63376 │ │ i32.const 12 │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ - i32.const 63008 │ │ + i32.const 63376 │ │ i32.const 32 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 539 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -418144,38 +420333,38 @@ │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::basic_streambuf__ │ │ local.set 4 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=32 │ │ local.get 0 │ │ - i32.const 64144 │ │ + i32.const 64512 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 4 │ │ call $std::__2::basic_streambuf_>::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 542 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ @@ -418218,36 +420407,36 @@ │ │ (local i32) │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::basic_ios_>::basic_ios__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 63056 │ │ + i32.const 63424 │ │ i32.const 12 │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ - i32.const 63056 │ │ + i32.const 63424 │ │ i32.const 32 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 540 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -418287,15 +420476,15 @@ │ │ drop │ │ local.get 0) │ │ (func $std::__2::basic_ios_>::basic_ios__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::ios_base::ios_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 63104 │ │ + i32.const 63472 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::basic_ios_>::init_std::__2::basic_streambuf_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ @@ -418314,15 +420503,15 @@ │ │ call $std::__2::locale::locale_std::__2::locale_const&_ │ │ drop) │ │ (func $std::__2::basic_ios_>::basic_ios__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::ios_base::ios_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 63176 │ │ + i32.const 63544 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::basic_ios_>::init_std::__2::basic_streambuf_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ @@ -418331,15 +420520,15 @@ │ │ i32.const 0 │ │ i32.store offset=72 │ │ local.get 0 │ │ call $std::__2::char_traits::eof__ │ │ i32.store offset=76) │ │ (func $std::__2::codecvt_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92412 │ │ + i32.const 92780 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::codecvt::always_noconv___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=28 │ │ call_indirect (type 10)) │ │ @@ -418353,77 +420542,77 @@ │ │ i32.or │ │ i32.store offset=4 │ │ local.get 2) │ │ (func $std::__2::DoIOSInit::~DoIOSInit__ (type 10) (param i32) (result i32) │ │ (local i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 543 │ │ - i32.const 91268 │ │ + i32.const 91636 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 544 │ │ - i32.const 91352 │ │ + i32.const 91720 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 543 │ │ - i32.const 91604 │ │ + i32.const 91972 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 544 │ │ - i32.const 91688 │ │ + i32.const 92056 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ end │ │ @@ -418433,31 +420622,31 @@ │ │ call $getTempRet0 │ │ drop │ │ call $std::terminate__ │ │ unreachable) │ │ (func $std::__2::ios_base::Init::Init__ (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92129 │ │ + i32.load8_u offset=92497 │ │ br_if 0 (;@1;) │ │ - i32.const 92128 │ │ + i32.const 92496 │ │ call $std::__2::DoIOSInit::DoIOSInit__ │ │ drop │ │ i32.const 545 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92129 │ │ + i32.store8 offset=92497 │ │ end │ │ local.get 0) │ │ (func $__cxx_global_array_dtor.1.1 (type 5) (param i32) │ │ - i32.const 92128 │ │ + i32.const 92496 │ │ call $std::__2::DoIOSInit::~DoIOSInit__ │ │ drop) │ │ (func $std::__2::ios_base::Init::~Init__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::__stdinbuf::~__stdinbuf__ (type 5) (param i32) │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::~basic_streambuf__ │ │ @@ -418867,15 +421056,15 @@ │ │ local.get 1 │ │ i32.load │ │ local.get 2 │ │ i32.load │ │ i32.lt_s) │ │ (func $std::__2::ios_base::ios_base__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 63712 │ │ + i32.const 64080 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__stdinbuf::~__stdinbuf__ (type 5) (param i32) │ │ local.get 0 │ │ call $std::__2::basic_streambuf_>::~basic_streambuf__ │ │ @@ -419863,15 +422052,15 @@ │ │ i32.xor │ │ local.set 0 │ │ end │ │ local.get 0) │ │ (func $_GLOBAL__I_000101 (type 11) │ │ call $__cxx_global_var_init) │ │ (func $_GLOBAL__sub_I_iostream.cpp (type 11)) │ │ - (func $__intscan (type 83) (param i32 i32 i32 i64) (result i64) │ │ + (func $__intscan (type 87) (param i32 i32 i32 i64) (result i64) │ │ (local i32 i32 i32 i64 i64 i64 i32 i64 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -420024,15 +422213,15 @@ │ │ local.get 0 │ │ call $__shgetc │ │ local.set 5 │ │ end │ │ i32.const 16 │ │ local.set 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ i32.const 16 │ │ i32.lt_u │ │ br_if 3 (;@4;) │ │ i64.const 0 │ │ local.set 3 │ │ @@ -420078,15 +422267,15 @@ │ │ end │ │ local.get 1 │ │ i32.const 10 │ │ local.get 1 │ │ select │ │ local.tee 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ i32.gt_u │ │ br_if 0 (;@5;) │ │ i64.const 0 │ │ local.set 3 │ │ block ;; label = @6 │ │ @@ -420260,15 +422449,15 @@ │ │ i32.eqz │ │ br_if 0 (;@4;) │ │ i64.const 0 │ │ local.set 7 │ │ block ;; label = @5 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 10 │ │ i32.le_u │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ local.set 2 │ │ @@ -420303,15 +422492,15 @@ │ │ local.get 10 │ │ local.get 2 │ │ i32.add │ │ local.set 2 │ │ block ;; label = @7 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 10 │ │ i32.le_u │ │ br_if 0 (;@7;) │ │ local.get 2 │ │ i32.const 119304647 │ │ @@ -420369,15 +422558,15 @@ │ │ end │ │ local.get 9 │ │ local.get 11 │ │ i64.add │ │ local.set 7 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 10 │ │ i32.le_u │ │ br_if 2 (;@3;) │ │ local.get 4 │ │ local.get 8 │ │ @@ -420396,24 +422585,24 @@ │ │ local.get 1 │ │ i32.const 23 │ │ i32.mul │ │ i32.const 5 │ │ i32.shr_u │ │ i32.const 7 │ │ i32.and │ │ - i32.const 64513 │ │ + i32.const 64881 │ │ i32.add │ │ i32.load8_s │ │ local.set 12 │ │ i64.const 0 │ │ local.set 7 │ │ block ;; label = @4 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 2 │ │ i32.le_u │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ local.set 10 │ │ @@ -420448,15 +422637,15 @@ │ │ local.get 2 │ │ local.get 10 │ │ i32.or │ │ local.set 10 │ │ block ;; label = @6 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 2 │ │ i32.le_u │ │ br_if 0 (;@6;) │ │ local.get 10 │ │ i32.const 134217728 │ │ @@ -420516,29 +422705,29 @@ │ │ end │ │ local.get 7 │ │ local.get 8 │ │ i64.or │ │ local.set 7 │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ local.tee 2 │ │ i32.le_u │ │ br_if 1 (;@3;) │ │ local.get 7 │ │ local.get 11 │ │ i64.le_u │ │ br_if 0 (;@4;) │ │ end │ │ end │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ i32.le_u │ │ br_if 0 (;@2;) │ │ loop ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ @@ -420561,15 +422750,15 @@ │ │ end │ │ local.get 0 │ │ call $__shgetc │ │ local.set 5 │ │ end │ │ local.get 1 │ │ local.get 5 │ │ - i32.const 64257 │ │ + i32.const 64625 │ │ i32.add │ │ i32.load8_u │ │ i32.gt_u │ │ br_if 0 (;@3;) │ │ end │ │ call $__errno_location │ │ i32.const 68 │ │ @@ -420647,15 +422836,15 @@ │ │ (local i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ local.get 3 │ │ - i32.const 92132 │ │ + i32.const 92500 │ │ local.get 3 │ │ select │ │ local.tee 5 │ │ i32.load │ │ local.set 3 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -420738,15 +422927,15 @@ │ │ local.tee 3 │ │ i32.const 50 │ │ i32.gt_u │ │ br_if 1 (;@3;) │ │ local.get 3 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 64528 │ │ + i32.const 64896 │ │ i32.add │ │ i32.load │ │ local.set 3 │ │ local.get 2 │ │ i32.const -1 │ │ i32.add │ │ local.tee 0 │ │ @@ -422391,41 +424580,41 @@ │ │ local.get 3 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=4 │ │ local.get 2) │ │ (func $__loc_is_allocated (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92160 │ │ + i32.const 92528 │ │ i32.ne │ │ local.get 0 │ │ - i32.const 92136 │ │ + i32.const 92504 │ │ i32.ne │ │ local.get 0 │ │ - i32.const 59872 │ │ + i32.const 60240 │ │ i32.ne │ │ local.get 0 │ │ i32.const 0 │ │ i32.ne │ │ local.get 0 │ │ - i32.const 59848 │ │ + i32.const 60216 │ │ i32.ne │ │ i32.and │ │ i32.and │ │ i32.and │ │ i32.and) │ │ (func $__newlocale (type 4) (param i32 i32 i32) (result i32) │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__lock │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $do_newlocale │ │ local.set 0 │ │ - i32.const 88304 │ │ + i32.const 88672 │ │ call $__unlock │ │ local.get 0) │ │ (func $do_newlocale (type 4) (param i32 i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 32 │ │ i32.sub │ │ @@ -422456,15 +424645,15 @@ │ │ i32.add │ │ i32.load │ │ local.set 5 │ │ br 1 (;@4;) │ │ end │ │ local.get 4 │ │ local.get 1 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.get 5 │ │ select │ │ call $__get_locale │ │ local.set 5 │ │ end │ │ local.get 3 │ │ i32.const 8 │ │ @@ -422494,82 +424683,82 @@ │ │ local.set 2 │ │ br 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 2 │ │ call $__loc_is_allocated │ │ br_if 0 (;@2;) │ │ - i32.const 59848 │ │ + i32.const 60216 │ │ local.set 2 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 59848 │ │ + i32.const 60216 │ │ i32.const 24 │ │ call $memcmp │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ - i32.const 59872 │ │ + i32.const 60240 │ │ local.set 2 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 59872 │ │ + i32.const 60240 │ │ i32.const 24 │ │ call $memcmp │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ i32.const 0 │ │ local.set 4 │ │ block ;; label = @3 │ │ i32.const 0 │ │ - i32.load8_u offset=92184 │ │ + i32.load8_u offset=92552 │ │ br_if 0 (;@3;) │ │ loop ;; label = @4 │ │ local.get 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 92136 │ │ + i32.const 92504 │ │ i32.add │ │ local.get 4 │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ call $__get_locale │ │ i32.store │ │ local.get 4 │ │ i32.const 1 │ │ i32.add │ │ local.tee 4 │ │ i32.const 6 │ │ i32.ne │ │ br_if 0 (;@4;) │ │ end │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92184 │ │ + i32.store8 offset=92552 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=92136 │ │ - i32.store offset=92160 │ │ + i32.load offset=92504 │ │ + i32.store offset=92528 │ │ end │ │ - i32.const 92136 │ │ + i32.const 92504 │ │ local.set 2 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 92136 │ │ + i32.const 92504 │ │ i32.const 24 │ │ call $memcmp │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ - i32.const 92160 │ │ + i32.const 92528 │ │ local.set 2 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ - i32.const 92160 │ │ + i32.const 92528 │ │ i32.const 24 │ │ call $memcmp │ │ i32.eqz │ │ br_if 1 (;@1;) │ │ i32.const 24 │ │ call $dlmalloc │ │ local.tee 2 │ │ @@ -422700,19 +424889,19 @@ │ │ end │ │ local.get 2 │ │ local.get 0 │ │ i32.sub │ │ i32.const 2 │ │ i32.shr_s) │ │ (func $__ctype_b_loc (type 9) (result i32) │ │ - i32.const 64732) │ │ + i32.const 65100) │ │ (func $__ctype_toupper_loc (type 9) (result i32) │ │ - i32.const 65504) │ │ + i32.const 65872) │ │ (func $__ctype_tolower_loc (type 9) (result i32) │ │ - i32.const 67056) │ │ + i32.const 67424) │ │ (func $wcsnrtombs (type 8) (param i32 i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ @@ -423117,15 +425306,15 @@ │ │ local.get 4 │ │ i32.const 1 │ │ i32.add │ │ local.set 4 │ │ local.get 6 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 64528 │ │ + i32.const 64896 │ │ i32.add │ │ i32.load │ │ local.set 5 │ │ i32.const 0 │ │ local.set 6 │ │ br 0 (;@8;) │ │ end │ │ @@ -423257,15 +425446,15 @@ │ │ local.get 4 │ │ i32.const 1 │ │ i32.add │ │ local.set 4 │ │ local.get 6 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 64528 │ │ + i32.const 64896 │ │ i32.add │ │ i32.load │ │ local.set 5 │ │ i32.const 1 │ │ local.set 6 │ │ br 1 (;@7;) │ │ end │ │ @@ -423716,15 +425905,15 @@ │ │ local.tee 4 │ │ i32.const 50 │ │ i32.gt_u │ │ br_if 0 (;@2;) │ │ local.get 4 │ │ i32.const 2 │ │ i32.shl │ │ - i32.const 64528 │ │ + i32.const 64896 │ │ i32.add │ │ i32.load │ │ local.set 4 │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.const 3 │ │ i32.gt_u │ │ @@ -423839,50 +426028,50 @@ │ │ i32.load │ │ select) │ │ (func $mbrlen (type 4) (param i32 i32 i32) (result i32) │ │ i32.const 0 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ - i32.const 92188 │ │ + i32.const 92556 │ │ local.get 2 │ │ select │ │ call $mbrtowc) │ │ (func $__uselocale (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ call $__get_tp │ │ local.tee 1 │ │ i32.load offset=88 │ │ local.set 2 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ - i32.const 88096 │ │ + i32.const 88464 │ │ local.get 0 │ │ local.get 0 │ │ i32.const -1 │ │ i32.eq │ │ select │ │ i32.store offset=88 │ │ end │ │ i32.const -1 │ │ local.get 2 │ │ local.get 2 │ │ - i32.const 88096 │ │ + i32.const 88464 │ │ i32.eq │ │ select) │ │ (func $strtoull (type 47) (param i32 i32 i32) (result i64) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i64.const -1 │ │ call $strtox.1) │ │ - (func $strtox.1 (type 83) (param i32 i32 i32 i64) (result i64) │ │ + (func $strtox.1 (type 87) (param i32 i32 i32 i64) (result i64) │ │ (local i32 i32 i32 i32 i32 i32 i32 i64 i64 i64 i64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -424181,20 +426370,20 @@ │ │ local.get 3) │ │ (func $strtoll (type 47) (param i32 i32 i32) (result i64) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ i64.const -9223372036854775808 │ │ call $strtox.1) │ │ - (func $strtoull_l (type 106) (param i32 i32 i32 i32) (result i64) │ │ + (func $strtoull_l (type 110) (param i32 i32 i32 i32) (result i64) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $strtoull) │ │ - (func $strtoll_l (type 106) (param i32 i32 i32 i32) (result i64) │ │ + (func $strtoll_l (type 110) (param i32 i32 i32 i32) (result i64) │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $strtoll) │ │ (func $std::__2::collate::~collate__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::locale::facet::~facet__ │ │ @@ -424696,25 +426885,25 @@ │ │ br 2 (;@1;) │ │ end │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 1 │ │ i32.const 1 │ │ @@ -424724,78 +426913,78 @@ │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 567 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 568 │ │ local.get 6 │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@8;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ br 5 (;@3;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 569 │ │ local.get 6 │ │ i32.const 12 │ │ i32.or │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 570 │ │ local.get 6 │ │ i32.const 24 │ │ i32.add │ │ local.get 2 │ │ local.get 6 │ │ local.get 6 │ │ @@ -424804,19 +426993,19 @@ │ │ local.tee 3 │ │ local.get 0 │ │ local.get 4 │ │ i32.const 1 │ │ call $invoke_iiiiiiii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@4;) │ │ local.get 5 │ │ local.get 4 │ │ local.get 6 │ │ @@ -424890,15 +427079,15 @@ │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 1) │ │ (func $std::__2::numpunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92436 │ │ + i32.const 92804 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::numpunct::truename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=24 │ │ @@ -424952,23 +427141,23 @@ │ │ block ;; label = @4 │ │ local.get 8 │ │ call $dlmalloc │ │ local.tee 11 │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@1;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ @@ -424993,55 +427182,55 @@ │ │ local.set 13 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ loop ;; label = @8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 0 │ │ local.get 7 │ │ i32.const 120 │ │ i32.add │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ block ;; label = @9 │ │ local.get 12 │ │ local.get 8 │ │ i32.const 0 │ │ i32.ne │ │ i32.and │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 0 │ │ local.get 7 │ │ i32.const 120 │ │ i32.add │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@5;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 3 (;@6;) │ │ @@ -425051,47 +427240,47 @@ │ │ i32.const 2 │ │ i32.or │ │ i32.store │ │ br 3 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@10;) │ │ local.get 6 │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 576 │ │ local.get 4 │ │ local.get 14 │ │ call $invoke_iii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@9;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ @@ -425120,25 +427309,25 @@ │ │ local.get 16 │ │ i32.const 1 │ │ i32.and │ │ i32.eqz │ │ br_if 2 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @11 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ local.get 15 │ │ local.set 13 │ │ @@ -425210,30 +427399,30 @@ │ │ i32.load8_u │ │ local.set 17 │ │ block ;; label = @11 │ │ local.get 6 │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 576 │ │ local.get 4 │ │ local.get 17 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 17 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 18 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 18 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@11;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ @@ -425407,29 +427596,29 @@ │ │ local.get 1 │ │ i32.store offset=12 │ │ local.get 2 │ │ call $std::__2::remove_reference::type&&_std::__2::move_void__*&__void*__ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 578 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 12 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 16 │ │ @@ -425461,24 +427650,24 @@ │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::__compressed_pair::second__ │ │ i32.load │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ drop │ │ @@ -425552,25 +427741,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -425589,30 +427778,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -425629,47 +427818,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -425677,34 +427866,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -425722,40 +427911,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -425801,79 +427990,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 581 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -425963,65 +428152,65 @@ │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 567 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 583 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ local.get 5 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 584 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ @@ -426046,15 +428235,15 @@ │ │ call $__resumeException │ │ unreachable) │ │ (func $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::__get_pointer__ │ │ local.get 1 │ │ i32.add) │ │ - (func $std::__2::__num_get::__stage2_int_loop_char__int__char*__char*&__unsigned_int&__char__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__char_const*_ (type 107) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32) │ │ + (func $std::__2::__num_get::__stage2_int_loop_char__int__char*__char*&__unsigned_int&__char__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__char_const*_ (type 111) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 10 │ │ global.set $__stack_pointer │ │ local.get 10 │ │ @@ -426195,30 +428384,30 @@ │ │ i32.store │ │ local.get 3 │ │ local.get 6 │ │ i32.const 1 │ │ i32.add │ │ i32.store │ │ local.get 6 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 9 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ br 2 (;@1;) │ │ end │ │ local.get 3 │ │ local.get 3 │ │ i32.load │ │ local.tee 0 │ │ i32.const 1 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 9 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 4 │ │ local.get 4 │ │ i32.load │ │ @@ -426481,25 +428670,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -426518,30 +428707,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -426558,47 +428747,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -426606,34 +428795,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -426651,40 +428840,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -426730,79 +428919,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 585 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_jiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 9 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -426844,15 +429033,15 @@ │ │ i32.const 208 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ local.get 0 │ │ call $__resumeException │ │ unreachable) │ │ - (func $long_long_std::__2::__num_get_signed_integral_char_const*__char_const*__unsigned_int&__int_ (type 106) (param i32 i32 i32 i32) (result i64) │ │ + (func $long_long_std::__2::__num_get_signed_integral_char_const*__char_const*__unsigned_int&__int_ (type 110) (param i32 i32 i32 i32) (result i64) │ │ (local i32 i32 i32 i64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -426992,25 +429181,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -427029,30 +429218,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -427069,47 +429258,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -427117,34 +429306,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -427162,40 +429351,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -427241,79 +429430,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 586 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -427526,25 +429715,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -427563,30 +429752,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -427603,47 +429792,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -427651,34 +429840,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -427696,40 +429885,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -427775,79 +429964,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 587 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -428058,25 +430247,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -428095,30 +430284,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -428135,47 +430324,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -428183,34 +430372,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -428228,40 +430417,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -428307,79 +430496,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 588 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -428590,25 +430779,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -428627,30 +430816,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -428667,47 +430856,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -428715,34 +430904,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -428760,40 +430949,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -428839,79 +431028,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 589 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_jiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 9 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -428953,15 +431142,15 @@ │ │ i32.const 208 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ local.get 0 │ │ call $__resumeException │ │ unreachable) │ │ - (func $unsigned_long_long_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ (type 106) (param i32 i32 i32 i32) (result i64) │ │ + (func $unsigned_long_long_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ (type 110) (param i32 i32 i32 i32) (result i64) │ │ (local i32 i32 i32 i32 i64) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -429115,25 +431304,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -429158,30 +431347,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=6 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -429198,47 +431387,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -429246,34 +431435,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 590 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 7 │ │ i32.add │ │ local.get 6 │ │ i32.const 6 │ │ @@ -429300,40 +431489,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -429385,78 +431574,78 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 591 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ call $invoke_fiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 8 │ │ f32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -429512,128 +431701,128 @@ │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 6 │ │ - i32.const 68608 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ + i32.const 68976 │ │ i32.const 32 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 567 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 593 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 3 │ │ local.get 6 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 583 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 4 │ │ local.get 6 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 584 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ @@ -429778,15 +431967,15 @@ │ │ call $char*_std::__2::find_char*__char*__char_const&_ │ │ local.get 11 │ │ i32.sub │ │ local.tee 11 │ │ i32.const 31 │ │ i32.gt_s │ │ br_if 1 (;@1;) │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 11 │ │ i32.add │ │ i32.load8_u │ │ local.set 5 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ @@ -429909,15 +432098,15 @@ │ │ local.set 0 │ │ end │ │ local.get 12 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 0) │ │ - (func $float_std::__2::__num_get_float_char_const*__char_const*__unsigned_int&_ (type 99) (param i32 i32 i32) (result f32) │ │ + (func $float_std::__2::__num_get_float_char_const*__char_const*__unsigned_int&_ (type 103) (param i32 i32 i32) (result f32) │ │ (local i32 i32 i32 f32 f32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 3 │ │ global.set $__stack_pointer │ │ block ;; label = @1 │ │ @@ -430030,25 +432219,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -430073,30 +432262,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=6 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -430113,47 +432302,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -430161,34 +432350,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 590 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 7 │ │ i32.add │ │ local.get 6 │ │ i32.const 6 │ │ @@ -430215,40 +432404,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -430300,78 +432489,78 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 594 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ call $invoke_diii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 8 │ │ f64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -430534,25 +432723,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -430577,30 +432766,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=22 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 280 │ │ i32.add │ │ local.get 6 │ │ i32.const 272 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -430617,47 +432806,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -430665,34 +432854,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=204 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 280 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 590 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 23 │ │ i32.add │ │ local.get 6 │ │ i32.const 22 │ │ @@ -430719,40 +432908,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 240 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 280 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -430804,28 +432993,28 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=24 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 595 │ │ local.get 6 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=204 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ i32.const 8 │ │ @@ -430837,54 +433026,54 @@ │ │ i64.load │ │ i64.store │ │ local.get 5 │ │ local.get 8 │ │ i64.store offset=8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=28 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 280 │ │ i32.add │ │ local.get 6 │ │ i32.const 272 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -431048,77 +433237,77 @@ │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 1 │ │ - i32.const 68608 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ + i32.const 68976 │ │ i32.const 26 │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ @@ -431129,25 +433318,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -431162,30 +433351,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @8 │ │ loop ;; label = @9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 8 │ │ i32.eqz │ │ br_if 6 (;@3;) │ │ @@ -431202,47 +433391,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@4;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@4;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -431250,34 +433439,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 580 │ │ local.get 8 │ │ i32.const 16 │ │ local.get 1 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -431294,40 +433483,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 8 │ │ br_if 6 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@9;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -431363,71 +433552,71 @@ │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 1 │ │ i32.sub │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::c_str___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ local.get 5 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 597 │ │ local.get 2 │ │ local.get 8 │ │ - i32.const 5977 │ │ + i32.const 6026 │ │ local.get 6 │ │ call $invoke_iiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 1 │ │ @@ -431435,30 +433624,30 @@ │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.const 4 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 6 │ │ i32.const 264 │ │ i32.add │ │ local.get 6 │ │ i32.const 256 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.eqz │ │ @@ -431510,32 +433699,32 @@ │ │ i32.load │ │ i32.load offset=32 │ │ call_indirect (type 14)) │ │ (func $std::__2::__cloc__ (type 9) (result i32) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92356 │ │ + i32.load8_u offset=92724 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92352 │ │ + i32.load offset=92720 │ │ return │ │ end │ │ i32.const 2147483647 │ │ - i32.const 16411 │ │ + i32.const 16714 │ │ i32.const 0 │ │ call $__newlocale │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92356 │ │ + i32.store8 offset=92724 │ │ i32.const 0 │ │ local.get 0 │ │ - i32.store offset=92352 │ │ + i32.store offset=92720 │ │ local.get 0) │ │ (func $std::__2::__libcpp_sscanf_l_char_const*____locale_struct*__char_const*__..._ (type 14) (param i32 i32 i32 i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 4 │ │ @@ -431610,25 +433799,25 @@ │ │ local.get 0 │ │ i32.load │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 598 │ │ local.get 1 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -431694,25 +433883,25 @@ │ │ br 2 (;@1;) │ │ end │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 1 │ │ i32.const 1 │ │ @@ -431722,78 +433911,78 @@ │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 600 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 601 │ │ local.get 6 │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@8;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ br 5 (;@3;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 602 │ │ local.get 6 │ │ i32.const 12 │ │ i32.or │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 603 │ │ local.get 6 │ │ i32.const 24 │ │ i32.add │ │ local.get 2 │ │ local.get 6 │ │ local.get 6 │ │ @@ -431802,19 +433991,19 @@ │ │ local.tee 3 │ │ local.get 0 │ │ local.get 4 │ │ i32.const 1 │ │ call $invoke_iiiiiiii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@4;) │ │ local.get 5 │ │ local.get 4 │ │ local.get 6 │ │ @@ -431888,15 +434077,15 @@ │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 1) │ │ (func $std::__2::numpunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92444 │ │ + i32.const 92812 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::numpunct::truename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=24 │ │ @@ -431950,23 +434139,23 @@ │ │ block ;; label = @4 │ │ local.get 8 │ │ call $dlmalloc │ │ local.tee 11 │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@1;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ @@ -431991,55 +434180,55 @@ │ │ local.set 13 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ loop ;; label = @8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 0 │ │ local.get 7 │ │ i32.const 120 │ │ i32.add │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ block ;; label = @9 │ │ local.get 12 │ │ local.get 8 │ │ i32.const 0 │ │ i32.ne │ │ i32.and │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 0 │ │ local.get 7 │ │ i32.const 120 │ │ i32.add │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@5;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 3 (;@6;) │ │ @@ -432049,47 +434238,47 @@ │ │ i32.const 2 │ │ i32.or │ │ i32.store │ │ br 3 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@10;) │ │ local.get 6 │ │ br_if 1 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 607 │ │ local.get 4 │ │ local.get 14 │ │ call $invoke_iii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@9;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ @@ -432118,25 +434307,25 @@ │ │ local.get 16 │ │ i32.const 1 │ │ i32.and │ │ i32.eqz │ │ br_if 2 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @11 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ local.get 15 │ │ local.set 13 │ │ @@ -432208,26 +434397,26 @@ │ │ i32.load │ │ local.set 17 │ │ block ;; label = @11 │ │ local.get 6 │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 607 │ │ local.get 4 │ │ local.get 17 │ │ call $invoke_iii │ │ local.set 17 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 18 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 18 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@11;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ @@ -432454,25 +434643,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -432491,30 +434680,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -432531,47 +434720,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -432579,34 +434768,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -432624,40 +434813,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -432703,79 +434892,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 581 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -432836,65 +435025,65 @@ │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 600 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 610 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 5 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ local.get 5 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 611 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ @@ -432914,15 +435103,15 @@ │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 1 │ │ call $__resumeException │ │ unreachable) │ │ - (func $std::__2::__num_get::__stage2_int_loop_wchar_t__int__char*__char*&__unsigned_int&__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__wchar_t_const*_ (type 107) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32) │ │ + (func $std::__2::__num_get::__stage2_int_loop_wchar_t__int__char*__char*&__unsigned_int&__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__wchar_t_const*_ (type 111) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 10 │ │ global.set $__stack_pointer │ │ local.get 10 │ │ @@ -433064,30 +435253,30 @@ │ │ i32.store │ │ local.get 3 │ │ local.get 9 │ │ i32.const 1 │ │ i32.add │ │ i32.store │ │ local.get 9 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 6 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ br 2 (;@1;) │ │ end │ │ local.get 3 │ │ local.get 3 │ │ i32.load │ │ local.tee 0 │ │ i32.const 1 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 6 │ │ i32.add │ │ i32.load8_u │ │ i32.store8 │ │ local.get 4 │ │ local.get 4 │ │ i32.load │ │ @@ -433153,25 +435342,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -433190,30 +435379,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -433230,47 +435419,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -433278,34 +435467,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -433323,40 +435512,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -433402,79 +435591,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 585 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_jiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 9 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -433564,25 +435753,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -433601,30 +435790,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -433641,47 +435830,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -433689,34 +435878,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -433734,40 +435923,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -433813,79 +436002,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 586 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -433975,25 +436164,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -434012,30 +436201,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -434052,47 +436241,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -434100,34 +436289,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -434145,40 +436334,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -434224,79 +436413,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 587 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -434386,25 +436575,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -434423,30 +436612,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -434463,47 +436652,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -434511,34 +436700,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -434556,40 +436745,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -434635,79 +436824,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 588 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 1 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -434797,25 +436986,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ @@ -434834,30 +437023,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -434874,47 +437063,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -434922,34 +437111,34 @@ │ │ local.tee 0 │ │ local.get 1 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 2 │ │ local.get 7 │ │ local.get 0 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -434967,40 +437156,40 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ local.get 8 │ │ call $invoke_iiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 2 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -435046,79 +437235,79 @@ │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 589 │ │ local.get 0 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 4 │ │ local.get 7 │ │ call $invoke_jiiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 9 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.eqz │ │ @@ -435204,25 +437393,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -435247,30 +437436,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=6 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ local.get 6 │ │ i32.const 352 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -435287,47 +437476,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -435335,34 +437524,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=180 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 612 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 7 │ │ i32.add │ │ local.get 6 │ │ i32.const 6 │ │ @@ -435389,40 +437578,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -435474,78 +437663,78 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 591 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=180 │ │ local.get 4 │ │ call $invoke_fiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 8 │ │ f32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 200 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ local.get 6 │ │ i32.const 352 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -435601,128 +437790,128 @@ │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 6 │ │ - i32.const 68608 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ + i32.const 68976 │ │ i32.const 32 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 600 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 614 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 3 │ │ local.get 6 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 610 │ │ local.get 1 │ │ call $invoke_ii │ │ local.set 6 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 4 │ │ local.get 6 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 611 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ @@ -435867,15 +438056,15 @@ │ │ call $wchar_t*_std::__2::find_wchar_t*__wchar_t*__wchar_t_const&_ │ │ local.get 11 │ │ i32.sub │ │ local.tee 11 │ │ i32.const 124 │ │ i32.gt_s │ │ br_if 1 (;@1;) │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ local.get 11 │ │ i32.const 2 │ │ i32.shr_s │ │ i32.add │ │ i32.load8_u │ │ local.set 5 │ │ block ;; label = @3 │ │ @@ -436047,25 +438236,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -436090,30 +438279,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=6 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ local.get 6 │ │ i32.const 352 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -436130,47 +438319,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -436178,34 +438367,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=180 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 612 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 7 │ │ i32.add │ │ local.get 6 │ │ i32.const 6 │ │ @@ -436232,40 +438421,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -436317,78 +438506,78 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=8 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 594 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=180 │ │ local.get 4 │ │ call $invoke_diii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 5 │ │ local.get 8 │ │ f64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 200 │ │ i32.add │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=12 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 360 │ │ i32.add │ │ local.get 6 │ │ i32.const 352 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -436474,25 +438663,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -436517,30 +438706,30 @@ │ │ local.get 6 │ │ i32.const 69 │ │ i32.store8 offset=22 │ │ block ;; label = @5 │ │ loop ;; label = @6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 376 │ │ i32.add │ │ local.get 6 │ │ i32.const 368 │ │ i32.add │ │ call $invoke_iii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ i32.eqz │ │ br_if 4 (;@2;) │ │ @@ -436557,47 +438746,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@3;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -436605,34 +438794,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=196 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 376 │ │ i32.add │ │ call $invoke_ii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 612 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 23 │ │ i32.add │ │ local.get 6 │ │ i32.const 22 │ │ @@ -436659,40 +438848,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 240 │ │ i32.add │ │ call $invoke_iiiiiiiiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 7 │ │ br_if 4 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 376 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -436744,28 +438933,28 @@ │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=24 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 595 │ │ local.get 6 │ │ local.get 1 │ │ local.get 6 │ │ i32.load offset=196 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 6 │ │ i32.const 8 │ │ @@ -436777,54 +438966,54 @@ │ │ i64.load │ │ i64.store │ │ local.get 5 │ │ local.get 8 │ │ i64.store offset=8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 6 │ │ i32.const 216 │ │ i32.add │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ local.get 6 │ │ i32.load offset=28 │ │ local.get 4 │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 376 │ │ i32.add │ │ local.get 6 │ │ i32.const 368 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.eqz │ │ @@ -436886,77 +439075,77 @@ │ │ local.get 6 │ │ i32.const 208 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 1 │ │ - i32.const 68608 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ + i32.const 68976 │ │ i32.const 26 │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ @@ -436967,25 +439156,25 @@ │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.tee 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -437000,30 +439189,30 @@ │ │ local.get 6 │ │ i32.const 0 │ │ i32.store offset=8 │ │ block ;; label = @8 │ │ loop ;; label = @9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 8 │ │ i32.eqz │ │ br_if 6 (;@3;) │ │ @@ -437040,47 +439229,47 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.shl │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@4;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::capacity___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@4;) │ │ local.get 6 │ │ local.get 3 │ │ i32.const 0 │ │ @@ -437088,34 +439277,34 @@ │ │ local.tee 1 │ │ local.get 2 │ │ i32.add │ │ i32.store offset=188 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 609 │ │ local.get 8 │ │ i32.const 16 │ │ local.get 1 │ │ local.get 6 │ │ i32.const 188 │ │ i32.add │ │ @@ -437132,40 +439321,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 224 │ │ i32.add │ │ call $invoke_iiiiiiiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@8;) │ │ local.get 8 │ │ br_if 6 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@9;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -437201,71 +439390,71 @@ │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ br 1 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 579 │ │ local.get 3 │ │ local.get 6 │ │ i32.load offset=188 │ │ local.get 1 │ │ i32.sub │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::c_str___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 6 │ │ local.get 5 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 597 │ │ local.get 2 │ │ local.get 8 │ │ - i32.const 5977 │ │ + i32.const 6026 │ │ local.get 6 │ │ call $invoke_iiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 1 │ │ @@ -437273,30 +439462,30 @@ │ │ br_if 0 (;@4;) │ │ local.get 4 │ │ i32.const 4 │ │ i32.store │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 6 │ │ i32.const 344 │ │ i32.add │ │ local.get 6 │ │ i32.const 336 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.eqz │ │ @@ -437422,15 +439611,15 @@ │ │ local.get 0 │ │ i32.const 1 │ │ i32.add │ │ local.set 0 │ │ br 0 (;@1;) │ │ end) │ │ (func $std::__2::__num_get::__do_widen_p_std::__2::ios_base&__char*__const (type 4) (param i32 i32 i32) (result i32) │ │ - i32.const 68608) │ │ + i32.const 68976) │ │ (func $std::__2::numpunct::decimal_point___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=12 │ │ call_indirect (type 10)) │ │ (func $std::__2::numpunct::thousands_sep___const (type 10) (param i32) (result i32) │ │ @@ -437484,50 +439673,50 @@ │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 4 │ │ - i32.const 68608 │ │ - i32.const 68608 │ │ + i32.const 68976 │ │ + i32.const 68976 │ │ i32.const 26 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ i32.add │ │ @@ -437584,27 +439773,27 @@ │ │ local.get 5 │ │ i32.const 24 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 567 │ │ local.get 5 │ │ i32.const 24 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ @@ -437671,26 +439860,26 @@ │ │ local.get 5 │ │ i32.const 40 │ │ i32.add │ │ call $std::__2::ostreambuf_iterator_>::operator*__ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 471 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -437813,26 +440002,26 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 76 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68645 align=1 │ │ + i32.load16_u offset=69013 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68641 align=1 │ │ + i32.load offset=69009 align=1 │ │ i32.store offset=72 │ │ local.get 5 │ │ i32.const 72 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7402 │ │ + i32.const 7451 │ │ i32.const 1 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -437862,15 +440051,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 615 │ │ local.get 5 │ │ i32.const 59 │ │ i32.add │ │ local.get 6 │ │ local.get 4 │ │ local.get 5 │ │ @@ -437883,19 +440072,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -438146,28 +440335,28 @@ │ │ block ;; label = @6 │ │ local.get 7 │ │ call $std::__2::basic_string__std::__2::allocator_>::empty___const │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 8 │ │ local.get 0 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 5 │ │ local.get 3 │ │ local.get 2 │ │ @@ -438190,30 +440379,30 @@ │ │ local.tee 10 │ │ i32.const -43 │ │ i32.add │ │ br_table 0 (;@7;) 1 (;@6;) 0 (;@7;) 1 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 10 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -438246,26 +440435,26 @@ │ │ i32.const 32 │ │ i32.or │ │ i32.const 120 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -438277,26 +440466,26 @@ │ │ local.get 11 │ │ i32.store8 │ │ local.get 9 │ │ i32.load8_s offset=1 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 10 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -438312,42 +440501,42 @@ │ │ i32.add │ │ local.set 9 │ │ end │ │ i32.const 0 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 9 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 583 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ local.set 11 │ │ local.get 9 │ │ @@ -438360,29 +440549,29 @@ │ │ i32.lt_u │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ i32.load │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 3 │ │ local.get 9 │ │ local.get 0 │ │ i32.sub │ │ i32.add │ │ local.get 6 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@6;) │ │ local.get 5 │ │ i32.load │ │ local.set 6 │ │ @@ -438425,26 +440614,26 @@ │ │ local.set 10 │ │ end │ │ local.get 6 │ │ i32.load8_s │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ local.get 5 │ │ @@ -438557,30 +440746,30 @@ │ │ local.get 0 │ │ i32.load offset=12 │ │ local.set 2 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=12 │ │ local.get 2) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_long__const (type 108) (param i32 i32 i32 i32 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_long__const (type 112) (param i32 i32 i32 i32 i64) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 112 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=104 │ │ local.get 5 │ │ i32.const 104 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7156 │ │ + i32.const 7205 │ │ i32.const 1 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -438610,15 +440799,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 615 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ @@ -438631,19 +440820,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -438688,26 +440877,26 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 76 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68645 align=1 │ │ + i32.load16_u offset=69013 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68641 align=1 │ │ + i32.load offset=69009 align=1 │ │ i32.store offset=72 │ │ local.get 5 │ │ i32.const 72 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7402 │ │ + i32.const 7451 │ │ i32.const 0 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -438737,15 +440926,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 615 │ │ local.get 5 │ │ i32.const 59 │ │ i32.add │ │ local.get 6 │ │ local.get 4 │ │ local.get 5 │ │ @@ -438758,19 +440947,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -438804,30 +440993,30 @@ │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 2 │ │ call $__resumeException │ │ unreachable) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__unsigned_long_long__const (type 108) (param i32 i32 i32 i32 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__unsigned_long_long__const (type 112) (param i32 i32 i32 i32 i64) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 112 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=104 │ │ local.get 5 │ │ i32.const 104 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7156 │ │ + i32.const 7205 │ │ i32.const 0 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -438857,15 +441046,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 615 │ │ local.get 5 │ │ i32.const 80 │ │ i32.add │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ @@ -438878,19 +441067,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -438924,30 +441113,30 @@ │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 2 │ │ call $__resumeException │ │ unreachable) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__double__const (type 109) (param i32 i32 i32 i32 f64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__double__const (type 113) (param i32 i32 i32 i32 f64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 208 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=200 │ │ local.get 5 │ │ i32.const 200 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_float_char*__char_const*__unsigned_int_ │ │ local.set 6 │ │ local.get 5 │ │ local.get 5 │ │ i32.const 160 │ │ @@ -439029,35 +441218,35 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 6 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@2;) │ │ local.get 5 │ │ local.get 2 │ │ call $std::__2::ios_base::precision___const │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 4 │ │ f64.store offset=8 │ │ i32.const 617 │ │ local.get 5 │ │ i32.const 156 │ │ i32.add │ │ @@ -439065,87 +441254,87 @@ │ │ local.get 5 │ │ i32.const 200 │ │ i32.add │ │ local.get 5 │ │ call $invoke_iiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ local.get 5 │ │ local.get 4 │ │ f64.store offset=16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 617 │ │ local.get 5 │ │ i32.const 156 │ │ i32.add │ │ local.get 8 │ │ local.get 5 │ │ i32.const 200 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_iiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 7 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 9 │ │ @@ -439197,23 +441386,23 @@ │ │ i32.const 1 │ │ i32.shl │ │ call $dlmalloc │ │ local.tee 7 │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ @@ -439225,37 +441414,37 @@ │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 5 │ │ i32.load offset=156 │ │ local.set 10 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 618 │ │ local.get 10 │ │ local.get 12 │ │ local.get 11 │ │ local.get 7 │ │ local.get 5 │ │ i32.const 68 │ │ @@ -439264,48 +441453,48 @@ │ │ i32.const 64 │ │ i32.add │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 139 │ │ local.get 1 │ │ local.get 7 │ │ local.get 5 │ │ i32.load offset=68 │ │ local.get 5 │ │ i32.load offset=64 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 8 │ │ call $std::__2::unique_ptr::~unique_ptr__ │ │ drop │ │ @@ -439493,29 +441682,29 @@ │ │ local.get 1 │ │ i32.store offset=12 │ │ local.get 2 │ │ call $std::__2::remove_reference::type&&_std::__2::move_void__*&__void*__ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 619 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 12 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 16 │ │ @@ -439548,28 +441737,28 @@ │ │ local.get 4 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 620 │ │ local.get 0 │ │ local.get 2 │ │ local.get 4 │ │ i32.load offset=8 │ │ call $invoke_iiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -439607,24 +441796,24 @@ │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::__compressed_pair::second__ │ │ i32.load │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ drop │ │ @@ -439667,30 +441856,30 @@ │ │ local.tee 6 │ │ i32.const -43 │ │ i32.add │ │ br_table 0 (;@9;) 1 (;@8;) 0 (;@9;) 1 (;@8;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 6 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -439730,26 +441919,26 @@ │ │ i32.const 32 │ │ i32.or │ │ i32.const 120 │ │ i32.ne │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -439761,26 +441950,26 @@ │ │ local.get 11 │ │ i32.store8 │ │ local.get 10 │ │ i32.load8_s offset=1 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 6 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -439802,43 +441991,43 @@ │ │ i32.ge_u │ │ br_if 2 (;@8;) │ │ local.get 6 │ │ i32.load8_s │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @11 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 621 │ │ local.get 12 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 3 (;@8;) │ │ @@ -439861,42 +442050,42 @@ │ │ i32.ge_u │ │ br_if 1 (;@8;) │ │ local.get 6 │ │ i32.load8_s │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 622 │ │ local.get 12 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@3;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 1 (;@8;) │ │ @@ -439913,28 +442102,28 @@ │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 8 │ │ local.get 10 │ │ local.get 6 │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -439945,42 +442134,42 @@ │ │ i32.store │ │ br 3 (;@5;) │ │ end │ │ i32.const 0 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 10 │ │ local.get 6 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 583 │ │ local.get 9 │ │ call $invoke_ii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ i32.const 0 │ │ local.set 13 │ │ local.get 10 │ │ @@ -439992,29 +442181,29 @@ │ │ i32.lt_u │ │ br_if 0 (;@9;) │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 3 │ │ local.get 10 │ │ local.get 0 │ │ i32.sub │ │ i32.add │ │ local.get 11 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@5;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 6 │ │ call $getTempRet0 │ │ @@ -440059,26 +442248,26 @@ │ │ local.set 12 │ │ end │ │ local.get 11 │ │ i32.load8_s │ │ local.set 15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 15 │ │ call $invoke_iii │ │ local.set 16 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @9 │ │ local.get 15 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ local.get 5 │ │ local.get 5 │ │ @@ -440130,25 +442319,25 @@ │ │ i32.load8_u │ │ local.tee 11 │ │ i32.const 46 │ │ i32.ne │ │ br_if 1 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 593 │ │ local.get 9 │ │ call $invoke_ii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -440165,28 +442354,28 @@ │ │ local.set 6 │ │ end │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 8 │ │ local.get 6 │ │ local.get 2 │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -440215,30 +442404,30 @@ │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer │ │ return │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ local.get 11 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -440302,30 +442491,30 @@ │ │ local.get 0 │ │ call $std::__2::__compressed_pair_elem::__get__) │ │ (func $std::__2::__compressed_pair::second__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::__compressed_pair_elem::__get__) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_double__const (type 110) (param i32 i32 i32 i32 i64 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_double__const (type 114) (param i32 i32 i32 i32 i64 i64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 256 │ │ i32.sub │ │ local.tee 6 │ │ global.set $__stack_pointer │ │ local.get 6 │ │ i64.const 37 │ │ i64.store offset=248 │ │ local.get 6 │ │ i32.const 248 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 16235 │ │ + i32.const 16538 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_float_char*__char_const*__unsigned_int_ │ │ local.set 7 │ │ local.get 6 │ │ local.get 6 │ │ i32.const 208 │ │ @@ -440415,24 +442604,24 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 7 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@2;) │ │ local.get 2 │ │ call $std::__2::ios_base::precision___const │ │ local.set 8 │ │ @@ -440442,15 +442631,15 @@ │ │ local.get 5 │ │ i64.store │ │ local.get 6 │ │ local.get 8 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 4 │ │ i64.store offset=8 │ │ i32.const 617 │ │ local.get 6 │ │ i32.const 204 │ │ i32.add │ │ @@ -440458,47 +442647,47 @@ │ │ local.get 6 │ │ i32.const 248 │ │ i32.add │ │ local.get 6 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ local.get 6 │ │ local.get 4 │ │ i64.store offset=32 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 5 │ │ i64.store offset=40 │ │ i32.const 617 │ │ local.get 6 │ │ i32.const 204 │ │ i32.add │ │ @@ -440508,40 +442697,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 8 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 10 │ │ @@ -440593,23 +442782,23 @@ │ │ i32.const 1 │ │ i32.shl │ │ call $dlmalloc │ │ local.tee 8 │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ @@ -440621,37 +442810,37 @@ │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 6 │ │ i32.load offset=204 │ │ local.set 11 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 618 │ │ local.get 11 │ │ local.get 13 │ │ local.get 12 │ │ local.get 8 │ │ local.get 6 │ │ i32.const 116 │ │ @@ -440660,48 +442849,48 @@ │ │ i32.const 112 │ │ i32.add │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 139 │ │ local.get 1 │ │ local.get 8 │ │ local.get 6 │ │ i32.load offset=116 │ │ local.get 6 │ │ i32.load offset=112 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 9 │ │ call $std::__2::unique_ptr::~unique_ptr__ │ │ drop │ │ @@ -440762,19 +442951,19 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 92 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68651 align=1 │ │ + i32.load16_u offset=69019 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68647 align=1 │ │ + i32.load offset=69015 align=1 │ │ i32.store offset=88 │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ local.get 4 │ │ i32.store │ │ local.get 5 │ │ @@ -440802,27 +442991,27 @@ │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 8 │ │ @@ -440918,27 +443107,27 @@ │ │ local.get 5 │ │ i32.const 24 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 600 │ │ local.get 5 │ │ i32.const 24 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 5 │ │ @@ -441005,26 +443194,26 @@ │ │ local.get 5 │ │ i32.const 40 │ │ i32.add │ │ call $std::__2::ostreambuf_iterator_>::operator*__ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 623 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -441161,26 +443350,26 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 156 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68645 align=1 │ │ + i32.load16_u offset=69013 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68641 align=1 │ │ + i32.load offset=69009 align=1 │ │ i32.store offset=152 │ │ local.get 5 │ │ i32.const 152 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7402 │ │ + i32.const 7451 │ │ i32.const 1 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -441210,15 +443399,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 624 │ │ local.get 5 │ │ i32.const 139 │ │ i32.add │ │ local.get 6 │ │ local.get 4 │ │ local.get 5 │ │ @@ -441231,19 +443420,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -441304,28 +443493,28 @@ │ │ block ;; label = @6 │ │ local.get 7 │ │ call $std::__2::basic_string__std::__2::allocator_>::empty___const │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 8 │ │ local.get 0 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@5;) │ │ local.get 5 │ │ local.get 3 │ │ local.get 2 │ │ @@ -441350,30 +443539,30 @@ │ │ local.tee 10 │ │ i32.const -43 │ │ i32.add │ │ br_table 0 (;@7;) 1 (;@6;) 0 (;@7;) 1 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 10 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -441406,26 +443595,26 @@ │ │ i32.const 32 │ │ i32.or │ │ i32.const 120 │ │ i32.ne │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -441437,26 +443626,26 @@ │ │ local.get 11 │ │ i32.store │ │ local.get 9 │ │ i32.load8_s offset=1 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 10 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -441472,42 +443661,42 @@ │ │ i32.add │ │ local.set 9 │ │ end │ │ i32.const 0 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 9 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 610 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ local.set 11 │ │ local.get 9 │ │ @@ -441520,31 +443709,31 @@ │ │ i32.lt_u │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ i32.load │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 626 │ │ local.get 3 │ │ local.get 9 │ │ local.get 0 │ │ i32.sub │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ local.get 6 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@6;) │ │ local.get 5 │ │ i32.load │ │ local.set 6 │ │ @@ -441587,26 +443776,26 @@ │ │ local.set 10 │ │ end │ │ local.get 6 │ │ i32.load8_s │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 13 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 13 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ local.get 5 │ │ @@ -441750,27 +443939,27 @@ │ │ local.get 5 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_unsigned_long__wchar_t_ │ │ local.tee 8 │ │ call $std::__2::basic_string__std::__2::allocator_>::data__ │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 627 │ │ local.get 0 │ │ local.get 5 │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@1;) │ │ local.get 8 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ @@ -441851,30 +444040,30 @@ │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 0) │ │ (func $std::__2::basic_string__std::__2::allocator_>::data__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::__get_pointer__ │ │ call $wchar_t*_std::__2::__to_address_wchar_t*_) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_long__const (type 108) (param i32 i32 i32 i32 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_long__const (type 112) (param i32 i32 i32 i32 i64) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 256 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=248 │ │ local.get 5 │ │ i32.const 248 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7156 │ │ + i32.const 7205 │ │ i32.const 1 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -441904,15 +444093,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 624 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ @@ -441925,19 +444114,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -441982,26 +444171,26 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 156 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68645 align=1 │ │ + i32.load16_u offset=69013 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68641 align=1 │ │ + i32.load offset=69009 align=1 │ │ i32.store offset=152 │ │ local.get 5 │ │ i32.const 152 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7402 │ │ + i32.const 7451 │ │ i32.const 0 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -442031,15 +444220,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 624 │ │ local.get 5 │ │ i32.const 139 │ │ i32.add │ │ local.get 6 │ │ local.get 4 │ │ local.get 5 │ │ @@ -442052,19 +444241,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -442098,30 +444287,30 @@ │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 2 │ │ call $__resumeException │ │ unreachable) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__unsigned_long_long__const (type 108) (param i32 i32 i32 i32 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__unsigned_long_long__const (type 112) (param i32 i32 i32 i32 i64) (result i32) │ │ (local i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 256 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=248 │ │ local.get 5 │ │ i32.const 248 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 7156 │ │ + i32.const 7205 │ │ i32.const 0 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_int_char*__char_const*__bool__unsigned_int_ │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ @@ -442151,15 +444340,15 @@ │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 624 │ │ local.get 5 │ │ i32.const 224 │ │ i32.add │ │ local.get 7 │ │ local.get 6 │ │ local.get 5 │ │ @@ -442172,19 +444361,19 @@ │ │ i32.const 24 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 16 │ │ @@ -442218,30 +444407,30 @@ │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 2 │ │ call $__resumeException │ │ unreachable) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__double__const (type 109) (param i32 i32 i32 i32 f64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__double__const (type 113) (param i32 i32 i32 i32 f64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 384 │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i64.const 37 │ │ i64.store offset=376 │ │ local.get 5 │ │ i32.const 376 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_float_char*__char_const*__unsigned_int_ │ │ local.set 6 │ │ local.get 5 │ │ local.get 5 │ │ i32.const 336 │ │ @@ -442323,35 +444512,35 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 6 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@2;) │ │ local.get 5 │ │ local.get 2 │ │ call $std::__2::ios_base::precision___const │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ local.get 4 │ │ f64.store offset=8 │ │ i32.const 617 │ │ local.get 5 │ │ i32.const 332 │ │ i32.add │ │ @@ -442359,87 +444548,87 @@ │ │ local.get 5 │ │ i32.const 376 │ │ i32.add │ │ local.get 5 │ │ call $invoke_iiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ local.get 5 │ │ local.get 4 │ │ f64.store offset=16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 617 │ │ local.get 5 │ │ i32.const 332 │ │ i32.add │ │ local.get 8 │ │ local.get 5 │ │ i32.const 376 │ │ i32.add │ │ local.get 5 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_iiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 7 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 9 │ │ @@ -442491,23 +444680,23 @@ │ │ i32.const 3 │ │ i32.shl │ │ call $dlmalloc │ │ local.tee 7 │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ @@ -442519,37 +444708,37 @@ │ │ call $std::__2::unique_ptr::reset_wchar_t*_ │ │ local.get 5 │ │ i32.load offset=332 │ │ local.set 10 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 628 │ │ local.get 10 │ │ local.get 12 │ │ local.get 11 │ │ local.get 7 │ │ local.get 5 │ │ i32.const 68 │ │ @@ -442558,48 +444747,48 @@ │ │ i32.const 64 │ │ i32.add │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 10 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 5 │ │ i32.const 56 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 629 │ │ local.get 1 │ │ local.get 7 │ │ local.get 5 │ │ i32.load offset=68 │ │ local.get 5 │ │ i32.load offset=64 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiiiii │ │ local.set 7 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 8 │ │ call $std::__2::unique_ptr::~unique_ptr__ │ │ drop │ │ @@ -442664,29 +444853,29 @@ │ │ local.get 1 │ │ i32.store offset=12 │ │ local.get 2 │ │ call $std::__2::remove_reference::type&&_std::__2::move_void__*&__void*__ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 630 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 12 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 16 │ │ @@ -442718,24 +444907,24 @@ │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::__compressed_pair::second__ │ │ i32.load │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ drop │ │ @@ -442778,30 +444967,30 @@ │ │ local.tee 6 │ │ i32.const -43 │ │ i32.add │ │ br_table 0 (;@9;) 1 (;@8;) 0 (;@9;) 1 (;@8;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 6 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -442841,26 +445030,26 @@ │ │ i32.const 32 │ │ i32.or │ │ i32.const 120 │ │ i32.ne │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -442872,26 +445061,26 @@ │ │ local.get 11 │ │ i32.store │ │ local.get 10 │ │ i32.load8_s offset=1 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 6 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -442913,43 +445102,43 @@ │ │ i32.ge_u │ │ br_if 2 (;@8;) │ │ local.get 6 │ │ i32.load8_s │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @11 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 621 │ │ local.get 12 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 3 (;@8;) │ │ @@ -442972,42 +445161,42 @@ │ │ i32.ge_u │ │ br_if 1 (;@8;) │ │ local.get 6 │ │ i32.load8_s │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 622 │ │ local.get 12 │ │ local.get 13 │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@3;) │ │ local.get 12 │ │ i32.eqz │ │ br_if 1 (;@8;) │ │ @@ -443024,28 +445213,28 @@ │ │ i32.eqz │ │ br_if 0 (;@8;) │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 8 │ │ local.get 10 │ │ local.get 6 │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -443058,42 +445247,42 @@ │ │ i32.store │ │ br 3 (;@5;) │ │ end │ │ i32.const 0 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 616 │ │ local.get 10 │ │ local.get 6 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 610 │ │ local.get 9 │ │ call $invoke_ii │ │ local.set 14 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ i32.const 0 │ │ local.set 13 │ │ local.get 10 │ │ @@ -443105,31 +445294,31 @@ │ │ i32.lt_u │ │ br_if 0 (;@9;) │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 626 │ │ local.get 3 │ │ local.get 10 │ │ local.get 0 │ │ i32.sub │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ local.get 11 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@5;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 6 │ │ call $getTempRet0 │ │ @@ -443174,26 +445363,26 @@ │ │ local.set 12 │ │ end │ │ local.get 11 │ │ i32.load8_s │ │ local.set 15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 15 │ │ call $invoke_iii │ │ local.set 16 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @9 │ │ local.get 15 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ local.get 5 │ │ local.get 5 │ │ @@ -443246,25 +445435,25 @@ │ │ i32.load8_u │ │ local.tee 11 │ │ i32.const 46 │ │ i32.ne │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 614 │ │ local.get 9 │ │ call $invoke_ii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -443280,30 +445469,30 @@ │ │ i32.const 1 │ │ i32.add │ │ local.set 6 │ │ br 3 (;@5;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ local.get 11 │ │ i32.const 24 │ │ i32.shl │ │ i32.const 24 │ │ i32.shr_s │ │ call $invoke_iii │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@2;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -443323,28 +445512,28 @@ │ │ end │ │ local.get 5 │ │ i32.load │ │ local.set 11 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 8 │ │ local.get 6 │ │ local.get 2 │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@4;) │ │ local.get 5 │ │ local.get 5 │ │ i32.load │ │ @@ -443425,30 +445614,30 @@ │ │ local.get 0 │ │ call $std::__2::__compressed_pair_elem::__get__) │ │ (func $std::__2::__compressed_pair::second__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::__compressed_pair_elem::__get__) │ │ - (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_double__const (type 110) (param i32 i32 i32 i32 i64 i64) (result i32) │ │ + (func $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_double__const (type 114) (param i32 i32 i32 i32 i64 i64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 432 │ │ i32.sub │ │ local.tee 6 │ │ global.set $__stack_pointer │ │ local.get 6 │ │ i64.const 37 │ │ i64.store offset=424 │ │ local.get 6 │ │ i32.const 424 │ │ i32.add │ │ i32.const 1 │ │ i32.or │ │ - i32.const 16235 │ │ + i32.const 16538 │ │ local.get 2 │ │ call $std::__2::ios_base::flags___const │ │ call $std::__2::__num_put_base::__format_float_char*__char_const*__unsigned_int_ │ │ local.set 7 │ │ local.get 6 │ │ local.get 6 │ │ i32.const 384 │ │ @@ -443538,24 +445727,24 @@ │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ local.get 7 │ │ i32.eqz │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 4 (;@2;) │ │ local.get 2 │ │ call $std::__2::ios_base::precision___const │ │ local.set 8 │ │ @@ -443565,15 +445754,15 @@ │ │ local.get 5 │ │ i64.store │ │ local.get 6 │ │ local.get 8 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 4 │ │ i64.store offset=8 │ │ i32.const 617 │ │ local.get 6 │ │ i32.const 380 │ │ i32.add │ │ @@ -443581,47 +445770,47 @@ │ │ local.get 6 │ │ i32.const 424 │ │ i32.add │ │ local.get 6 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@5;) │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ local.get 6 │ │ local.get 4 │ │ i64.store offset=32 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ local.get 5 │ │ i64.store offset=40 │ │ i32.const 617 │ │ local.get 6 │ │ i32.const 380 │ │ i32.add │ │ @@ -443631,40 +445820,40 @@ │ │ i32.add │ │ local.get 6 │ │ i32.const 32 │ │ i32.add │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ end │ │ block ;; label = @5 │ │ local.get 8 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 10 │ │ @@ -443716,23 +445905,23 @@ │ │ i32.const 3 │ │ i32.shl │ │ call $dlmalloc │ │ local.tee 8 │ │ br_if 0 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 6 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 6 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 2 │ │ call $getTempRet0 │ │ @@ -443744,37 +445933,37 @@ │ │ call $std::__2::unique_ptr::reset_wchar_t*_ │ │ local.get 6 │ │ i32.load offset=380 │ │ local.set 11 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 628 │ │ local.get 11 │ │ local.get 13 │ │ local.get 12 │ │ local.get 8 │ │ local.get 6 │ │ i32.const 116 │ │ @@ -443783,48 +445972,48 @@ │ │ i32.const 112 │ │ i32.add │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ call $invoke_viiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 11 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@6;) │ │ local.get 6 │ │ i32.const 104 │ │ i32.add │ │ call $std::__2::locale::~locale__ │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 629 │ │ local.get 1 │ │ local.get 8 │ │ local.get 6 │ │ i32.load offset=116 │ │ local.get 6 │ │ i32.load offset=112 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@5;) │ │ local.get 9 │ │ call $std::__2::unique_ptr::~unique_ptr__ │ │ drop │ │ @@ -443885,19 +446074,19 @@ │ │ i32.sub │ │ local.tee 5 │ │ global.set $__stack_pointer │ │ local.get 5 │ │ i32.const 204 │ │ i32.add │ │ i32.const 0 │ │ - i32.load16_u offset=68651 align=1 │ │ + i32.load16_u offset=69019 align=1 │ │ i32.store16 │ │ local.get 5 │ │ i32.const 0 │ │ - i32.load offset=68647 align=1 │ │ + i32.load offset=69015 align=1 │ │ i32.store offset=200 │ │ call $std::__2::__cloc__ │ │ local.set 6 │ │ local.get 5 │ │ local.get 4 │ │ i32.store │ │ local.get 5 │ │ @@ -443925,27 +446114,27 @@ │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ local.get 2 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 5 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ i32.const 8 │ │ @@ -444077,27 +446266,27 @@ │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 8 │ │ i32.const 8 │ │ @@ -444413,25 +446602,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -444511,25 +446700,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -444609,25 +446798,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -444816,27 +447005,27 @@ │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -445078,19 +447267,19 @@ │ │ local.get 4 │ │ local.get 9 │ │ call $std::__2::time_get_>_>::__get_am_pm_int&__std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__unsigned_int&__std::__2::ctype_const&__const │ │ br 12 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 0 │ │ - i32.load offset=68660 align=1 │ │ + i32.load offset=69028 align=1 │ │ i32.store offset=15 align=1 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68653 align=1 │ │ + i64.load offset=69021 align=1 │ │ i64.store offset=8 │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -445105,19 +447294,19 @@ │ │ i32.store offset=24 │ │ br 11 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 12 │ │ i32.add │ │ i32.const 0 │ │ - i32.load8_u offset=68668 │ │ + i32.load8_u offset=69036 │ │ i32.store8 │ │ local.get 8 │ │ i32.const 0 │ │ - i32.load offset=68664 align=1 │ │ + i32.load offset=69032 align=1 │ │ i32.store offset=8 │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -445727,27 +447916,27 @@ │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 8 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 8 │ │ i32.const 8 │ │ @@ -446007,29 +448196,29 @@ │ │ i32.sub │ │ local.tee 6 │ │ global.set $__stack_pointer │ │ local.get 6 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68840 │ │ + i64.load offset=69208 │ │ i64.store │ │ local.get 6 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68832 │ │ + i64.load offset=69200 │ │ i64.store │ │ local.get 6 │ │ i32.const 0 │ │ - i64.load offset=68824 │ │ + i64.load offset=69192 │ │ i64.store offset=8 │ │ local.get 6 │ │ i32.const 0 │ │ - i64.load offset=68816 │ │ + i64.load offset=69184 │ │ i64.store │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ local.get 5 │ │ @@ -446116,25 +448305,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -446214,25 +448403,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -446312,25 +448501,25 @@ │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 6 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 6 │ │ call $std::__2::locale::~locale__ │ │ @@ -446517,25 +448706,25 @@ │ │ i32.const 0 │ │ i32.store │ │ local.get 8 │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 8 │ │ call $invoke_ii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -446649,29 +448838,29 @@ │ │ call $std::__2::time_get_>_>::__get_day_int&__std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__unsigned_int&__std::__2::ctype_const&__const │ │ br 21 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68696 │ │ + i64.load offset=69064 │ │ i64.store │ │ local.get 8 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68688 │ │ + i64.load offset=69056 │ │ i64.store │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68680 │ │ + i64.load offset=69048 │ │ i64.store offset=8 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68672 │ │ + i64.load offset=69040 │ │ i64.store │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -446684,29 +448873,29 @@ │ │ i32.store offset=56 │ │ br 20 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68728 │ │ + i64.load offset=69096 │ │ i64.store │ │ local.get 8 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68720 │ │ + i64.load offset=69088 │ │ i64.store │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68712 │ │ + i64.load offset=69080 │ │ i64.store offset=8 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68704 │ │ + i64.load offset=69072 │ │ i64.store │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -446804,15 +448993,15 @@ │ │ local.get 2 │ │ local.get 4 │ │ local.get 9 │ │ call $std::__2::time_get_>_>::__get_am_pm_int&__std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__unsigned_int&__std::__2::ctype_const&__const │ │ br 12 (;@2;) │ │ end │ │ local.get 8 │ │ - i32.const 68736 │ │ + i32.const 69104 │ │ i32.const 44 │ │ call $__memcpy │ │ local.set 6 │ │ local.get 6 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ @@ -446827,23 +449016,23 @@ │ │ i32.store offset=56 │ │ br 11 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i32.load offset=68800 │ │ + i32.load offset=69168 │ │ i32.store │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68792 │ │ + i64.load offset=69160 │ │ i64.store offset=8 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68784 │ │ + i64.load offset=69152 │ │ i64.store │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -446867,29 +449056,29 @@ │ │ call $std::__2::time_get_>_>::__get_second_int&__std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__unsigned_int&__std::__2::ctype_const&__const │ │ br 9 (;@2;) │ │ end │ │ local.get 8 │ │ i32.const 24 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68840 │ │ + i64.load offset=69208 │ │ i64.store │ │ local.get 8 │ │ i32.const 16 │ │ i32.add │ │ i32.const 0 │ │ - i64.load offset=68832 │ │ + i64.load offset=69200 │ │ i64.store │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68824 │ │ + i64.load offset=69192 │ │ i64.store offset=8 │ │ local.get 8 │ │ i32.const 0 │ │ - i64.load offset=68816 │ │ + i64.load offset=69184 │ │ i64.store │ │ local.get 8 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ @@ -447680,15 +449869,15 @@ │ │ local.get 0 │ │ i32.load │ │ call $std::__2::__libcpp_mbsrtowcs_l_wchar_t*__char_const**__unsigned_long____mbstate_t*____locale_struct*_ │ │ local.tee 0 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ - i32.const 11840 │ │ + i32.const 12109 │ │ call $std::__2::__throw_runtime_error_char_const*_ │ │ unreachable │ │ end │ │ local.get 2 │ │ local.get 1 │ │ local.get 0 │ │ i32.const 2 │ │ @@ -447731,28 +449920,28 @@ │ │ local.get 5 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 631 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -447777,33 +449966,33 @@ │ │ (func $std::__2::__throw_runtime_error_char_const*_ (type 5) (param i32) │ │ (local i32) │ │ i32.const 8 │ │ call $__cxa_allocate_exception │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 632 │ │ local.get 1 │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ - i32.const 75108 │ │ + i32.const 75476 │ │ i32.const 633 │ │ call $__cxa_throw │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ call $getTempRet0 │ │ @@ -447915,29 +450104,29 @@ │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 634 │ │ local.get 0 │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::__zero__ │ │ @@ -448209,27 +450398,27 @@ │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::unique_ptr::unique_ptr_char*__std::__2::__dependent_type__true>::__good_rval_ref_type_ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 144 │ │ i32.add │ │ local.get 4 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -448239,40 +450428,40 @@ │ │ block ;; label = @11 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 7 │ │ i32.const 144 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ local.get 7 │ │ i32.const 0 │ │ i32.store8 offset=143 │ │ local.get 4 │ │ call $std::__2::ios_base::flags___const │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 636 │ │ local.get 7 │ │ i32.const 280 │ │ i32.add │ │ local.get 2 │ │ local.get 3 │ │ local.get 7 │ │ @@ -448290,56 +450479,56 @@ │ │ i32.add │ │ local.get 7 │ │ i32.const 260 │ │ i32.add │ │ call $invoke_iiiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 5 (;@6;) │ │ local.get 7 │ │ i32.const 0 │ │ - i32.load offset=16720 align=1 │ │ + i32.load offset=17023 align=1 │ │ i32.store offset=135 align=1 │ │ local.get 7 │ │ i32.const 0 │ │ - i64.load offset=16713 align=1 │ │ + i64.load offset=17016 align=1 │ │ i64.store offset=128 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 8 │ │ local.get 7 │ │ i32.const 128 │ │ i32.add │ │ local.get 7 │ │ i32.const 138 │ │ i32.add │ │ local.get 7 │ │ i32.const 118 │ │ i32.add │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@9;) │ │ local.get 7 │ │ i32.const 571 │ │ i32.store offset=4 │ │ @@ -448375,23 +450564,23 @@ │ │ call $dlmalloc │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 8 │ │ call $std::__2::unique_ptr::get___const │ │ br_if 3 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@4;) │ │ br 10 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -448445,32 +450634,32 @@ │ │ local.get 7 │ │ local.get 6 │ │ i32.store │ │ block ;; label = @9 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ - i32.const 8947 │ │ + i32.const 9081 │ │ local.get 7 │ │ call $sscanf │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 637 │ │ - i32.const 4872 │ │ + i32.const 4921 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 8 (;@1;) │ │ br 5 (;@4;) │ │ end │ │ local.get 8 │ │ @@ -448507,30 +450696,30 @@ │ │ i32.add │ │ local.set 4 │ │ br 0 (;@7;) │ │ end │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 7 │ │ i32.const 280 │ │ i32.add │ │ local.get 7 │ │ i32.const 272 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ block ;; label = @6 │ │ local.get 2 │ │ i32.eqz │ │ @@ -448648,15 +450837,15 @@ │ │ local.get 11 │ │ i32.const 40 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 17 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 638 │ │ local.get 2 │ │ local.get 3 │ │ local.get 11 │ │ i32.const 120 │ │ i32.add │ │ local.get 11 │ │ @@ -448670,19 +450859,19 @@ │ │ local.get 15 │ │ local.get 16 │ │ local.get 11 │ │ i32.const 36 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ @@ -448714,28 +450903,28 @@ │ │ block ;; label = @12 │ │ local.get 10 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@3;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ @@ -448759,75 +450948,75 @@ │ │ end │ │ local.get 10 │ │ i32.const 3 │ │ i32.eq │ │ br_if 10 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@3;) │ │ block ;; label = @18 │ │ local.get 7 │ │ i32.const 8192 │ │ local.get 3 │ │ call $std::__2::ctype::is_unsigned_short__char__const │ │ i32.eqz │ │ br_if 0 (;@18;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 639 │ │ local.get 11 │ │ i32.const 24 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @19 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@19;) │ │ local.get 11 │ │ i32.const 24 │ │ i32.add │ │ call $std::__2::istreambuf_iterator_>::__proxy::operator*___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 640 │ │ local.get 17 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@16;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 11 │ │ @@ -448849,97 +451038,97 @@ │ │ i32.const 3 │ │ i32.eq │ │ br_if 9 (;@7;) │ │ end │ │ loop ;; label = @16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@2;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 9 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@2;) │ │ local.get 7 │ │ i32.const 8192 │ │ local.get 3 │ │ call $std::__2::ctype::is_unsigned_short__char__const │ │ i32.eqz │ │ br_if 9 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 639 │ │ local.get 11 │ │ i32.const 24 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @17 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 11 │ │ i32.const 24 │ │ i32.add │ │ call $std::__2::istreambuf_iterator_>::__proxy::operator*___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 640 │ │ local.get 17 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@16;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -448969,25 +451158,25 @@ │ │ block ;; label = @16 │ │ local.get 15 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ i32.eqz │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 13 (;@3;) │ │ block ;; label = @17 │ │ local.get 3 │ │ i32.const 255 │ │ @@ -448996,25 +451185,25 @@ │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load8_u │ │ i32.ne │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@3;) │ │ local.get 15 │ │ local.get 4 │ │ local.get 15 │ │ @@ -449028,25 +451217,25 @@ │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ br 9 (;@7;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 3 │ │ i32.const 255 │ │ i32.and │ │ @@ -449054,25 +451243,25 @@ │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load8_u │ │ i32.ne │ │ br_if 8 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ @@ -449084,25 +451273,25 @@ │ │ i32.gt_u │ │ select │ │ local.set 2 │ │ br 9 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 11 (;@3;) │ │ block ;; label = @15 │ │ local.get 3 │ │ i32.const 255 │ │ @@ -449111,25 +451300,25 @@ │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load8_u │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 15 │ │ local.get 4 │ │ local.get 15 │ │ @@ -449138,25 +451327,25 @@ │ │ i32.gt_u │ │ select │ │ local.set 2 │ │ br 9 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 11 (;@3;) │ │ block ;; label = @15 │ │ local.get 3 │ │ i32.const 255 │ │ @@ -449165,25 +451354,25 @@ │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load8_u │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ @@ -449314,27 +451503,27 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::end__ │ │ local.set 3 │ │ local.get 14 │ │ call $std::__2::basic_string__std::__2::allocator_>::begin__ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 641 │ │ local.get 2 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@10;) │ │ local.get 3 │ │ br_if 1 (;@14;) │ │ end │ │ @@ -449374,49 +451563,49 @@ │ │ i32.const 8 │ │ i32.add │ │ call $bool_std::__2::operator!=_std::__2::__wrap_iter_const&__std::__2::__wrap_iter_const&_ │ │ i32.eqz │ │ br_if 2 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @17 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 3 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 3 │ │ i32.const 255 │ │ i32.and │ │ @@ -449425,25 +451614,25 @@ │ │ i32.add │ │ call $std::__2::__wrap_iter::operator*___const │ │ i32.load8_u │ │ i32.ne │ │ br_if 3 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@15;) │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ @@ -449491,48 +451680,48 @@ │ │ br 2 (;@11;) │ │ end │ │ block ;; label = @13 │ │ block ;; label = @14 │ │ loop ;; label = @15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 573 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@14;) │ │ local.get 1 │ │ i32.eqz │ │ br_if 2 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@9;) │ │ block ;; label = @16 │ │ block ;; label = @17 │ │ local.get 7 │ │ @@ -449547,28 +451736,28 @@ │ │ local.tee 1 │ │ local.get 11 │ │ i32.load offset=548 │ │ i32.ne │ │ br_if 0 (;@18;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 642 │ │ local.get 8 │ │ local.get 9 │ │ local.get 11 │ │ i32.const 548 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@9;) │ │ local.get 9 │ │ i32.load │ │ local.set 1 │ │ @@ -449609,30 +451798,30 @@ │ │ local.tee 2 │ │ local.get 11 │ │ i32.load offset=128 │ │ i32.ne │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 643 │ │ local.get 12 │ │ local.get 11 │ │ i32.const 132 │ │ i32.add │ │ local.get 11 │ │ i32.const 128 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 8 (;@9;) │ │ local.get 11 │ │ i32.load offset=132 │ │ local.set 2 │ │ @@ -449646,25 +451835,25 @@ │ │ local.get 3 │ │ i32.store │ │ i32.const 0 │ │ local.set 3 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@15;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -449688,30 +451877,30 @@ │ │ local.get 2 │ │ local.get 11 │ │ i32.load offset=128 │ │ i32.ne │ │ br_if 0 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 643 │ │ local.get 12 │ │ local.get 11 │ │ i32.const 132 │ │ i32.add │ │ local.get 11 │ │ i32.const 128 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@8;) │ │ local.get 11 │ │ i32.load offset=132 │ │ local.set 2 │ │ @@ -449729,49 +451918,49 @@ │ │ local.get 11 │ │ i32.load offset=36 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@8;) │ │ block ;; label = @14 │ │ block ;; label = @15 │ │ local.get 3 │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@8;) │ │ local.get 3 │ │ i32.const 255 │ │ i32.and │ │ @@ -449788,73 +451977,73 @@ │ │ i32.store │ │ i32.const 0 │ │ local.set 0 │ │ br 3 (;@11;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@8;) │ │ loop ;; label = @14 │ │ local.get 11 │ │ i32.load offset=36 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 1 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @15 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@15;) │ │ block ;; label = @16 │ │ block ;; label = @17 │ │ local.get 3 │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@15;) │ │ local.get 7 │ │ i32.const 2048 │ │ local.get 3 │ │ @@ -449876,46 +452065,46 @@ │ │ i32.load │ │ local.get 11 │ │ i32.load offset=548 │ │ i32.ne │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 642 │ │ local.get 8 │ │ local.get 9 │ │ local.get 11 │ │ i32.const 548 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@15;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@15;) │ │ local.get 9 │ │ local.get 9 │ │ i32.load │ │ @@ -449924,31 +452113,31 @@ │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ local.get 3 │ │ i32.store8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ local.get 11 │ │ i32.load offset=36 │ │ i32.const -1 │ │ i32.add │ │ i32.store offset=36 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@14;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -449985,50 +452174,50 @@ │ │ local.get 2 │ │ local.get 4 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ i32.ge_u │ │ br_if 1 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @14 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@14;) │ │ block ;; label = @15 │ │ block ;; label = @16 │ │ local.get 9 │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 575 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@14;) │ │ local.get 9 │ │ i32.const 255 │ │ i32.and │ │ @@ -450047,25 +452236,25 @@ │ │ i32.store │ │ i32.const 0 │ │ local.set 0 │ │ br 4 (;@11;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 577 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ local.set 2 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ @@ -450089,30 +452278,30 @@ │ │ i32.const 0 │ │ i32.store offset=24 │ │ local.get 12 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 13 │ │ local.get 0 │ │ local.get 11 │ │ i32.load offset=132 │ │ local.get 11 │ │ i32.const 24 │ │ i32.add │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @13 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@13;) │ │ local.get 11 │ │ i32.load offset=24 │ │ @@ -450247,29 +452436,29 @@ │ │ local.get 1 │ │ i32.store offset=12 │ │ local.get 2 │ │ call $std::__2::remove_reference::type&&_std::__2::move_void__*&__void*__ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 644 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 12 │ │ i32.add │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 16 │ │ @@ -450750,67 +452939,67 @@ │ │ local.get 7 │ │ i32.const 20 │ │ i32.add │ │ call $std::__2::unique_ptr::unique_ptr_char*__std::__2::__dependent_type__true>::__good_rval_ref_type_ │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ local.get 4 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ local.get 7 │ │ i32.const 0 │ │ i32.store8 offset=15 │ │ local.get 4 │ │ call $std::__2::ios_base::flags___const │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 636 │ │ local.get 7 │ │ i32.const 152 │ │ i32.add │ │ local.get 2 │ │ local.get 3 │ │ local.get 7 │ │ @@ -450828,19 +453017,19 @@ │ │ i32.add │ │ local.get 7 │ │ i32.const 132 │ │ i32.add │ │ call $invoke_iiiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@3;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 3 (;@5;) │ │ @@ -450848,43 +453037,43 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::clear__ │ │ local.get 7 │ │ i32.load8_u offset=15 │ │ i32.eqz │ │ br_if 2 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 1 │ │ i32.const 45 │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 640 │ │ local.get 6 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@6;) │ │ br 5 (;@3;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -450897,26 +453086,26 @@ │ │ local.set 4 │ │ call $getTempRet0 │ │ drop │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 1 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ local.get 8 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 4 │ │ @@ -450946,55 +453135,55 @@ │ │ i32.add │ │ local.set 4 │ │ br 0 (;@7;) │ │ end │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 645 │ │ local.get 6 │ │ local.get 4 │ │ local.get 3 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 4 │ │ call $getTempRet0 │ │ drop │ │ br 3 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 574 │ │ local.get 7 │ │ i32.const 152 │ │ i32.add │ │ local.get 7 │ │ i32.const 144 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@3;) │ │ block ;; label = @5 │ │ local.get 2 │ │ i32.eqz │ │ @@ -451177,27 +453366,27 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::data___const │ │ local.set 5 │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 646 │ │ local.get 0 │ │ local.get 5 │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ @@ -451287,15 +453476,15 @@ │ │ drop │ │ local.get 0) │ │ (func $std::__2::__compressed_pair::first___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::__compressed_pair_elem::__get___const) │ │ (func $std::__2::moneypunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92280 │ │ + i32.const 92648 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::moneypunct::neg_format___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=44 │ │ @@ -451344,15 +453533,15 @@ │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=36 │ │ call_indirect (type 10)) │ │ (func $std::__2::moneypunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92272 │ │ + i32.const 92640 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::moneypunct::neg_format___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=44 │ │ @@ -451588,24 +453777,24 @@ │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::__compressed_pair::second__ │ │ i32.load │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ local.get 2 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ drop │ │ @@ -451639,27 +453828,27 @@ │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::unique_ptr::unique_ptr_wchar_t*__std::__2::__dependent_type__true>::__good_rval_ref_type_ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 192 │ │ i32.add │ │ local.get 4 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -451669,40 +453858,40 @@ │ │ block ;; label = @11 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 7 │ │ i32.const 192 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ local.get 7 │ │ i32.const 0 │ │ i32.store8 offset=191 │ │ local.get 4 │ │ call $std::__2::ios_base::flags___const │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 647 │ │ local.get 7 │ │ i32.const 616 │ │ i32.add │ │ local.get 2 │ │ local.get 3 │ │ local.get 7 │ │ @@ -451720,56 +453909,56 @@ │ │ i32.add │ │ local.get 7 │ │ i32.const 608 │ │ i32.add │ │ call $invoke_iiiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@5;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 5 (;@6;) │ │ local.get 7 │ │ i32.const 0 │ │ - i32.load offset=16720 align=1 │ │ + i32.load offset=17023 align=1 │ │ i32.store offset=183 align=1 │ │ local.get 7 │ │ i32.const 0 │ │ - i64.load offset=16713 align=1 │ │ + i64.load offset=17016 align=1 │ │ i64.store offset=176 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 8 │ │ local.get 7 │ │ i32.const 176 │ │ i32.add │ │ local.get 7 │ │ i32.const 186 │ │ i32.add │ │ local.get 7 │ │ i32.const 128 │ │ i32.add │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@9;) │ │ local.get 7 │ │ i32.const 571 │ │ i32.store offset=4 │ │ @@ -451807,23 +453996,23 @@ │ │ call $dlmalloc │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 8 │ │ call $std::__2::unique_ptr::get___const │ │ br_if 3 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@4;) │ │ br 10 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -451877,32 +454066,32 @@ │ │ local.get 7 │ │ local.get 6 │ │ i32.store │ │ block ;; label = @9 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ - i32.const 8947 │ │ + i32.const 9081 │ │ local.get 7 │ │ call $sscanf │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 637 │ │ - i32.const 4872 │ │ + i32.const 4921 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 8 (;@1;) │ │ br 5 (;@4;) │ │ end │ │ local.get 8 │ │ @@ -451941,30 +454130,30 @@ │ │ i32.add │ │ local.set 4 │ │ br 0 (;@7;) │ │ end │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 7 │ │ i32.const 616 │ │ i32.add │ │ local.get 7 │ │ i32.const 608 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ block ;; label = @6 │ │ local.get 2 │ │ i32.eqz │ │ @@ -452081,15 +454270,15 @@ │ │ local.get 11 │ │ i32.const 32 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 17 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 648 │ │ local.get 2 │ │ local.get 3 │ │ local.get 11 │ │ i32.const 120 │ │ i32.add │ │ local.get 11 │ │ @@ -452103,19 +454292,19 @@ │ │ local.get 15 │ │ local.get 16 │ │ local.get 11 │ │ i32.const 28 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ @@ -452147,28 +454336,28 @@ │ │ block ;; label = @12 │ │ local.get 4 │ │ i32.const 4 │ │ i32.eq │ │ br_if 0 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@3;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@12;) │ │ @@ -452192,91 +454381,91 @@ │ │ end │ │ local.get 4 │ │ i32.const 3 │ │ i32.eq │ │ br_if 10 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 649 │ │ local.get 7 │ │ i32.const 8192 │ │ local.get 3 │ │ call $invoke_iiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@3;) │ │ block ;; label = @18 │ │ local.get 3 │ │ i32.eqz │ │ br_if 0 (;@18;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 650 │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @19 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@19;) │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::istreambuf_iterator_>::__proxy::operator*___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 651 │ │ local.get 17 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 3 (;@16;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 11 │ │ @@ -452298,113 +454487,113 @@ │ │ i32.const 3 │ │ i32.eq │ │ br_if 9 (;@7;) │ │ end │ │ loop ;; label = @16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@2;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 9 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 649 │ │ local.get 7 │ │ i32.const 8192 │ │ local.get 3 │ │ call $invoke_iiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@2;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 9 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 650 │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ local.get 0 │ │ i32.const 0 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @17 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::istreambuf_iterator_>::__proxy::operator*___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 651 │ │ local.get 17 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@16;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -452434,50 +454623,50 @@ │ │ block ;; label = @16 │ │ local.get 15 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ i32.eqz │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 13 (;@3;) │ │ block ;; label = @17 │ │ local.get 3 │ │ local.get 15 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load │ │ i32.ne │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 14 (;@3;) │ │ local.get 15 │ │ local.get 20 │ │ local.get 15 │ │ @@ -452491,49 +454680,49 @@ │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ br 9 (;@7;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 3 │ │ local.get 16 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load │ │ i32.ne │ │ br_if 8 (;@7;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ @@ -452545,50 +454734,50 @@ │ │ i32.gt_u │ │ select │ │ local.set 2 │ │ br 9 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 11 (;@3;) │ │ block ;; label = @15 │ │ local.get 3 │ │ local.get 15 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 15 │ │ local.get 20 │ │ local.get 15 │ │ @@ -452597,50 +454786,50 @@ │ │ i32.gt_u │ │ select │ │ local.set 2 │ │ br 9 (;@6;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 11 (;@3;) │ │ block ;; label = @15 │ │ local.get 3 │ │ local.get 16 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long_ │ │ i32.load │ │ i32.ne │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 12 (;@3;) │ │ local.get 6 │ │ i32.const 1 │ │ i32.store8 │ │ @@ -452730,27 +454919,27 @@ │ │ br_if 1 (;@15;) │ │ local.get 2 │ │ call $std::__2::__wrap_iter::operator*___const │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 649 │ │ local.get 7 │ │ i32.const 8192 │ │ local.get 3 │ │ call $invoke_iiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @17 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 1 │ │ i32.eqz │ │ @@ -452796,27 +454985,27 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::end__ │ │ local.set 3 │ │ local.get 14 │ │ call $std::__2::basic_string__std::__2::allocator_>::begin__ │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 652 │ │ local.get 2 │ │ local.get 3 │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@10;) │ │ local.get 3 │ │ br_if 1 (;@14;) │ │ end │ │ @@ -452852,74 +455041,74 @@ │ │ i32.add │ │ local.get 11 │ │ call $bool_std::__2::operator!=_std::__2::__wrap_iter_const&__std::__2::__wrap_iter_const&_ │ │ i32.eqz │ │ br_if 2 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @17 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 3 │ │ i32.eqz │ │ br_if 3 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@17;) │ │ local.get 3 │ │ local.get 11 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::__wrap_iter::operator*___const │ │ i32.load │ │ i32.ne │ │ br_if 3 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@15;) │ │ local.get 11 │ │ i32.const 8 │ │ i32.add │ │ @@ -452965,67 +455154,67 @@ │ │ br 2 (;@11;) │ │ end │ │ block ;; label = @13 │ │ block ;; label = @14 │ │ loop ;; label = @15 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 604 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@14;) │ │ local.get 1 │ │ i32.eqz │ │ br_if 2 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@9;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 649 │ │ local.get 7 │ │ i32.const 2048 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 10 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@9;) │ │ block ;; label = @16 │ │ block ;; label = @17 │ │ local.get 10 │ │ @@ -453037,28 +455226,28 @@ │ │ local.tee 1 │ │ local.get 11 │ │ i32.load offset=548 │ │ i32.ne │ │ br_if 0 (;@18;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 653 │ │ local.get 8 │ │ local.get 9 │ │ local.get 11 │ │ i32.const 548 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 9 (;@9;) │ │ local.get 9 │ │ i32.load │ │ local.set 1 │ │ @@ -453095,30 +455284,30 @@ │ │ local.tee 2 │ │ local.get 11 │ │ i32.load offset=128 │ │ i32.ne │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 643 │ │ local.get 12 │ │ local.get 11 │ │ i32.const 132 │ │ i32.add │ │ local.get 11 │ │ i32.const 128 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 8 (;@9;) │ │ local.get 11 │ │ i32.load offset=132 │ │ local.set 2 │ │ @@ -453132,25 +455321,25 @@ │ │ local.get 3 │ │ i32.store │ │ i32.const 0 │ │ local.set 3 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@15;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -453174,30 +455363,30 @@ │ │ local.get 2 │ │ local.get 11 │ │ i32.load offset=128 │ │ i32.ne │ │ br_if 0 (;@14;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 643 │ │ local.get 12 │ │ local.get 11 │ │ i32.const 132 │ │ i32.add │ │ local.get 11 │ │ i32.const 128 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 6 (;@8;) │ │ local.get 11 │ │ i32.load offset=132 │ │ local.set 2 │ │ @@ -453215,49 +455404,49 @@ │ │ local.get 11 │ │ i32.load offset=28 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 0 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@8;) │ │ block ;; label = @14 │ │ block ;; label = @15 │ │ local.get 3 │ │ br_if 0 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 7 (;@8;) │ │ local.get 3 │ │ local.get 11 │ │ i32.load offset=116 │ │ @@ -453272,92 +455461,92 @@ │ │ i32.store │ │ i32.const 0 │ │ local.set 0 │ │ br 3 (;@11;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@8;) │ │ loop ;; label = @14 │ │ local.get 11 │ │ i32.load offset=28 │ │ i32.const 1 │ │ i32.lt_s │ │ br_if 1 (;@13;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @15 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@15;) │ │ block ;; label = @16 │ │ block ;; label = @17 │ │ local.get 3 │ │ br_if 0 (;@17;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@15;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 649 │ │ local.get 7 │ │ i32.const 2048 │ │ local.get 3 │ │ call $invoke_iiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@15;) │ │ local.get 3 │ │ br_if 1 (;@16;) │ │ end │ │ @@ -453376,46 +455565,46 @@ │ │ i32.load │ │ local.get 11 │ │ i32.load offset=548 │ │ i32.ne │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 653 │ │ local.get 8 │ │ local.get 9 │ │ local.get 11 │ │ i32.const 548 │ │ i32.add │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@15;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@15;) │ │ local.get 9 │ │ local.get 9 │ │ i32.load │ │ @@ -453424,31 +455613,31 @@ │ │ i32.add │ │ i32.store │ │ local.get 2 │ │ local.get 3 │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 11 │ │ local.get 11 │ │ i32.load offset=28 │ │ i32.const -1 │ │ i32.add │ │ i32.store offset=28 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@14;) │ │ end │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -453485,50 +455674,50 @@ │ │ local.get 2 │ │ local.get 20 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ i32.ge_u │ │ br_if 1 (;@12;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 0 │ │ local.get 11 │ │ i32.const 552 │ │ i32.add │ │ call $invoke_iii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @14 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@14;) │ │ block ;; label = @15 │ │ block ;; label = @16 │ │ local.get 9 │ │ br_if 0 (;@16;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 606 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 9 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@14;) │ │ local.get 9 │ │ local.get 20 │ │ local.get 2 │ │ @@ -453545,25 +455734,25 @@ │ │ i32.store │ │ i32.const 0 │ │ local.set 0 │ │ br 4 (;@11;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 608 │ │ local.get 0 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ local.set 2 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ @@ -453587,30 +455776,30 @@ │ │ i32.const 0 │ │ i32.store offset=16 │ │ local.get 12 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 582 │ │ local.get 13 │ │ local.get 0 │ │ local.get 11 │ │ i32.load offset=132 │ │ local.get 11 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_viiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @13 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@13;) │ │ local.get 11 │ │ i32.load offset=16 │ │ @@ -454081,67 +456270,67 @@ │ │ local.get 7 │ │ i32.const 20 │ │ i32.add │ │ call $std::__2::unique_ptr::unique_ptr_wchar_t*__std::__2::__dependent_type__true>::__good_rval_ref_type_ │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ local.get 4 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@7;) │ │ local.get 7 │ │ i32.const 0 │ │ i32.store8 offset=15 │ │ local.get 4 │ │ call $std::__2::ios_base::flags___const │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 647 │ │ local.get 7 │ │ i32.const 440 │ │ i32.add │ │ local.get 2 │ │ local.get 3 │ │ local.get 7 │ │ @@ -454159,19 +456348,19 @@ │ │ i32.add │ │ local.get 7 │ │ i32.const 432 │ │ i32.add │ │ call $invoke_iiiiiiiiiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@3;) │ │ local.get 2 │ │ i32.eqz │ │ br_if 3 (;@5;) │ │ @@ -454179,43 +456368,43 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::clear__ │ │ local.get 7 │ │ i32.load8_u offset=15 │ │ i32.eqz │ │ br_if 2 (;@6;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 1 │ │ i32.const 45 │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 5 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 651 │ │ local.get 6 │ │ local.get 2 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@6;) │ │ br 5 (;@3;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -454228,26 +456417,26 @@ │ │ local.set 4 │ │ call $getTempRet0 │ │ drop │ │ br 4 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 1 │ │ i32.const 48 │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ local.get 8 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 4 │ │ @@ -454273,55 +456462,55 @@ │ │ i32.add │ │ local.set 4 │ │ br 0 (;@7;) │ │ end │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 654 │ │ local.get 6 │ │ local.get 4 │ │ local.get 3 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 4 │ │ call $getTempRet0 │ │ drop │ │ br 3 (;@2;) │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 605 │ │ local.get 7 │ │ i32.const 440 │ │ i32.add │ │ local.get 7 │ │ i32.const 432 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@3;) │ │ block ;; label = @5 │ │ local.get 2 │ │ i32.eqz │ │ @@ -454506,27 +456695,27 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::data___const │ │ local.set 5 │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 655 │ │ local.get 0 │ │ local.get 5 │ │ local.get 2 │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @3 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ @@ -454670,15 +456859,15 @@ │ │ return │ │ end │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::__set_short_size_unsigned_long_) │ │ (func $std::__2::moneypunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92296 │ │ + i32.const 92664 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::moneypunct::neg_format___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=44 │ │ @@ -454732,15 +456921,15 @@ │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.load offset=36 │ │ call_indirect (type 10)) │ │ (func $std::__2::moneypunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 92288 │ │ + i32.const 92656 │ │ call $std::__2::locale::use_facet_std::__2::locale::id&__const) │ │ (func $std::__2::moneypunct::neg_format___const (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ local.get 1 │ │ i32.load │ │ i32.load offset=44 │ │ @@ -454979,15 +457168,15 @@ │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::char_traits::assign_wchar_t&__wchar_t_const&_ │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__char__long_double__const (type 111) (param i32 i32 i32 i32 i32 i64 i64) (result i32) │ │ + (func $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__char__long_double__const (type 115) (param i32 i32 i32 i32 i32 i64 i64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 464 │ │ i32.sub │ │ local.tee 7 │ │ global.set $__stack_pointer │ │ local.get 7 │ │ @@ -455001,15 +457190,15 @@ │ │ i32.const 352 │ │ i32.add │ │ i32.store offset=348 │ │ local.get 7 │ │ i32.const 352 │ │ i32.add │ │ i32.const 100 │ │ - i32.const 8941 │ │ + i32.const 9075 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ local.set 8 │ │ local.get 7 │ │ i32.const 571 │ │ @@ -455045,72 +457234,72 @@ │ │ block ;; label = @4 │ │ local.get 8 │ │ i32.const 100 │ │ i32.lt_u │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@2;) │ │ local.get 7 │ │ local.get 5 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ i64.store offset=8 │ │ i32.const 617 │ │ local.get 7 │ │ i32.const 348 │ │ i32.add │ │ local.get 12 │ │ - i32.const 8941 │ │ + i32.const 9075 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@2;) │ │ block ;; label = @5 │ │ local.get 8 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@3;) │ │ br 3 (;@2;) │ │ end │ │ local.get 9 │ │ @@ -455125,99 +457314,99 @@ │ │ local.get 10 │ │ i32.const 0 │ │ call $bool_std::__2::operator==_std::__2::unique_ptr_const&__std::nullptr_t_ │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 10 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 11 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 216 │ │ i32.add │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 7 │ │ i32.const 216 │ │ i32.add │ │ call $invoke_ii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 592 │ │ local.get 13 │ │ local.get 7 │ │ i32.load offset=348 │ │ local.tee 12 │ │ local.get 12 │ │ local.get 8 │ │ i32.add │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ i32.const 0 │ │ local.set 14 │ │ block ;; label = @12 │ │ @@ -455245,15 +457434,15 @@ │ │ local.get 7 │ │ i32.const 160 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 656 │ │ local.get 2 │ │ local.get 14 │ │ local.get 7 │ │ i32.const 216 │ │ i32.add │ │ local.get 7 │ │ @@ -455269,19 +457458,19 @@ │ │ local.get 12 │ │ local.get 16 │ │ local.get 7 │ │ i32.const 156 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@9;) │ │ local.get 7 │ │ i32.const 571 │ │ i32.store offset=36 │ │ @@ -455347,23 +457536,23 @@ │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 17 │ │ call $std::__2::unique_ptr::get___const │ │ local.tee 2 │ │ br_if 3 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 8 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 8 │ │ call $getTempRet0 │ │ @@ -455389,15 +457578,15 @@ │ │ br 2 (;@6;) │ │ end │ │ local.get 3 │ │ call $std::__2::ios_base::flags___const │ │ local.set 18 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 657 │ │ local.get 2 │ │ local.get 7 │ │ i32.const 36 │ │ i32.add │ │ local.get 7 │ │ i32.const 32 │ │ @@ -455419,44 +457608,44 @@ │ │ local.get 15 │ │ local.get 12 │ │ local.get 16 │ │ local.get 7 │ │ i32.load offset=156 │ │ call $invoke_viiiiiiiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 139 │ │ local.get 1 │ │ local.get 2 │ │ local.get 7 │ │ i32.load offset=36 │ │ local.get 7 │ │ i32.load offset=32 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiiii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@4;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 8 │ │ @@ -455705,15 +457894,15 @@ │ │ local.get 9 │ │ local.get 0 │ │ i32.store │ │ local.get 10 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $std::__2::__money_put::__format_char*__char*&__char*&__unsigned_int__char_const*__char_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__char__char__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ (type 112) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $std::__2::__money_put::__format_char*__char*&__char*&__unsigned_int__char_const*__char_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__char__char__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ (type 116) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 15 │ │ global.set $__stack_pointer │ │ local.get 2 │ │ @@ -456213,27 +458402,27 @@ │ │ i32.add │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 465 │ │ local.get 6 │ │ i32.const 184 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -456251,26 +458440,26 @@ │ │ local.get 5 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long__const │ │ i32.load8_u │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 466 │ │ local.get 8 │ │ i32.const 45 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@8;) │ │ local.get 10 │ │ i32.const 255 │ │ i32.and │ │ @@ -456293,15 +458482,15 @@ │ │ local.get 6 │ │ i32.const 128 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 656 │ │ local.get 2 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 184 │ │ i32.add │ │ local.get 6 │ │ @@ -456317,19 +458506,19 @@ │ │ local.get 9 │ │ local.get 10 │ │ local.get 6 │ │ i32.const 124 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 6 │ │ i32.const 571 │ │ i32.store offset=4 │ │ @@ -456401,23 +458590,23 @@ │ │ call $std::__2::unique_ptr::reset_char*_ │ │ local.get 12 │ │ call $std::__2::unique_ptr::get___const │ │ local.tee 2 │ │ br_if 4 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@6;) │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -456454,15 +458643,15 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::data___const │ │ local.set 15 │ │ local.get 5 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 657 │ │ local.get 2 │ │ local.get 6 │ │ i32.const 4 │ │ i32.add │ │ local.get 6 │ │ local.get 13 │ │ @@ -456482,44 +458671,44 @@ │ │ local.get 11 │ │ local.get 9 │ │ local.get 10 │ │ local.get 6 │ │ i32.load offset=124 │ │ call $invoke_viiiiiiiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 139 │ │ local.get 1 │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=4 │ │ local.get 6 │ │ i32.load │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 5 │ │ @@ -456567,15 +458756,15 @@ │ │ call $std::__2::locale::~locale__ │ │ drop │ │ local.get 6 │ │ i32.const 192 │ │ i32.add │ │ global.set $__stack_pointer │ │ local.get 3) │ │ - (func $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__wchar_t__long_double__const (type 111) (param i32 i32 i32 i32 i32 i64 i64) (result i32) │ │ + (func $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__wchar_t__long_double__const (type 115) (param i32 i32 i32 i32 i32 i64 i64) (result i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 1072 │ │ i32.sub │ │ local.tee 7 │ │ global.set $__stack_pointer │ │ local.get 7 │ │ @@ -456589,15 +458778,15 @@ │ │ i32.const 960 │ │ i32.add │ │ i32.store offset=956 │ │ local.get 7 │ │ i32.const 960 │ │ i32.add │ │ i32.const 100 │ │ - i32.const 8941 │ │ + i32.const 9075 │ │ local.get 7 │ │ i32.const 16 │ │ i32.add │ │ call $snprintf │ │ local.set 8 │ │ local.get 7 │ │ i32.const 571 │ │ @@ -456633,72 +458822,72 @@ │ │ block ;; label = @4 │ │ local.get 8 │ │ i32.const 100 │ │ i32.lt_u │ │ br_if 0 (;@4;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 12 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@2;) │ │ local.get 7 │ │ local.get 5 │ │ i64.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ local.get 6 │ │ i64.store offset=8 │ │ i32.const 617 │ │ local.get 7 │ │ i32.const 956 │ │ i32.add │ │ local.get 12 │ │ - i32.const 8941 │ │ + i32.const 9075 │ │ local.get 7 │ │ call $invoke_iiiii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@2;) │ │ block ;; label = @5 │ │ local.get 8 │ │ i32.const -1 │ │ i32.ne │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@3;) │ │ br 3 (;@2;) │ │ end │ │ local.get 9 │ │ @@ -456715,99 +458904,99 @@ │ │ local.get 10 │ │ i32.const 0 │ │ call $bool_std::__2::operator==_std::__2::unique_ptr_const&__std::nullptr_t_ │ │ i32.eqz │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 7 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@2;) │ │ br 2 (;@3;) │ │ end │ │ local.get 10 │ │ call $std::__2::unique_ptr::get___const │ │ local.set 11 │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 138 │ │ local.get 7 │ │ i32.const 520 │ │ i32.add │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ block ;; label = @8 │ │ block ;; label = @9 │ │ block ;; label = @10 │ │ block ;; label = @11 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@11;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 7 │ │ i32.const 520 │ │ i32.add │ │ call $invoke_ii │ │ local.set 13 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 613 │ │ local.get 13 │ │ local.get 7 │ │ i32.load offset=956 │ │ local.tee 12 │ │ local.get 12 │ │ local.get 8 │ │ i32.add │ │ local.get 11 │ │ call $invoke_iiiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 12 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@10;) │ │ i32.const 0 │ │ local.set 14 │ │ block ;; label = @12 │ │ @@ -456835,15 +459024,15 @@ │ │ local.get 7 │ │ i32.const 456 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 16 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 658 │ │ local.get 2 │ │ local.get 14 │ │ local.get 7 │ │ i32.const 520 │ │ i32.add │ │ local.get 7 │ │ @@ -456859,19 +459048,19 @@ │ │ local.get 12 │ │ local.get 16 │ │ local.get 7 │ │ i32.const 452 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@9;) │ │ local.get 7 │ │ i32.const 571 │ │ i32.store offset=36 │ │ @@ -456939,23 +459128,23 @@ │ │ call $std::__2::unique_ptr::reset_wchar_t*_ │ │ local.get 17 │ │ call $std::__2::unique_ptr::get___const │ │ local.tee 2 │ │ br_if 3 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 8 (;@3;) │ │ call $__cxa_find_matching_catch_2 │ │ local.set 8 │ │ call $getTempRet0 │ │ @@ -456981,15 +459170,15 @@ │ │ br 2 (;@6;) │ │ end │ │ local.get 3 │ │ call $std::__2::ios_base::flags___const │ │ local.set 18 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 659 │ │ local.get 2 │ │ local.get 7 │ │ i32.const 36 │ │ i32.add │ │ local.get 7 │ │ i32.const 32 │ │ @@ -457013,44 +459202,44 @@ │ │ local.get 15 │ │ local.get 12 │ │ local.get 16 │ │ local.get 7 │ │ i32.load offset=452 │ │ call $invoke_viiiiiiiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @8 │ │ local.get 8 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@8;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 629 │ │ local.get 1 │ │ local.get 2 │ │ local.get 7 │ │ i32.load offset=36 │ │ local.get 7 │ │ i32.load offset=32 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiiii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 8 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 8 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@4;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 8 │ │ @@ -457299,15 +459488,15 @@ │ │ local.get 9 │ │ local.get 0 │ │ i32.store │ │ local.get 10 │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ - (func $std::__2::__money_put::__format_wchar_t*__wchar_t*&__wchar_t*&__unsigned_int__wchar_t_const*__wchar_t_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__wchar_t__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ (type 112) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ + (func $std::__2::__money_put::__format_wchar_t*__wchar_t*&__wchar_t*&__unsigned_int__wchar_t_const*__wchar_t_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__wchar_t__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ (type 116) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ local.tee 15 │ │ global.set $__stack_pointer │ │ local.get 2 │ │ @@ -457825,27 +460014,27 @@ │ │ i32.add │ │ local.get 3 │ │ call $std::__2::ios_base::getloc___const │ │ i32.const 0 │ │ local.set 7 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 599 │ │ local.get 6 │ │ i32.const 488 │ │ i32.add │ │ call $invoke_ii │ │ local.set 8 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ block ;; label = @6 │ │ block ;; label = @7 │ │ @@ -457863,26 +460052,26 @@ │ │ local.get 5 │ │ i32.const 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator___unsigned_long__const │ │ i32.load │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 625 │ │ local.get 8 │ │ i32.const 45 │ │ call $invoke_iii │ │ local.set 11 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 9 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 9 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@8;) │ │ local.get 10 │ │ local.get 11 │ │ i32.eq │ │ @@ -457901,15 +460090,15 @@ │ │ local.get 6 │ │ i32.const 424 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ local.set 10 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 658 │ │ local.get 2 │ │ local.get 7 │ │ local.get 6 │ │ i32.const 488 │ │ i32.add │ │ local.get 6 │ │ @@ -457925,19 +460114,19 @@ │ │ local.get 9 │ │ local.get 10 │ │ local.get 6 │ │ i32.const 420 │ │ i32.add │ │ call $invoke_viiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@7;) │ │ local.get 6 │ │ i32.const 571 │ │ i32.store offset=4 │ │ @@ -458011,23 +460200,23 @@ │ │ call $std::__2::unique_ptr::reset_wchar_t*_ │ │ local.get 12 │ │ call $std::__2::unique_ptr::get___const │ │ local.tee 2 │ │ br_if 4 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 572 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 3 (;@6;) │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -458064,15 +460253,15 @@ │ │ call $std::__2::basic_string__std::__2::allocator_>::data___const │ │ local.set 15 │ │ local.get 5 │ │ call $std::__2::basic_string__std::__2::allocator_>::size___const │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 659 │ │ local.get 2 │ │ local.get 6 │ │ i32.const 4 │ │ i32.add │ │ local.get 6 │ │ local.get 13 │ │ @@ -458094,44 +460283,44 @@ │ │ local.get 11 │ │ local.get 9 │ │ local.get 10 │ │ local.get 6 │ │ i32.load offset=420 │ │ call $invoke_viiiiiiiiiiiiiii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 5 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 629 │ │ local.get 1 │ │ local.get 2 │ │ local.get 6 │ │ i32.load offset=4 │ │ local.get 6 │ │ i32.load │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiiii │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 5 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 5 │ │ @@ -458275,33 +460464,33 @@ │ │ (func $std::__2::messages::do_close_long__const (type 1) (param i32 i32)) │ │ (func $.L_ZNSt3__26locale5facetD2Ev_bitcast.153 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::locale::facet::~facet__) │ │ (func $std::__2::codecvt::~codecvt__ (type 10) (param i32) (result i32) │ │ (local i32 i32 i32) │ │ local.get 0 │ │ - i32.const 68920 │ │ + i32.const 69288 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 1 │ │ @@ -458309,24 +460498,24 @@ │ │ i32.eq │ │ br_if 1 (;@1;) │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 660 │ │ local.get 3 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -458352,733 +460541,733 @@ │ │ (func $std::__2::locale::__imp::__imp_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ (local i32 i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 68848 │ │ + i32.const 69216 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 661 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ i32.const 30 │ │ call $invoke_iii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ block ;; label = @4 │ │ block ;; label = @5 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 662 │ │ local.get 0 │ │ i32.const 152 │ │ i32.add │ │ - i32.const 16411 │ │ + i32.const 16714 │ │ call $invoke_iii │ │ local.set 4 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@4;) │ │ local.get 1 │ │ call $std::__2::vector_>::clear__ │ │ call $std::__2::collate&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 663 │ │ local.get 0 │ │ - i32.const 93664 │ │ + i32.const 94032 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::collate&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 664 │ │ local.get 0 │ │ - i32.const 93672 │ │ + i32.const 94040 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 665 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 666 │ │ local.get 0 │ │ - i32.const 93680 │ │ + i32.const 94048 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::ctype&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 667 │ │ local.get 0 │ │ - i32.const 93696 │ │ + i32.const 94064 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 668 │ │ local.get 0 │ │ - i32.const 93704 │ │ + i32.const 94072 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 669 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 670 │ │ local.get 0 │ │ - i32.const 93712 │ │ + i32.const 94080 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 671 │ │ local.get 0 │ │ - i32.const 93728 │ │ + i32.const 94096 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 672 │ │ local.get 0 │ │ - i32.const 93736 │ │ + i32.const 94104 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 673 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 674 │ │ local.get 0 │ │ - i32.const 93744 │ │ + i32.const 94112 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 675 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 676 │ │ local.get 0 │ │ - i32.const 93768 │ │ + i32.const 94136 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::num_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 677 │ │ local.get 0 │ │ - i32.const 93800 │ │ + i32.const 94168 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::num_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 678 │ │ local.get 0 │ │ - i32.const 93808 │ │ + i32.const 94176 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::num_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 679 │ │ local.get 0 │ │ - i32.const 93816 │ │ + i32.const 94184 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::num_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 680 │ │ local.get 0 │ │ - i32.const 93824 │ │ + i32.const 94192 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 681 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 682 │ │ local.get 0 │ │ - i32.const 93832 │ │ + i32.const 94200 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 683 │ │ local.get 0 │ │ - i32.const 93840 │ │ + i32.const 94208 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 684 │ │ local.get 0 │ │ - i32.const 93848 │ │ + i32.const 94216 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 685 │ │ local.get 0 │ │ - i32.const 93856 │ │ + i32.const 94224 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 686 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 687 │ │ local.get 0 │ │ - i32.const 93864 │ │ + i32.const 94232 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 688 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 689 │ │ local.get 0 │ │ - i32.const 93872 │ │ + i32.const 94240 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 690 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 691 │ │ local.get 0 │ │ - i32.const 93880 │ │ + i32.const 94248 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 692 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 693 │ │ local.get 0 │ │ - i32.const 93888 │ │ + i32.const 94256 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::time_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 694 │ │ local.get 0 │ │ - i32.const 93896 │ │ + i32.const 94264 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::time_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 695 │ │ local.get 0 │ │ - i32.const 93912 │ │ + i32.const 94280 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 696 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 697 │ │ local.get 0 │ │ - i32.const 93928 │ │ + i32.const 94296 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 698 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 699 │ │ local.get 0 │ │ - i32.const 93944 │ │ + i32.const 94312 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 700 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 701 │ │ local.get 0 │ │ - i32.const 93960 │ │ + i32.const 94328 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ call $std::__2::messages&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 702 │ │ local.get 0 │ │ - i32.const 93968 │ │ + i32.const 94336 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@3;) │ │ local.get 0 │ │ return │ │ end │ │ @@ -459116,15 +461305,15 @@ │ │ local.get 0 │ │ local.get 1 │ │ i32.const -1 │ │ i32.add │ │ call $std::__2::__shared_count::__shared_count_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 69296 │ │ + i32.const 69664 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::vector_>::vector_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ local.get 0 │ │ @@ -459132,43 +461321,43 @@ │ │ local.set 2 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 703 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 704 │ │ local.get 0 │ │ local.get 1 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ @@ -459191,336 +461380,336 @@ │ │ call $std::__2::__vector_base_>::clear__ │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::vector_>::__annotate_shrink_unsigned_long__const │ │ local.get 0 │ │ call $std::__2::vector_>::__invalidate_all_iterators__) │ │ (func $std::__2::collate&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93664 │ │ + i32.const 94032 │ │ i32.const 1 │ │ call $std::__2::collate::collate_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::collate*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92192 │ │ + i32.const 92560 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::collate&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93672 │ │ + i32.const 94040 │ │ i32.const 1 │ │ call $std::__2::collate::collate_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::collate*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92200 │ │ + i32.const 92568 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::ctype&_std::__2::_anonymous_namespace_::make__std::nullptr_t__bool__unsigned_int>_std::nullptr_t__bool__unsigned_int_ (type 11) │ │ - i32.const 93680 │ │ + i32.const 94048 │ │ i32.const 0 │ │ i32.const 0 │ │ i32.const 1 │ │ call $std::__2::ctype::ctype_unsigned_short_const*__bool__unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::ctype*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92396 │ │ + i32.const 92764 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::ctype&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93696 │ │ + i32.const 94064 │ │ i32.const 1 │ │ call $std::__2::ctype::ctype_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::ctype*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92388 │ │ + i32.const 92756 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93704 │ │ + i32.const 94072 │ │ i32.const 1 │ │ call $std::__2::codecvt::codecvt_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92404 │ │ + i32.const 92772 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93712 │ │ + i32.const 94080 │ │ i32.const 1 │ │ call $std::__2::codecvt::codecvt_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92412 │ │ + i32.const 92780 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93728 │ │ + i32.const 94096 │ │ i32.const 1 │ │ call $std::__2::codecvt::codecvt_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92420 │ │ + i32.const 92788 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93736 │ │ + i32.const 94104 │ │ i32.const 1 │ │ call $std::__2::codecvt::codecvt_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92428 │ │ + i32.const 92796 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::numpunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93744 │ │ + i32.const 94112 │ │ i32.const 1 │ │ call $std::__2::numpunct::numpunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::numpunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92436 │ │ + i32.const 92804 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::numpunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93768 │ │ + i32.const 94136 │ │ i32.const 1 │ │ call $std::__2::numpunct::numpunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::numpunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92444 │ │ + i32.const 92812 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::num_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93800 │ │ + i32.const 94168 │ │ i32.const 1 │ │ call $std::__2::num_get_>_>::num_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92208 │ │ + i32.const 92576 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::num_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93808 │ │ + i32.const 94176 │ │ i32.const 1 │ │ call $std::__2::num_get_>_>::num_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92216 │ │ + i32.const 92584 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::num_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93816 │ │ + i32.const 94184 │ │ i32.const 1 │ │ call $std::__2::num_put_>_>::num_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92224 │ │ + i32.const 92592 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::num_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93824 │ │ + i32.const 94192 │ │ i32.const 1 │ │ call $std::__2::num_put_>_>::num_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92232 │ │ + i32.const 92600 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93832 │ │ + i32.const 94200 │ │ i32.const 1 │ │ call $std::__2::moneypunct::moneypunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92272 │ │ + i32.const 92640 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93840 │ │ + i32.const 94208 │ │ i32.const 1 │ │ call $std::__2::moneypunct::moneypunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92280 │ │ + i32.const 92648 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93848 │ │ + i32.const 94216 │ │ i32.const 1 │ │ call $std::__2::moneypunct::moneypunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92288 │ │ + i32.const 92656 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93856 │ │ + i32.const 94224 │ │ i32.const 1 │ │ call $std::__2::moneypunct::moneypunct_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92296 │ │ + i32.const 92664 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::money_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93864 │ │ + i32.const 94232 │ │ i32.const 1 │ │ call $std::__2::money_get_>_>::money_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92304 │ │ + i32.const 92672 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::money_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93872 │ │ + i32.const 94240 │ │ i32.const 1 │ │ call $std::__2::money_get_>_>::money_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92312 │ │ + i32.const 92680 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::money_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93880 │ │ + i32.const 94248 │ │ i32.const 1 │ │ call $std::__2::money_put_>_>::money_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92320 │ │ + i32.const 92688 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::money_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93888 │ │ + i32.const 94256 │ │ i32.const 1 │ │ call $std::__2::money_put_>_>::money_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92328 │ │ + i32.const 92696 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::time_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93896 │ │ + i32.const 94264 │ │ i32.const 1 │ │ call $std::__2::time_get_>_>::time_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92240 │ │ + i32.const 92608 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::time_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93912 │ │ + i32.const 94280 │ │ i32.const 1 │ │ call $std::__2::time_get_>_>::time_get_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_get_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92248 │ │ + i32.const 92616 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::time_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93928 │ │ + i32.const 94296 │ │ i32.const 1 │ │ call $std::__2::time_put_>_>::time_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92256 │ │ + i32.const 92624 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::time_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93944 │ │ + i32.const 94312 │ │ i32.const 1 │ │ call $std::__2::time_put_>_>::time_put_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_put_>_>*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92264 │ │ + i32.const 92632 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::messages&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93960 │ │ + i32.const 94328 │ │ i32.const 1 │ │ call $std::__2::messages::messages_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::messages*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92336 │ │ + i32.const 92704 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::messages&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ (type 11) │ │ - i32.const 93968 │ │ + i32.const 94336 │ │ i32.const 1 │ │ call $std::__2::messages::messages_unsigned_long_ │ │ drop) │ │ (func $void_std::__2::locale::__imp::install_>_std::__2::messages*_ (type 1) (param i32 i32) │ │ local.get 0 │ │ local.get 1 │ │ - i32.const 92344 │ │ + i32.const 92712 │ │ call $std::__2::locale::id::__get__ │ │ call $std::__2::locale::__imp::install_std::__2::locale::facet*__long_) │ │ (func $std::__2::vector_>::~vector__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::vector_>::__annotate_delete___const │ │ local.get 0 │ │ call $std::__2::__vector_base_>::~__vector_base__ │ │ drop │ │ local.get 0) │ │ (func $std::__2::__shared_count::__shared_count_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=4 │ │ local.get 0 │ │ - i32.const 74224 │ │ + i32.const 74592 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__vector_base_>::__vector_base__ (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ global.get $__stack_pointer │ │ @@ -459535,33 +461724,33 @@ │ │ i64.const 0 │ │ i64.store │ │ local.get 1 │ │ i32.const 0 │ │ i32.store offset=12 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 705 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_iiii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ i32.const 16 │ │ @@ -459769,27 +461958,27 @@ │ │ local.tee 1 │ │ call $std::__2::vector_>::size___const │ │ local.get 2 │ │ i32.gt_u │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 707 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.add │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ block ;; label = @2 │ │ local.get 1 │ │ @@ -459834,238 +462023,238 @@ │ │ unreachable) │ │ (func $std::__2::collate::collate_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70172 │ │ + i32.const 70540 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::collate::collate_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70204 │ │ + i32.const 70572 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::ctype::ctype_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::ctype_base::ctype_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 69352 │ │ + i32.const 69720 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::codecvt::codecvt_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::codecvt_base::codecvt_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 69500 │ │ + i32.const 69868 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::codecvt::codecvt_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::codecvt_base::codecvt_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 69648 │ │ + i32.const 70016 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::codecvt::codecvt_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::codecvt_base::codecvt_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 69764 │ │ + i32.const 70132 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::num_get_>_>::num_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70236 │ │ + i32.const 70604 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::num_get_>_>::num_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70480 │ │ + i32.const 70848 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::num_put_>_>::num_put_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70692 │ │ + i32.const 71060 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::num_put_>_>::num_put_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ - i32.const 70924 │ │ + i32.const 71292 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::moneypunct::moneypunct_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::money_base::money_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 71908 │ │ + i32.const 72276 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::moneypunct::moneypunct_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::money_base::money_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 72056 │ │ + i32.const 72424 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::moneypunct::moneypunct_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::money_base::money_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 72172 │ │ + i32.const 72540 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::moneypunct::moneypunct_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::money_base::money_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 72288 │ │ + i32.const 72656 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::money_get_>_>::money_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::__money_get::__money_get__ │ │ drop │ │ local.get 0 │ │ - i32.const 72404 │ │ + i32.const 72772 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::money_get_>_>::money_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::__money_get::__money_get__ │ │ drop │ │ local.get 0 │ │ - i32.const 72568 │ │ + i32.const 72936 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::money_put_>_>::money_put_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::__money_put::__money_put__ │ │ drop │ │ local.get 0 │ │ - i32.const 72732 │ │ + i32.const 73100 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::money_put_>_>::money_put_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::__money_put::__money_put__ │ │ drop │ │ local.get 0 │ │ - i32.const 72896 │ │ + i32.const 73264 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::time_get_>_>::time_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ @@ -460073,20 +462262,20 @@ │ │ drop │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::__time_get_c_storage::__time_get_c_storage__ │ │ local.set 1 │ │ local.get 0 │ │ - i32.const 71124 │ │ + i32.const 71492 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 1 │ │ - i32.const 71124 │ │ + i32.const 71492 │ │ i32.const 56 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::time_get_>_>::time_get_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ @@ -460094,52 +462283,52 @@ │ │ drop │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $std::__2::__time_get_c_storage::__time_get_c_storage__ │ │ local.set 1 │ │ local.get 0 │ │ - i32.const 71388 │ │ + i32.const 71756 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 1 │ │ - i32.const 71388 │ │ + i32.const 71756 │ │ i32.const 56 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::time_put_>_>::time_put_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 708 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ - i32.const 71624 │ │ + i32.const 71992 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ return │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -460156,34 +462345,34 @@ │ │ (local i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 708 │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ - i32.const 71780 │ │ + i32.const 72148 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ return │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ @@ -460201,29 +462390,29 @@ │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::messages_base::messages_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 73060 │ │ + i32.const 73428 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::messages::messages_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ call $std::__2::messages_base::messages_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 73180 │ │ + i32.const 73548 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::vector_>::__annotate_delete___const (type 5) (param i32) │ │ local.get 0 │ │ local.get 0 │ │ @@ -460249,30 +462438,30 @@ │ │ i32.const 2 │ │ i32.shl │ │ i32.add │ │ call $std::__2::vector_>::__annotate_contiguous_container_void_const*__void_const*__void_const*__void_const*__const) │ │ (func $std::__2::locale::classic__ (type 9) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92368 │ │ + i32.load8_u offset=92736 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92364 │ │ + i32.load offset=92732 │ │ return │ │ end │ │ call $std::__2::locale::__imp::make_classic__ │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92368 │ │ + i32.store8 offset=92736 │ │ i32.const 0 │ │ - i32.const 92360 │ │ - i32.store offset=92364 │ │ - i32.const 92360) │ │ + i32.const 92728 │ │ + i32.store offset=92732 │ │ + i32.const 92728) │ │ (func $std::__2::vector_>::operator___unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ i32.load │ │ local.get 1 │ │ i32.const 2 │ │ i32.shl │ │ i32.add) │ │ @@ -460301,17 +462490,17 @@ │ │ end │ │ local.get 1 │ │ i32.const -1 │ │ i32.eq) │ │ (func $std::__2::locale::__imp::make_classic__ (type 9) (result i32) │ │ call $std::__2::locale::__imp&_std::__2::_anonymous_namespace_::make_unsigned_int_ │ │ i32.const 0 │ │ - i32.const 93976 │ │ - i32.store offset=92360 │ │ - i32.const 92360) │ │ + i32.const 94344 │ │ + i32.store offset=92728 │ │ + i32.const 92728) │ │ (func $long_std::__2::__libcpp_atomic_refcount_increment_long&_ (type 10) (param i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ local.get 0 │ │ i32.load │ │ i32.const 1 │ │ i32.add │ │ @@ -460458,15 +462647,15 @@ │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ call $std::__2::_anonymous_namespace_::release::operator___std::__2::locale::facet*_ │ │ end) │ │ (func $std::__2::locale::__imp::~__imp__ (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ local.get 0 │ │ - i32.const 68848 │ │ + i32.const 69216 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 8 │ │ i32.add │ │ local.set 1 │ │ @@ -460561,25 +462750,25 @@ │ │ local.get 3 │ │ call $std::__2::__split_buffer&>::__split_buffer_unsigned_long__unsigned_long__std::__2::__sso_allocator&_ │ │ local.tee 3 │ │ local.get 1 │ │ call $std::__2::__split_buffer&>::__construct_at_end_unsigned_long_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 709 │ │ local.get 0 │ │ local.get 3 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ local.get 3 │ │ call $std::__2::__split_buffer&>::~__split_buffer__ │ │ drop │ │ @@ -460643,57 +462832,57 @@ │ │ local.get 0 │ │ i32.load │ │ local.get 1 │ │ i32.const 2 │ │ i32.shl │ │ i32.add) │ │ (func $std::__2::locale::__imp&_std::__2::_anonymous_namespace_::make_unsigned_int_ (type 11) │ │ - i32.const 93976 │ │ + i32.const 94344 │ │ i32.const 1 │ │ call $std::__2::locale::__imp::__imp_unsigned_long_ │ │ drop) │ │ (func $std::__2::locale::__imp::make_global__ (type 9) (result i32) │ │ - i32.const 92372 │ │ + i32.const 92740 │ │ call $std::__2::locale::classic__ │ │ call $std::__2::locale::locale_std::__2::locale_const&_ │ │ drop │ │ - i32.const 92372) │ │ + i32.const 92740) │ │ (func $std::__2::locale::__global__ (type 9) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92380 │ │ + i32.load8_u offset=92748 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92376 │ │ + i32.load offset=92744 │ │ return │ │ end │ │ call $std::__2::locale::__imp::make_global__ │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92380 │ │ + i32.store8 offset=92748 │ │ i32.const 0 │ │ - i32.const 92372 │ │ - i32.store offset=92376 │ │ - i32.const 92372) │ │ + i32.const 92740 │ │ + i32.store offset=92744 │ │ + i32.const 92740) │ │ (func $std::__2::locale::locale__ (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 710 │ │ call $invoke_i │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ local.get 1 │ │ @@ -460810,19 +462999,19 @@ │ │ (func $void_std::__2::__call_once_proxy_>_void*_ (type 5) (param i32) │ │ local.get 0 │ │ call $std::__2::__call_once_param_>::operator____) │ │ (func $int_std::__2::_anonymous_namespace_::__libcpp_atomic_add_int*__int__int_ (type 9) (result i32) │ │ (local i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.load offset=92384 │ │ + i32.load offset=92752 │ │ i32.const 1 │ │ i32.add │ │ local.tee 0 │ │ - i32.store offset=92384 │ │ + i32.store offset=92752 │ │ local.get 0) │ │ (func $std::__2::basic_string__std::__2::allocator_>::basic_string_std::__2::basic_string__std::__2::allocator_>&&_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::remove_reference__std::__2::allocator_>::__rep__std::__2::allocator_>&>::type&&_std::__2::move__std::__2::allocator_>::__rep__std::__2::allocator_>&>_std::__2::__compressed_pair__std::__2::allocator_>::__rep__std::__2::allocator_>&_ │ │ local.tee 2 │ │ @@ -460870,24 +463059,24 @@ │ │ local.set 3 │ │ end │ │ local.get 3) │ │ (func $std::__2::ctype::classic_table__ (type 9) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 712 │ │ call $invoke_i │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.load │ │ @@ -461026,24 +463215,24 @@ │ │ local.set 1 │ │ end │ │ local.get 1) │ │ (func $std::__2::ctype::__classic_upper_table__ (type 9) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 713 │ │ call $invoke_i │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.load │ │ @@ -461106,24 +463295,24 @@ │ │ local.set 1 │ │ end │ │ local.get 1) │ │ (func $std::__2::ctype::__classic_lower_table__ (type 9) (result i32) │ │ (local i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 714 │ │ call $invoke_i │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ i32.load │ │ @@ -461248,15 +463437,15 @@ │ │ local.get 0 │ │ local.get 2 │ │ i32.store8 offset=12 │ │ local.get 0 │ │ local.get 1 │ │ i32.store offset=8 │ │ local.get 0 │ │ - i32.const 68868 │ │ + i32.const 69236 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ block ;; label = @1 │ │ local.get 1 │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ @@ -461265,15 +463454,15 @@ │ │ end │ │ local.get 0) │ │ (func $std::__2::ctype_base::ctype_base__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::ctype::~ctype__ (type 10) (param i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ - i32.const 68868 │ │ + i32.const 69236 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.load offset=8 │ │ local.tee 1 │ │ @@ -461540,30 +463729,30 @@ │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ local.set 2 │ │ local.get 0 │ │ call $std::__2::codecvt_base::codecvt_base__ │ │ drop │ │ local.get 0 │ │ - i32.const 68920 │ │ + i32.const 69288 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 3 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ local.get 3 │ │ @@ -461862,29 +464051,29 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 715 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -461922,27 +464111,27 @@ │ │ local.get 4 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 716 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462215,29 +464404,29 @@ │ │ local.get 6 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 5 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 717 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ local.get 4 │ │ call $invoke_iiiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 5 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462275,28 +464464,28 @@ │ │ local.get 5 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 718 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iiiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 4 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462401,28 +464590,28 @@ │ │ (func $std::__2::codecvt::do_encoding___const (type 10) (param i32) (result i32) │ │ (local i32 i32) │ │ local.get 0 │ │ i32.load offset=8 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 719 │ │ i32.const 0 │ │ i32.const 0 │ │ i32.const 4 │ │ local.get 1 │ │ call $invoke_iiiii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ i32.const -1 │ │ local.set 1 │ │ @@ -462435,25 +464624,25 @@ │ │ local.tee 0 │ │ br_if 0 (;@3;) │ │ i32.const 1 │ │ return │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 720 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ @@ -462485,27 +464674,27 @@ │ │ local.get 4 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 721 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462543,24 +464732,24 @@ │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 722 │ │ call $invoke_i │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462652,27 +464841,27 @@ │ │ local.get 4 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::__libcpp_locale_guard::__libcpp_locale_guard___locale_struct*&_ │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 723 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ call $std::__2::__libcpp_locale_guard::~__libcpp_locale_guard__ │ │ @@ -462702,25 +464891,25 @@ │ │ local.tee 0 │ │ br_if 0 (;@1;) │ │ i32.const 1 │ │ return │ │ end │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 720 │ │ local.get 0 │ │ call $invoke_ii │ │ local.set 1 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ return │ │ @@ -464962,15 +467151,15 @@ │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ i32.const 11310 │ │ i32.store16 offset=8 │ │ local.get 0 │ │ - i32.const 68968 │ │ + i32.const 69336 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ @@ -464981,27 +467170,27 @@ │ │ local.get 1 │ │ call $std::__2::locale::facet::facet_unsigned_long_ │ │ drop │ │ local.get 0 │ │ i64.const 188978561070 │ │ i64.store offset=8 align=4 │ │ local.get 0 │ │ - i32.const 69008 │ │ + i32.const 69376 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ drop │ │ local.get 0) │ │ (func $std::__2::numpunct::~numpunct__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 68968 │ │ + i32.const 69336 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ @@ -465014,15 +467203,15 @@ │ │ local.get 0 │ │ call $std::__2::numpunct::~numpunct__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::numpunct::~numpunct__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 69008 │ │ + i32.const 69376 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ @@ -465061,20 +467250,20 @@ │ │ local.get 1 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_std::__2::basic_string__std::__2::allocator_>_const&_ │ │ drop) │ │ (func $std::__2::numpunct::do_truename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ - i32.const 9323 │ │ + i32.const 9457 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop) │ │ (func $std::__2::numpunct::do_truename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ - i32.const 69048 │ │ + i32.const 69416 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop) │ │ (func $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ global.get $__stack_pointer │ │ i32.const 16 │ │ i32.sub │ │ @@ -465098,20 +467287,20 @@ │ │ global.set $__stack_pointer │ │ local.get 0) │ │ (func $std::__2::char_traits::length_wchar_t_const*_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $wcslen) │ │ (func $std::__2::numpunct::do_falsename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ - i32.const 9638 │ │ + i32.const 9772 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop) │ │ (func $std::__2::numpunct::do_falsename___const (type 1) (param i32 i32) │ │ local.get 0 │ │ - i32.const 69068 │ │ + i32.const 69436 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop) │ │ (func $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::assign_char_const*_) │ │ (func $std::__2::basic_string__std::__2::allocator_>::assign_char_const*_ (type 6) (param i32 i32) (result i32) │ │ @@ -465141,891 +467330,891 @@ │ │ local.set 0 │ │ br 0 (;@2;) │ │ end │ │ end) │ │ (func $std::__2::__time_get_c_storage::__weeks___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92456 │ │ + i32.load8_u offset=92824 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92452 │ │ + i32.load offset=92820 │ │ return │ │ end │ │ call $std::__2::init_weeks__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92456 │ │ + i32.store8 offset=92824 │ │ i32.const 0 │ │ - i32.const 92640 │ │ - i32.store offset=92452 │ │ - i32.const 92640) │ │ + i32.const 93008 │ │ + i32.store offset=92820 │ │ + i32.const 93008) │ │ (func $std::__2::init_weeks__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92808 │ │ + i32.load8_u offset=93176 │ │ br_if 0 (;@1;) │ │ - i32.const 92640 │ │ + i32.const 93008 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 92808 │ │ + i32.const 93176 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 724 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92808 │ │ + i32.store8 offset=93176 │ │ end │ │ - i32.const 92640 │ │ + i32.const 93008 │ │ i32.const 1498 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92652 │ │ + i32.const 93020 │ │ i32.const 1505 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92664 │ │ + i32.const 93032 │ │ i32.const 1471 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92676 │ │ + i32.const 93044 │ │ i32.const 1479 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92688 │ │ + i32.const 93056 │ │ i32.const 1462 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92700 │ │ + i32.const 93068 │ │ i32.const 1512 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92712 │ │ + i32.const 93080 │ │ i32.const 1489 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92724 │ │ - i32.const 6125 │ │ + i32.const 93092 │ │ + i32.const 6174 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92736 │ │ - i32.const 6739 │ │ + i32.const 93104 │ │ + i32.const 6788 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92748 │ │ - i32.const 9443 │ │ + i32.const 93116 │ │ + i32.const 9577 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92760 │ │ - i32.const 12679 │ │ + i32.const 93128 │ │ + i32.const 12948 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92772 │ │ + i32.const 93140 │ │ i32.const 1968 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92784 │ │ - i32.const 7724 │ │ + i32.const 93152 │ │ + i32.const 7773 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 92796 │ │ - i32.const 3402 │ │ + i32.const 93164 │ │ + i32.const 3451 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.55 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 92808 │ │ + i32.const 93176 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 92640 │ │ + i32.const 93008 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::__time_get_c_storage::__weeks___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92464 │ │ + i32.load8_u offset=92832 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92460 │ │ + i32.load offset=92828 │ │ return │ │ end │ │ call $std::__2::init_wweeks__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92464 │ │ + i32.store8 offset=92832 │ │ i32.const 0 │ │ - i32.const 92816 │ │ - i32.store offset=92460 │ │ - i32.const 92816) │ │ + i32.const 93184 │ │ + i32.store offset=92828 │ │ + i32.const 93184) │ │ (func $std::__2::init_wweeks__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92984 │ │ + i32.load8_u offset=93352 │ │ br_if 0 (;@1;) │ │ - i32.const 92816 │ │ + i32.const 93184 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 92984 │ │ + i32.const 93352 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 725 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92984 │ │ + i32.store8 offset=93352 │ │ end │ │ - i32.const 92816 │ │ - i32.const 73268 │ │ + i32.const 93184 │ │ + i32.const 73636 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92828 │ │ - i32.const 73296 │ │ + i32.const 93196 │ │ + i32.const 73664 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92840 │ │ - i32.const 73324 │ │ + i32.const 93208 │ │ + i32.const 73692 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92852 │ │ - i32.const 73356 │ │ + i32.const 93220 │ │ + i32.const 73724 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92864 │ │ - i32.const 73396 │ │ + i32.const 93232 │ │ + i32.const 73764 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92876 │ │ - i32.const 73432 │ │ + i32.const 93244 │ │ + i32.const 73800 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92888 │ │ - i32.const 73460 │ │ + i32.const 93256 │ │ + i32.const 73828 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92900 │ │ - i32.const 73496 │ │ + i32.const 93268 │ │ + i32.const 73864 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92912 │ │ - i32.const 73512 │ │ + i32.const 93280 │ │ + i32.const 73880 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92924 │ │ - i32.const 73528 │ │ + i32.const 93292 │ │ + i32.const 73896 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92936 │ │ - i32.const 73544 │ │ + i32.const 93304 │ │ + i32.const 73912 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92948 │ │ - i32.const 73560 │ │ + i32.const 93316 │ │ + i32.const 73928 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92960 │ │ - i32.const 73576 │ │ + i32.const 93328 │ │ + i32.const 73944 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 92972 │ │ - i32.const 73592 │ │ + i32.const 93340 │ │ + i32.const 73960 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.70 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 92984 │ │ + i32.const 93352 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 92816 │ │ + i32.const 93184 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::assign_wchar_t_const*_) │ │ (func $std::__2::__time_get_c_storage::__months___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92472 │ │ + i32.load8_u offset=92840 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92468 │ │ + i32.load offset=92836 │ │ return │ │ end │ │ call $std::__2::init_months__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92472 │ │ + i32.store8 offset=92840 │ │ i32.const 0 │ │ - i32.const 92992 │ │ - i32.store offset=92468 │ │ - i32.const 92992) │ │ + i32.const 93360 │ │ + i32.store offset=92836 │ │ + i32.const 93360) │ │ (func $std::__2::init_months__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=93280 │ │ + i32.load8_u offset=93648 │ │ br_if 0 (;@1;) │ │ - i32.const 92992 │ │ + i32.const 93360 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 93280 │ │ + i32.const 93648 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 726 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=93280 │ │ + i32.store8 offset=93648 │ │ end │ │ - i32.const 92992 │ │ + i32.const 93360 │ │ i32.const 1332 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93004 │ │ + i32.const 93372 │ │ i32.const 1323 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93016 │ │ - i32.const 8132 │ │ + i32.const 93384 │ │ + i32.const 8266 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93028 │ │ - i32.const 7165 │ │ + i32.const 93396 │ │ + i32.const 7214 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93040 │ │ + i32.const 93408 │ │ i32.const 1535 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93052 │ │ - i32.const 9755 │ │ + i32.const 93420 │ │ + i32.const 9889 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93064 │ │ + i32.const 93432 │ │ i32.const 1414 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93076 │ │ + i32.const 93444 │ │ i32.const 2209 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93088 │ │ - i32.const 5698 │ │ + i32.const 93456 │ │ + i32.const 5747 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93100 │ │ - i32.const 5550 │ │ + i32.const 93468 │ │ + i32.const 5599 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93112 │ │ - i32.const 5689 │ │ + i32.const 93480 │ │ + i32.const 5738 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93124 │ │ - i32.const 5708 │ │ + i32.const 93492 │ │ + i32.const 5757 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93136 │ │ - i32.const 6875 │ │ + i32.const 93504 │ │ + i32.const 6924 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93148 │ │ - i32.const 13987 │ │ + i32.const 93516 │ │ + i32.const 14256 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93160 │ │ - i32.const 5754 │ │ + i32.const 93528 │ │ + i32.const 5803 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93172 │ │ - i32.const 4717 │ │ + i32.const 93540 │ │ + i32.const 4766 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93184 │ │ + i32.const 93552 │ │ i32.const 1535 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93196 │ │ - i32.const 6129 │ │ + i32.const 93564 │ │ + i32.const 6178 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93208 │ │ - i32.const 7085 │ │ + i32.const 93576 │ │ + i32.const 7134 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93220 │ │ - i32.const 8144 │ │ + i32.const 93588 │ │ + i32.const 8278 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93232 │ │ - i32.const 5949 │ │ + i32.const 93600 │ │ + i32.const 5998 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93244 │ │ - i32.const 3307 │ │ + i32.const 93612 │ │ + i32.const 3356 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93256 │ │ + i32.const 93624 │ │ i32.const 1926 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93268 │ │ - i32.const 13802 │ │ + i32.const 93636 │ │ + i32.const 14071 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.85 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 93280 │ │ + i32.const 93648 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 92992 │ │ + i32.const 93360 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::__time_get_c_storage::__months___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92480 │ │ + i32.load8_u offset=92848 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92476 │ │ + i32.load offset=92844 │ │ return │ │ end │ │ call $std::__2::init_wmonths__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92480 │ │ + i32.store8 offset=92848 │ │ i32.const 0 │ │ - i32.const 93296 │ │ - i32.store offset=92476 │ │ - i32.const 93296) │ │ + i32.const 93664 │ │ + i32.store offset=92844 │ │ + i32.const 93664) │ │ (func $std::__2::init_wmonths__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=93584 │ │ + i32.load8_u offset=93952 │ │ br_if 0 (;@1;) │ │ - i32.const 93296 │ │ + i32.const 93664 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 93584 │ │ + i32.const 93952 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 727 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=93584 │ │ + i32.store8 offset=93952 │ │ end │ │ - i32.const 93296 │ │ - i32.const 73608 │ │ + i32.const 93664 │ │ + i32.const 73976 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93308 │ │ - i32.const 73640 │ │ + i32.const 93676 │ │ + i32.const 74008 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93320 │ │ - i32.const 73676 │ │ + i32.const 93688 │ │ + i32.const 74044 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93332 │ │ - i32.const 73700 │ │ + i32.const 93700 │ │ + i32.const 74068 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93344 │ │ - i32.const 73724 │ │ + i32.const 93712 │ │ + i32.const 74092 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93356 │ │ - i32.const 73740 │ │ + i32.const 93724 │ │ + i32.const 74108 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93368 │ │ - i32.const 73760 │ │ + i32.const 93736 │ │ + i32.const 74128 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93380 │ │ - i32.const 73780 │ │ + i32.const 93748 │ │ + i32.const 74148 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93392 │ │ - i32.const 73808 │ │ + i32.const 93760 │ │ + i32.const 74176 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93404 │ │ - i32.const 73848 │ │ + i32.const 93772 │ │ + i32.const 74216 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93416 │ │ - i32.const 73880 │ │ + i32.const 93784 │ │ + i32.const 74248 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93428 │ │ - i32.const 73916 │ │ + i32.const 93796 │ │ + i32.const 74284 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93440 │ │ - i32.const 73952 │ │ + i32.const 93808 │ │ + i32.const 74320 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93452 │ │ - i32.const 73968 │ │ + i32.const 93820 │ │ + i32.const 74336 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93464 │ │ - i32.const 73984 │ │ + i32.const 93832 │ │ + i32.const 74352 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93476 │ │ - i32.const 74000 │ │ + i32.const 93844 │ │ + i32.const 74368 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93488 │ │ - i32.const 73724 │ │ + i32.const 93856 │ │ + i32.const 74092 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93500 │ │ - i32.const 74016 │ │ + i32.const 93868 │ │ + i32.const 74384 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93512 │ │ - i32.const 74032 │ │ + i32.const 93880 │ │ + i32.const 74400 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93524 │ │ - i32.const 74048 │ │ + i32.const 93892 │ │ + i32.const 74416 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93536 │ │ - i32.const 74064 │ │ + i32.const 93904 │ │ + i32.const 74432 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93548 │ │ - i32.const 74080 │ │ + i32.const 93916 │ │ + i32.const 74448 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93560 │ │ - i32.const 74096 │ │ + i32.const 93928 │ │ + i32.const 74464 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93572 │ │ - i32.const 74112 │ │ + i32.const 93940 │ │ + i32.const 74480 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.109 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 93584 │ │ + i32.const 93952 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 93296 │ │ + i32.const 93664 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::__time_get_c_storage::__am_pm___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92488 │ │ + i32.load8_u offset=92856 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92484 │ │ + i32.load offset=92852 │ │ return │ │ end │ │ call $std::__2::init_am_pm__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92488 │ │ + i32.store8 offset=92856 │ │ i32.const 0 │ │ - i32.const 93600 │ │ - i32.store offset=92484 │ │ - i32.const 93600) │ │ + i32.const 93968 │ │ + i32.store offset=92852 │ │ + i32.const 93968) │ │ (func $std::__2::init_am_pm__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=93624 │ │ + i32.load8_u offset=93992 │ │ br_if 0 (;@1;) │ │ - i32.const 93600 │ │ + i32.const 93968 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 93624 │ │ + i32.const 93992 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 728 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=93624 │ │ + i32.store8 offset=93992 │ │ end │ │ - i32.const 93600 │ │ - i32.const 16066 │ │ + i32.const 93968 │ │ + i32.const 16369 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop │ │ - i32.const 93612 │ │ - i32.const 16063 │ │ + i32.const 93980 │ │ + i32.const 16366 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_char_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.133 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 93624 │ │ + i32.const 93992 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 93600 │ │ + i32.const 93968 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::__time_get_c_storage::__am_pm___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92496 │ │ + i32.load8_u offset=92864 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ - i32.load offset=92492 │ │ + i32.load offset=92860 │ │ return │ │ end │ │ call $std::__2::init_wam_pm__ │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92496 │ │ + i32.store8 offset=92864 │ │ i32.const 0 │ │ - i32.const 93632 │ │ - i32.store offset=92492 │ │ - i32.const 93632) │ │ + i32.const 94000 │ │ + i32.store offset=92860 │ │ + i32.const 94000) │ │ (func $std::__2::init_wam_pm__ (type 11) │ │ (local i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=93656 │ │ + i32.load8_u offset=94024 │ │ br_if 0 (;@1;) │ │ - i32.const 93632 │ │ + i32.const 94000 │ │ local.set 0 │ │ loop ;; label = @2 │ │ local.get 0 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string__ │ │ i32.const 12 │ │ i32.add │ │ local.tee 0 │ │ - i32.const 93656 │ │ + i32.const 94024 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ end │ │ i32.const 729 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=93656 │ │ + i32.store8 offset=94024 │ │ end │ │ - i32.const 93632 │ │ - i32.const 74128 │ │ + i32.const 94000 │ │ + i32.const 74496 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop │ │ - i32.const 93644 │ │ - i32.const 74140 │ │ + i32.const 94012 │ │ + i32.const 74508 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator=_wchar_t_const*_ │ │ drop) │ │ (func $__cxx_global_array_dtor.136 (type 5) (param i32) │ │ (local i32) │ │ - i32.const 93656 │ │ + i32.const 94024 │ │ local.set 1 │ │ loop ;; label = @1 │ │ local.get 1 │ │ i32.const -12 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ local.tee 1 │ │ - i32.const 93632 │ │ + i32.const 94000 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ end) │ │ (func $std::__2::__time_get_c_storage::__x___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92512 │ │ + i32.load8_u offset=92880 │ │ br_if 0 (;@1;) │ │ - i32.const 92500 │ │ + i32.const 92868 │ │ i32.const 1624 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop │ │ i32.const 730 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92512 │ │ + i32.store8 offset=92880 │ │ end │ │ - i32.const 92500) │ │ + i32.const 92868) │ │ (func $__cxx_global_array_dtor.2 (type 5) (param i32) │ │ - i32.const 92500 │ │ + i32.const 92868 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__x___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92528 │ │ + i32.load8_u offset=92896 │ │ br_if 0 (;@1;) │ │ - i32.const 92516 │ │ - i32.const 69092 │ │ + i32.const 92884 │ │ + i32.const 69460 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop │ │ i32.const 731 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92528 │ │ + i32.store8 offset=92896 │ │ end │ │ - i32.const 92516) │ │ + i32.const 92884) │ │ (func $__cxx_global_array_dtor.32 (type 5) (param i32) │ │ - i32.const 92516 │ │ + i32.const 92884 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__X___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92544 │ │ + i32.load8_u offset=92912 │ │ br_if 0 (;@1;) │ │ - i32.const 92532 │ │ - i32.const 15832 │ │ + i32.const 92900 │ │ + i32.const 16135 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop │ │ i32.const 732 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92544 │ │ + i32.store8 offset=92912 │ │ end │ │ - i32.const 92532) │ │ + i32.const 92900) │ │ (func $__cxx_global_array_dtor.34 (type 5) (param i32) │ │ - i32.const 92532 │ │ + i32.const 92900 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__X___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92560 │ │ + i32.load8_u offset=92928 │ │ br_if 0 (;@1;) │ │ - i32.const 92548 │ │ - i32.const 69128 │ │ + i32.const 92916 │ │ + i32.const 69496 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop │ │ i32.const 733 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92560 │ │ + i32.store8 offset=92928 │ │ end │ │ - i32.const 92548) │ │ + i32.const 92916) │ │ (func $__cxx_global_array_dtor.36 (type 5) (param i32) │ │ - i32.const 92548 │ │ + i32.const 92916 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__c___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92576 │ │ + i32.load8_u offset=92944 │ │ br_if 0 (;@1;) │ │ - i32.const 92564 │ │ - i32.const 15740 │ │ + i32.const 92932 │ │ + i32.const 16043 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop │ │ i32.const 734 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92576 │ │ + i32.store8 offset=92944 │ │ end │ │ - i32.const 92564) │ │ + i32.const 92932) │ │ (func $__cxx_global_array_dtor.38 (type 5) (param i32) │ │ - i32.const 92564 │ │ + i32.const 92932 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__c___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92592 │ │ + i32.load8_u offset=92960 │ │ br_if 0 (;@1;) │ │ - i32.const 92580 │ │ - i32.const 69164 │ │ + i32.const 92948 │ │ + i32.const 69532 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop │ │ i32.const 735 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92592 │ │ + i32.store8 offset=92960 │ │ end │ │ - i32.const 92580) │ │ + i32.const 92948) │ │ (func $__cxx_global_array_dtor.40 (type 5) (param i32) │ │ - i32.const 92580 │ │ + i32.const 92948 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__r___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92608 │ │ + i32.load8_u offset=92976 │ │ br_if 0 (;@1;) │ │ - i32.const 92596 │ │ - i32.const 5961 │ │ + i32.const 92964 │ │ + i32.const 6010 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ drop │ │ i32.const 736 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92608 │ │ + i32.store8 offset=92976 │ │ end │ │ - i32.const 92596) │ │ + i32.const 92964) │ │ (func $__cxx_global_array_dtor.42 (type 5) (param i32) │ │ - i32.const 92596 │ │ + i32.const 92964 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::__time_get_c_storage::__r___const (type 10) (param i32) (result i32) │ │ block ;; label = @1 │ │ i32.const 0 │ │ - i32.load8_u offset=92624 │ │ + i32.load8_u offset=92992 │ │ br_if 0 (;@1;) │ │ - i32.const 92612 │ │ - i32.const 69248 │ │ + i32.const 92980 │ │ + i32.const 69616 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_wchar_t_const*_ │ │ drop │ │ i32.const 737 │ │ i32.const 0 │ │ i32.const 1024 │ │ call $__cxa_atexit │ │ drop │ │ i32.const 0 │ │ i32.const 1 │ │ - i32.store8 offset=92624 │ │ + i32.store8 offset=92992 │ │ end │ │ - i32.const 92612) │ │ + i32.const 92980) │ │ (func $__cxx_global_array_dtor.44 (type 5) (param i32) │ │ - i32.const 92612 │ │ + i32.const 92980 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop) │ │ (func $std::__2::basic_string__std::__2::allocator_>::__invalidate_iterators_past_unsigned_long_ (type 1) (param i32 i32)) │ │ (func $std::__2::__time_put::~__time_put__ (type 10) (param i32) (result i32) │ │ (local i32 i32 i32) │ │ local.get 0 │ │ i32.load │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 596 │ │ call $invoke_i │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ block ;; label = @2 │ │ local.get 1 │ │ @@ -466033,24 +468222,24 @@ │ │ i32.eq │ │ br_if 0 (;@2;) │ │ local.get 0 │ │ i32.load │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 660 │ │ local.get 3 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -466214,28 +468403,28 @@ │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $std::__2::allocator::deallocate_wchar_t*__unsigned_long_) │ │ (func $std::__2::allocator::deallocate_wchar_t*__unsigned_long_ (type 2) (param i32 i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 474 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 2 │ │ i32.shl │ │ i32.const 4 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ return │ │ end │ │ @@ -466290,33 +468479,33 @@ │ │ call $std::__2::__vector_base_>::__alloc___const │ │ call $unsigned_long_std::__2::allocator_traits_>::max_size__void>_std::__2::__sso_allocator_const&_ │ │ i32.store offset=12 │ │ call $std::__2::numeric_limits::max__ │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ local.get 0 │ │ i32.store offset=8 │ │ i32.const 738 │ │ local.get 1 │ │ i32.const 12 │ │ i32.add │ │ local.get 1 │ │ i32.const 8 │ │ i32.add │ │ call $invoke_iii │ │ local.set 2 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 2 │ │ i32.load │ │ @@ -466520,15 +468709,15 @@ │ │ (func $std::__2::allocator::allocate_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ call $unsigned_long_std::__2::allocator_traits_>::max_size__void>_std::__2::allocator_const&_ │ │ local.get 1 │ │ i32.ge_u │ │ br_if 0 (;@1;) │ │ - i32.const 9115 │ │ + i32.const 9249 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable │ │ end │ │ local.get 1 │ │ i32.const 2 │ │ i32.shl │ │ i32.const 4 │ │ @@ -466609,28 +468798,28 @@ │ │ i32.const 16 │ │ i32.add │ │ global.set $__stack_pointer) │ │ (func $void_std::__2::allocator_traits_>::destroy_std::__2::__sso_allocator&__std::__2::locale::facet**_ (type 1) (param i32 i32)) │ │ (func $std::__2::allocator::deallocate_std::__2::locale::facet**__unsigned_long_ (type 2) (param i32 i32 i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 474 │ │ local.get 1 │ │ local.get 2 │ │ i32.const 2 │ │ i32.shl │ │ i32.const 4 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ return │ │ end │ │ @@ -466649,22 +468838,22 @@ │ │ local.get 0) │ │ (func $std::__2::__money_put::__money_put__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::__money_put::__money_put__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::__time_get_c_storage::__time_get_c_storage__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 74152 │ │ + i32.const 74520 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__time_get_c_storage::__time_get_c_storage__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 74188 │ │ + i32.const 74556 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__time_put::__time_put__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::__2::__cloc__ │ │ @@ -467242,15 +469431,15 @@ │ │ (func $std::__2::allocator::allocate_unsigned_long_ (type 6) (param i32 i32) (result i32) │ │ block ;; label = @1 │ │ local.get 0 │ │ call $unsigned_long_std::__2::allocator_traits_>::max_size__void>_std::__2::allocator_const&_ │ │ local.get 1 │ │ i32.ge_u │ │ br_if 0 (;@1;) │ │ - i32.const 9115 │ │ + i32.const 9249 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable │ │ end │ │ local.get 1 │ │ i32.const 2 │ │ i32.shl │ │ i32.const 4 │ │ @@ -467834,26 +470023,26 @@ │ │ local.get 0 │ │ call $__pthread_mutex_lock) │ │ (func $std::__2::__libcpp_mutex_unlock_pthread_mutex_t*_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $__pthread_mutex_unlock) │ │ (func $std::__2::__call_once_unsigned_long_volatile&__void*__void__*__void*__ (type 2) (param i32 i32 i32) │ │ (local i32) │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $std::__2::__libcpp_mutex_lock_pthread_mutex_t*_ │ │ drop │ │ block ;; label = @1 │ │ loop ;; label = @2 │ │ local.get 0 │ │ i32.load │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ - i32.const 94168 │ │ - i32.const 94144 │ │ + i32.const 94536 │ │ + i32.const 94512 │ │ call $std::__2::__libcpp_condvar_wait_pthread_cond_t*__pthread_mutex_t*_ │ │ drop │ │ br 0 (;@2;) │ │ end │ │ end │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ @@ -467863,95 +470052,95 @@ │ │ i32.load │ │ br_if 0 (;@4;) │ │ local.get 0 │ │ i32.const 1 │ │ call $void_std::__2::_anonymous_namespace_::__libcpp_relaxed_store_unsigned_long_volatile*__unsigned_long_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 967 │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 3 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 3 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_vi │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 968 │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 0 │ │ call $void_std::__2::_anonymous_namespace_::__libcpp_atomic_store_unsigned_long_volatile*__unsigned_long__int_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 967 │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 969 │ │ - i32.const 94168 │ │ + i32.const 94536 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.ne │ │ br_if 2 (;@3;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -467959,107 +470148,107 @@ │ │ call $getTempRet0 │ │ drop │ │ local.get 1 │ │ call $__cxa_begin_catch │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 968 │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @5 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ local.get 0 │ │ i32.const 0 │ │ call $void_std::__2::_anonymous_namespace_::__libcpp_relaxed_store_unsigned_long_volatile*__unsigned_long_ │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 967 │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 969 │ │ - i32.const 94168 │ │ + i32.const 94536 │ │ call $invoke_ii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@5;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 970 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 4 (;@1;) │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 1 │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 2 (;@2;) │ │ local.get 1 │ │ call $__resumeException │ │ unreachable │ │ end │ │ - i32.const 94144 │ │ + i32.const 94512 │ │ call $std::__2::__libcpp_mutex_unlock_pthread_mutex_t*_ │ │ drop │ │ end │ │ return │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -468088,15 +470277,15 @@ │ │ (local i32) │ │ i32.const 4 │ │ call $__cxa_allocate_exception │ │ local.tee 0 │ │ call $std::bad_alloc::bad_alloc__ │ │ drop │ │ local.get 0 │ │ - i32.const 74904 │ │ + i32.const 75272 │ │ i32.const 971 │ │ call $__cxa_throw │ │ unreachable) │ │ (func $operator_new_unsigned_long_ (type 10) (param i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ i32.const 1 │ │ @@ -468121,15 +470310,15 @@ │ │ end │ │ i32.const 4 │ │ call $__cxa_allocate_exception │ │ local.tee 0 │ │ call $std::bad_alloc::bad_alloc__ │ │ drop │ │ local.get 0 │ │ - i32.const 74904 │ │ + i32.const 75272 │ │ i32.const 971 │ │ call $__cxa_throw │ │ unreachable │ │ end │ │ local.get 0) │ │ (func $operator_new___unsigned_long_ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ @@ -468138,15 +470327,15 @@ │ │ local.get 0 │ │ call $dlfree) │ │ (func $operator_delete___void*_ (type 5) (param i32) │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::exception::exception__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 74844 │ │ + i32.const 75212 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::__libcpp_refstring::__libcpp_refstring_char_const*_ (type 6) (param i32 i32) (result i32) │ │ (local i32 i32) │ │ local.get 1 │ │ @@ -468180,34 +470369,34 @@ │ │ i32.add) │ │ (func $std::logic_error::logic_error_char_const*_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ call $std::exception::exception__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 74916 │ │ + i32.const 75284 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 972 │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ local.get 1 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -468226,37 +470415,37 @@ │ │ i32.const 1) │ │ (func $std::runtime_error::runtime_error_std::__2::basic_string__std::__2::allocator_>_const&_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ call $std::exception::exception__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 74936 │ │ + i32.const 75304 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 1 │ │ call $std::__2::basic_string__std::__2::allocator_>::c_str___const │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 972 │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ local.get 1 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -468273,34 +470462,34 @@ │ │ unreachable) │ │ (func $std::runtime_error::runtime_error_char_const*_ (type 6) (param i32 i32) (result i32) │ │ (local i32) │ │ local.get 0 │ │ call $std::exception::exception__ │ │ local.set 2 │ │ local.get 0 │ │ - i32.const 74936 │ │ + i32.const 75304 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 972 │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ local.get 1 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 0 │ │ return │ │ @@ -468401,47 +470590,47 @@ │ │ i32.add │ │ local.tee 2 │ │ br_if 0 (;@2;) │ │ end │ │ end │ │ local.get 0) │ │ (func $std::__2::__basic_string_common::__throw_length_error___const (type 5) (param i32) │ │ - i32.const 8359 │ │ + i32.const 8493 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable) │ │ (func $std::__2::__basic_string_common::__throw_out_of_range___const (type 5) (param i32) │ │ - i32.const 8359 │ │ + i32.const 8493 │ │ call $std::__2::__throw_out_of_range_char_const*_ │ │ unreachable) │ │ (func $std::__2::__throw_out_of_range_char_const*_ (type 5) (param i32) │ │ (local i32) │ │ i32.const 8 │ │ call $__cxa_allocate_exception │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 973 │ │ local.get 1 │ │ local.get 0 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ local.get 1 │ │ - i32.const 75076 │ │ + i32.const 75444 │ │ i32.const 129 │ │ call $__cxa_throw │ │ unreachable │ │ end │ │ call $__cxa_find_matching_catch_2 │ │ local.set 0 │ │ call $getTempRet0 │ │ @@ -468453,15 +470642,15 @@ │ │ unreachable) │ │ (func $std::out_of_range::out_of_range_char_const*_ (type 6) (param i32 i32) (result i32) │ │ local.get 0 │ │ local.get 1 │ │ call $std::logic_error::logic_error_char_const*_ │ │ drop │ │ local.get 0 │ │ - i32.const 75036 │ │ + i32.const 75404 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::__2::char_traits::move_char*__char_const*__unsigned_long_ (type 4) (param i32 i32 i32) (result i32) │ │ block ;; label = @1 │ │ local.get 2 │ │ @@ -469470,27 +471659,27 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 2 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 974 │ │ local.get 0 │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_iiii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 2 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -469836,27 +472025,27 @@ │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 975 │ │ local.get 0 │ │ local.get 2 │ │ local.get 1 │ │ call $invoke_iiii │ │ local.set 0 │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ end │ │ local.get 0 │ │ return │ │ @@ -470486,15 +472675,15 @@ │ │ local.get 2 │ │ local.get 1 │ │ i32.store │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ i32.const 1024 │ │ - i32.const 13318 │ │ + i32.const 13587 │ │ local.get 2 │ │ call $snprintf │ │ drop │ │ local.get 2 │ │ i32.const 16 │ │ i32.add │ │ local.set 5 │ │ @@ -470519,15 +472708,15 @@ │ │ i32.add │ │ br_table 0 (;@3;) 2 (;@1;) 1 (;@2;) │ │ end │ │ call $__errno_location │ │ i32.load │ │ local.set 0 │ │ end │ │ - i32.const 22663 │ │ + i32.const 22971 │ │ local.set 1 │ │ local.get 0 │ │ i32.const 28 │ │ i32.eq │ │ br_if 0 (;@1;) │ │ call $abort │ │ unreachable │ │ @@ -470559,35 +472748,35 @@ │ │ i32.eqz │ │ br_if 0 (;@2;) │ │ block ;; label = @3 │ │ local.get 2 │ │ call $std::__2::basic_string__std::__2::allocator_>::empty___const │ │ br_if 0 (;@3;) │ │ local.get 2 │ │ - i32.const 19818 │ │ + i32.const 20121 │ │ call $std::__2::basic_string__std::__2::allocator_>::operator+=_char_const*_ │ │ drop │ │ end │ │ local.get 3 │ │ local.get 1 │ │ call $std::__2::error_code::message___const │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 976 │ │ local.get 2 │ │ local.get 3 │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 1 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 1 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@1;) │ │ local.get 3 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ @@ -470641,65 +472830,65 @@ │ │ global.set $__stack_pointer │ │ local.get 3 │ │ local.get 2 │ │ call $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ │ │ local.set 2 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 977 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ local.get 1 │ │ local.get 2 │ │ call $invoke_viii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ block ;; label = @3 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@3;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 978 │ │ local.get 0 │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $invoke_iii │ │ drop │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 4 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 4 │ │ i32.const 1 │ │ i32.eq │ │ br_if 1 (;@2;) │ │ local.get 3 │ │ i32.const 16 │ │ i32.add │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ local.get 2 │ │ call $std::__2::basic_string__std::__2::allocator_>::~basic_string__ │ │ drop │ │ local.get 0 │ │ - i32.const 74280 │ │ + i32.const 74648 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ local.get 1 │ │ i64.load align=4 │ │ i64.store offset=8 align=4 │ │ @@ -470742,61 +472931,61 @@ │ │ call $std::__2::system_error::~system_error__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::__2::error_category::~error_category__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::__2::__vector_base_common::__throw_length_error___const (type 5) (param i32) │ │ - i32.const 4751 │ │ + i32.const 4800 │ │ call $std::__2::__throw_length_error_char_const*_ │ │ unreachable) │ │ (func $abort_message (type 1) (param i32 i32) │ │ call $abort │ │ unreachable) │ │ (func $void__*std::__2::_anonymous_namespace_::__libcpp_atomic_load_void__*_const*_____int____ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.load) │ │ (func $std::terminate__ (type 11) │ │ call $std::get_terminate__ │ │ call $std::__terminate_void__*____ │ │ unreachable) │ │ (func $std::get_terminate__ (type 9) (result i32) │ │ - i32.const 75948 │ │ + i32.const 76316 │ │ call $void__*std::__2::_anonymous_namespace_::__libcpp_atomic_load_void__*_const*_____int____) │ │ (func $std::__terminate_void__*____ (type 5) (param i32) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @1 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.eq │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 982 │ │ - i32.const 12237 │ │ + i32.const 12506 │ │ i32.const 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 1 (;@1;) │ │ end │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -470804,45 +472993,45 @@ │ │ call $getTempRet0 │ │ drop │ │ local.get 0 │ │ call $__cxa_begin_catch │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 982 │ │ - i32.const 6264 │ │ + i32.const 6313 │ │ i32.const 0 │ │ call $invoke_vii │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ drop │ │ call $getTempRet0 │ │ drop │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ i32.const 142 │ │ call $invoke_v │ │ i32.const 0 │ │ - i32.load offset=91076 │ │ + i32.load offset=91444 │ │ local.set 0 │ │ i32.const 0 │ │ i32.const 0 │ │ - i32.store offset=91076 │ │ + i32.store offset=91444 │ │ block ;; label = @2 │ │ local.get 0 │ │ i32.const 1 │ │ i32.ne │ │ br_if 0 (;@2;) │ │ i32.const 0 │ │ call $__cxa_find_matching_catch_3 │ │ @@ -470850,18 +473039,18 @@ │ │ call $getTempRet0 │ │ drop │ │ end │ │ call $std::terminate__ │ │ end │ │ unreachable) │ │ (func $std::get_new_handler__ (type 9) (result i32) │ │ - i32.const 94216 │ │ + i32.const 94584 │ │ call $void__*std::__2::_anonymous_namespace_::__libcpp_atomic_load_void__*_const*_____int____) │ │ (func $__cxa_pure_virtual (type 11) │ │ - i32.const 19515 │ │ + i32.const 19818 │ │ i32.const 0 │ │ call $abort_message │ │ unreachable) │ │ (func $__cxxabiv1::__shim_type_info::~__shim_type_info__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::type_info::~type_info__ │ │ drop │ │ @@ -470933,16 +473122,16 @@ │ │ local.set 4 │ │ local.get 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ local.set 4 │ │ local.get 1 │ │ - i32.const 74444 │ │ - i32.const 74492 │ │ + i32.const 74812 │ │ + i32.const 74860 │ │ i32.const 0 │ │ call $__dynamic_cast │ │ local.tee 1 │ │ i32.eqz │ │ br_if 0 (;@1;) │ │ local.get 3 │ │ i32.const 8 │ │ @@ -472256,54 +474445,54 @@ │ │ block ;; label = @1 │ │ local.get 0 │ │ br_if 0 (;@1;) │ │ i32.const 0 │ │ return │ │ end │ │ local.get 0 │ │ - i32.const 74444 │ │ - i32.const 74588 │ │ + i32.const 74812 │ │ + i32.const 74956 │ │ i32.const 0 │ │ call $__dynamic_cast │ │ i32.const 0 │ │ i32.ne) │ │ (func $std::exception::~exception__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::exception::~exception__.1 (type 5) (param i32) │ │ local.get 0 │ │ call $std::exception::~exception__ │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $std::exception::what___const (type 10) (param i32) (result i32) │ │ - i32.const 6249) │ │ + i32.const 6298) │ │ (func $std::bad_alloc::bad_alloc__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::exception::exception__ │ │ drop │ │ local.get 0 │ │ - i32.const 74824 │ │ + i32.const 75192 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::bad_alloc::~bad_alloc__ (type 5) (param i32) │ │ local.get 0 │ │ call $.L_ZNSt9exceptionD2Ev_bitcast.4 │ │ drop │ │ local.get 0 │ │ call $operator_delete_void*_) │ │ (func $.L_ZNSt9exceptionD2Ev_bitcast.4 (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::exception::~exception__) │ │ (func $std::bad_alloc::what___const (type 10) (param i32) (result i32) │ │ - i32.const 13727) │ │ + i32.const 13996) │ │ (func $std::logic_error::~logic_error__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 74916 │ │ + i32.const 75284 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::__libcpp_refstring::~__libcpp_refstring__ │ │ @@ -472359,15 +474548,15 @@ │ │ i32.add │ │ call $std::__2::__libcpp_refstring::c_str___const) │ │ (func $std::__2::__libcpp_refstring::c_str___const (type 10) (param i32) (result i32) │ │ local.get 0 │ │ i32.load) │ │ (func $std::runtime_error::~runtime_error__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ - i32.const 74936 │ │ + i32.const 75304 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0 │ │ i32.const 4 │ │ i32.add │ │ call $std::__2::__libcpp_refstring::~__libcpp_refstring__ │ │ @@ -472408,15 +474597,15 @@ │ │ (func $std::type_info::~type_info__ (type 10) (param i32) (result i32) │ │ local.get 0) │ │ (func $std::bad_cast::bad_cast__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::exception::exception__ │ │ drop │ │ local.get 0 │ │ - i32.const 75120 │ │ + i32.const 75488 │ │ i32.const 8 │ │ i32.add │ │ i32.store │ │ local.get 0) │ │ (func $std::bad_cast::~bad_cast__ (type 10) (param i32) (result i32) │ │ local.get 0 │ │ call $std::exception::~exception__ │ │ @@ -472442,17 +474631,17 @@ │ │ i32.sub │ │ i32.const -16 │ │ i32.and │ │ local.tee 1 │ │ global.set $__stack_pointer │ │ local.get 1) │ │ (func $emscripten_stack_init (type 11) │ │ - i32.const 225296 │ │ + i32.const 225664 │ │ global.set $__stack_base │ │ - i32.const 94220 │ │ + i32.const 94588 │ │ i32.const 15 │ │ i32.add │ │ i32.const -16 │ │ i32.and │ │ global.set $__stack_end) │ │ (func $emscripten_stack_get_free (type 9) (result i32) │ │ global.get $__stack_pointer │ │ @@ -472460,55 +474649,55 @@ │ │ i32.sub) │ │ (func $emscripten_stack_get_base (type 9) (result i32) │ │ global.get $__stack_base) │ │ (func $emscripten_stack_get_end (type 9) (result i32) │ │ global.get $__stack_end) │ │ (table (;0;) 1010 1010 funcref) │ │ (memory (;0;) 128 32768) │ │ - (global $__stack_pointer (mut i32) (i32.const 225296)) │ │ + (global $__stack_pointer (mut i32) (i32.const 225664)) │ │ (global $__stack_end (mut i32) (i32.const 0)) │ │ (global $__stack_base (mut i32) (i32.const 0)) │ │ - (global (;3;) i32 (i32.const 75952)) │ │ - (global (;4;) i32 (i32.const 76349)) │ │ - (global (;5;) i32 (i32.const 76636)) │ │ - (global (;6;) i32 (i32.const 76805)) │ │ - (global (;7;) i32 (i32.const 77041)) │ │ - (global (;8;) i32 (i32.const 77273)) │ │ - (global (;9;) i32 (i32.const 77655)) │ │ - (global (;10;) i32 (i32.const 77682)) │ │ - (global (;11;) i32 (i32.const 77692)) │ │ - (global (;12;) i32 (i32.const 78073)) │ │ - (global (;13;) i32 (i32.const 78284)) │ │ - (global (;14;) i32 (i32.const 78417)) │ │ - (global (;15;) i32 (i32.const 78550)) │ │ - (global (;16;) i32 (i32.const 78954)) │ │ - (global (;17;) i32 (i32.const 79379)) │ │ - (global (;18;) i32 (i32.const 79591)) │ │ - (global (;19;) i32 (i32.const 79618)) │ │ - (global (;20;) i32 (i32.const 79731)) │ │ - (global (;21;) i32 (i32.const 79844)) │ │ - (global (;22;) i32 (i32.const 79926)) │ │ - (global (;23;) i32 (i32.const 79973)) │ │ - (global (;24;) i32 (i32.const 80097)) │ │ - (global (;25;) i32 (i32.const 80222)) │ │ - (global (;26;) i32 (i32.const 80264)) │ │ - (global (;27;) i32 (i32.const 80789)) │ │ - (global (;28;) i32 (i32.const 81374)) │ │ - (global (;29;) i32 (i32.const 81555)) │ │ - (global (;30;) i32 (i32.const 81669)) │ │ - (global (;31;) i32 (i32.const 81784)) │ │ - (global (;32;) i32 (i32.const 81823)) │ │ - (global (;33;) i32 (i32.const 82242)) │ │ - (global (;34;) i32 (i32.const 82311)) │ │ - (global (;35;) i32 (i32.const 82617)) │ │ - (global (;36;) i32 (i32.const 82735)) │ │ - (global (;37;) i32 (i32.const 82939)) │ │ - (global (;38;) i32 (i32.const 83003)) │ │ - (global (;39;) i32 (i32.const 83427)) │ │ - (global (;40;) i32 (i32.const 83496)) │ │ + (global (;3;) i32 (i32.const 76320)) │ │ + (global (;4;) i32 (i32.const 76717)) │ │ + (global (;5;) i32 (i32.const 77004)) │ │ + (global (;6;) i32 (i32.const 77173)) │ │ + (global (;7;) i32 (i32.const 77409)) │ │ + (global (;8;) i32 (i32.const 77641)) │ │ + (global (;9;) i32 (i32.const 78023)) │ │ + (global (;10;) i32 (i32.const 78050)) │ │ + (global (;11;) i32 (i32.const 78060)) │ │ + (global (;12;) i32 (i32.const 78441)) │ │ + (global (;13;) i32 (i32.const 78652)) │ │ + (global (;14;) i32 (i32.const 78785)) │ │ + (global (;15;) i32 (i32.const 78918)) │ │ + (global (;16;) i32 (i32.const 79322)) │ │ + (global (;17;) i32 (i32.const 79747)) │ │ + (global (;18;) i32 (i32.const 79959)) │ │ + (global (;19;) i32 (i32.const 79986)) │ │ + (global (;20;) i32 (i32.const 80099)) │ │ + (global (;21;) i32 (i32.const 80212)) │ │ + (global (;22;) i32 (i32.const 80294)) │ │ + (global (;23;) i32 (i32.const 80341)) │ │ + (global (;24;) i32 (i32.const 80465)) │ │ + (global (;25;) i32 (i32.const 80590)) │ │ + (global (;26;) i32 (i32.const 80632)) │ │ + (global (;27;) i32 (i32.const 81157)) │ │ + (global (;28;) i32 (i32.const 81742)) │ │ + (global (;29;) i32 (i32.const 81923)) │ │ + (global (;30;) i32 (i32.const 82037)) │ │ + (global (;31;) i32 (i32.const 82152)) │ │ + (global (;32;) i32 (i32.const 82191)) │ │ + (global (;33;) i32 (i32.const 82610)) │ │ + (global (;34;) i32 (i32.const 82679)) │ │ + (global (;35;) i32 (i32.const 82985)) │ │ + (global (;36;) i32 (i32.const 83103)) │ │ + (global (;37;) i32 (i32.const 83307)) │ │ + (global (;38;) i32 (i32.const 83371)) │ │ + (global (;39;) i32 (i32.const 83795)) │ │ + (global (;40;) i32 (i32.const 83864)) │ │ (export "memory" (memory 0)) │ │ (export "__wasm_call_ctors" (func $__wasm_call_ctors)) │ │ (export "get_game_count" (func $get_game_count)) │ │ (export "get_game_name" (func $get_game_name)) │ │ (export "start_game" (func $start_game)) │ │ (export "update" (func $update)) │ │ (export "handle_user_string_input" (func $handle_user_string_input)) │ │ @@ -472585,11 +474774,11 @@ │ │ (export "stackRestore" (func $stackRestore)) │ │ (export "stackAlloc" (func $stackAlloc)) │ │ (export "__cxa_can_catch" (func $__cxa_can_catch)) │ │ (export "__cxa_is_pointer_type" (func $__cxa_is_pointer_type)) │ │ (export "__start_em_asm" (global 39)) │ │ (export "__stop_em_asm" (global 40)) │ │ (elem (;0;) (i32.const 1) func $js_set_game_handle $js_get_game_id $js_draw_graphic $js_draw_line $js_draw_text $js_draw_rect $js_draw_triangle $js_draw_circle $js_draw_clear $js_draw_refresh $js_send_message $js_create_btn $js_set_btn_enabled $js_set_btn_visible $js_hide_popup $js_add_game_option $js_set_status_msg $js_set_status_err $js_show_popup $js_prompt_string $js_update_timer_ms $js_delete_timer $js_enable_evt $js_disable_evt $js_get_time_ms $js_get_time_of_day $js_store_data $js_read_stored_data $db_helper_get_new_session_id $db_helper_get_last_session_id $db_helper_save_state $db_helper_has_saved_state_offset $db_helper_get_saved_state_offset $js_draw_extra_canvas $js_new_extra_canvas $js_set_active_canvas $js_delete_extra_canvases $js_get_user_colour_pref $js_is_feature_supported $js_destroy_all $dict2_is_dict_ready $em_js_dict_init $dict2_is_valid_word $dict2_get_word_freq $dict2_get_random_word $luaopen_alexlib_dict $lua_dict_ready $lua_dict_init $lua_dict_is_valid_word $lua_dict_get_word_freq $lua_dict_get_random_word $lua_dict_get_words_made_from_letters $luaopen_alexlib $lua_err_handler $destroy_lua_game $update.1 $handle_user_string_input.1 $handle_user_clicked.1 $handle_mousemove.1 $handle_mouse_evt.1 $handle_wheel_changed.1 $handle_key_evt.1 $handle_touch_evt.1 $handle_msg_received.1 $handle_btn_clicked.1 $handle_popup_btn_clicked.1 $handle_game_option_evt.1 $start_game.1 $get_state.1 $get_init_state.1 $lua_run_cmd.1 $lua_draw_graphic $lua_draw_line $lua_draw_text $lua_draw_rect $lua_draw_triangle $lua_draw_circle $lua_draw_clear $lua_draw_refresh $lua_send_message $lua_create_btn $lua_set_btn_enabled $lua_set_btn_visible $lua_show_popup $lua_add_game_option $lua_prompt_string $lua_hide_popup $lua_set_status_msg $lua_set_status_err $lua_set_timer_update_ms $lua_delete_timer $lua_enable_evt $lua_get_time_ms $lua_get_time_of_day $lua_get_new_session_id $lua_get_last_session_id $lua_store_data $lua_read_stored_data $lua_save_state $lua_has_saved_state_offset $lua_get_saved_state_offset $lua_draw_extra_canvas $lua_new_extra_canvas $lua_set_active_canvas $lua_delete_extra_canvases $lua_get_user_colour_pref $lua_is_feature_supported $preview_get_user_colour_pref_char*__unsigned_long_ $preview_set_status_err_char_const*__unsigned_long_ $preview_draw_refresh__ $preview_draw_clear__ $preview_draw_circle_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ $preview_draw_rect_char_const*__unsigned_long__int__int__int__int_ $preview_draw_text_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ $preview_draw_line_char_const*__int__int__int__int__int_ $preview_draw_graphic_char_const*__int__int__int__int__draw_graphic_params_const*_ $preview_get_game_id_void_const*__char*__unsigned_long_ $SavedStateDb::get_next_move_id_int_ $SavedStateDb::read_state_int__int__unsigned_char*__unsigned_long_ $SavedStateDb::read_state_info_int__char*__unsigned_long__char*__unsigned_long__unsigned_int*_ $get_lua_game_path $init_lua_game $operator_new_unsigned_long_ $std::__2::basic_string__std::__2::allocator_>&_std::__2::basic_string__std::__2::allocator_>::__assign_no_alias_char_const*__unsigned_long_ $std::__2::basic_string__std::__2::allocator_>::__assign_external_char_const*_ $std::__2::__vector_base_>::__throw_length_error___const $std::__2::__throw_length_error_char_const*_ $std::length_error::length_error_char_const*_ $std::logic_error::~logic_error__ $ButtonInfo::fromSize_std::__2::basic_string__std::__2::allocator_>__int__int__int__int__int__void__*__void*__int__ $btn_clicked_void*__int_ $ButtonHelper::new_button_ButtonInfo_ $std::__2::locale::use_facet_std::__2::locale::id&__const $std::__2::basic_string__std::__2::allocator_>::__init_copy_ctor_external_char_const*__unsigned_long_ $std::__2::basic_string__std::__2::allocator_>::__throw_length_error___const $std::__2::basic_string__std::__2::allocator_>::compare_unsigned_long__unsigned_long__char_const*__unsigned_long__const $std::__2::basic_ostream_>::sentry::sentry_std::__2::basic_ostream_>&_ $std::__2::ios_base::getloc___const $std::__2::ostreambuf_iterator_>_std::__2::__pad_and_output_>_std::__2::ostreambuf_iterator_>__char_const*__char_const*__char_const*__std::__2::ios_base&__char_ $std::__2::ios_base::clear_unsigned_int_ $std::__2::ios_base::__set_badbit_and_consider_rethrow__ $__cxa_end_catch $TouchPressHandler::handle_touch_evt_std::__2::basic_string__std::__2::allocator_>__touch_info_const*__int_ $history_browse_state::history_browse_state_void*__game_api_callbacks_const*_ $ButtonHelper::ButtonHelper_void*_ $init_lib_game_api_callbacks_const*__char_const*__int_ $destroy_game_void*_ $update_void*__int_ $handle_user_string_input_void*__char*__int__bool_ $handle_user_clicked_void*__int__int_ $handle_mousemove_void*__int__int__int_ $handle_mouse_evt_void*__int__int__int__int_ $handle_wheel_changed_void*__int__int_ $handle_key_evt_void*__char_const*__char_const*_ $handle_touch_evt_void*__char_const*__int__void*__int_ $handle_msg_received_void*__char_const*__int__char_const*__int_ $handle_btn_clicked_void*__char_const*_ $handle_popup_btn_clicked_void*__char_const*__int__popup_state_const*_ $handle_game_option_evt_void*__option_type__char_const*__int_ $start_game_void*__int__unsigned_char_const*__unsigned_long_ $lua_run_cmd_void*__char_const*__int_ $SessionSelectState::update_void*__int_ $SessionSelectState::handle_user_pressed_history_browse_state*__int__int_ $SessionSelectState::handle_mousemove_history_browse_state*__int__int__int_ $SessionSelectState::handle_mouse_evt_history_browse_state*__int__int__int__int_ $SessionSelectState::handle_wheel_changed_history_browse_state*__int__int_ $SessionSelectState::handle_touch_evt_history_browse_state*__std::__2::basic_string__std::__2::allocator_>__void*__int_ $MoveSelectState::update_void*__int_ $MoveSelectState::handle_user_pressed_history_browse_state*__int__int_ $MoveSelectState::handle_mousemove_history_browse_state*__int__int__int_ $MoveSelectState::handle_mouse_evt_history_browse_state*__int__int__int__int_ $MoveSelectState::handle_wheel_changed_history_browse_state*__int__int_ $MoveSelectState::handle_touch_evt_history_browse_state*__std::__2::basic_string__std::__2::allocator_>__void*__int_ $set_game_handle_void_const*__char_const*_ $get_game_id_void_const*__char*__unsigned_long_ $draw_graphic_char_const*__int__int__int__int__draw_graphic_params_const*_ $draw_line_char_const*__int__int__int__int__int_ $draw_text_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ $draw_rect_char_const*__unsigned_long__int__int__int__int_ $draw_triangle_char_const*__unsigned_long__int__int__int__int__int__int_ $draw_circle_char_const*__unsigned_long__char_const*__unsigned_long__int__int__int__int_ $draw_clear__ $draw_refresh__ $send_message_char_const*__unsigned_long__char_const*__unsigned_long_ $create_btn_char_const*__char_const*__int_ $set_btn_enabled_char_const*__bool_ $set_btn_visible_char_const*__bool_ $hide_popup__ $add_game_option_char_const*__option_info_const*_ $set_status_msg_char_const*__unsigned_long_ $set_status_err_char_const*__unsigned_long_ $show_popup_void*__char_const*__unsigned_long__popup_info_const*_ $prompt_string_char_const*__unsigned_long__char_const*__unsigned_long_ $update_timer_ms_int_ $delete_timer_int_ $enable_evt_char_const*__unsigned_long_ $disable_evt_char_const*__unsigned_long_ $get_time_ms__ $get_time_of_day_char*__unsigned_long_ $store_data_void*__char_const*__unsigned_char_const*__unsigned_long_ $read_stored_data_void*__char_const*__unsigned_char*__unsigned_long_ $get_new_session_id__ $get_last_session_id_char_const*_ $save_state_int__unsigned_char_const*__unsigned_long_ $has_saved_state_offset_int__int_ $adjust_saved_state_offset_int__int__unsigned_char*__unsigned_long_ $draw_extra_canvas_char_const*__int__int__int__int_ $new_extra_canvas_char_const*_ $set_active_canvas_char_const*_ $delete_extra_canvases__ $get_user_colour_pref_char*__unsigned_long_ $is_feature_supported_char_const*__unsigned_long_ $destroy_all__ $SavedStateDb::error_std::__2::basic_string__std::__2::allocator_>_ $SavedStateDb::read_uint32_char_const*__unsigned_int*__unsigned_int_ $SavedStateDb::SavedStateDb_void*__game_api_callbacks_const*_ $SavedStateDb::save_state_std::__2::basic_string__std::__2::allocator_>__int__unsigned_char_const*__unsigned_long_ $dict_is_ready $dict_init $dict_is_valid_word $dict_get_word_freq $dict_get_random_word $dict_get_words_made_from_letters $f_call $getF $getS $l_alloc $panic $warnfoff $warnfon $warnfcont $boxgc $resume $unroll $closepaux $f_parser $dothecall $dofilecont $ipairsaux $generic_reader $luaB_next $pairscont $finishpcall $luaB_assert $luaB_collectgarbage $luaB_dofile $luaB_error $luaB_getmetatable $luaB_ipairs $luaB_loadfile $luaB_load $luaB_pairs $luaB_pcall $luaB_print $luaB_warn $luaB_rawequal $luaB_rawlen $luaB_rawget $luaB_rawset $luaB_select $luaB_setmetatable $luaB_tonumber $luaB_tostring $luaB_type $luaB_xpcall $luaB_auxwrap $luaB_cocreate $luaB_coresume $luaB_corunning $luaB_costatus $luaB_cowrap $luaB_yield $luaB_yieldable $luaB_close $hookf $db_debug $db_getuservalue $db_gethook $db_getinfo $db_getlocal $db_getregistry $db_getmetatable $db_getupvalue $db_upvaluejoin $db_upvalueid $db_setuservalue $db_sethook $db_setlocal $db_setmetatable $db_setupvalue $db_traceback $db_setcstacklimit $luaopen_base $luaopen_package $luaopen_coroutine $luaopen_table $luaopen_io $luaopen_os $luaopen_string $luaopen_math $luaopen_utf8 $luaopen_debug $io_noclose $io_readline $io_fclose $io_pclose $io_close $io_flush $io_input $io_lines $io_open $io_output $io_popen $io_read $io_tmpfile $io_type $io_write $f_gc $f_tostring $f_read $f_write $f_lines $f_flush $f_seek $f_close $f_setvbuf $math_abs $math_acos $math_asin $math_atan $math_ceil $math_cos $math_deg $math_exp $math_toint $math_floor $math_fmod $math_ult $math_log $math_max $math_min $math_modf $math_rad $math_sin $math_sqrt $math_tan $math_type $math_random $math_randomseed $gctm $ll_loadlib $ll_searchpath $ll_require $searcher_preload $searcher_Lua $searcher_C $searcher_Croot $os_clock $os_date $os_difftime $os_execute $os_exit $os_getenv $os_remove $os_rename $os_setlocale $os_time $os_tmpname $f_luaopen $lua_newstate $writer $gmatch_aux $str_byte $str_char $str_dump $str_find $str_format $gmatch $str_gsub $str_len $str_lower $str_match $str_rep $str_reverse $str_sub $str_upper $str_pack $str_packsize $str_unpack $arith_add $arith_sub $arith_mul $arith_mod $arith_pow $arith_div $arith_idiv $arith_unm $tconcat $tinsert $tpack $tunpack $tremove $tmove $sort $iter_auxlax $iter_auxstrict $byteoffset $codepoint $utfchar $utflen $iter_codes $crc_read $window_read $read_data $pkware_decrypt $pkware_encrypt $zip_source_pkware_decode $zip_source_pkware_encode $maximum_compressed_size $compress_allocate $deallocate $general_purpose_bit_flags $start $end $input $end_of_input $process $decompress_allocate $compress_callback $read_file $_zip_stdio_op_close $_zip_stdio_op_commit_write $_zip_stdio_op_create_temp_output $_zip_stdio_op_open $_zip_stdio_op_read $_zip_stdio_op_remove $_zip_stdio_op_rollback_write $_zip_stdio_op_seek $_zip_stdio_op_stat $_zip_stdio_op_strdup $_zip_stdio_op_tell $_zip_stdio_op_write $zcalloc $zcfree $deflate_stored $deflate_fast $deflate_slow $__stdio_seek $__stdio_write $__stdio_read $__stdio_close $__emscripten_stdout_close $__emscripten_stdout_seek $fmt_fp $pop_arg_long_double $sn_write $wmemcpy $std::__2::basic_ios_>::rdbuf___const $std::__2::basic_streambuf_>::pubsync__ $std::__2::basic_ios_>::setstate_unsigned_int_ $std::__2::basic_ostream_>::sentry::sentry_std::__2::basic_ostream_>&_ $std::__2::basic_streambuf_>::pubsync__ $std::__2::basic_ios_>::setstate_unsigned_int_ $std::__2::basic_ios_>::good___const $std::__2::ctype_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::ctype::widen_char__const $std::__2::num_put_>_>_const&_std::__2::use_facet_>_>_>_std::__2::locale_const&_ $std::__2::basic_ios_>::fill___const $std::__2::num_put_>_>::put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long__const $std::__2::num_put_>_>::put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__unsigned_long__const $std::__2::ostreambuf_iterator_>::operator=_char_ $std::__2::__compressed_pair__std::__2::allocator_>::__rep__std::__2::allocator_>::__compressed_pair_std::__2::__default_init_tag&&__std::__2::__default_init_tag&&_ $std::bad_cast::~bad_cast__ $std::__2::__libcpp_deallocate_void*__unsigned_long__unsigned_long_ $std::__2::basic_streambuf_>::~basic_streambuf__ $std::__2::basic_streambuf_>::~basic_streambuf__.1 $std::__2::basic_streambuf_>::imbue_std::__2::locale_const&_ $std::__2::basic_streambuf_>::setbuf_char*__long_ $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ $std::__2::basic_streambuf_>::seekpos_std::__2::fpos<__mbstate_t>__unsigned_int_ $std::__2::basic_streambuf_>::sync__ $std::__2::basic_streambuf_>::showmanyc__ $std::__2::basic_streambuf_>::xsgetn_char*__long_ $std::__2::basic_streambuf_>::underflow__ $std::__2::basic_streambuf_>::uflow__ $std::__2::basic_streambuf_>::pbackfail_int_ $std::__2::basic_streambuf_>::xsputn_char_const*__long_ $std::__2::basic_streambuf_>::overflow_int_ $std::__2::basic_streambuf_>::~basic_streambuf__ $std::__2::basic_streambuf_>::~basic_streambuf__.1 $std::__2::basic_streambuf_>::imbue_std::__2::locale_const&_ $std::__2::basic_streambuf_>::setbuf_wchar_t*__long_ $std::__2::basic_streambuf_>::seekoff_long_long__std::__2::ios_base::seekdir__unsigned_int_ $std::__2::basic_streambuf_>::seekpos_std::__2::fpos<__mbstate_t>__unsigned_int_ $std::__2::basic_streambuf_>::sync__ $std::__2::basic_streambuf_>::showmanyc__ $std::__2::basic_streambuf_>::xsgetn_wchar_t*__long_ $std::__2::basic_streambuf_>::underflow__ $std::__2::basic_streambuf_>::uflow__ $std::__2::basic_streambuf_>::pbackfail_unsigned_int_ $std::__2::basic_streambuf_>::xsputn_wchar_t_const*__long_ $std::__2::basic_streambuf_>::overflow_unsigned_int_ $std::__2::basic_istream_>::~basic_istream__.1 $std::__2::basic_istream_>::~basic_istream__.2 $virtual_thunk_to_std::__2::basic_istream_>::~basic_istream__ $virtual_thunk_to_std::__2::basic_istream_>::~basic_istream__.1 $std::__2::basic_istream_>::~basic_istream__.1 $std::__2::basic_istream_>::~basic_istream__.2 $virtual_thunk_to_std::__2::basic_istream_>::~basic_istream__ $virtual_thunk_to_std::__2::basic_istream_>::~basic_istream__.1 $std::__2::basic_ostream_>::~basic_ostream__.1 $std::__2::basic_ostream_>::~basic_ostream__.2 $virtual_thunk_to_std::__2::basic_ostream_>::~basic_ostream__ $virtual_thunk_to_std::__2::basic_ostream_>::~basic_ostream__.1 $std::__2::basic_ostream_>::~basic_ostream__.1 $std::__2::basic_ostream_>::~basic_ostream__.2 $virtual_thunk_to_std::__2::basic_ostream_>::~basic_ostream__ $virtual_thunk_to_std::__2::basic_ostream_>::~basic_ostream__.1 $std::__2::basic_ios_>::~basic_ios__ $std::__2::basic_ios_>::~basic_ios__.1 $std::__2::basic_ios_>::~basic_ios__ $std::__2::basic_ios_>::~basic_ios__.1 $__cxx_global_array_dtor $std::__2::ios_base::__call_callbacks_std::__2::ios_base::event_ $std::__2::ios_base::failure::failure_char_const*__std::__2::error_code_const&_ $std::__2::ios_base::failure::~failure__ $std::__2::error_category::~error_category__ $std::__2::__iostream_category::~__iostream_category__ $std::__2::__iostream_category::name___const $std::__2::error_category::default_error_condition_int__const $std::__2::error_category::equivalent_int__std::__2::error_condition_const&__const $std::__2::error_category::equivalent_std::__2::error_code_const&__int__const $std::__2::__iostream_category::message_int__const $std::__2::ios_base::failure::~failure__.1 $std::runtime_error::what___const $std::__2::ios_base::~ios_base__ $std::__2::ios_base::~ios_base__.1 $__cxx_global_array_dtor.1 $std::__2::basic_ios_>::init_std::__2::basic_streambuf_>*_ $std::__2::basic_ios_>::init_std::__2::basic_streambuf_>*_ $std::__2::codecvt_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::codecvt_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::basic_ostream_>::flush__ $std::__2::basic_ostream_>::flush__ $__cxx_global_array_dtor.1.1 $std::__2::__stdinbuf::~__stdinbuf__ $std::__2::__stdinbuf::imbue_std::__2::locale_const&_ $std::__2::__stdinbuf::underflow__ $std::__2::__stdinbuf::uflow__ $std::__2::__stdinbuf::pbackfail_int_ $std::__2::__stdinbuf::~__stdinbuf__ $std::__2::__stdinbuf::imbue_std::__2::locale_const&_ $std::__2::__stdinbuf::underflow__ $std::__2::__stdinbuf::uflow__ $std::__2::__stdinbuf::pbackfail_unsigned_int_ $std::__2::__stdoutbuf::~__stdoutbuf__ $std::__2::__stdoutbuf::imbue_std::__2::locale_const&_ $std::__2::__stdoutbuf::sync__ $std::__2::__stdoutbuf::xsputn_char_const*__long_ $std::__2::__stdoutbuf::overflow_int_ $std::__2::__stdoutbuf::~__stdoutbuf__ $std::__2::__stdoutbuf::imbue_std::__2::locale_const&_ $std::__2::__stdoutbuf::sync__ $std::__2::__stdoutbuf::xsputn_wchar_t_const*__long_ $std::__2::__stdoutbuf::overflow_unsigned_int_ $string_read $std::__2::numpunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::numpunct::truename___const $std::__2::numpunct::falsename___const $std::__2::basic_string__std::__2::allocator_>_const*_std::__2::__scan_keyword_>__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::ctype_>_std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::ctype_const&__unsigned_int&__bool_ $dlfree $std::__throw_bad_alloc__ $bool_std::__2::operator!=_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ $bool_std::__2::operator==_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ $std::__2::istreambuf_iterator_>::operator*___const $std::__2::ctype::toupper_char__const $std::__2::istreambuf_iterator_>::operator++__ $std::__2::__compressed_pair::__compressed_pair_unsigned_char*&__void__*&&__void*__ $std::__2::basic_string__std::__2::allocator_>::resize_unsigned_long_ $std::__2::__num_get::__stage2_int_loop_char__int__char*__char*&__unsigned_int&__char__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__char_const*_ $long_std::__2::__num_get_signed_integral_char_const*__char_const*__unsigned_int&__int_ $std::__2::__check_grouping_std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*__unsigned_int&_ $std::__2::numpunct::thousands_sep___const $std::__2::numpunct::grouping___const $long_long_std::__2::__num_get_signed_integral_char_const*__char_const*__unsigned_int&__int_ $unsigned_short_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ $unsigned_int_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ $unsigned_long_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ $unsigned_long_long_std::__2::__num_get_unsigned_integral_char_const*__char_const*__unsigned_int&__int_ $std::__2::__num_get::__stage2_float_loop_char__bool&__char&__char*__char*&__char__char__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__unsigned_int&__char*_ $float_std::__2::__num_get_float_char_const*__char_const*__unsigned_int&_ $std::__2::ctype::widen_char_const*__char_const*__char*__const $std::__2::numpunct::decimal_point___const $double_std::__2::__num_get_float_char_const*__char_const*__unsigned_int&_ $long_double_std::__2::__num_get_float_char_const*__char_const*__unsigned_int&_ $std::__2::__cloc__ $std::__2::__libcpp_sscanf_l_char_const*____locale_struct*__char_const*__..._ $__uselocale $std::__2::ctype_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::numpunct_const&_std::__2::use_facet_>_std::__2::locale_const&_ $std::__2::numpunct::truename___const $std::__2::numpunct::falsename___const $std::__2::basic_string__std::__2::allocator_>_const*_std::__2::__scan_keyword_>__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::ctype_>_std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::basic_string__std::__2::allocator_>_const*__std::__2::ctype_const&__unsigned_int&__bool_ $bool_std::__2::operator!=_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ $bool_std::__2::operator==_>_std::__2::istreambuf_iterator_>_const&__std::__2::istreambuf_iterator_>_const&_ $std::__2::istreambuf_iterator_>::operator*___const $std::__2::ctype::toupper_wchar_t__const $std::__2::istreambuf_iterator_>::operator++__ $std::__2::__num_get::__stage2_int_loop_wchar_t__int__char*__char*&__unsigned_int&__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__wchar_t_const*_ $std::__2::numpunct::thousands_sep___const $std::__2::numpunct::grouping___const $std::__2::__num_get::__stage2_float_loop_wchar_t__bool&__char&__char*__char*&__wchar_t__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__unsigned_int*__unsigned_int*&__unsigned_int&__wchar_t*_ $std::__2::ctype::widen_char_const*__char_const*__wchar_t*__const $std::__2::numpunct::decimal_point___const $std::__2::__num_put::__widen_and_group_int_char*__char*__char*__char*__char*&__char*&__std::__2::locale_const&_ $void_std::__2::reverse_char*__char*_ $std::__2::__libcpp_asprintf_l_char**____locale_struct*__char_const*__..._ $std::__2::__num_put::__widen_and_group_float_char*__char*__char*__char*__char*&__char*&__std::__2::locale_const&_ $std::__2::__compressed_pair::__compressed_pair_char*&__void__*&&__void*__ $vasprintf $__isxdigit_l $__isdigit_l $std::__2::ostreambuf_iterator_>::operator=_wchar_t_ $std::__2::__num_put::__widen_and_group_int_char*__char*__char*__wchar_t*__wchar_t*&__wchar_t*&__std::__2::locale_const&_ $std::__2::ctype::widen_char__const $void_std::__2::reverse_wchar_t*__wchar_t*_ $std::__2::basic_streambuf_>::sputn_wchar_t_const*__long_ $std::__2::__num_put::__widen_and_group_float_char*__char*__char*__wchar_t*__wchar_t*&__wchar_t*&__std::__2::locale_const&_ $std::__2::ostreambuf_iterator_>_std::__2::__pad_and_output_>_std::__2::ostreambuf_iterator_>__wchar_t_const*__wchar_t_const*__wchar_t_const*__std::__2::ios_base&__wchar_t_ $std::__2::__compressed_pair::__compressed_pair_wchar_t*&__void__*&&__void*__ $mbsrtowcs $std::runtime_error::runtime_error_char_const*_ $std::runtime_error::~runtime_error__ $std::__2::__compressed_pair__std::__2::allocator_>::__rep__std::__2::allocator_>::__compressed_pair_std::__2::__default_init_tag&&__std::__2::__default_init_tag&&_ $std::__2::__do_nothing_void*_ $std::__2::money_get_>_>::__do_get_std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__bool__std::__2::locale_const&__unsigned_int__unsigned_int&__bool&__std::__2::ctype_const&__std::__2::unique_ptr&__char*&__char*_ $std::__2::__throw_runtime_error_char_const*_ $std::__2::__money_get::__gather_info_bool__std::__2::locale_const&__std::__2::money_base::pattern&__char&__char&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__int&_ $std::__2::istreambuf_iterator_>::operator++_int_ $std::__2::basic_string__std::__2::allocator_>::push_back_char_ $bool_std::__2::equal__std::__2::__wrap_iter_>_std::__2::__wrap_iter__std::__2::__wrap_iter__std::__2::__wrap_iter_ $void_std::__2::__double_or_nothing_std::__2::unique_ptr&__char*&__char*&_ $void_std::__2::__double_or_nothing_std::__2::unique_ptr&__unsigned_int*&__unsigned_int*&_ $std::__2::__compressed_pair::__compressed_pair_unsigned_int*&__void__*&&__void*__ $std::__2::_MetaBase<__is_cpp17_forward_iterator::value>::_EnableIfImpl__std::__2::allocator_>&>_std::__2::basic_string__std::__2::allocator_>::append_char*__char*_ $std::__2::basic_string__std::__2::allocator_>::append_char_const*__unsigned_long_ $std::__2::money_get_>_>::__do_get_std::__2::istreambuf_iterator_>&__std::__2::istreambuf_iterator_>__bool__std::__2::locale_const&__unsigned_int__unsigned_int&__bool&__std::__2::ctype_const&__std::__2::unique_ptr&__wchar_t*&__wchar_t*_ $std::__2::__money_get::__gather_info_bool__std::__2::locale_const&__std::__2::money_base::pattern&__wchar_t&__wchar_t&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__int&_ $std::__2::ctype::is_unsigned_short__wchar_t__const $std::__2::istreambuf_iterator_>::operator++_int_ $std::__2::basic_string__std::__2::allocator_>::push_back_wchar_t_ $bool_std::__2::equal__std::__2::__wrap_iter_>_std::__2::__wrap_iter__std::__2::__wrap_iter__std::__2::__wrap_iter_ $void_std::__2::__double_or_nothing_std::__2::unique_ptr&__wchar_t*&__wchar_t*&_ $std::__2::_MetaBase<__is_cpp17_forward_iterator::value>::_EnableIfImpl__std::__2::allocator_>&>_std::__2::basic_string__std::__2::allocator_>::append_wchar_t*__wchar_t*_ $std::__2::basic_string__std::__2::allocator_>::append_wchar_t_const*__unsigned_long_ $std::__2::__money_put::__gather_info_bool__bool__std::__2::locale_const&__std::__2::money_base::pattern&__char&__char&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__int&_ $std::__2::__money_put::__format_char*__char*&__char*&__unsigned_int__char_const*__char_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__char__char__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ $std::__2::__money_put::__gather_info_bool__bool__std::__2::locale_const&__std::__2::money_base::pattern&__wchar_t&__wchar_t&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__std::__2::basic_string__std::__2::allocator_>&__int&_ $std::__2::__money_put::__format_wchar_t*__wchar_t*&__wchar_t*&__unsigned_int__wchar_t_const*__wchar_t_const*__std::__2::ctype_const&__bool__std::__2::money_base::pattern_const&__wchar_t__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__std::__2::basic_string__std::__2::allocator_>_const&__int_ $freelocale $std::__2::vector_>::vector_unsigned_long_ $std::__2::basic_string__std::__2::allocator_>::basic_string_char_const*_ $void_std::__2::locale::__imp::install_>_std::__2::collate*_ $void_std::__2::locale::__imp::install_>_std::__2::collate*_ $std::__2::ctype&_std::__2::_anonymous_namespace_::make__std::nullptr_t__bool__unsigned_int>_std::nullptr_t__bool__unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::ctype*_ $void_std::__2::locale::__imp::install_>_std::__2::ctype*_ $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ $std::__2::codecvt&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ $void_std::__2::locale::__imp::install_>_std::__2::codecvt*_ $std::__2::numpunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::numpunct*_ $std::__2::numpunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::numpunct*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_get_>_>*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_get_>_>*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_put_>_>*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::num_put_>_>*_ $std::__2::moneypunct&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ $void_std::__2::locale::__imp::install_>_std::__2::moneypunct*_ $std::__2::money_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_get_>_>*_ $std::__2::money_get_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_get_>_>*_ $std::__2::money_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_put_>_>*_ $std::__2::money_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::money_put_>_>*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_get_>_>*_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_get_>_>*_ $std::__2::time_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_put_>_>*_ $std::__2::time_put_>_>&_std::__2::_anonymous_namespace_::make_>_>__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_>_>_std::__2::time_put_>_>*_ $std::__2::messages&_std::__2::_anonymous_namespace_::make__unsigned_int>_unsigned_int_ $void_std::__2::locale::__imp::install_>_std::__2::messages*_ $void_std::__2::locale::__imp::install_>_std::__2::messages*_ $std::__2::vector_>::__vallocate_unsigned_long_ $std::__2::vector_>::__construct_at_end_unsigned_long_ $std::__2::__compressed_pair_>::__compressed_pair_std::nullptr_t&&__std::__2::__default_init_tag&&_ $std::__2::locale::id::__init__ $std::__2::vector_>::resize_unsigned_long_ $std::__2::__time_put::__time_put__ $std::__2::vector_>::__swap_out_circular_buffer_std::__2::__split_buffer&>&_ $std::__2::locale::__global__ $void_std::__2::__call_once_proxy_>_void*_ $__ctype_b_loc $__ctype_toupper_loc $__ctype_tolower_loc $wcsnrtombs $wcrtomb $mbsnrtowcs $mbrtowc $std::__2::__libcpp_mbtowc_l_wchar_t*__char_const*__unsigned_long____locale_struct*_ $std::__2::__libcpp_mb_cur_max_l___locale_struct*_ $mbtowc $__ctype_get_mb_cur_max $mbrlen $__cxx_global_array_dtor.55 $__cxx_global_array_dtor.70 $__cxx_global_array_dtor.85 $__cxx_global_array_dtor.109 $__cxx_global_array_dtor.133 $__cxx_global_array_dtor.136 $__cxx_global_array_dtor.2 $__cxx_global_array_dtor.32 $__cxx_global_array_dtor.34 $__cxx_global_array_dtor.36 $__cxx_global_array_dtor.38 $__cxx_global_array_dtor.40 $__cxx_global_array_dtor.42 $__cxx_global_array_dtor.44 $unsigned_long_const&_std::__2::min_unsigned_long_const&__unsigned_long_const&_ $std::__2::locale::__imp::~__imp__ $std::__2::locale::__imp::~__imp__.1 $std::__2::locale::facet::__on_zero_shared__ $std::__2::ctype::~ctype__ $std::__2::ctype::~ctype__.1 $std::__2::ctype::do_toupper_char__const $std::__2::ctype::do_toupper_char*__char_const*__const $std::__2::ctype::do_tolower_char__const $std::__2::ctype::do_tolower_char*__char_const*__const $std::__2::ctype::do_widen_char__const $std::__2::ctype::do_widen_char_const*__char_const*__char*__const $std::__2::ctype::do_narrow_char__char__const $std::__2::ctype::do_narrow_char_const*__char_const*__char__char*__const $std::__2::codecvt::~codecvt__ $std::__2::codecvt::~codecvt__.1 $std::__2::codecvt::do_out___mbstate_t&__wchar_t_const*__wchar_t_const*__wchar_t_const*&__char*__char*__char*&__const $std::__2::codecvt::do_in___mbstate_t&__char_const*__char_const*__char_const*&__wchar_t*__wchar_t*__wchar_t*&__const $std::__2::codecvt::do_unshift___mbstate_t&__char*__char*__char*&__const $std::__2::codecvt::do_encoding___const $std::__2::codecvt::do_always_noconv___const $std::__2::codecvt::do_length___mbstate_t&__char_const*__char_const*__unsigned_long__const $std::__2::codecvt::do_max_length___const $std::__2::numpunct::~numpunct__ $std::__2::numpunct::~numpunct__.1 $std::__2::numpunct::do_decimal_point___const $std::__2::numpunct::do_thousands_sep___const $std::__2::numpunct::do_grouping___const $std::__2::numpunct::do_truename___const $std::__2::numpunct::do_falsename___const $std::__2::numpunct::~numpunct__ $std::__2::numpunct::~numpunct__.1 $std::__2::numpunct::do_decimal_point___const $std::__2::numpunct::do_thousands_sep___const $std::__2::numpunct::do_grouping___const $std::__2::numpunct::do_truename___const $std::__2::numpunct::do_falsename___const $std::__2::locale::facet::~facet__ $std::__2::locale::facet::~facet__.1 $std::__2::ctype::~ctype__ $std::__2::ctype::do_is_unsigned_short__wchar_t__const $std::__2::ctype::do_is_wchar_t_const*__wchar_t_const*__unsigned_short*__const $std::__2::ctype::do_scan_is_unsigned_short__wchar_t_const*__wchar_t_const*__const $std::__2::ctype::do_scan_not_unsigned_short__wchar_t_const*__wchar_t_const*__const $std::__2::ctype::do_toupper_wchar_t__const $std::__2::ctype::do_toupper_wchar_t*__wchar_t_const*__const $std::__2::ctype::do_tolower_wchar_t__const $std::__2::ctype::do_tolower_wchar_t*__wchar_t_const*__const $std::__2::ctype::do_widen_char__const $std::__2::ctype::do_widen_char_const*__char_const*__wchar_t*__const $std::__2::ctype::do_narrow_wchar_t__char__const $std::__2::ctype::do_narrow_wchar_t_const*__wchar_t_const*__char__char*__const $std::__2::codecvt::~codecvt__ $std::__2::codecvt::do_out___mbstate_t&__char_const*__char_const*__char_const*&__char*__char*__char*&__const $std::__2::codecvt::do_in___mbstate_t&__char_const*__char_const*__char_const*&__char*__char*__char*&__const $std::__2::codecvt::do_unshift___mbstate_t&__char*__char*__char*&__const $std::__2::codecvt::do_encoding___const $std::__2::codecvt::do_always_noconv___const $std::__2::codecvt::do_length___mbstate_t&__char_const*__char_const*__unsigned_long__const $std::__2::codecvt::do_max_length___const $std::__2::codecvt::~codecvt__ $std::__2::codecvt::do_out___mbstate_t&__char16_t_const*__char16_t_const*__char16_t_const*&__char*__char*__char*&__const $std::__2::codecvt::do_in___mbstate_t&__char_const*__char_const*__char_const*&__char16_t*__char16_t*__char16_t*&__const $std::__2::codecvt::do_unshift___mbstate_t&__char*__char*__char*&__const $std::__2::codecvt::do_encoding___const $std::__2::codecvt::do_always_noconv___const $std::__2::codecvt::do_length___mbstate_t&__char_const*__char_const*__unsigned_long__const $std::__2::codecvt::do_max_length___const $std::__2::codecvt::~codecvt__ $std::__2::codecvt::do_out___mbstate_t&__char32_t_const*__char32_t_const*__char32_t_const*&__char*__char*__char*&__const $std::__2::codecvt::do_in___mbstate_t&__char_const*__char_const*__char_const*&__char32_t*__char32_t*__char32_t*&__const $std::__2::codecvt::do_unshift___mbstate_t&__char*__char*__char*&__const $std::__2::codecvt::do_encoding___const $std::__2::codecvt::do_always_noconv___const $std::__2::codecvt::do_length___mbstate_t&__char_const*__char_const*__unsigned_long__const $std::__2::codecvt::do_max_length___const $std::__2::collate::~collate__ $std::__2::collate::~collate__.1 $std::__2::collate::do_compare_char_const*__char_const*__char_const*__char_const*__const $std::__2::collate::do_transform_char_const*__char_const*__const $std::__2::collate::do_hash_char_const*__char_const*__const $std::__2::collate::~collate__ $std::__2::collate::~collate__.1 $std::__2::collate::do_compare_wchar_t_const*__wchar_t_const*__wchar_t_const*__wchar_t_const*__const $std::__2::collate::do_transform_wchar_t_const*__wchar_t_const*__const $std::__2::collate::do_hash_wchar_t_const*__wchar_t_const*__const $std::__2::num_get_>_>::~num_get__ $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__bool&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_short&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_int&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_long_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__float&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__double&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long_double&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__void*&__const $std::__2::num_get_>_>::~num_get__ $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__bool&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_short&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_int&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__unsigned_long_long&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__float&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__double&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__long_double&__const $std::__2::num_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__void*&__const $std::__2::num_put_>_>::~num_put__ $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__bool__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__unsigned_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__unsigned_long_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__double__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__long_double__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__void_const*__const $std::__2::num_put_>_>::~num_put__ $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__bool__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__unsigned_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__unsigned_long_long__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__double__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__long_double__const $std::__2::num_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__void_const*__const $std::__2::time_get_>_>::~time_get__ $std::__2::time_get_>_>::~time_get__.1 $std::__2::time_get_>_>::do_date_order___const $std::__2::time_get_>_>::do_get_time_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_date_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_weekday_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_monthname_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_year_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__char__char__const $std::__2::__time_get_c_storage::__weeks___const $std::__2::__time_get_c_storage::__months___const $std::__2::__time_get_c_storage::__am_pm___const $std::__2::__time_get_c_storage::__c___const $std::__2::__time_get_c_storage::__r___const $std::__2::__time_get_c_storage::__x___const $std::__2::__time_get_c_storage::__X___const $std::__2::time_get_>_>::~time_get__ $std::__2::time_get_>_>::~time_get__.1 $std::__2::time_get_>_>::do_date_order___const $std::__2::time_get_>_>::do_get_time_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_date_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_weekday_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_monthname_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_year_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__const $std::__2::time_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__std::__2::ios_base&__unsigned_int&__tm*__char__char__const $std::__2::__time_get_c_storage::__weeks___const $std::__2::__time_get_c_storage::__months___const $std::__2::__time_get_c_storage::__am_pm___const $std::__2::__time_get_c_storage::__c___const $std::__2::__time_get_c_storage::__r___const $std::__2::__time_get_c_storage::__x___const $std::__2::__time_get_c_storage::__X___const $std::__2::time_put_>_>::~time_put__.1 $std::__2::time_put_>_>::~time_put__ $std::__2::time_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__char__tm_const*__char__char__const $std::__2::time_put_>_>::~time_put__.1 $std::__2::time_put_>_>::~time_put__ $std::__2::time_put_>_>::do_put_std::__2::ostreambuf_iterator_>__std::__2::ios_base&__wchar_t__tm_const*__char__char__const $std::__2::moneypunct::~moneypunct__ $std::__2::moneypunct::do_decimal_point___const $std::__2::moneypunct::do_thousands_sep___const $std::__2::moneypunct::do_grouping___const $std::__2::moneypunct::do_curr_symbol___const $std::__2::moneypunct::do_positive_sign___const $std::__2::moneypunct::do_negative_sign___const $std::__2::moneypunct::do_frac_digits___const $std::__2::moneypunct::do_pos_format___const $std::__2::moneypunct::do_neg_format___const $std::__2::moneypunct::~moneypunct__ $std::__2::moneypunct::do_decimal_point___const $std::__2::moneypunct::do_thousands_sep___const $std::__2::moneypunct::do_grouping___const $std::__2::moneypunct::do_curr_symbol___const $std::__2::moneypunct::do_positive_sign___const $std::__2::moneypunct::do_negative_sign___const $std::__2::moneypunct::do_frac_digits___const $std::__2::moneypunct::do_pos_format___const $std::__2::moneypunct::do_neg_format___const $std::__2::moneypunct::~moneypunct__ $std::__2::moneypunct::do_decimal_point___const $std::__2::moneypunct::do_thousands_sep___const $std::__2::moneypunct::do_grouping___const $std::__2::moneypunct::do_curr_symbol___const $std::__2::moneypunct::do_positive_sign___const $std::__2::moneypunct::do_negative_sign___const $std::__2::moneypunct::do_frac_digits___const $std::__2::moneypunct::do_pos_format___const $std::__2::moneypunct::do_neg_format___const $std::__2::moneypunct::~moneypunct__ $std::__2::moneypunct::do_decimal_point___const $std::__2::moneypunct::do_thousands_sep___const $std::__2::moneypunct::do_grouping___const $std::__2::moneypunct::do_curr_symbol___const $std::__2::moneypunct::do_positive_sign___const $std::__2::moneypunct::do_negative_sign___const $std::__2::moneypunct::do_frac_digits___const $std::__2::moneypunct::do_pos_format___const $std::__2::moneypunct::do_neg_format___const $std::__2::money_get_>_>::~money_get__ $std::__2::money_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__bool__std::__2::ios_base&__unsigned_int&__long_double&__const $std::__2::money_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__bool__std::__2::ios_base&__unsigned_int&__std::__2::basic_string__std::__2::allocator_>&__const $std::__2::money_get_>_>::~money_get__ $std::__2::money_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__bool__std::__2::ios_base&__unsigned_int&__long_double&__const $std::__2::money_get_>_>::do_get_std::__2::istreambuf_iterator_>__std::__2::istreambuf_iterator_>__bool__std::__2::ios_base&__unsigned_int&__std::__2::basic_string__std::__2::allocator_>&__const $std::__2::money_put_>_>::~money_put__ $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__char__long_double__const $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__char__std::__2::basic_string__std::__2::allocator_>_const&__const $std::__2::money_put_>_>::~money_put__ $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__wchar_t__long_double__const $std::__2::money_put_>_>::do_put_std::__2::ostreambuf_iterator_>__bool__std::__2::ios_base&__wchar_t__std::__2::basic_string__std::__2::allocator_>_const&__const $std::__2::messages::~messages__ $std::__2::messages::do_open_std::__2::basic_string__std::__2::allocator_>_const&__std::__2::locale_const&__const $std::__2::messages::do_get_long__int__int__std::__2::basic_string__std::__2::allocator_>_const&__const $std::__2::messages::do_close_long__const $std::__2::messages::~messages__ $std::__2::messages::do_open_std::__2::basic_string__std::__2::allocator_>_const&__std::__2::locale_const&__const $std::__2::messages::do_get_long__int__int__std::__2::basic_string__std::__2::allocator_>_const&__const $std::__2::messages::do_close_long__const $std::__2::__shared_count::~__shared_count__ $std::__2::__shared_count::~__shared_count__.1 $__cxa_pure_virtual $std::__2::__libcpp_mutex_unlock_pthread_mutex_t*_ $std::__2::__libcpp_mutex_lock_pthread_mutex_t*_ $std::__2::__libcpp_condvar_broadcast_pthread_cond_t*_ $__cxa_rethrow $std::exception::~exception__ $std::__2::__libcpp_refstring::__libcpp_refstring_char_const*_ $std::out_of_range::out_of_range_char_const*_ $wmemmove $wmemset $std::__2::basic_string__std::__2::allocator_>::operator+=_std::__2::basic_string__std::__2::allocator_>_const&_ $std::__2::system_error::__init_std::__2::error_code_const&__std::__2::basic_string__std::__2::allocator_>_ $std::runtime_error::runtime_error_std::__2::basic_string__std::__2::allocator_>_const&_ $std::__2::system_error::~system_error__ $std::__2::system_error::~system_error__.1 $abort $abort_message $__cxxabiv1::__shim_type_info::~__shim_type_info__ $__cxxabiv1::__class_type_info::~__class_type_info__ $__cxxabiv1::__shim_type_info::noop1___const $__cxxabiv1::__shim_type_info::noop2___const $__cxxabiv1::__class_type_info::can_catch___cxxabiv1::__shim_type_info_const*__void*&__const $__cxxabiv1::__class_type_info::search_above_dst___cxxabiv1::__dynamic_cast_info*__void_const*__void_const*__int__bool__const $__cxxabiv1::__class_type_info::search_below_dst___cxxabiv1::__dynamic_cast_info*__void_const*__int__bool__const $__cxxabiv1::__class_type_info::has_unambiguous_public_base___cxxabiv1::__dynamic_cast_info*__void*__int__const $__cxxabiv1::__si_class_type_info::~__si_class_type_info__ $__cxxabiv1::__si_class_type_info::search_above_dst___cxxabiv1::__dynamic_cast_info*__void_const*__void_const*__int__bool__const $__cxxabiv1::__si_class_type_info::search_below_dst___cxxabiv1::__dynamic_cast_info*__void_const*__int__bool__const $__cxxabiv1::__si_class_type_info::has_unambiguous_public_base___cxxabiv1::__dynamic_cast_info*__void*__int__const $__cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info__ $__cxxabiv1::__vmi_class_type_info::search_above_dst___cxxabiv1::__dynamic_cast_info*__void_const*__void_const*__int__bool__const $__cxxabiv1::__vmi_class_type_info::search_below_dst___cxxabiv1::__dynamic_cast_info*__void_const*__int__bool__const $__cxxabiv1::__vmi_class_type_info::has_unambiguous_public_base___cxxabiv1::__dynamic_cast_info*__void*__int__const $std::bad_alloc::~bad_alloc__ $std::bad_alloc::what___const $std::exception::~exception__.1 $std::exception::what___const $std::logic_error::~logic_error__.1 $std::logic_error::what___const $std::runtime_error::~runtime_error__.1 $std::length_error::~length_error__ $std::out_of_range::~out_of_range__ $std::bad_cast::~bad_cast__.1 $std::bad_cast::what___const) │ │ - (data $.rodata (i32.const 1024) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00]}\00, \22err\22: \22unhandled\22}\00{\00interval is empty\00infinity\00getregistry\00invalid value in central directory\00insufficient memory\00not enough memory\00February\00January\00monetary\00need dictionary\00binary\00attempt to yield across a C-call boundary\00July\00is_ready\00call_func_get_bytearray\00yday\00wday\00Thursday\00Tuesday\00Wednesday\00Saturday\00Sunday\00Monday\00Friday\00get_time_of_day\00May\00flip_y\00aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%||EcECExEXEyEYOdOeOHOIOmOMOSOuOUOVOwOWOy\00%m/%d/%y\000x%llx\00fluid_mix\00pattern too complex\00__newindex\00__index\00integer index\00invalid upvalue index\00get_word_matching_params_idx\00max\00flip_x\00state_%04x_%04x\00-+ 0X0x\00-0X+0X 0X-0x+0x 0x\00__pow\00integer overflow\00C stack overflow\00string length overflow\00table overflow\00unsigned overflow\00select_move_preview\00Nov\00getenv\00__idiv\00__div\00wu\00flnSrtu\00sudoku\00Thu\00invalid detail error %u\00words-en.txt\00lua_draw_text\00next\00handle_key_evt\00handle_game_option_evt\00handle_touch_evt\00handle_mouse_evt\00enable_evt\00_IO_output\00handle_user_string_input\00_IO_input\00unsupported locale for standard input\00stdout\00thrust\00August\00const\00multiple to-be-closed variables in local list\00draw_graphics_test\00timer_test\00touch_test\00card_angle_test\00card_test\00isdst\00std::bad_cast\00sqrt\00sort\00data string too short\00invert\00assert\00insert\00touchstart\00restart\00y_start\00x_start\00%s.XXXXXX.part\00__bnot\00handle_key_evt(evt_id=\22%s\22, code=\22%s\22) returned nil! (top was %d) Should return true or false to indicate if key was handled or not\00count\00Slnt\00print\00codepoint\00%s: could not convert %s to Lua number or int\00adjust_saved_state_offset called with invalid move_id_offset param, expected int\00adjust_saved_state_offset called with invalid session_id param, expected int\00Zip archive inconsistent\00absent\00Invalid argument\00invalid UTF-8 in comment\00brightness_percent\00constant\00ult\00__lt\00exit\00init\00setcstacklimit\00height\00rawset\00unset\00adjust_saved_state_offset\00has_saved_state_offset\00invalid literal/lengths set\00invalid code lengths set\00unknown header flags set\00invalid distances set\00rawget\00init_lua_alex_dict\00alexgames.dict\00central directory count of entries is incorrect\00archive comment length incorrect\00EOCD64 magic incorrect\00lua_draw_rect\00collect\00select\00Oct\00bt\00float\00variable-length format\00invalid format\00namewhat\00invalid bit length repeat\00__concat\00Sat\00*t\00status\00radius\00File already exists\00too many arguments\00wrong number of arguments\00constants\00too many results\00chess\00ipairs\00__pairs\00get_words_made_from_letters\00crossword_letters\00function or expression needs too many registers\00checkers\00specifier '%%q' cannot have modifiers\00searchers\00nups\00poker_chips\00labels/gotos\00string contains zeros\00acos\00options\00too many nested functions\00items\00nparams\00lua_set_timer_update_ms\00get_time_ms\00update_period_ms\00too many length or distance symbols\00invalid stored block lengths\00too many upvalues\00attempt to compare two %s values\00delete_extra_canvases\00too many captures\00core and library have incompatible numeric types\00activelines\00chunk has too many lines\00add_word_to_frames\00alexgames\00local variables\00angle_degrees\00opcodes\00time out-of-bounds\00final position out of bounds\00initial position out of bounds\00garbage at end of extra fields\00abs\00set_active_canvas\00new_extra_canvas\00lua_draw_extra_canvas\0031s\00%.*s\00%s%s%s\00attempt to %s a %s value%s\00luaopen_%s\00@%s\00>%s\00module '%s' not found:%s\00%s/%s\00%s expected, got %s\00%s near %s\00too many %s (limit is %d) in %s\00attempt to compare %s with %s\00%s is type %s, expected %s\00cannot %s %s: %s\00%s:%d: %s\00entry %d: %s\00error loading module '%s' from file '%s':\0a\09%s\00hour\00cur\00popup_info_to_json_str\00option_info_to_json_str\00stderr\00set_status_err\00handle_lua_err\00Apr\00__bxor\00items in a constructor\00vector\00for iterator\00update_dict called, seeding random number generator\00unspecified iostream_category error\00syntax error\00money_get error\00buffer error\00No error\00stream error\00Tell error\00Internal error\00Seek error\00Write error\00file error\00Read error\00Zlib error\00data error\00CRC error\00floor\00for\00__bor\00Error getting root_dir\00Failed to get root dir\00__shr\00lower\00invalid long string delimiter\00upper\00minesweeper\00endless_runner\00lua_delete_timer\00lua_err_handler\00lua_pop_error_handler\00maxinteger\00tointeger\00mininteger\00object length is not an integer\00field '%s' is not an integer\00%s:%d: expected dropdown \22id\22 field to be integer\00lua_Integer\00%d-byte integer does not fit into Lua Integer\00ntransfer\00ftransfer\00read saved state into buffer\00freeing saved state buffer\00crossword_builder\00variable size fields overflow header\00October\00tonumber\00%s: expected param to be type number\00%s:%d value arg elem %d is type %d (%s), expected number\00malformed number\00lua_Number\00November\00September\00December\00char\00year\00draw_clear\00ios_base::clear\00Mar\00min_freq\00dict_get_word_freq\00__eq\00exp\00lua_show_popup\00hide_popup\00stop\00'__newindex' chain too long; possible loop\00'__index' chain too long; possible loop\00dump\00Not allowed in torrentzip\00step\00rep\00Sep\00wrap\00Pp\00%I:%M:%S %p\00%s: %p\00proto\00goto\00/usr/local/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/loadall.so;./?.so\00attempt to divide by zero\00'for' step is zero\00no\00io\00go\00getinfo\00do\00Sun\00Jun\00create_btn\00return\00charpattern\00missing '[' after '%%f' in pattern\00warn\00backgammon\00lua_add_game_option\00invalid option\00std::exception\00terminate_handler unexpectedly threw an exception\00Instruction\00main function\00unable to dump given function\00cannot use '...' outside a vararg function\00number%s has no integer representation\00number has no integer representation\00[dict] get_game_dict_api returning default C implementation\00date result cannot be represented in this installation\00time result cannot be represented in this installation\00dynamic libraries not enabled; check your Lua installation\00incompatible version\00Mon\00perform bitwise operation on\00perform arithmetic on\00asin\00upvaluejoin\00min\00=stdin\00main\00popen\00reopen\00rawlen\00__len\00then\00atan\00nan\00boolean\00Jan\00\5cn\00value has no literal form\00swarm\00/dev/urandom\00__unm\00card_sim\00central directory overlaps EOCD, or there is space between them\00EOCD64 overlaps EOCD, or there is space between them\00iostream\00setstepmul\00__mul\00Jul\00unexpected symbol\00full\00xpcall\00istailcall\00__call\00tail call\00destroy_all\00until\00April\00%s:%d: expected dropdown \22id\22 field to be number, not nil\00table index is nil\00%s: param %s is nil\00ceil\00no detail\00state_db_sess_tail\00__shl\00touchcancel\00label\00rawequal\00incremental\00hospital\00generational\00normal\00setlocal\00getlocal\00global\00Sl\00dark\00sethook\00gethook\00external hook\00not a binary chunk\00main chunk\00corrupted chunk\00truncated chunk\00seek\00clock\00invalid code -- missing end-of-block\00incorrect header check\00incorrect length check\00incorrect data check\00too many results to unpack\00traceback\00invalid distance too far back\00break\00handle_mouse_evt history browse ui\00Fri\00[dict] get_game_dict_api returning dict pointer set by set_game_dict_api\00month\00max_length\00min_length\00file length in header doesn't match actual file length\00wrong EOCD length\00outline_width\00searchpath\00cpath\00math\00flush\00draw_refresh\00float format mismatch\00integer format mismatch\00version mismatch\00%s size mismatch\00header crc mismatch\00gmatch\00local and central headers do not match\00EOCD64 and EOCD do not match\00March\00debug\00Aug\00set_status_msg\00isvararg\00log\00lexical element too long\00control structure too long\00string slice too long\00spider_swing\00invalid order function for sorting\00error reading saved state, aborting\00__tostring\00prompt_string\00basic_string\00api->get_game_id() returned empty string\00binary string\00invalid use of '%c' in replacement string\00bad format for constant string\00%s: returned type %s, should be a table or string\00initial position out of string\00arg %d is type %s (%d), expected string\00unfinished string\00error object is not a string\00reader function must return a string\00'__tostring' must return a string\00'package.%s' must be a string\00isrunning\00error in error handling\00config\00array too big\00memory allocation error: block too big\00deg\00%.14g\00setvbuf\00get length of\00inf\00self\00elseif\00off\00get_user_colour_pref\00modf\00%.0Lf\00%Lf\00version mismatch: app. needs %f, Lua core provides %f\00packsize\00line_size\00invalid window size\00string length does not fit in given size\00string longer than given size\00allocator::allocate(size_t n) 'n' exceeds maximum supported size\00touchmove\00handle_mousemove\00remove\00too many elements to move\00Read-only archive\00Possibly truncated or corrupted zip archive\00Not a zip archive\00true\00blue\00setuservalue\00getuservalue\00setupvalue\00getupvalue\00no value\00initial value\00variable '%s' got a non-closable value\00Tue\00initial position is a continuation byte\00execute\00write\00get_init_state\00get_state\00save_state\00concatenate\00collate\00create\00update\00history_browse\00setpause\00Resource still in use\00reverse\00__close\00else\00false\00invalid pattern capture\00unfinished capture\00Malloc failure\00require\00solitaire\00ctype\00item_type\00invalid block type\00June\00cannot close a %s coroutine\00cannot resume non-suspended coroutine\00cannot resume dead coroutine\00attempt to yield from outside a coroutine\00currentline\00lua_draw_line\00too many arguments to resume\00too many results to resume\00difftime\00add_word_to_frame\00create_frame\00tmpname\00rename\00invalid UTF-8 in filename\00unable to generate a unique filename\00__name\00destroy_game\00start_game\00load_game\00init_lua_game\00title\00while\00tmpfile\00dofile\00loadfile\00build_word_dict_from_file\00Failure to create temporary file\00Can't open file\00No such file\00Premature end of file\00Can't remove file\00cannot close standard file\00attempt to use a closed file\00lua_draw_triangle\00lua_draw_circle\00set_btn_visible\00setmetatable\00getmetatable\00__metatable\00cannot change a protected metatable\00string/function/table\00nil or table\00field '%s' missing in date table\00%s:%d: expected arg %d to be table\00lua_dict_get_random_word: params is not nil or a table\00draw_graphic: params is not nil or a table\00'package.searchers' must be a table\00isyieldable\00setlocale\00__le\00snake\00huge\00format result too large\00buffer too large\00resulting string too large\00UTF-8 value too large\00decimal escape too large\00not an integer in proper range\00index out of range\00level out of range\00value out of range\00base out of range\00send_message\00package\00collectgarbage\00minesweeper_life\00__mode\00invalid mode\00invalid literal/length code\00invalid distance code\00invalid UTF-8 code\00source\00invalid escape sequence\00Ee\00lua_dict_get_random_word\00dict_is_valid_word\00fmod\00__mod\00metamethod\00unknown compression method\00destination wrap around\00field '%s' is out-of-bound\00word_mastermind\00find\00touchend\00y_end\00x_end\00stream end\00Aborting saved state read, reached the end\00__band\00%lld\00yield\00invalid WinZip AES extra field\00invalid Zip64 extra field\00extra field length is invalid\00central header invalid\00central directory length invalid\00Compressed data invalid\00upvalueid\00game_%s_last_sess_id\00get_new_session_id\00get_last_session_id\00save_state: invalid session_id\00state_%04x_last_move_id\00state_%04x_game_id\00handle_msg_received\00is_feature_supported\00Multi-disk zip archives not supported\00Operation not supported\00locale not supported\00Encryption method not supported\00Compression method not supported\00'popen' not supported\00Entry has been deleted\00hexadecimal digit expected\00function arguments expected\00%s expected\00Lua function expected\00value expected\00'=' or 'in' expected\00 or '...' expected\00selected\00state_%04x_last_updated\00file is already closed\00default %s file is closed\00Containing zip archive was closed\00terminate_handler unexpectedly returned\00lastlinedefined\00Operation cancelled\00[init] emscripten_api.c: init_game_api called\00[init] game_api.c: alex_init_game called\00Closing zip archive failed\00Renaming temporary file failed\00Game \22%.*s\22 not handled\00set_btn_enabled\00handle_user_clicked\00handle_popup_btn_clicked\00handle_btn_clicked\00handle_wheel_changed\00Entry has been changed\00randomseed\00suspended\00No password provided\00Wrong password provided\00loaded\00Wed\00__add\00rad\00upload\00preload\00thread\00state_db_sess_head\00dead\00state_preview_%03d\00\5c%03d\00%3d/%3d\00\5c%d\00invalid capture index %%%d\00%s:%d: expected \22item_type\22 field to be number, not %d\00%s:%d: expected \22id\22 field to be number, not %d\00%s:%d: expected \22text\22 field to be string, not %d\00%s:%d: expected \22label\22 field to be string, not %d\00%s:%d: expected \22msg\22 field to be string, not %d\00%s:%d: expected \22title\22 field to be string, not %d\00%s:%d: expected \22options\22 field to be table, not %d\00%s:%d: expected \22items\22 field to be table, not %d\00%s: returned %d bytes of state, max buff is %d\00%s: expected stack idx %d to contain field %s, but top was %d\00Unknown error %d\00%s: game returned %b bytes of state, larger than buff %d\00%s:%d: expected dropdown \22id\22 field to be number, not type %d\00%s:%d: expected \22type\22 field to be string, not type %d\00%s: Unhandled popup item type %d\00break outside loop at line %d\00function at line %d\00no visible label '%s' for at line %d\00label '%s' already defined on line %d\00api->adjust_saved_state_offset returned %d\00short_src\00std::bad_alloc\00lua_get_int_or_float_func\00numeric\00lua_draw_graphic\00__gc\00sec\00Dec\00#cccccc\00/home/vagrant/build/net.alexbarry.alexgames/src/dictionary/c_dictionary.c\00/home/vagrant/build/net.alexbarry.alexgames/src/lua_api/lua_api.c\00%c\00wb\00gsub\00__sub\00rb\00crib\00loadlib\00Feb\00read invalid number of bytes from db\00r+b\00rwa\00preload/games/test/draw_graphics_test.lua\00preload/games/test/timer_test.lua\00preload/games/touch_test/touch_test.lua\00preload/games/test/card_angle_test.lua\00preload//libs/cards/card_test.lua\00/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua\00preload/games/fluid_mix/fluid_mix_main.lua\00preload/games/wu/wu_main.lua\00preload/games/sudoku/sudoku_main.lua\00preload/games/thrust/thrust_main.lua\00preload/games/chess/chess_main.lua\00preload/games/crossword_letters/crossword_letters_main.lua\00preload/games/checkers/checkers_main.lua\00preload/games/poker_chips/poker_chips_main.lua\00preload/games/31s/31s_main.lua\00preload/games/minesweeper/minesweeper_main.lua\00preload/games/endless_runner/endless_runner_main.lua\00preload/games/crossword_builder/crossword_builder_main.lua\00preload/games/go/go_main.lua\00preload/games/backgammon/backgammon_main.lua\00preload/games/swarm/swarm_main.lua\00preload/games/hospital/hospital_main.lua\00preload/games/spider_swing/spider_swing_main.lua\00preload/games/blue/blue_main.lua\00preload/games/solitaire/solitaire_main.lua\00preload/games/snake/snake_main.lua\00preload/games/minesweeper_life/minesweeper_life_main.lua\00preload/games/life/life_main.lua\00preload/games/bound/bound_main.lua\00preload/games/word_mastermind/word_mastermind_main.lua\00preload/games/card_sim/card_generic_main.lua\00preload/games/crib/crib_main.lua\00/upload/game1/game.lua\00%s;%s/?.lua;%s/?.lua;%s/?.lua;%s/?.lua\00\1bLua\00light userdata\00lua_store_data\00read_stored_data\00Unexpected length of data\00#aaaaaaaa\00#aaaaaa\00%a\00_\00integral size (%d) out of limits [1,%d]\00=[C]\00no field package.preload['%s']\00\22]\00,\22options\22:[\00\22, \22items\22: [\00_HOOKKEY\00%a %b %d %H:%M:%S %Y\00xX\00POSIX\00_ENV\00LUA_NOENV\00%U\00GMT\00TEXT_ALIGN_RIGHT\00TEXT_ALIGN_LEFT\00_CLIBS\00%H:%M:%S\00TEXT_ALIGN_CENTER\00pP\00MOUSE_EVT_UP\00MOUSE_EVT_ALT_UP\00MOUSE_EVT_ALT2_UP\00.xXnN\00table index is NaN\00MOUSE_EVT_DOWN\00MOUSE_EVT_ALT_DOWN\00MOUSE_EVT_ALT2_DOWN\00POPUP_ITEM_TYPE_DROPDOWN\00OPTION_TYPE_BTN\00POPUP_ITEM_TYPE_BTN\00_VERSION\00NAN\00PM\00AM\00api->adjust_saved_state_offset is NULL\00api->has_saved_state_offset is NULL\00WARNING: popup_state is NULL\00frame != NULL\00dict_handle != NULL\00word_info.word != NULL\00LC_ALL\00%I\00LUA_PATH\00LUA_CPATH\00_G\00POPUP_ITEM_TYPE_MSG\00LANG\00INF\00eE\00MOUSE_EVT_LEAVE\00TEXT_ALIGN_CENTRE\00OPTION_TYPE_TOGGLE\00word_metadata == WORD_METADATA_VULGAR_OR_WEIRD\00_LOADED\00_PRELOAD\00C\00%s: debug.traceback is not a function?\00%s: arg 1 is not a string?\00%s: debug is not a table?\00why the hell is the length not an integer???\00=?\00\00\00\00\00\00function <%s:%d>\00>>\00~=\00, tail=\00, head=\00>=\00==\00<=\00<<\00;;\00stack traceback:\00:preload:\00::\00\22value\22:\00{\22type\22:\00\22,\22id\22:\00-1e9999\00-0123456789\00%s: byte %d is %d, expected uint8\00utf8\00#aaaaaa88\00#33333388\00C.UTF-8\00%s:%d value arg elem %d is %d, must be between 0 and 255\00_5_4\00write_b64\00alex_start_game_b64\00decode_b64\00Lua 5.4\00y3\00x3\00y2\00x2\00format asks for alignment not power of 2\00y1\00x1\00/upload/game1\001.3.1\000.1.1\00delim_idx != -1\00line_end != -1\00word_metadata_str_len == 1\00draw_graphic: params.brightness_percent should be an integer between 0 and 100\00#000000\00-0\00-#0\00bytes_written > 0\00History entries found: 0\00/proc/self/fd/\00upload/\00preload/\00//\00No contents found at \22%s\22, please upload a game or select another (preloaded) game. If you refreshed the page then you must re-upload your game zip.\00_G.\00-+#0 123456789.\00reading saved state...\00Reading state info ...\00TORRENTZIPPED-\00^$*+?.([%-\00,\00w+\00-+\00_UBOX*\00FILE*\00(temporary)\00(C temporary)\00\0a\09...\09(skipping %d levels)\00stack overflow (%s)\00%s: bad binary format (%s)\00calling '%s' on bad self (%s)\00bad argument #%d (%s)\00%s:%d: expected \22value\22 field to be bool, not %d (%s)\00%s:%d: expected \22label\22 field to be string, not %d (%s)\00%s: expected last stack value to be error handler func, was type %d (%s)\00bad argument #%d to '%s' (%s)\00cannot open file '%s' (%s)\00bad 'for' %s (number expected, got %s)\00invalid replacement value (a %s)\00file (%p)\00(null)\00draw_graphic: params.flip_y is not a boolean (and not nil)\00draw_graphic: params.flip_x is not a boolean (and not nil)\00draw_graphic: params.invert is not a boolean (and not nil)\00(vararg)\00invalid format (too long)\00%s: expected arg 1 to be popup id (string)\00(for state)\00(no name)\00=(debug command)\00file (closed)\00=(load)\00too many %s (limit is %d)\00%s expected (to close %s at line %d)\00unfinished long %s (starting at line %d)\00%s (moves: %d)\00pos - orig_pos == word_len + 1 + sizeof(freq) + sizeof(word_metadata)\00(0/0)\00\0a\09(...tail calls...)\00attempt to load a %s chunk (mode is '%s')\00 (%s '%s')\00malformed pattern (missing arguments to '%%b')\00malformed pattern (missing ']')\00malformed pattern (ends with '%%')\00 (\00missing '}'\00missing '{'\00unfinished string for format 'z'\00invalid key to 'next'\00wrong number of arguments to 'insert'\00invalid conversion '%s' to 'format'\00invalid value (%s) at index %I in table for 'concat'\00%s '%s'\00invalid option '%s'\00function '%s'\00 at line %d jumps into the scope of local '%s'\00unknown attribute '%s'\00no module '%s' in file '%s'\00attempt to assign to const variable '%s'\00attempt to %s a '%s' with a '%s'\00invalid conversion specification: '%s'\00invalid conversion specifier '%%%s'\00invalid option '%%%c' to 'lua_pushfstring'\00'618502e'\00missing size for format option 'c'\00invalid format option '%c'\00invalid next option for option 'X'\00'<\5c%d>'\00invalid option '>'\00attempt to perform 'n%%0'\00'\0a\09no file '\00%\00Starting game \22%s\22\00Failed to load game \22%s\22\00\5c\22\00,\22text\22:\22\00,\22label\22:\22\00,\22msg\22:\22\00{\22title\22:\22\00[string \22\00start_game function not defined!\00Pure virtual function called!\00assertion failed!\00%02x \00%s: byte %d is type %s, expected number \00error in \00\0a\09%s: in \00\0a\09%s:%d: in \00[saved_state] storing session id \00lua_debug> \00save_state: invalid_session_id = \00%04x: \00Found history entries: \00Lua warning: \00%s: Returning %d bytes of state: \00 move id: \00%s:%d: \00-+0 \00-+#0 \00%s: dec state: len %zu, \00 \0c\0a\0d\09\0b\00%s: String is %zu bytes, expected to have written %zu\0a\00read %d bytes from DB for key %s, expected %zu\0a\00File %3d: name=\22%s\22, size:%llu\0a\00cont\0a\00stack size can not fit %d more elements\0a\00[lua_init] called luaL_openlibs\0a\00Unhandled state preview game_id=\22%s\22, sess=%d, date=%s\0a\00Failed to open output file %s\0a\00called %s\0a\00AlexGames version %s, git hash = %s\0a\00[lua_init] err: %s\0a\00lua error: %s\0a\00lua_run_cmd stack top: %s\0a\00%s: enc state: len %zu, %s\0a\00[lua_init] lua_State is %p\0a\00[lua_init] setting lua panic function\0a\00%s: api_callbacks is null\0a\00lua_api.c:%d %s is null\0a\00lua_api.c:%d %s->%s() is null\0a\00%s: api_callbacks->get_new_session_id (func=%p) and/or game_api->start_game (func=%p) are null\0a\00%s: err_msg == null\0a\00%s: L == null\0a\00Returning %d bytes of state\0a\00destroy_lua_game\0a\00[lua_init] about to call luaL_dofile\0a\00[lua_init] done calling luaL_dofile\0a\00%s: received input len %zu enc (max %zu dec), too large\0a\00Loading saved state session_id=%lld, move_id_offset=%lld\0a\00[dict] ERROR: file %s could not be opened\0a\00[dict] c_dictionary: dict_init called\0a\00game %.*s not handled\0a\00lua_api.c get_state called, L=%p, top=%d\0a\00Read %zu bytes of state for session_id=%d\0a\00Checking for stored state with session_id=%d\0a\00%s: \22%.*s\22, is_cancelled=%d\0a\00%s:%d\0a\00chose random word idx %d\0a\00lua stack depth is %d\0a\00lua_run_cmd returned error %d\0a\00Lua package.path too big, max size %d, actual %d\0a\00found matching word count of %d\0a\00zip_stat_index returned %d\0a\00pcall_handler_err: lua_pcall returned %d\0a\00line %d: rc = %d\0a\00fwrite returned %d when writing %zu bytes of data\0a\00%s: malloc returned NULL\0a\00%s: L == NULL\0a\00%s: already busy processing lua API\0a\00Found %d files in zip archive:\0a\00%s: input length %d is not a multiple of 4\0a\00Confirmed that %s exists.\0a\00Total dict init took %4lld ms. Created %d frames (%.1f MB), containing a total of %d words.\0a\00[lua_init] %s: before finishing, lua_gettop(L) returned %d. Should be zero.\0a\00[lua_init] init_lua called...\0a\00[lua_init] Trying to load lua script at \22%s\22...\0a\00/\0a;\0a?\0a!\0a-\0a\00Failed to open file idx %d (%s)\0a\00PANIC: unprotected error in call to Lua API (%s)\0a\00[dict] %s(handle=%p)\0a\00%s: output buff (%d bytes) is too small to write encoded input (unenc %d, enc %d)\0a\00[lua_init] luaL_dofile returned rc = %d (LUA_OK)\0a\00Unhandled state preview game_id=\22%s\22\0a\00ROOT_DIR=\22%s\22\0a\00Creating new directory \22%s\22\0a\00error %d %d creating dir \22%s\22\0a\00[init] setting game handle to \22%s\22\0a\00emscripten_api.c: js_set_game_handle called with \22%s\22\0a\00Loading Lua game path \22%s\22\0a\00Writing to file \22%s\22\0a\00Uploaded game does not contain game main file \22%s\22\0a\00Successfully ran command \22%s\22\0a\00[init] preload_path = \22%s\22\0a\00Error opening file %s: \22%s\22\0a\00[lua_init] Including preload path: \22%s\22\0a\00[lua_init] Including upload path: \22%s\22\0a\00%s: %d items left on stack after completion!\0a\00%s: %d items on stack before starting!\0a\00\19\93\0d\0a\1a\0a\00\0a\09\00PK\05\06\00PK\03\04\00PK\01\02\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00\00\00\00\00\8b\05\00\00/\00\00\00\80\0b\00\000\00\00\00\be+\00\001\00\00\00\8c\16\00\002\00\00\00\a9+\00\003\00\00\00\d0\0d\00\004\00\00\00\00\00\00\00\00\00\00\00\00\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00Lua package.path too big\00\00\00\00\00\00\00\00\d45\00\00H\00\00\00\b9&\00\00I\00\00\00\dd\07\00\00J\00\00\00\d2\0c\00\00K\00\00\00\88(\00\00L\00\00\00\9a(\00\00M\00\00\00_\16\00\00N\00\00\00\08\1f\00\00O\00\00\00\f0*\00\00P\00\00\00\f5\17\00\00Q\00\00\00\c20\00\00R\00\00\00\a6(\00\00S\00\00\00\a7\16\00\00T\00\00\00J\18\00\00U\00\00\00\99 \00\00V\00\00\00\b2\16\00\00W\00\00\00\d4\1f\00\00X\00\00\00O\12\00\00Y\00\00\00\d4\0e\00\00Z\00\00\00/\14\00\00[\00\00\004\08\00\00\5c\00\00\00\e8\0e\00\00]\00\00\00\ef\05\00\00^\00\00\00h-\00\00_\00\00\00{-\00\00`\00\00\00\bc<\00\00a\00\00\00\c7<\00\00b\00\00\006%\00\00c\00\00\00\c2\0b\00\00d\00\00\00\a8\0b\00\00e\00\00\00\d3\10\00\00f\00\00\00\be\10\00\00g\00\00\00\ac\10\00\00h\00\00\00y\0f\00\00i\00\00\00\d3\22\00\00j\00\00\00\ed-\00\00k\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ee%\00\000,\00\00\ec\0d\00\00\bb\0d\00\00\df\17\00\00\966\00\00.\0e\00\00;\18\00\00\1c\14\00\00\10\14\00\00: \00\00\e5\10\00\00\9e\07\00\00h\06\00\00\9a\08\00\00\b3\1c\00\00 +\00\00*,\00\00\15\1b\00\00\a9\07\00\00p$\00\00\fc\1a\00\00w\15\00\00\00\00\00\00Game not handled\00\00\00\00\00\00\00\00\00\00\00\00d\00\00\00\00\00\00\00\00\00\00\00c\00\00\00\00\00\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\00\00\00ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/db.read_state_info did not return a game ID\00\92\00\00\00\93\00\00\00\94\00\00\00\95\00\00\00\96\00\00\00\97\00\00\00\98\00\00\00\99\00\00\00\9a\00\00\00\9b\00\00\00\9c\00\00\00\9d\00\00\00\9e\00\00\00\9f\00\00\00\a0\00\00\00\00\00\00\00\00\00\00\00\a1\00\00\00\00\00\00\00\18\5c\00\00\a2\00\00\00\a3\00\00\00\a4\00\00\00\a5\00\00\00\a6\00\00\00\a7\00\00\0018SessionSelectState\0019HistoryBrowseWindow\00\00p#\01\00\f9[\00\00\98#\01\00\e4[\00\00\10\5c\00\00\00\00\00\00X\5c\00\00\a8\00\00\00\a9\00\00\00\aa\00\00\00\ab\00\00\00\ac\00\00\00\ad\00\00\0015MoveSelectState\00\00\00\98#\01\00D\5c\00\00\10\5c\00\00\00\00\00\00\00\00\00\00\00\00\00\00Successfully loaded game state!\00Error loading saved state\00\00\00\00\00\00\00Loading saved game...\00key\00touch\00mouse_move\00mouse_updown\00wheel\00\00\00\ae\00\00\00\af\00\00\00\b0\00\00\00\b1\00\00\00\b2\00\00\00\b3\00\00\00\b4\00\00\00\b5\00\00\00\b6\00\00\00\b7\00\00\00\b8\00\00\00\b9\00\00\00\ba\00\00\00\bb\00\00\00\bc\00\00\00\bd\00\00\00\be\00\00\00\bf\00\00\00\c0\00\00\00\c1\00\00\00\c2\00\00\00\c3\00\00\00\c4\00\00\00\c5\00\00\00\c6\00\00\00\c7\00\00\00\c8\00\00\00\c9\00\00\00\ca\00\00\00\cb\00\00\00\cc\00\00\00\cd\00\00\00\ce\00\00\00\cf\00\00\00\d0\00\00\00\d1\00\00\00\d2\00\00\00\d3\00\00\00\d4\00\00\00\d5\00\00\00\da\00\00\00\db\00\00\00\dc\00\00\00\dd\00\00\00\de\00\00\00\df\00\00\00\00\00\00\00\00\00\00\00\e15\00\00\e8\00\00\00\99%\00\00\e8\00\00\00\00\00\00\00\00\00\00\00\01\03\03\04\04\05\06\00Z\09\00\00\f4\00\00\00\05+\00\00\f5\00\00\00\bc'\00\00\f6\00\00\00\9c\13\00\00\f7\00\00\00\c3(\00\00\f8\00\00\00\c1\0d\00\00\f9\00\00\00\c3'\00\00\fa\00\00\00\9f1\00\00\fb\00\00\00\e7\07\00\00\f1\00\00\00\ca\0d\00\00\fc\00\00\00\c9\1b\00\00\fd\00\00\000\0a\00\00\fe\00\00\006\18\00\00\ff\00\00\00\9e\1c\00\00\00\01\00\00\b8\1a\00\00\01\01\00\00=\0c\00\00\02\01\00\00\9b\0b\00\00\03\01\00\00\e4\0c\00\00\04\01\00\00\b6(\00\00\05\01\00\00\b6\15\00\00\06\01\00\00\90 \00\00\07\01\00\00\16&\00\00\08\01\00\00\c8\1b\00\00\09\01\00\00\83?\00\00\00\00\00\00\b2>\00\00\00\00\00\00\00\00\00\00\00\00\00\00\bd\16\00\00s\09\00\00\dc\0c\00\00%\0a\00\004\17\00\00r%\00\00\9c\1b\00\00A\22\00\00\bc\1c\00\00\a7\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00U%\00\00\0b\01\00\00\f4&\00\00\0c\01\00\00C\22\00\00\0d\01\00\00Q\0d\00\00\0e\01\00\00A\17\00\00\0f\01\00\00\9c,\00\00\10\01\00\00\ed)\00\00\11\01\00\00\9b%\00\00\12\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00C\22\00\00\be1\00\00I1\00\00\c9\1c\00\00\ca\1f\00\00\14\01\00\00\82$\00\00\15\01\00\00\f9\1c\00\00\16\01\00\00\e2\17\00\00\17\01\00\00\d9\1c\00\00\18\01\00\00\d6\04\00\00\19\01\00\00\c3(\00\00\1a\01\00\00\9a$\00\00\1b\01\00\00\8f\1a\00\00\1c\01\00\00I-\00\00\1d\01\00\00u$\00\00\1e\01\00\00\f1\1c\00\00\1f\01\00\00\d0\1c\00\00 \01\00\00\b6(\00\00!\01\00\00\8f$\00\00\22\01\00\00\db\1d\00\00#\01\00\00\85\0b\00\00$\01\00\00\00\00\00\00\00\00\00\00\e6\1b\00\00\00\18\00\00\be&\00\00%\0a\00\00\e1\1b\00\00\00\00\00\00\00\00\00\00\00\00\00\00\83?\00\00%\01\00\00\fd*\00\00&\01\00\00\9f&\00\00'\01\00\00\e7)\00\00(\01\00\00\dc\17\00\00)\01\00\00\9d\0e\00\00*\01\00\00:\22\00\00+\01\00\00\fd\1e\00\00,\01\00\00vA\00\00-\01\00\00\ca\1f\00\00.\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\9b%\00\003\01\00\00\02\1f\00\004\01\00\00\8d\08\00\005\01\00\00\f1\0f\00\006\01\00\00\b3\1a\00\007\01\00\00C\08\00\008\01\00\00\ab\1a\00\009\01\00\00\a61\00\00:\01\00\00\b4'\00\00;\01\00\00\16&\00\00<\01\00\00\17%\00\00=\01\00\00\00\00\00\00\00\00\00\00\91\06\00\00\00\00\00\00\e15\00\00>\01\00\00\99%\00\00>\01\00\00\8e \00\00?\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\a61\00\00@\01\00\00\17%\00\00A\01\00\00\f1\0f\00\00B\01\00\00\02\1f\00\00C\01\00\00M\1d\00\00D\01\00\00\9b%\00\00E\01\00\00\a9\22\00\00F\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\009\0c\00\00\15\12\00\00\8c,\00\00\00\00\00\00\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\d9\17\00\00\c3\1b\00\00\be&\00\00\00\00\00\00\a8\10\00\00G\01\00\00\9b\0e\00\00H\01\00\00\8a\1a\00\00I\01\00\00\ca\1a\00\00J\01\00\00d\1c\00\00K\01\00\00\9c\0e\00\00L\01\00\00\9f\22\00\00M\01\00\00\9f\16\00\00N\01\00\00m\14\00\00O\01\00\00\a2\13\00\00P\01\00\00\cc+\00\00Q\01\00\00r\0b\00\00R\01\00\00\ec\1f\00\00S\01\00\00\da\06\00\00T\01\00\00\9b\1a\00\00U\01\00\00\e8\22\00\00V\01\00\00\911\00\00W\01\00\00\8b\1a\00\00X\01\00\003\09\00\00Y\01\00\00\cb\1a\00\00Z\01\00\00\16&\00\00[\01\00\00\08\1b\00\00\00\00\00\00>1\00\00\00\00\00\00v\1e\00\00\00\00\00\00\0e*\00\00\00\00\00\00b\14\00\00\00\00\00\00w\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\1b\00\00\5c\01\00\00>1\00\00]\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\9b6\00\00_\01\00\00\ec\1e\00\00`\01\00\00\9c1\00\00\00\00\00\00\f7\1e\00\00\00\00\00\00\f8\1e\00\00\00\00\00\00]\0e\00\00\00\00\00\00\801\00\00\00\00\00\00\00\00\00\00\00\00\00\00\e6%\00\00a\01\00\00\00\00\00\00\00\00\00\00b\01\00\00c\01\00\00d\01\00\00e\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\08\08\08\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\04\04\04\04\04\04\04\04\04\04\04\04\04\04\04\16\16\16\16\16\16\16\16\16\16\04\04\04\04\04\04\04\15\15\15\15\15\15\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\04\04\04\04\05\04\15\15\15\15\15\15\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\04\04\04\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\02\02\03\03\03\03\04\04\04\04\04\04\04\04\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\0a\0a\09\09\08\08\08\08\08\00\08\08\08\08\00\00\00\00\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\80\80\80\08\08\08\08\08\00\00\04\10\10\10\10\10\10\10\10\10\10\18hh \00\00\09\09\01\00\09 \09H(\03\00\00\00\00\00\00\00\00\00\00\00\00\00R\1d\00\00f\01\00\00^%\00\00g\01\00\00\fb&\00\00h\01\00\00\0f%\00\00i\01\00\00{\0b\00\00j\01\00\00\8a\07\00\00k\01\00\00\fa#\00\00l\01\00\00+'\00\00m\01\00\00\f9)\00\00n\01\00\00\ff&\00\00o\01\00\00#'\00\00p\01\00\00\00\00\00\00\00\00\00\00\06\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\f3\1b\00\00M%\00\00\f8%\00\00<\05\00\00\c85\00\00\ff&\00\00\00\00\00\00\00\00\00\00\93,\00\00\03\1e\00\00\ea\17\00\00\a1%\00\00\c8\22\00\00\8c,\00\00\a6%\00\00\a8\13\00\00\04\19\00\00b\17\00\00\cc\22\00\00\a8\1a\00\00\dc\1c\00\00`\1c\00\00!\0a\00\00\af\13\00\00:\0d\00\00\00\18\00\00\c5\1a\00\00k$\00\00\f7\1b\00\00\ae'\00\00>C\00\00\15D\00\00\14D\00\00\fc@\00\00\f9@\00\00\ff@\00\00\e6@\00\00\02A\00\00\e3@\00\00#A\00\00\c5@\00\00\b3@\00\00\a9@\00\00\cb@\00\00\bc@\00\00\00\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\0a\0a\0a\0a\0b\0b\0b\0b\0e\0d\0b\0b\0b\0b\06\06\04\04\05\05\07\07\07\07\09\08\03\03\03\03\03\03\03\03\03\03\03\03\02\02\01\01\00\00J\00\00\00K\00\00\00I\00\00\00M\00\00\00\00\00\00\00\0a%\00\00u\01\00\00U\16\00\00v\01\00\00\15\17\00\00w\01\00\00@,\00\00x\01\00\00\17\0d\00\00y\01\00\00y\1f\00\00z\01\00\00\886\00\00{\01\00\00\c1\1a\00\00|\01\00\00\e6\13\00\00}\01\00\00\be\1f\00\00~\01\00\009\17\00\00\7f\01\00\00\91%\00\00\80\01\00\00\8f6\00\00\81\01\00\00\0a\14\00\00\82\01\00\00\d6\1d\00\00\83\01\00\00-#\00\00\84\01\00\00\d4\1d\00\00\85\01\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\8b1\00\00\86\01\00\00\8d6\00\00\87\01\00\00\a7\1b\00\00\88\01\00\00\d1+\00\00\89\01\00\00\12\07\00\00\8a\01\00\00\98\07\00\00\8b\01\00\00\91\07\00\00\8c\01\00\00\0f\1b\00\00\8d\01\00\00\91\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00C\0d\00\00\8e\01\00\00a\09\00\00\8f\01\00\00\d6\1d\00\00\90\01\00\00\d4\1d\00\00\91\01\00\00\fa#\00\00\92\01\00\00\16$\00\00\93\01\00\008\09\00\00\94\01\00\00\00\00\00\00\00\00\00\00userdata\00\00\00\00\00\00\00\00\a5$\00\00`\1c\00\00\d3\1a\00\00`h\00\00'\16\00\00:\22\00\00\e7)\00\00\04\19\00\00`h\00\00\a41\00\00\9d$\00\00\5c\17\00\00\91\06\00\00\86\06\00\00\e15\00\00%+\00\00\bf\1a\00\00\9a\16\00\00\8b1\00\00\8d6\00\00\a7\1b\00\00\d1+\00\00\12\07\00\00\98\07\00\00\91\07\00\00\90,\00\00\ac\13\00\00q\12\00\00\86\1c\00\00\e0\13\00\00\0f\1b\00\00\9a\09\00\00v\0b\00\00\03*\00\00A\0d\00\00\da\1b\00\00\99%\00\00\00\00\00\00\00\00\00\00\00\00\00\00\d2\0b\00\00\97\01\00\006\0a\00\00\98\01\00\00U\16\00\00\99\01\00\00\c1\1a\00\00\9a\01\00\004\10\00\00\9b\01\00\00\07\18\00\00\00\00\00\00\00\00\00\00\00\00\00\00[\00-\7f\c2-\fd][\80-\bf]*\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\80\00\00\00\00\08\00\00\00\00\01\00\00\00 \00\00\00\00\04\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00.\00\00\00-\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00\00\00\00\00\00\00\00\bc\98!\00\00\00\00\00\00\00\00\00\00\00\00:&;&e&f&c&`&\22 \d8%\cb%\d9%B&@&j&k&<&\ba%\c4%\95!< \b6\00\a7\00\ac%\a8!\91!\93!\92!\90!\1f\22\94!\b2%\bc% \00!\00\22\00#\00$\00%\00&\00'\00(\00)\00*\00+\00,\00-\00.\00/\000\001\002\003\004\005\006\007\008\009\00:\00;\00<\00=\00>\00?\00@\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00[\00\5c\00]\00^\00_\00`\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00{\00|\00}\00~\00\02#\c7\00\fc\00\e9\00\e2\00\e4\00\e0\00\e5\00\e7\00\ea\00\eb\00\e8\00\ef\00\ee\00\ec\00\c4\00\c5\00\c9\00\e6\00\c6\00\f4\00\f6\00\f2\00\fb\00\f9\00\ff\00\d6\00\dc\00\a2\00\a3\00\a5\00\a7 \92\01\e1\00\ed\00\f3\00\fa\00\f1\00\d1\00\aa\00\ba\00\bf\00\10#\ac\00\bd\00\bc\00\a1\00\ab\00\bb\00\91%\92%\93%\02%$%a%b%V%U%c%Q%W%]%\5c%[%\10%\14%4%,%\1c%\00%<%^%_%Z%T%i%f%`%P%l%g%h%d%e%Y%X%R%S%k%j%\18%\0c%\88%\84%\8c%\90%\80%\b1\03\df\00\93\03\c0\03\a3\03\c3\03\b5\00\c4\03\a6\03\98\03\a9\03\b4\03\1e\22\c6\03\b5\03)\22a\22\b1\00e\22d\22 #!#\f7\00H\22\b0\00\19\22\b7\00\1a\22\7f \b2\00\a0%\a0\00\00\00\00\00%\13\00\00\00\00\00\00\02.\00\00\01\00\00\00\8b0\00\00\01\00\00\00p0\00\00\01\00\00\00U\13\00\00\01\00\00\00w\13\00\00\01\00\00\00`\13\00\00\00\00\00\00\98\13\00\00\00\00\00\00\ab/\00\00\00\00\00\00\17(\00\00\00\00\00\00_\0d\00\00\01\00\00\00\07(\00\00\01\00\00\00\e6'\00\00\02\00\00\00\82\13\00\00\00\00\00\00\d7%\00\00\00\00\00\00'1\00\00\00\00\00\00u.\00\00\00\00\00\00$(\00\00\00\00\00\00,\0b\00\00\00\00\00\00Y$\00\00\00\00\00\00F\13\00\00\03\00\00\00\0c\0b\00\00\01\00\00\00:(\00\00\00\00\00\00\ac.\00\00\00\00\00\00U.\00\00\00\00\00\00\1b$\00\00\00\00\00\00S1\00\00\00\00\00\00h1\00\00\00\00\00\00(.\00\00\00\00\00\00{%\00\00\01\00\00\00;\13\00\00\00\00\00\001-\00\00\00\00\00\00\050\00\00\00\00\00\00\d8<\00\00\00\00\00\00\1a\17\00\00\00\00\00\00-$\00\00$\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00i\1c\00\00\00\00\00\00\1e\1b\00\00\00\00\00\00\96\0c\00\00\00\00\00\00\10-\00\00\01\00\00\00\f9,\00\00\00\00\00\00f\0c\00\00\01\00\00\00\80\1f\00\00\00\00\00\00\cc\1e\00\00\00\00\00\00^\1b\00\00\00\00\00\00\b7\0c\00\00\00\00\00\00\a7\1f\00\00\00\00\00\00\e2\04\00\00\01\00\00\00\89\15\00\00\01\00\00\002'\00\00\01\00\00\00=\0b\00\00\01\00\00\00\c1,\00\00\01\00\00\00\a2,\00\00\01\00\00\00\89\10\00\00\01\00\00\00\db,\00\00\01\00\00\00\95\1e\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\960\07w,a\0e\ee\baQ\09\99\19\c4m\07\8f\f4jp5\a5c\e9\a3\95d\9e2\88\db\0e\a4\b8\dcy\1e\e9\d5\e0\88\d9\d2\97+L\b6\09\bd|\b1~\07-\b8\e7\91\1d\bf\90d\10\b7\1d\f2 \b0jHq\b9\f3\deA\be\84}\d4\da\1a\eb\e4\ddmQ\b5\d4\f4\c7\85\d3\83V\98l\13\c0\a8kdz\f9b\fd\ec\c9e\8aO\5c\01\14\d9l\06cc=\0f\fa\f5\0d\08\8d\c8 n;^\10iL\e4A`\d5rqg\a2\d1\e4\03jm\0d\a8Zjz\0b\cf\0e\e4\9d\ff\09\93'\ae\00\0a\b1\9e\07}D\93\0f\f0\d2\a3\08\87h\f2\01\1e\fe\c2\06i]Wb\f7\cbge\80q6l\19\e7\06knv\1b\d4\fe\e0+\d3\89Zz\da\10\ccJ\ddgo\df\b9\f9\f9\ef\be\8eC\be\b7\17\d5\8e\b0`\e8\a3\d6\d6~\93\d1\a1\c4\c2\d88R\f2\dfO\f1g\bb\d1gW\bc\a6\dd\06\b5?K6\b2H\da+\0d\d8L\1b\0a\af\f6J\036`z\04A\c3\ef`\dfU\dfg\a8\ef\8en1y\beiF\8c\b3a\cb\1a\83f\bc\a0\d2o%6\e2hR\95w\0c\cc\03G\0b\bb\b9\16\02\22/&\05U\be;\ba\c5(\0b\bd\b2\92Z\b4+\04j\b3\5c\a7\ff\d7\c21\cf\d0\b5\8b\9e\d9,\1d\ae\de[\b0\c2d\9b&\f2c\ec\9c\a3ju\0a\93m\02\a9\06\09\9c?6\0e\eb\85g\07r\13W\00\05\82J\bf\95\14z\b8\e2\ae+\b1{8\1b\b6\0c\9b\8e\d2\92\0d\be\d5\e5\b7\ef\dc|!\df\db\0b\d4\d2\d3\86B\e2\d4\f1\f8\b3\ddhn\83\da\1f\cd\16\be\81[&\b9\f6\e1w\b0owG\b7\18\e6Z\08\88pj\0f\ff\ca;\06f\5c\0b\01\11\ff\9ee\8fi\aeb\f8\d3\ffkaE\cfl\16x\e2\0a\a0\ee\d2\0d\d7T\83\04N\c2\b3\039a&g\a7\f7\16`\d0MGiI\dbwn>Jj\d1\ae\dcZ\d6\d9f\0b\df@\f0;\d87S\ae\bc\a9\c5\9e\bb\de\7f\cf\b2G\e9\ff\b50\1c\f2\bd\bd\8a\c2\ba\ca0\93\b3S\a6\a3\b4$\056\d0\ba\93\06\d7\cd)W\deT\bfg\d9#.zf\b3\b8Ja\c4\02\1bh]\94+o*7\be\0b\b4\a1\8e\0c\c3\1b\df\05Z\8d\ef\02-\00\00\00\00F;ge\8cv\ce\ca\caM\a9\afY\eb\edN\1f\d0\8a+\d5\9d#\84\93\a6D\e1\b2\d6\db\9d\f4\ed\bc\f8>\a0\15Wx\9br2\eb=6\d3\ad\06Q\b6gK\f8\19!p\9f|%\ab\c6\e0c\90\a1\85\a9\dd\08*\ef\e6oO|@+\ae:{L\cb\f06\e5d\b6\0d\82\01\97}\1d}\d1Fz\18\1b\0b\d3\b7]0\b4\d2\ce\96\f03\88\ad\97VB\e0>\f9\04\dbY\9c\0bP\fc\1aMk\9b\7f\87&2\d0\c1\1dU\b5R\bb\11T\14\80v1\de\cd\df\9e\98\f6\b8\fb\b9\86'\87\ff\bd@\e25\f0\e9Ms\cb\8e(\e0m\ca\c9\a6V\ad\acl\1b\04\03* cf.\fb:\fah\c0]\9f\a2\8d\f40\e4\b6\93Uw\10\d7\b41+\b0\d1\fbf\19~\bd]~\1b\9c-\e1g\da\16\86\02\10[/\adV`H\c8\c5\c6\0c)\83\fdkLI\b0\c2\e3\0f\8b\a5\86\16\a0\f85P\9b\9fP\9a\d66\ff\dc\edQ\9aOK\15{\09pr\1e\c3=\db\b1\85\06\bc\d4\a4v#\a8\e2MD\cd(\00\edbn;\8a\07\fd\9d\ce\e6\bb\a6\a9\83q\eb\00,7\d0gI3\0b>\d5u0Y\b0\bf}\f0\1f\f9F\97zj\e0\d3\9b,\db\b4\fe\e6\96\1dQ\a0\adz4\81\dd\e5H\c7\e6\82-\0d\ab+\82K\90L\e7\d86\08\06\9e\0docT@\c6\cc\12{\a1\a9\1d\f0\04/[\cbcJ\91\86\ca\e5\d7\bd\ad\80D\1b\e9a\02 \8e\04\c8m'\ab\8eV@\ce\af&\df\b2\e9\1d\b8\d7#P\11xekv\1d\f6\cd2\fc\b0\f6U\99z\bb\fc6<\80\9bS8[\c2\cf~`\a5\aa\b4-\0c\05\f2\16k`a\b0/\81'\8bH\e4\ed\c6\e1K\ab\fd\86.\8a\8d\19R\cc\b6~7\06\fb\d7\98@\c0\b0\fd\d3f\f4\1c\95]\93y_\10:\d6\19+]\b3,@\f1kj{\96\0e\a06?\a1\e6\0dX\c4u\ab\1c%3\90{@\f9\dd\d2\ef\bf\e6\b5\8a\9e\96*\f6\d8\adM\93\12\e0\e4[P&\df\1dkA\ba\d7&\e8\15\91\1d\8fp\b0m\10\0c\f6Vwi<\1b\de\c6z \b9\a3\e9\86\fdB\af\bd\9a'e\f03\88#\cbT\ed:\e0\09^|\dbn;\b6\96\c7\94\f0\ad\a0\f1c\0b\e4\10%0\83u\ef}*\da\a9FM\bf\886\d2\c3\ce\0d\b5\a6\04@\1c\09B{{l\d1\dd?\8d\97\e6X\e8]\ab\f1G\1b\90\96\22\1fK\cf\beYp\a8\db\93=\01t\d5\06f\11F\a0\22\f0\00\9bE\95\ca\d6\ec:\8c\ed\8b_\ad\9d\14#\eb\a6sF!\eb\da\e9g\d0\bd\8c\f4v\f9m\b2M\9e\08x\007\a7>;P\c21\b0\f5Dw\8b\92!\bd\c6;\8e\fb\fd\5c\ebh[\18\0a.`\7fo\e4-\d6\c0\a2\16\b1\a5\83f.\d9\c5]I\bc\0f\10\e0\13I+\87v\da\8d\c3\97\9c\b6\a4\f2V\fb\0d]\10\c0j8\14\1b3\a4R T\c1\98m\fdn\deV\9a\0bM\f0\de\ea\0b\cb\b9\8f\c1\86\10 \87\bdwE\a6\cd\e89\e0\f6\8f\5c*\bb&\f3l\80A\96\ff&\05w\b9\1db\12sP\cb\bd5k\ac\d8\00\00\00\00X\80\e2\d7\f1\06\b4t\a9\86V\a3\e2\0dh\e9\ba\8d\8a>\13\0b\dc\9dK\8b>J\85\1d\a1\09\dd\9dC\det\1b\15},\9b\f7\aag\10\c9\e0?\90+7\96\16}\94\ce\96\9fC\0a;B\13R\bb\a0\c4\fb=\f6g\a3\bd\14\b0\e86*\fa\b0\b6\c8-\190\9e\8eA\b0|Y\8f&\e3\1a\d7\a6\01\cd~ Wn&\a0\b5\b9m+\8b\f35\abi$\9c-?\87\c4\ad\ddP\14v\84&L\f6f\f1\e5p0R\bd\f0\d2\85\f6{\ec\cf\ae\fb\0e\18\07}X\bb_\fd\bal\91k%/\c9\eb\c7\f8`m\91[8\eds\8csfM\c6+\e6\af\11\82`\f9\b2\da\e0\1be\1eM\c65F\cd$\e2\efKrA\b7\cb\90\96\fc@\ae\dc\a4\c0L\0b\0dF\1a\a8U\c6\f8\7f\9bPg<\c3\d0\85\ebjV\d3H2\d61\9fy]\0f\d5!\dd\ed\02\88[\bb\a1\d0\dbYv(\ec\08Mpl\ea\9a\d9\ea\bc9\81j^\ee\ca\e1`\a4\92a\82s;\e7\d4\d0cg6\07\ad\f1\a9D\f5qK\93\5c\f7\1d0\04w\ff\e7O\fc\c1\ad\17|#z\be\fau\d9\e6z\97\0e\22\d7J^zW\a8\89\d3\d1\fe*\8bQ\1c\fd\c0\da\22\b7\98Z\c0`1\dc\96\c3i\5ct\14\a7\ca\ebW\ffJ\09\80V\cc_#\0eL\bd\f4E\c7\83\be\1dGai\b4\c17\ca\ecA\d5\1d<\9a\8ckd\1an\bc\cd\9c8\1f\95\1c\da\c8\de\97\e4\82\86\17\06U/\91P\f6w\11\b2!\b9\87-b\e1\07\cf\b5H\81\99\16\10\01{\c1[\8aE\8b\03\0a\a7\5c\aa\8c\f1\ff\f2\0c\13(6\a1\cexn!,\af\c7\a7z\0c\9f'\98\db\d4\ac\a6\91\8c,DF%\aa\12\e5}*\f02\b3\bcoq\eb<\8d\a6B\ba\db\05\1a:9\d2Q\b1\07\98\091\e5O\a0\b7\b3\ec\f87Q;P\d8\11\9a\08X\f3M\a1\de\a5\ee\f9^G9\b2\d5ys\eaU\9b\a4C\d3\cd\07\1bS/\d0\d5\c5\b0\93\8dERD$\c3\04\e7|C\e607\c8\d8zoH:\ad\c6\cel\0e\9eN\8e\d9Z\e3S\89\02c\b1^\ab\e5\e7\fd\f3e\05*\b8\ee;`\e0n\d9\b7I\e8\8f\14\11hm\c3\df\fe\f2\80\87~\10W.\f8F\f4vx\a4#=\f3\9aiesx\be\cc\f5.\1d\94u\cc\caD\ae\95\bc\1c.wk\b5\a8!\c8\ed(\c3\1f\a6\a3\fdU\fe#\1f\82W\a5I!\0f%\ab\f6\c1\b34\b5\993\d6b0\b5\80\c1h5b\16#\be\5c\5c{>\be\8b\d2\b8\e8(\8a8\0a\ffN\95\d7\af\16\155x\bf\93c\db\e7\13\81\0c\ac\98\bfF\f4\18]\91]\9e\0b2\05\1e\e9\e5\cb\88v\a6\93\08\94q:\8e\c2\d2b\0e \05)\85\1eOq\05\fc\98\d8\83\aa;\80\03H\ecx4\19\d7 \b4\fb\00\892\ad\a3\d1\b2Ot\9a9q>\c2\b9\93\e9k?\c5J3\bf'\9d\fd)\b8\de\a5\a9Z\09\0c/\0c\aaT\af\ee}\1f$\d07G\a42\e0\ee\22dC\b6\a2\86\94r\0f[\c4*\8f\b9\13\83\09\ef\b0\db\89\0dg\90\023-\c8\82\d1\faa\04\87Y9\84e\8e\f7\12\fa\cd\af\92\18\1a\06\14N\b9^\94\acn\15\1f\92$M\9fp\f3\e4\19&P\bc\99\c4\87lB\9d\f14\c2\7f&\9dD)\85\c5\c4\cbR\8eO\f5\18\d6\cf\17\cf\7fIAl'\c9\a3\bb\e9_<\f8\b1\df\de/\18Y\88\8c@\d9j[\0bRT\11S\d2\b6\c6\faT\e0e\a2\d4\02\b2fy\df\e2>\f9=5\97\7fk\96\cf\ff\89A\84t\b7\0b\dc\f4U\dcur\03\7f-\f2\e1\a8\e3d~\eb\bb\e4\9c<\12b\ca\9fJ\e2(H\01i\16\02Y\e9\f4\d5\f0o\a2v\a8\ef@\a1\00\00\00\00\e1\b6R\ef\83k\d4\05b\dd\86\ea\06\d7\a8\0b\e7a\fa\e4\85\bc|\0ed\0a.\e1\0c\aeQ\17\ed\18\03\f8\8f\c5\85\12ns\d7\fd\0ay\f9\1c\eb\cf\ab\f3\89\12-\19h\a4\7f\f6\18\5c\a3.\f9\ea\f1\c1\9b7w+z\81%\c4\1e\8b\0b%\ff=Y\ca\9d\e0\df |V\8d\cf\14\f2\f29\f5D\a0\d6\97\99&\03\8d\10\88QbP\c8\cb\e7\b1~\99\08\d3\a3\1f\e22\15M\0dV\1fc\ec\b7\a91\03\d5t\b7\e94\c2\e5\06\5cf\9a\f0\bd\d0\c8\1f\df\0dN\f5>\bb\1c\1aZ\b12\fb\bb\07`\14\d9\da\e6\fe8l\b4\11H\94h\c9\a9\22:&\cb\ff\bc\cc*I\ee#NC\c0\c2\af\f5\92-\cd(\14\c7,\9eF(D:9\de\a5\8ck1\c7Q\ed\db&\e7\bf4B\ed\91\d5\a3[\c3:\c1\86E\d0 0\17?\81\e6k\ae`P9A\02\8d\bf\ab\e3;\edD\871\c3\a5f\87\91J\04Z\17\a0\e5\ecEO\8dH:\b9l\fehV\0e#\ee\bc\ef\95\bcS\8b\9f\92\b2j)\c0]\08\f4F\b7\e9B\14X\99\ba\c8\80x\0c\9ao\1a\d1\1c\85\fbgNj\9fm`\8b~\db2d\1c\06\b4\8e\fd\b0\e6a\95\14\99\97t\a2\cbx\16\7fM\92\f7\c9\1f}\93\c31\9crucs\10\a8\e5\99\f1\1e\b7v\b1^-\f3P\e8\7f\1c25\f9\f6\d3\83\ab\19\b7\89\85\f8V?\d7\174\e2Q\fd\d5T\03\12\bd\f0|\e4\5cF.\0b>\9b\a8\e1\df-\fa\0e\bb'\d4\efZ\91\86\008L\00\ea\d9\faR\05\a9\02\8e\ddH\b4\dc2*iZ\d8\cb\df\087\af\d5&\d6Nct9,\be\f2\d3\cd\08\a0<\a5\ac\df\caD\1a\8d%&\c7\0b\cf\c7qY \a3{w\c1B\cd%. \10\a3\c4\c1\a6\f1+\e1\96\e6\14\00 \b4\fbb\fd2\11\83K`\fe\e7AN\1f\06\f7\1c\f0d*\9a\1a\85\9c\c8\f5\ed8\b7\03\0c\8e\e5\ecnSc\06\8f\e51\e9\eb\ef\1f\08\0aYM\e7h\84\cb\0d\892\99\e2\f9\caE:\18|\17\d5z\a1\91?\9b\17\c3\d0\ff\1d\ed1\1e\ab\bf\de|v94\9d\c0k\db\f5d\14-\14\d2F\c2v\0f\c0(\97\b9\92\c7\f3\b3\bc&\12\05\ee\c9p\d8h#\91n:\cc\d1.\a0I0\98\f2\a6REtL\b3\f3&\a3\d7\f9\08B6OZ\adT\92\dcG\b5$\8e\a8\dd\80\f1^<6\a3\b1^\eb%[\bf]w\b4\dbWYU:\e1\0b\baX<\8dP\b9\8a\df\bf\c9r\03g(\c4Q\88J\19\d7b\ab\af\85\8d\cf\a5\abl.\13\f9\83L\ce\7fi\adx-\86\c5\dcRp$j\00\9fF\b7\86u\a7\01\d4\9a\c3\0b\fa{\22\bd\a8\94@`.~\a1\d6|\91\00\00\00\00C\cb\a6\87\c7\90<\d4\84[\9aS\cf'\08s\8c\ec\ae\f4\08\b74\a7K|\92 \9eO\10\e6\dd\84\b6aY\df,2\1a\14\8a\b5Qh\18\95\12\a3\be\12\96\f8$A\d53\82\c6}\99Q\17>R\f7\90\ba\09m\c3\f9\c2\cbD\b2\beYd\f1u\ff\e3u.e\b06\e5\c37\e3\d6A\f1\a0\1d\e7v$F}%g\8d\db\a2,\f1I\82o:\ef\05\ebauV\a8\aa\d3\d1\fa2\a3.\b9\f9\05\a9=\a2\9f\fa~i9}5\15\ab]v\de\0d\da\f2\85\97\89\b1N1\0ed}\b3\c8'\b6\15O\a3\ed\8f\1c\e0&)\9b\abZ\bb\bb\e8\91\1d\dc\0e;BN.x\89\e8\a9\fc\d2r\fa\bf\19\d4}j*V\bb)\e1\f0<\ad\bajo\eeq\cc\e8\a5\0d^\c8\e6\c6\f8Ob\9db\1c!V\c4\9b\89\fc\17J\ca7\b1\cdNl+\9e\0d\a7\8d\19F\db\1f9\05\10\b9\be\81K#\ed\c2\80\85j\17\b3\07\acTx\a1+\d0#;x\93\e8\9d\ff\d8\94\0f\df\9b_\a9X\1f\043\0b\5c\cf\95\8c\0eW\e5sM\9cC\f4\c9\c7\d9\a7\8a\0c\7f \c1p\ed\00\82\bbK\87\06\e0\d1\d4E+wS\90\18\f5\95\d3\d3S\12W\88\c9A\14Co\c6_?\fd\e6\1c\f4[a\98\af\c12\dbdg\b5s\ce\b4d0\05\12\e3\b4^\88\b0\f7\95.7\bc\e9\bc\17\ff\22\1a\90{y\80\c38\b2&D\ed\81\a4\82\aeJ\02\05*\11\98Vi\da>\d1\22\a6\ac\f1am\0av\e56\90%\a6\fd6\a2\e8\cb\8c\ba\ab\00*=/[\b0nl\90\16\e9'\ec\84\c9d'\22N\e0|\b8\1d\a3\b7\1e\9av\84\9c\5c5O:\db\b1\14\a0\88\f2\df\06\0f\b9\a3\94/\fah2\a8~3\a8\fb=\f8\0e|\95R\dd\ad\d6\99{*R\c2\e1y\11\09G\feZu\d5\de\19\besY\9d\e5\e9\0a\de.O\8d\0b\1d\cdKH\d6k\cc\cc\8d\f1\9f\8fFW\18\c4:\c58\87\f1c\bf\03\aa\f9\ec@a_k\12\f9/\94Q2\89\13\d5i\13@\96\a2\b5\c7\dd\de'\e7\9e\15\81`\1aN\1b3Y\85\bd\b4\8c\b6?r\cf}\99\f5K&\03\a6\08\ed\a5!C\917\01\00Z\91\86\84\01\0b\d5\c7\ca\adRo`~\83,\ab\d8\04\a8\f0BW\eb;\e4\d0\a0Gv\f0\e3\8c\d0wg\d7J$$\1c\ec\a3\f1/ne\b2\e4\c8\e26\bfR\b1ut\f46>\08f\16}\c3\c0\91\f9\98Z\c2\baS\fcE\1c\ae\ca\e7_el`\db>\f63\98\f5P\b4\d3\89\c2\94\90Bd\13\14\19\fe@W\d2X\c7\82\e1\da\01\c1*|\86Eq\e6\d5\06\ba@RM\c6\d2r\0e\0dt\f5\8aV\ee\a6\c9\9dH!a7\9b\f0\22\fc=w\a6\a7\a7$\e5l\01\a3\ae\10\93\83\ed\db5\04i\80\afW*K\09\d0\ffx\8b\16\bc\b3-\918\e8\b7\c2{#\11E0_\83es\94%\e2\f7\cf\bf\b1\b4\04\196\e6\9ci\c9\a5W\cfN!\0cU\1db\c7\f3\9a)\bba\bajp\c7=\ee+]n\ad\e0\fb\e9x\d3y/;\18\df\a8\bfCE\fb\fc\88\e3|\b7\f4q\5c\f4?\d7\dbpdM\883\af\eb\0f\9b\058\de\d8\ce\9eY\5c\95\04\0a\1f^\a2\8dT\220\ad\17\e9\96*\93\b2\0cy\d0y\aa\fe\05J(8F\81\8e\bf\c2\da\14\ec\81\11\b2k\cam K\89\a6\86\cc\0d\fd\1c\9fN6\ba\18\00\00\00\00\87\a6\cbC\d4<\90\c7S\9a[\84s\08'\cf\f4\ae\ec\8c\a74\b7\08 \92|K\e6\10O\9ea\b6\84\dd2,\dfY\b5\8a\14\1a\95\18hQ\12\be\a3\12A$\f8\96\c6\823\d5\17Q\99}\90\f7R>\c3m\09\baD\cb\c2\f9dY\be\b2\e3\ffu\f1\b0e.u7\c3\e56\f1A\d6\e3v\e7\1d\a0%}F$\a2\db\8dg\82I\f1,\05\ef:oVua\eb\d1\d3\aa\a8.\a32\fa\a9\05\f9\b9\fa\9f\a2=}9i~]\ab\155\da\0d\dev\89\97\85\f2\0e1N\b1\c8\b3}dO\15\b6'\1c\8f\ed\a3\9b)&\e0\bb\bbZ\ab<\1d\91\e8o\87\cal\e8!\01/9\f2\ab\87\beT`\c4\ed\ce;@jh\f0\03J\fa\8cH\cd\5cG\0b\9e\c6\1c\8f\19`\d7\cc\df\e2\e4\19XD/Z\0b\det\de\8cx\bf\9d\ac\ea\c3\d6+L\08\95x\d6S\11\ffp\98R]Fe\f4\da\e0\ae\b7\89z\f53\0e\dc>p.NB;\a9\e8\89x\far\d2\fc}\d4\19\bf\bbV*j<\f0\e1)oj\ba\ad\e8\ccq\ee\c8^\0d\a5O\f8\c6\e6\1cb\9db\9b\c4V!J\17\fc\89\cd\b17\ca\9e+lN\19\8d\a7\0d9\1f\dbF\be\b9\10\05\ed#K\81j\85\80\c2\ac\07\b3\17+\a1xTx;#\d0\ff\9d\e8\93\df\0f\94\d8X\a9_\9b\0b3\04\1f\8c\95\cf\5cs\e5W\0e\f4C\9cM\a7\d9\c7\c9 \7f\0c\8a\00\edp\c1\87K\bb\82\d4\d1\e0\06Sw+E\95\f5\18\90\12S\d3\d3A\c9\88W\c6oC\14\e6\fd?_a[\f4\1c2\c1\af\98\b5gd\dbd\b4\ces\e3\12\050\b0\88^\b47.\95\f7\17\bc\e9\bc\90\1a\22\ff\c3\80y{D&\b28\82\a4\81\ed\05\02J\aeV\98\11*\d1>\dai\f1\ac\a6\22v\0ama%\906\e5\a26\fd\a6\ba\8c\cb\e8=*\00\abn\b0[/\e9\16\90l\c9\84\ec'N\22'd\1d\b8|\e0\9a\1e\b7\a3\5c\9c\84v\db:O5\88\a0\14\b1\0f\06\df\f2/\94\a3\b9\a82h\fa\fb\a83~|\0e\f8=\ad\ddR\95*{\99\d6y\e1\c2R\feG\09\11\de\d5uZYs\be\19\0a\e9\e5\9d\8dO.\deK\cd\1d\0b\cck\d6H\9f\f1\8d\cc\18WF\8f8\c5:\c4\bfc\f1\87\ec\f9\aa\03k_a@\94/\f9\12\13\892Q@\13i\d5\c7\b5\a2\96\e7'\de\dd`\81\15\9e3\1bN\1a\b4\bd\85Yr?\b6\8c\f5\99}\cf\a6\03&K!\a5\ed\08\017\91C\86\91Z\00\d5\0b\01\84R\ad\ca\c7\83~`o\04\d8\ab,WB\f0\a8\d0\e4;\eb\f0vG\a0w\d0\8c\e3$J\d7g\a3\ec\1c$en/\f1\e2\c8\e4\b2\b1R\bf66\f4tu\16f\08>\91\c0\c3}\c2Z\98\f9E\fcS\ba\e7\ca\ae\1c`le_3\f6>\db\b4P\f5\98\94\c2\89\d3\13dB\90@\fe\19\14\c7X\d2W\01\da\e1\82\86|*\c1\d5\e6qER@\ba\06r\d2\c6M\f5t\0d\0e\a6\eeV\8a!H\9d\c9\f0\9b7aw=\fc\22$\a7\a7\a6\a3\01l\e5\83\93\10\ae\045\db\edW\af\80i\d0\09K*\16\8bx\ff\91-\b3\bc\c2\b7\e88E\11#{e\83_0\e2%\94s\b1\bf\cf\f76\19\04\b4\c9i\9c\e6N\cfW\a5\1dU\0c!\9a\f3\c7b\baa\bb)=\c7pjn]+\ee\e9\fb\e0\ad/y\d3x\a8\df\18;\fbEC\bf|\e3\88\fc\5cq\f4\b7\db\d7?\f4\88Mdp\0f\eb\af3\de8\05\9bY\9e\ce\d8\0a\04\95\5c\8d\a2^\1f\ad0\22T*\96\e9\17y\0c\b2\93\fe\aay\d08(J\05\bf\8e\81F\ec\14\da\c2k\b2\11\81K m\ca\cc\86\a6\89\9f\1c\fd\0d\18\ba6N\00\00\00\00\efR\b6\e1\05\d4k\83\ea\86\ddb\0b\a8\d7\06\e4\faa\e7\0e|\bc\85\e1.\0ad\17Q\ae\0c\f8\03\18\ed\12\85\c5\8f\fd\d7sn\1c\f9y\0a\f3\ab\cf\eb\19-\12\89\f6\7f\a4h.\a3\5c\18\c1\f1\ea\f9+w7\9b\c4%\81z%\0b\8b\1e\caY=\ff \df\e0\9d\cf\8dV|9\f2\f2\14\d6\a0D\f5<&\99\97\d3t/v2Z%\12\dd\08\93\f37\8eN\91\d8\dc\f8p]F\b80\b2\14\0e\d1X\92\d3\b3\b7\c0eRV\eeo6\b9\bc\d9\d7S:\04\b5\bch\b2TJ\17\16<\a5E\a0\ddO\c3}\bf\a0\91\cb^A\bf\c1:\ae\edw\dbDk\aa\b9\ab9\1cXs\e5\e4(\9c\b7R\c9v1\8f\ab\99c9JxM3.\97\1f\85\cf}\99X\ad\92\cb\eeLd\b4J$\8b\e6\fc\c5a`!\a7\8e2\97Fo\1c\9d\22\80N+\c3j\c8\f6\a1\85\9a@@\ba\8dp`U\df\c6\81\bfY\1b\e3P\0b\ad\02\b1%\a7f^w\11\87\b4\f1\cc\e5[\a3z\04\ad\dc\delB\8eh\8d\a8\08\b5\efGZ\03\0e\a6t\09jI&\bf\8b\a3\a0b\e9L\f2\d4\08\94.,x{|\9a\99\91\faG\fb~\a8\f1\1a\9f\86\fb~p\d4M\9f\9aR\90\fdu\00&\1c\83\7f\82tl-4\95\86\ab\e9\f7i\f9_\16\88\d7Urg\85\e3\93\8d\03>\f1bQ\88\10\e7\cb\c8P\08\99~\b1\e2\1f\a3\d3\0dM\152\ecc\1fV\031\a9\b7\e9\b7t\d5\06\e5\c24\f0\9af\5c\1f\c8\d0\bd\f5N\0d\df\1a\1c\bb>\fb2\b1Z\14`\07\bb\fe\e6\da\d9\11\b4l8\c9h\94H&:\22\a9\cc\bc\ff\cb#\eeI*\c2\c0CN-\92\f5\af\c7\14(\cd(F\9e,\de9:D1k\8c\a5\db\edQ\c74\bf\e7&\d5\91\edB:\c3[\a3\d0E\86\c1?\170 \aek\e6\81A9P`\ab\bf\8d\02D\ed;\e3\a5\c31\87J\91\87f\a0\17Z\04OE\ec\e5\b9:H\8dVh\fel\bc\ee#\0eS\bc\95\ef\b2\92\9f\8b]\c0)j\b7F\f4\08X\14B\e9\80\c8\ba\99o\9a\0cx\85\1c\d1\1ajNg\fb\8b`m\9fd2\db~\8e\b4\06\1ca\e6\b0\fd\97\99\14\95x\cb\a2t\92M\7f\16}\1f\c9\f7\9c1\c3\93scur\99\e5\a8\10v\b7\1e\f1\f3-^\b1\1c\7f\e8P\f6\f952\19\ab\83\d3\f8\85\89\b7\17\d7?V\fdQ\e24\12\03T\d5\e4|\f0\bd\0b.F\5c\e1\a8\9b>\0e\fa-\df\ef\d4'\bb\00\86\91Z\ea\00L8\05R\fa\d9\dd\8e\02\a92\dc\b4H\d8Zi*7\08\df\cb\d6&\d5\af9tcN\d3\f2\be,<\a0\08\cd\ca\df\ac\a5%\8d\1aD\cf\0b\c7& Yq\c7\c1w{\a3.%\cdB\c4\a3\10 +\f1\a6\c1\14\e6\96\e1\fb\b4 \00\112\fdb\fe`K\83\1fNA\e7\f0\1c\f7\06\1a\9a*d\f5\c8\9c\85\03\b78\ed\ec\e5\8e\0c\06cSn\e91\e5\8f\08\1f\ef\eb\e7MY\0a\0d\cb\84h\e2\992\89:E\ca\f9\d5\17|\18?\91\a1z\d0\c3\17\9b1\ed\1d\ff\de\bf\ab\1e49v|\dbk\c0\9d-\14d\f5\c2F\d2\14(\c0\0fv\c7\92\b9\97&\bc\b3\f3\c9\ee\05\12#h\d8p\cc:n\91I\a0.\d1\a6\f2\980LtER\a3&\f3\b3B\08\f9\d7\adZO6G\dc\92T\a8\8e$\b5^\f1\80\dd\b1\a36<[%\eb^\b4w]\bfUYW\db\ba\0b\e1:P\8d\8a\8d\ba\9d\dc\0b\13J>\8bK\09\a1\1d\85\deC\9d\dd}\15\1bt\aa\f7\9b,\e0\c9\10g7+\90?\94}\16\96C\9f\96\ce\13B;\0a\c4\a0\bbRg\f6=\fb\b0\14\bd\a3\fa*6\e8-\c8\b6\b0\8e\9e0\19Y|\b0A\1a\e3&\8f\cd\01\a6\d7nW ~\b9\b5\a0&\f3\8b+m$i\ab5\87?-\9cP\dd\ad\c4&\84v\14\f1f\f6LR0p\e5\85\d2\f0\bd\cf\ec{\f6\18\0e\fb\ae\bbX}\07l\ba\fd_/%k\91\f8\c7\eb\c9[\91m`\8cs\ed8\c6Mfs\11\af\e6+\b2\f9`\82e\1b\e0\da5\c6M\1e\e2$\cdFArK\ef\96\90\cb\b7\dc\ae@\fc\0bL\c0\a4\a8\1aF\0d\7f\f8\c6U{(\e8\b8\d2\ff\0a8\8a\af\d7\95Nx5\15\16\dbc\93\bf\0c\81\13\e7F\bf\98\ac\91]\18\f42\0b\9e]\e5\e9\1e\05\a6v\88\cbq\94\08\93\d2\c2\8e:\05 \0ebO\1e\85)\98\fc\05q;\aa\83\d8\ecH\03\80\d7\194x\00\fb\b4 \a3\ad2\89tO\b2\d1>q9\9a\e9\93\b9\c2J\c5?k\9d'\bf3\de\b8)\fd\09Z\a9\a5\aa\0c/\0c}\ee\afT7\d0$\1f\e02\a4GCd\22\ee\94\86\a2\b6\c4[\0fr\13\b9\8f*\b0\ef\09\83g\0d\89\db-3\02\90\fa\d1\82\c8Y\87\04a\8ee\849\cd\fa\12\f7\1a\18\92\af\b9N\14\06n\ac\94^$\92\1f\15\f3p\9fMP&\19\e4\87\c4\99\bc\f1\9dBl&\7f\c24\85)D\9dR\cb\c4\c5\18\f5O\8e\cf\17\cf\d6lAI\7f\bb\a3\c9'\f8<_\e9/\de\df\b1\8c\88Y\18[j\d9@\11TR\0b\c6\b6\d2Se\e0T\fa\b2\02\d4\a2\e2\dfyf5=\f9>\96k\7f\97A\89\ff\cf\0b\b7t\84\dcU\f4\dc\7f\03ru\a8\e1\f2-\eb~d\e3<\9c\e4\bb\9f\cab\12H(\e2J\02\16i\01\d5\f4\e9Yv\a2o\f0\a1@\ef\a8\00\00\00\00eg;F\ca\cev\8c\af\a9M\caN\ed\ebY+\8a\d0\1f\84#\9d\d5\e1D\a6\93\9d\db\d6\b2\f8\bc\ed\f4W\15\a0>2r\9bx\d36=\eb\b6Q\06\ad\19\f8Kg|\9fp!\e0\c6\ab%\85\a1\90c*\08\dd\a9Oo\e6\ef\ae+@|\cbL{:d\e56\f0\01\82\0d\b6}\1d}\97\18zF\d1\b7\d3\0b\1b\d2\b40]3\f0\96\ceV\97\ad\88\f9>\e0B\9cY\db\04\1a\fcP\0b\7f\9bkM\d02&\87\b5U\1d\c1T\11\bbR1v\80\14\9e\df\cd\de\fb\b8\f6\98\87'\86\b9\e2@\bd\ffM\e9\f05(\8e\cbs\c9\cam\e0\ac\adV\a6\03\04\1blfc *\fa:\fb.\9f]\c0h0\f4\8d\a2U\93\b6\e4\b4\d7\10w\d1\b0+1~\19f\fb\1b~]\bdg\e1-\9c\02\86\16\da\ad/[\10\c8H`V)\0c\c6\c5Lk\fd\83\e3\c2\b0I\86\a5\8b\0f5\f8\a0\16P\9f\9bP\ff6\d6\9a\9aQ\ed\dc{\15KO\1erp\09\b1\db=\c3\d4\bc\06\85\a8#v\a4\cdDM\e2b\ed\00(\07\8a;n\e6\ce\9d\fd\83\a9\a6\bb,\00\ebqIg\d07\d5>\0b3\b0Y0u\1f\f0}\bfz\97F\f9\9b\d3\e0j\fe\b4\db,Q\1d\96\e64z\ad\a0H\e5\dd\81-\82\e6\c7\82+\ab\0d\e7L\90K\06\086\d8co\0d\9e\cc\c6@T\a9\a1{\12/\04\f0\1dJc\cb[\e5\ca\86\91\80\ad\bd\d7a\e9\1bD\04\8e \02\ab'm\c8\ce@V\8e\b2\df&\af\d7\b8\1d\e9x\11P#\1dvke\fc2\cd\f6\99U\f6\b06\fc\bbzS\9b\80<\cf\c2[8\aa\a5`~\05\0c-\b4`k\16\f2\81/\b0a\e4H\8b'K\e1\c6\ed.\86\fd\abR\19\8d\8a7~\b6\cc\98\d7\fb\06\fd\b0\c0@\1c\f4f\d3y\93]\95\d6:\10_\b3]+\19k\f1@,\0e\96{j\a1?6\a0\c4X\0d\e6%\1c\abu@{\903\ef\d2\dd\f9\8a\b5\e6\bf\f6*\96\9e\93M\ad\d8<\e4\e0\12Y\83\dbT\b8\c7}\c7\dd\a0F\81r\09\0bK\17n0\0d\8b7\eb\09\eeP\d0OA\f9\9d\85$\9e\a6\c3\c5\da\00P\a0\bd;\16\0f\14v\dcjsM\9a\16\ec=\bbs\8b\06\fd\dc\22K7\b9EpqX\01\d6\e2=f\ed\a4\92\cf\a0n\f7\a8\9b(q\0d\10'\14j+a\bb\c3f\ab\de\a4]\ed?\e0\fb~Z\87\c08\f5.\8d\f2\90I\b6\b4\ec\d6\c6\95\89\b1\fd\d3&\18\b0\19C\7f\8b_\a2;-\cc\c7\5c\16\8ah\f5[@\0d\92`\06\91\cb\bb\02\f4\ac\80D[\05\cd\8e>b\f6\c8\df&P[\baAk\1d\15\e8&\d7p\8f\1d\91\0c\10m\b0iwV\f6\c6\de\1b<\a3\b9 zB\fd\86\e9'\9a\bd\af\883\f0e\edT\cb#^\09\e0:;n\db|\94\c7\96\b6\f1\a0\ad\f0\10\e4\0bcu\830%\da*}\ef\bfMF\a9\c3\d26\88\a6\b5\0d\ce\09\1c@\04l{{B\8d?\dd\d1\e8X\e6\97G\f1\ab]\22\96\90\1b\be\cfK\1f\db\a8pYt\01=\93\11f\06\d5\f0\22\a0F\95E\9b\00:\ec\d6\ca_\8b\ed\8c#\14\9d\adFs\a6\eb\e9\da\eb!\8c\bd\d0gm\f9v\f4\08\9eM\b2\a77\00x\c2P;>D\f5\b01!\92\8bw\8e;\c6\bd\eb\5c\fd\fb\0a\18[ho\7f`.\c0\d6-\e4\a5\b1\16\a2\d9.f\83\bcI]\c5\13\e0\10\0fv\87+I\97\c3\8d\da\f2\a4\b6\9c]\0d\fbV8j\c0\10\a43\1b\14\c1T Rn\fdm\98\0b\9aV\de\ea\de\f0M\8f\b9\cb\0b \10\86\c1Ew\bd\879\e8\cd\a6\5c\8f\f6\e0\f3&\bb*\96A\80lw\05&\ff\12b\1d\b9\bd\cbPs\d8\ack5\00\00\00\00w\070\96\ee\0ea,\99\09Q\ba\07m\c4\19pj\f4\8f\e9c\a55\9ed\95\a3\0e\db\882y\dc\b8\a4\e0\d5\e9\1e\97\d2\d9\88\09\b6L+~\b1|\bd\e7\b8-\07\90\bf\1d\91\1d\b7\10dj\b0 \f2\f3\b9qH\84\beA\de\1a\da\d4}m\dd\e4\eb\f4\d4\b5Q\83\d3\85\c7\13l\98Vdk\a8\c0\fdb\f9z\8ae\c9\ec\14\01\5cOc\06l\d9\fa\0f=c\8d\08\0d\f5;n \c8Li\10^\d5`A\e4\a2gqr<\03\e4\d1K\04\d4G\d2\0d\85\fd\a5\0a\b5k5\b5\a8\faB\b2\98l\db\bb\c9\d6\ac\bc\f9@2\d8l\e3E\df\5cu\dc\d6\0d\cf\ab\d1=Y&\d90\acQ\de\00:\c8\d7Q\80\bf\d0a\16!\b4\f4\b5V\b3\c4#\cf\ba\95\99\b8\bd\a5\0f(\02\b8\9e_\05\88\08\c6\0c\d9\b2\b1\0b\e9$/o|\87XhL\11\c1a\1d\ab\b6f-=v\dcA\90\01\dbq\06\98\d2 \bc\ef\d5\10*q\b1\85\89\06\b6\b5\1f\9f\bf\e4\a5\e8\b8\d43x\07\c9\a2\0f\00\f94\96\09\a8\8e\e1\0e\98\18\7fj\0d\bb\08m=-\91dl\97\e6c\5c\01kkQ\f4\1clab\85e0\d8\f2b\00Nl\06\95\ed\1b\01\a5{\82\08\f4\c1\f5\0f\c4We\b0\d9\c6\12\b7\e9P\8b\be\b8\ea\fc\b9\88|b\dd\1d\df\15\da-I\8c\d3|\f3\fb\d4LeM\b2aX:\b5Q\ce\a3\bc\00t\d4\bb0\e2J\df\a5A=\d8\95\d7\a4\d1\c4m\d3\d6\f4\fbCi\e9j4n\d9\fc\adg\88F\da`\b8\d0D\04-s3\03\1d\e5\aa\0aL_\dd\0d|\c9P\05q<'\02A\aa\be\0b\10\10\c9\0c \86Wh\b5% o\85\b3\b9f\d4\09\cea\e4\9f^\de\f9\0e)\d9\c9\98\b0\d0\98\22\c7\d7\a8\b4Y\b3=\17.\b4\0d\81\b7\bd\5c;\c0\bal\ad\ed\b8\83 \9a\bf\b3\b6\03\b6\e2\0ct\b1\d2\9a\ea\d5G9\9d\d2w\af\04\db&\15s\dc\16\83\e3c\0b\12\94d;\84\0dmj>zjZ\a8\e4\0e\cf\0b\93\09\ff\9d\0a\00\ae'}\07\9e\b1\f0\0f\93D\87\08\a3\d2\1e\01\f2hi\06\c2\fe\f7bW]\80eg\cb\19l6qnk\06\e7\fe\d4\1bv\89\d3+\e0\10\dazZg\ddJ\cc\f9\b9\dfo\8e\be\ef\f9\17\b7\beC`\b0\8e\d5\d6\d6\a3\e8\a1\d1\93~8\d8\c2\c4O\df\f2R\d1\bbg\f1\a6\bcWg?\b5\06\ddH\b26K\d8\0d+\da\af\0a\1bL6\03J\f6A\04z`\df`\ef\c3\a8g\dfU1n\8e\efFi\bey\cba\b3\8c\bcf\83\1a%o\d2\a0Rh\e26\cc\0cw\95\bb\0bG\03\22\02\16\b9U\05&/\c5\ba;\be\b2\bd\0b(+\b4Z\92\5c\b3j\04\c2\d7\ff\a7\b5\d0\cf1,\d9\9e\8b[\de\ae\1d\9bd\c2\b0\ecc\f2&uj\a3\9c\02m\93\0a\9c\09\06\a9\eb\0e6?r\07g\85\05\00W\13\95\bfJ\82\e2\b8z\14{\b1+\ae\0c\b6\1b8\92\d2\8e\9b\e5\d5\be\0d|\dc\ef\b7\0b\db\df!\86\d3\d2\d4\f1\d4\e2Bh\dd\b3\f8\1f\da\83n\81\be\16\cd\f6\b9&[o\b0w\e1\18\b7Gw\88\08Z\e6\ff\0fjpf\06;\ca\11\01\0b\5c\8fe\9e\ff\f8b\aeiak\ff\d3\16l\cfE\a0\0a\e2x\d7\0d\d2\eeN\04\83T9\03\b3\c2\a7g&a\d0`\16\f7IiGM>nw\db\ae\d1jJ\d9\d6Z\dc@\df\0bf7\d8;\f0\a9\bc\aeS\de\bb\9e\c5G\b2\cf\7f0\b5\ff\e9\bd\bd\f2\1c\ca\ba\c2\8aS\b3\930$\b4\a3\a6\ba\d06\05\cd\d7\06\93T\deW)#\d9g\bf\b3fz.\c4aJ\b8]h\1b\02*o+\94\b4\0b\be7\c3\0c\8e\a1Z\05\df\1b-\02\ef\8d1.3.1\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\bd\01\00\00\04\00\04\00\08\00\04\00\be\01\00\00\04\00\05\00\10\00\08\00\be\01\00\00\04\00\06\00 \00 \00\be\01\00\00\04\00\04\00\10\00\10\00\bf\01\00\00\08\00\10\00 \00 \00\bf\01\00\00\08\00\10\00\80\00\80\00\bf\01\00\00\08\00 \00\80\00\00\01\bf\01\00\00 \00\80\00\02\01\00\04\bf\01\00\00 \00\02\01\02\01\00\10\bf\01\00\00\00\00\00\00\00\00\00\00\10\00\11\00\12\00\00\00\08\00\07\00\09\00\06\00\0a\00\05\00\0b\00\04\00\0c\00\03\00\0d\00\02\00\0e\00\01\00\0f\00\00\00\00\00\00\00\00\00\00\00`\07\00\00\00\08P\00\00\08\10\00\14\08s\00\12\07\1f\00\00\08p\00\00\080\00\00\09\c0\00\10\07\0a\00\00\08`\00\00\08 \00\00\09\a0\00\00\08\00\00\00\08\80\00\00\08@\00\00\09\e0\00\10\07\06\00\00\08X\00\00\08\18\00\00\09\90\00\13\07;\00\00\08x\00\00\088\00\00\09\d0\00\11\07\11\00\00\08h\00\00\08(\00\00\09\b0\00\00\08\08\00\00\08\88\00\00\08H\00\00\09\f0\00\10\07\04\00\00\08T\00\00\08\14\00\15\08\e3\00\13\07+\00\00\08t\00\00\084\00\00\09\c8\00\11\07\0d\00\00\08d\00\00\08$\00\00\09\a8\00\00\08\04\00\00\08\84\00\00\08D\00\00\09\e8\00\10\07\08\00\00\08\5c\00\00\08\1c\00\00\09\98\00\14\07S\00\00\08|\00\00\08<\00\00\09\d8\00\12\07\17\00\00\08l\00\00\08,\00\00\09\b8\00\00\08\0c\00\00\08\8c\00\00\08L\00\00\09\f8\00\10\07\03\00\00\08R\00\00\08\12\00\15\08\a3\00\13\07#\00\00\08r\00\00\082\00\00\09\c4\00\11\07\0b\00\00\08b\00\00\08\22\00\00\09\a4\00\00\08\02\00\00\08\82\00\00\08B\00\00\09\e4\00\10\07\07\00\00\08Z\00\00\08\1a\00\00\09\94\00\14\07C\00\00\08z\00\00\08:\00\00\09\d4\00\12\07\13\00\00\08j\00\00\08*\00\00\09\b4\00\00\08\0a\00\00\08\8a\00\00\08J\00\00\09\f4\00\10\07\05\00\00\08V\00\00\08\16\00@\08\00\00\13\073\00\00\08v\00\00\086\00\00\09\cc\00\11\07\0f\00\00\08f\00\00\08&\00\00\09\ac\00\00\08\06\00\00\08\86\00\00\08F\00\00\09\ec\00\10\07\09\00\00\08^\00\00\08\1e\00\00\09\9c\00\14\07c\00\00\08~\00\00\08>\00\00\09\dc\00\12\07\1b\00\00\08n\00\00\08.\00\00\09\bc\00\00\08\0e\00\00\08\8e\00\00\08N\00\00\09\fc\00`\07\00\00\00\08Q\00\00\08\11\00\15\08\83\00\12\07\1f\00\00\08q\00\00\081\00\00\09\c2\00\10\07\0a\00\00\08a\00\00\08!\00\00\09\a2\00\00\08\01\00\00\08\81\00\00\08A\00\00\09\e2\00\10\07\06\00\00\08Y\00\00\08\19\00\00\09\92\00\13\07;\00\00\08y\00\00\089\00\00\09\d2\00\11\07\11\00\00\08i\00\00\08)\00\00\09\b2\00\00\08\09\00\00\08\89\00\00\08I\00\00\09\f2\00\10\07\04\00\00\08U\00\00\08\15\00\10\08\02\01\13\07+\00\00\08u\00\00\085\00\00\09\ca\00\11\07\0d\00\00\08e\00\00\08%\00\00\09\aa\00\00\08\05\00\00\08\85\00\00\08E\00\00\09\ea\00\10\07\08\00\00\08]\00\00\08\1d\00\00\09\9a\00\14\07S\00\00\08}\00\00\08=\00\00\09\da\00\12\07\17\00\00\08m\00\00\08-\00\00\09\ba\00\00\08\0d\00\00\08\8d\00\00\08M\00\00\09\fa\00\10\07\03\00\00\08S\00\00\08\13\00\15\08\c3\00\13\07#\00\00\08s\00\00\083\00\00\09\c6\00\11\07\0b\00\00\08c\00\00\08#\00\00\09\a6\00\00\08\03\00\00\08\83\00\00\08C\00\00\09\e6\00\10\07\07\00\00\08[\00\00\08\1b\00\00\09\96\00\14\07C\00\00\08{\00\00\08;\00\00\09\d6\00\12\07\13\00\00\08k\00\00\08+\00\00\09\b6\00\00\08\0b\00\00\08\8b\00\00\08K\00\00\09\f6\00\10\07\05\00\00\08W\00\00\08\17\00@\08\00\00\13\073\00\00\08w\00\00\087\00\00\09\ce\00\11\07\0f\00\00\08g\00\00\08'\00\00\09\ae\00\00\08\07\00\00\08\87\00\00\08G\00\00\09\ee\00\10\07\09\00\00\08_\00\00\08\1f\00\00\09\9e\00\14\07c\00\00\08\7f\00\00\08?\00\00\09\de\00\12\07\1b\00\00\08o\00\00\08/\00\00\09\be\00\00\08\0f\00\00\08\8f\00\00\08O\00\00\09\fe\00`\07\00\00\00\08P\00\00\08\10\00\14\08s\00\12\07\1f\00\00\08p\00\00\080\00\00\09\c1\00\10\07\0a\00\00\08`\00\00\08 \00\00\09\a1\00\00\08\00\00\00\08\80\00\00\08@\00\00\09\e1\00\10\07\06\00\00\08X\00\00\08\18\00\00\09\91\00\13\07;\00\00\08x\00\00\088\00\00\09\d1\00\11\07\11\00\00\08h\00\00\08(\00\00\09\b1\00\00\08\08\00\00\08\88\00\00\08H\00\00\09\f1\00\10\07\04\00\00\08T\00\00\08\14\00\15\08\e3\00\13\07+\00\00\08t\00\00\084\00\00\09\c9\00\11\07\0d\00\00\08d\00\00\08$\00\00\09\a9\00\00\08\04\00\00\08\84\00\00\08D\00\00\09\e9\00\10\07\08\00\00\08\5c\00\00\08\1c\00\00\09\99\00\14\07S\00\00\08|\00\00\08<\00\00\09\d9\00\12\07\17\00\00\08l\00\00\08,\00\00\09\b9\00\00\08\0c\00\00\08\8c\00\00\08L\00\00\09\f9\00\10\07\03\00\00\08R\00\00\08\12\00\15\08\a3\00\13\07#\00\00\08r\00\00\082\00\00\09\c5\00\11\07\0b\00\00\08b\00\00\08\22\00\00\09\a5\00\00\08\02\00\00\08\82\00\00\08B\00\00\09\e5\00\10\07\07\00\00\08Z\00\00\08\1a\00\00\09\95\00\14\07C\00\00\08z\00\00\08:\00\00\09\d5\00\12\07\13\00\00\08j\00\00\08*\00\00\09\b5\00\00\08\0a\00\00\08\8a\00\00\08J\00\00\09\f5\00\10\07\05\00\00\08V\00\00\08\16\00@\08\00\00\13\073\00\00\08v\00\00\086\00\00\09\cd\00\11\07\0f\00\00\08f\00\00\08&\00\00\09\ad\00\00\08\06\00\00\08\86\00\00\08F\00\00\09\ed\00\10\07\09\00\00\08^\00\00\08\1e\00\00\09\9d\00\14\07c\00\00\08~\00\00\08>\00\00\09\dd\00\12\07\1b\00\00\08n\00\00\08.\00\00\09\bd\00\00\08\0e\00\00\08\8e\00\00\08N\00\00\09\fd\00`\07\00\00\00\08Q\00\00\08\11\00\15\08\83\00\12\07\1f\00\00\08q\00\00\081\00\00\09\c3\00\10\07\0a\00\00\08a\00\00\08!\00\00\09\a3\00\00\08\01\00\00\08\81\00\00\08A\00\00\09\e3\00\10\07\06\00\00\08Y\00\00\08\19\00\00\09\93\00\13\07;\00\00\08y\00\00\089\00\00\09\d3\00\11\07\11\00\00\08i\00\00\08)\00\00\09\b3\00\00\08\09\00\00\08\89\00\00\08I\00\00\09\f3\00\10\07\04\00\00\08U\00\00\08\15\00\10\08\02\01\13\07+\00\00\08u\00\00\085\00\00\09\cb\00\11\07\0d\00\00\08e\00\00\08%\00\00\09\ab\00\00\08\05\00\00\08\85\00\00\08E\00\00\09\eb\00\10\07\08\00\00\08]\00\00\08\1d\00\00\09\9b\00\14\07S\00\00\08}\00\00\08=\00\00\09\db\00\12\07\17\00\00\08m\00\00\08-\00\00\09\bb\00\00\08\0d\00\00\08\8d\00\00\08M\00\00\09\fb\00\10\07\03\00\00\08S\00\00\08\13\00\15\08\c3\00\13\07#\00\00\08s\00\00\083\00\00\09\c7\00\11\07\0b\00\00\08c\00\00\08#\00\00\09\a7\00\00\08\03\00\00\08\83\00\00\08C\00\00\09\e7\00\10\07\07\00\00\08[\00\00\08\1b\00\00\09\97\00\14\07C\00\00\08{\00\00\08;\00\00\09\d7\00\12\07\13\00\00\08k\00\00\08+\00\00\09\b7\00\00\08\0b\00\00\08\8b\00\00\08K\00\00\09\f7\00\10\07\05\00\00\08W\00\00\08\17\00@\08\00\00\13\073\00\00\08w\00\00\087\00\00\09\cf\00\11\07\0f\00\00\08g\00\00\08'\00\00\09\af\00\00\08\07\00\00\08\87\00\00\08G\00\00\09\ef\00\10\07\09\00\00\08_\00\00\08\1f\00\00\09\9f\00\14\07c\00\00\08\7f\00\00\08?\00\00\09\df\00\12\07\1b\00\00\08o\00\00\08/\00\00\09\bf\00\00\08\0f\00\00\08\8f\00\00\08O\00\00\09\ff\00\10\05\01\00\17\05\01\01\13\05\11\00\1b\05\01\10\11\05\05\00\19\05\01\04\15\05A\00\1d\05\01@\10\05\03\00\18\05\01\02\14\05!\00\1c\05\01 \12\05\09\00\1a\05\01\08\16\05\81\00@\05\00\00\10\05\02\00\17\05\81\01\13\05\19\00\1b\05\01\18\11\05\07\00\19\05\01\06\15\05a\00\1d\05\01`\10\05\04\00\18\05\01\03\14\051\00\1c\05\010\12\05\0d\00\1a\05\01\0c\16\05\c1\00@\05\00\00\03\00\04\00\05\00\06\00\07\00\08\00\09\00\0a\00\0b\00\0d\00\0f\00\11\00\13\00\17\00\1b\00\1f\00#\00+\003\00;\00C\00S\00c\00s\00\83\00\a3\00\c3\00\e3\00\02\01\00\00\00\00\00\00\10\00\10\00\10\00\10\00\10\00\10\00\10\00\10\00\11\00\11\00\11\00\11\00\12\00\12\00\12\00\12\00\13\00\13\00\13\00\13\00\14\00\14\00\14\00\14\00\15\00\15\00\15\00\15\00\10\00\cb\00M\00\00\00\01\00\02\00\03\00\04\00\05\00\07\00\09\00\0d\00\11\00\19\00!\001\00A\00a\00\81\00\c1\00\01\01\81\01\01\02\01\03\01\04\01\06\01\08\01\0c\01\10\01\18\01 \010\01@\01`\00\00\00\00\10\00\10\00\10\00\10\00\11\00\11\00\12\00\12\00\13\00\13\00\14\00\14\00\15\00\15\00\16\00\16\00\17\00\17\00\18\00\18\00\19\00\19\00\1a\00\1a\00\1b\00\1b\00\1c\00\1c\00\1d\00\1d\00@\00@\00\00\01\02\03\04\04\05\05\06\06\06\06\07\07\07\07\08\08\08\08\08\08\08\08\09\09\09\09\09\09\09\09\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\00\00\10\11\12\12\13\13\14\14\14\14\15\15\15\15\16\16\16\16\16\16\16\16\17\17\17\17\17\17\17\17\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\00\01\02\03\04\05\06\07\08\08\09\09\0a\0a\0b\0b\0c\0c\0c\0c\0d\0d\0d\0d\0e\0e\0e\0e\0f\0f\0f\0f\10\10\10\10\10\10\10\10\11\11\11\11\11\11\11\11\12\12\12\12\12\12\12\12\13\13\13\13\13\13\13\13\14\14\14\14\14\14\14\14\14\14\14\14\14\14\14\14\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\16\16\16\16\16\16\16\16\16\16\16\16\16\16\16\16\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1c@\a4\00\00@\a9\00\00\01\01\00\00\1e\01\00\00\0f\00\00\00\c0\a8\00\00\c0\a9\00\00\00\00\00\00\1e\00\00\00\0f\00\00\00\00\00\00\00@\aa\00\00\00\00\00\00\13\00\00\00\07\00\00\00\00\00\00\00\0c\00\08\00\8c\00\08\00L\00\08\00\cc\00\08\00,\00\08\00\ac\00\08\00l\00\08\00\ec\00\08\00\1c\00\08\00\9c\00\08\00\5c\00\08\00\dc\00\08\00<\00\08\00\bc\00\08\00|\00\08\00\fc\00\08\00\02\00\08\00\82\00\08\00B\00\08\00\c2\00\08\00\22\00\08\00\a2\00\08\00b\00\08\00\e2\00\08\00\12\00\08\00\92\00\08\00R\00\08\00\d2\00\08\002\00\08\00\b2\00\08\00r\00\08\00\f2\00\08\00\0a\00\08\00\8a\00\08\00J\00\08\00\ca\00\08\00*\00\08\00\aa\00\08\00j\00\08\00\ea\00\08\00\1a\00\08\00\9a\00\08\00Z\00\08\00\da\00\08\00:\00\08\00\ba\00\08\00z\00\08\00\fa\00\08\00\06\00\08\00\86\00\08\00F\00\08\00\c6\00\08\00&\00\08\00\a6\00\08\00f\00\08\00\e6\00\08\00\16\00\08\00\96\00\08\00V\00\08\00\d6\00\08\006\00\08\00\b6\00\08\00v\00\08\00\f6\00\08\00\0e\00\08\00\8e\00\08\00N\00\08\00\ce\00\08\00.\00\08\00\ae\00\08\00n\00\08\00\ee\00\08\00\1e\00\08\00\9e\00\08\00^\00\08\00\de\00\08\00>\00\08\00\be\00\08\00~\00\08\00\fe\00\08\00\01\00\08\00\81\00\08\00A\00\08\00\c1\00\08\00!\00\08\00\a1\00\08\00a\00\08\00\e1\00\08\00\11\00\08\00\91\00\08\00Q\00\08\00\d1\00\08\001\00\08\00\b1\00\08\00q\00\08\00\f1\00\08\00\09\00\08\00\89\00\08\00I\00\08\00\c9\00\08\00)\00\08\00\a9\00\08\00i\00\08\00\e9\00\08\00\19\00\08\00\99\00\08\00Y\00\08\00\d9\00\08\009\00\08\00\b9\00\08\00y\00\08\00\f9\00\08\00\05\00\08\00\85\00\08\00E\00\08\00\c5\00\08\00%\00\08\00\a5\00\08\00e\00\08\00\e5\00\08\00\15\00\08\00\95\00\08\00U\00\08\00\d5\00\08\005\00\08\00\b5\00\08\00u\00\08\00\f5\00\08\00\0d\00\08\00\8d\00\08\00M\00\08\00\cd\00\08\00-\00\08\00\ad\00\08\00m\00\08\00\ed\00\08\00\1d\00\08\00\9d\00\08\00]\00\08\00\dd\00\08\00=\00\08\00\bd\00\08\00}\00\08\00\fd\00\08\00\13\00\09\00\13\01\09\00\93\00\09\00\93\01\09\00S\00\09\00S\01\09\00\d3\00\09\00\d3\01\09\003\00\09\003\01\09\00\b3\00\09\00\b3\01\09\00s\00\09\00s\01\09\00\f3\00\09\00\f3\01\09\00\0b\00\09\00\0b\01\09\00\8b\00\09\00\8b\01\09\00K\00\09\00K\01\09\00\cb\00\09\00\cb\01\09\00+\00\09\00+\01\09\00\ab\00\09\00\ab\01\09\00k\00\09\00k\01\09\00\eb\00\09\00\eb\01\09\00\1b\00\09\00\1b\01\09\00\9b\00\09\00\9b\01\09\00[\00\09\00[\01\09\00\db\00\09\00\db\01\09\00;\00\09\00;\01\09\00\bb\00\09\00\bb\01\09\00{\00\09\00{\01\09\00\fb\00\09\00\fb\01\09\00\07\00\09\00\07\01\09\00\87\00\09\00\87\01\09\00G\00\09\00G\01\09\00\c7\00\09\00\c7\01\09\00'\00\09\00'\01\09\00\a7\00\09\00\a7\01\09\00g\00\09\00g\01\09\00\e7\00\09\00\e7\01\09\00\17\00\09\00\17\01\09\00\97\00\09\00\97\01\09\00W\00\09\00W\01\09\00\d7\00\09\00\d7\01\09\007\00\09\007\01\09\00\b7\00\09\00\b7\01\09\00w\00\09\00w\01\09\00\f7\00\09\00\f7\01\09\00\0f\00\09\00\0f\01\09\00\8f\00\09\00\8f\01\09\00O\00\09\00O\01\09\00\cf\00\09\00\cf\01\09\00/\00\09\00/\01\09\00\af\00\09\00\af\01\09\00o\00\09\00o\01\09\00\ef\00\09\00\ef\01\09\00\1f\00\09\00\1f\01\09\00\9f\00\09\00\9f\01\09\00_\00\09\00_\01\09\00\df\00\09\00\df\01\09\00?\00\09\00?\01\09\00\bf\00\09\00\bf\01\09\00\7f\00\09\00\7f\01\09\00\ff\00\09\00\ff\01\09\00\00\00\07\00@\00\07\00 \00\07\00`\00\07\00\10\00\07\00P\00\07\000\00\07\00p\00\07\00\08\00\07\00H\00\07\00(\00\07\00h\00\07\00\18\00\07\00X\00\07\008\00\07\00x\00\07\00\04\00\07\00D\00\07\00$\00\07\00d\00\07\00\14\00\07\00T\00\07\004\00\07\00t\00\07\00\03\00\08\00\83\00\08\00C\00\08\00\c3\00\08\00#\00\08\00\a3\00\08\00c\00\08\00\e3\00\08\00\00\00\05\00\10\00\05\00\08\00\05\00\18\00\05\00\04\00\05\00\14\00\05\00\0c\00\05\00\1c\00\05\00\02\00\05\00\12\00\05\00\0a\00\05\00\1a\00\05\00\06\00\05\00\16\00\05\00\0e\00\05\00\1e\00\05\00\01\00\05\00\11\00\05\00\09\00\05\00\19\00\05\00\05\00\05\00\15\00\05\00\0d\00\05\00\1d\00\05\00\03\00\05\00\13\00\05\00\0b\00\05\00\1b\00\05\00\07\00\05\00\17\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\06\00\00\00\06\00\00\00\07\00\00\00\07\00\00\00\08\00\00\00\08\00\00\00\09\00\00\00\09\00\00\00\0a\00\00\00\0a\00\00\00\0b\00\00\00\0b\00\00\00\0c\00\00\00\0c\00\00\00\0d\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\07\00\00\00\00\00\00\00\10\11\12\00\08\07\09\06\0a\05\0b\04\0c\03\0d\02\0e\01\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\0a\00\00\00\0c\00\00\00\0e\00\00\00\10\00\00\00\14\00\00\00\18\00\00\00\1c\00\00\00 \00\00\00(\00\00\000\00\00\008\00\00\00@\00\00\00P\00\00\00`\00\00\00p\00\00\00\80\00\00\00\a0\00\00\00\c0\00\00\00\e0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\06\00\00\00\08\00\00\00\0c\00\00\00\10\00\00\00\18\00\00\00 \00\00\000\00\00\00@\00\00\00`\00\00\00\80\00\00\00\c0\00\00\00\00\01\00\00\80\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\06\00\00\00\08\00\00\00\0c\00\00\00\10\00\00\00\18\00\00\00 \00\00\000\00\00\00@\00\00\00`\00\00\00\00\00\00\00\00\00\00E\05\00\00Z,\00\00\87X\00\00l\13\00\00.\13\00\00\8d\13\00\00\05\05\00\00\18\13\00\00>\1a\00\00\87X\00\00\00\00\00\00\00\00\00\00O\bba\05g\ac\dd?\18-DT\fb!\e9?\9b\f6\81\d2\0bs\ef?\18-DT\fb!\f9?\e2e/\22\7f+z<\07\5c\143&\a6\81<\bd\cb\f0z\88\07p<\07\5c\143&\a6\91<\18-DT\fb!\e9?\18-DT\fb!\e9\bf\d2!3\7f|\d9\02@\d2!3\7f|\d9\02\c0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\18-DT\fb!\09@\18-DT\fb!\09\c0\03\00\00\00\04\00\00\00\04\00\00\00\06\00\00\00\83\f9\a2\00DNn\00\fc)\15\00\d1W'\00\dd4\f5\00b\db\c0\00<\99\95\00A\90C\00cQ\fe\00\bb\de\ab\00\b7a\c5\00:n$\00\d2MB\00I\06\e0\00\09\ea.\00\1c\92\d1\00\eb\1d\fe\00)\b1\1c\00\e8>\a7\00\f55\82\00D\bb.\00\9c\e9\84\00\b4&p\00A~_\00\d6\919\00S\839\00\9c\f49\00\8b_\84\00(\f9\bd\00\f8\1f;\00\de\ff\97\00\0f\98\05\00\11/\ef\00\0aZ\8b\00m\1fm\00\cf~6\00\09\cb'\00FO\b7\00\9ef?\00-\ea_\00\ba'u\00\e5\eb\c7\00={\f1\00\f79\07\00\92R\8a\00\fbk\ea\00\1f\b1_\00\08]\8d\000\03V\00{\fcF\00\f0\abk\00 \bc\cf\006\f4\9a\00\e3\a9\1d\00^a\91\00\08\1b\e6\00\85\99e\00\a0\14_\00\8d@h\00\80\d8\ff\00'sM\00\06\061\00\caV\15\00\c9\a8s\00{\e2`\00k\8c\c0\00\19\c4G\00\cdg\c3\00\09\e8\dc\00Y\83*\00\8bv\c4\00\a6\1c\96\00D\af\dd\00\19W\d1\00\a5>\05\00\05\07\ff\003~?\00\c22\e8\00\98O\de\00\bb}2\00&=\c3\00\1ek\ef\00\9f\f8^\005\1f:\00\7f\f2\ca\00\f1\87\1d\00|\90!\00j$|\00\d5n\fa\000-w\00\15;C\00\b5\14\c6\00\c3\19\9d\00\ad\c4\c2\00,MA\00\0c\00]\00\86}F\00\e3q-\00\9b\c6\9a\003b\00\00\b4\d2|\00\b4\a7\97\007U\d5\00\d7>\f6\00\a3\10\18\00Mv\fc\00d\9d*\00p\d7\ab\00c|\f8\00z\b0W\00\17\15\e7\00\c0IV\00;\d6\d9\00\a7\848\00$#\cb\00\d6\8aw\00ZT#\00\00\1f\b9\00\f1\0a\1b\00\19\ce\df\00\9f1\ff\00f\1ej\00\99Wa\00\ac\fbG\00~\7f\d8\00\22e\b7\002\e8\89\00\e6\bf`\00\ef\c4\cd\00l6\09\00]?\d4\00\16\de\d7\00X;\de\00\de\9b\92\00\d2\22(\00(\86\e8\00\e2XM\00\c6\ca2\00\08\e3\16\00\e0}\cb\00\17\c0P\00\f3\1d\a7\00\18\e0[\00.\134\00\83\12b\00\83H\01\00\f5\8e[\00\ad\b0\7f\00\1e\e9\f2\00HJC\00\10g\d3\00\aa\dd\d8\00\ae_B\00ja\ce\00\0a(\a4\00\d3\99\b4\00\06\a6\f2\00\5cw\7f\00\a3\c2\83\00a<\88\00\8asx\00\af\8cZ\00o\d7\bd\00-\a6c\00\f4\bf\cb\00\8d\81\ef\00&\c1g\00U\caE\00\ca\d96\00(\a8\d2\00\c2a\8d\00\12\c9w\00\04&\14\00\12F\9b\00\c4Y\c4\00\c8\c5D\00M\b2\91\00\00\17\f3\00\d4C\ad\00)I\e5\00\fd\d5\10\00\00\be\fc\00\1e\94\cc\00p\ce\ee\00\13>\f5\00\ec\f1\80\00\b3\e7\c3\00\c7\f8(\00\93\05\94\00\c1q>\00.\09\b3\00\0bE\f3\00\88\12\9c\00\ab {\00.\b5\9f\00G\92\c2\00{2/\00\0cUm\00r\a7\90\00k\e7\1f\001\cb\96\00y\16J\00Ay\e2\00\f4\df\89\00\e8\94\97\00\e2\e6\84\00\991\97\00\88\edk\00__6\00\bb\fd\0e\00H\9a\b4\00g\a4l\00qrB\00\8d]2\00\9f\15\b8\00\bc\e5\09\00\8d1%\00\f7t9\000\05\1c\00\0d\0c\01\00K\08h\00,\eeX\00G\aa\90\00t\e7\02\00\bd\d6$\00\f7}\a6\00nHr\00\9f\16\ef\00\8e\94\a6\00\b4\91\f6\00\d1SQ\00\cf\0a\f2\00 \983\00\f5K~\00\b2ch\00\dd>_\00@]\03\00\85\89\7f\00UR)\007d\c0\00m\d8\10\002H2\00[Lu\00Nq\d4\00ETn\00\0b\09\c1\00*\f5i\00\14f\d5\00'\07\9d\00]\04P\00\b4;\db\00\eav\c5\00\87\f9\17\00Ik}\00\1d'\ba\00\96i)\00\c6\cc\ac\00\ad\14T\00\90\e2j\00\88\d9\89\00,rP\00\04\a4\be\00w\07\94\00\f30p\00\00\fc'\00\eaq\a8\00f\c2I\00d\e0=\00\97\dd\83\00\a3?\97\00C\94\fd\00\0d\86\8c\001A\de\00\929\9d\00\ddp\8c\00\17\b7\e7\00\08\df;\00\157+\00\5c\80\a0\00Z\80\93\00\10\11\92\00\0f\e8\d8\00l\80\af\00\db\ffK\008\90\0f\00Y\18v\00b\a5\15\00a\cb\bb\00\c7\89\b9\00\10@\bd\00\d2\f2\04\00Iu'\00\eb\b6\f6\00\db\22\bb\00\0a\14\aa\00\89&/\00d\83v\00\09;3\00\0e\94\1a\00Q:\aa\00\1d\a3\c2\00\af\ed\ae\00\5c&\12\00m\c2M\00-z\9c\00\c0V\97\00\03?\83\00\09\f0\f6\00+@\8c\00m1\99\009\b4\07\00\0c \15\00\d8\c3[\00\f5\92\c4\00\c6\adK\00N\ca\a5\00\a77\cd\00\e6\a96\00\ab\92\94\00\ddBh\00\19c\de\00v\8c\ef\00h\8bR\00\fc\db7\00\ae\a1\ab\00\df\151\00\00\ae\a1\00\0c\fb\da\00dMf\00\ed\05\b7\00)e0\00WV\bf\00G\ff:\00j\f9\b9\00u\be\f3\00(\93\df\00\ab\800\00f\8c\f6\00\04\cb\15\00\fa\22\06\00\d9\e4\1d\00=\b3\a4\00W\1b\8f\006\cd\09\00NB\e9\00\13\be\a4\003#\b5\00\f0\aa\1a\00Oe\a8\00\d2\c1\a5\00\0b?\0f\00[x\cd\00#\f9v\00{\8b\04\00\89\17r\00\c6\a6S\00on\e2\00\ef\eb\00\00\9bJX\00\c4\da\b7\00\aaf\ba\00v\cf\cf\00\d1\02\1d\00\b1\f1-\00\8c\99\c1\00\c3\adw\00\86H\da\00\f7]\a0\00\c6\80\f4\00\ac\f0/\00\dd\ec\9a\00?\5c\bc\00\d0\dem\00\90\c7\1f\00*\db\b6\00\a3%:\00\00\af\9a\00\adS\93\00\b6W\04\00)-\b4\00K\80~\00\da\07\a7\00v\aa\0e\00{Y\a1\00\16\12*\00\dc\b7-\00\fa\e5\fd\00\89\db\fe\00\89\be\fd\00\e4vl\00\06\a9\fc\00>\80p\00\85n\15\00\fd\87\ff\00(>\07\00ag3\00*\18\86\00M\bd\ea\00\b3\e7\af\00\8fmn\00\95g9\001\bf[\00\84\d7H\000\df\16\00\c7-C\00%a5\00\c9p\ce\000\cb\b8\00\bfl\fd\00\a4\00\a2\00\05l\e4\00Z\dd\a0\00!oG\00b\12\d2\00\b9\5c\84\00paI\00kV\e0\00\99R\01\00PU7\00\1e\d5\b7\003\f1\c4\00\13n_\00]0\e4\00\85.\a9\00\1d\b2\c3\00\a126\00\08\b7\a4\00\ea\b1\d4\00\16\f7!\00\8fi\e4\00'\ffw\00\0c\03\80\00\8d@-\00O\cd\a0\00 \a5\99\00\b3\a2\d3\00/]\0a\00\b4\f9B\00\11\da\cb\00}\be\d0\00\9b\db\c1\00\ab\17\bd\00\ca\a2\81\00\08j\5c\00.U\17\00'\00U\00\7f\14\f0\00\e1\07\86\00\14\0bd\00\96A\8d\00\87\be\de\00\da\fd*\00k%\b6\00{\894\00\05\f3\fe\00\b9\bf\9e\00hjO\00J*\a8\00O\c4Z\00-\f8\bc\00\d7Z\98\00\f4\c7\95\00\0dM\8d\00 :\a6\00\a4W_\00\14?\b1\00\808\95\00\cc \01\00q\dd\86\00\c9\de\b6\00\bf`\f5\00Me\11\00\01\07k\00\8c\b0\ac\00\b2\c0\d0\00QUH\00\1e\fb\0e\00\95r\c3\00\a3\06;\00\c0@5\00\06\dc{\00\e0E\cc\00N)\fa\00\d6\ca\c8\00\e8\f3A\00|d\de\00\9bd\d8\00\d9\be1\00\a4\97\c3\00wX\d4\00i\e3\c5\00\f0\da\13\00\ba:<\00F\18F\00Uu_\00\d2\bd\f5\00n\92\c6\00\ac.]\00\0eD\ed\00\1c>B\00a\c4\87\00)\fd\e9\00\e7\d6\f3\00\22|\ca\00o\915\00\08\e0\c5\00\ff\d7\8d\00nj\e2\00\b0\fd\c6\00\93\08\c1\00|]t\00k\ad\b2\00\cdn\9d\00>r{\00\c6\11j\00\f7\cf\a9\00)s\df\00\b5\c9\ba\00\b7\00Q\00\e2\b2\0d\00t\ba$\00\e5}`\00t\d8\8a\00\0d\15,\00\81\18\0c\00~f\94\00\01)\16\00\9fzv\00\fd\fd\be\00VE\ef\00\d9~6\00\ec\d9\13\00\8b\ba\b9\00\c4\97\fc\001\a8'\00\f1n\c3\00\94\c56\00\d8\a8V\00\b4\a8\b5\00\cf\cc\0e\00\12\89-\00oW4\00,V\89\00\99\ce\e3\00\d6 \b9\00k^\aa\00>*\9c\00\11_\cc\00\fd\0bJ\00\e1\f4\fb\00\8e;m\00\e2\86,\00\e9\d4\84\00\fc\b4\a9\00\ef\ee\d1\00.5\c9\00/9a\008!D\00\1b\d9\c8\00\81\fc\0a\00\fbJj\00/\1c\d8\00S\b4\84\00N\99\8c\00T\22\cc\00*U\dc\00\c0\c6\d6\00\0b\19\96\00\1ap\b8\00i\95d\00&Z`\00?R\ee\00\7f\11\0f\00\f4\b5\11\00\fc\cb\f5\004\bc-\004\bc\ee\00\e8]\cc\00\dd^`\00g\8e\9b\00\923\ef\00\c9\17\b8\00aX\9b\00\e1W\bc\00Q\83\c6\00\d8>\10\00\ddqH\00-\1c\dd\00\af\18\a1\00!,F\00Y\f3\d7\00\d9z\98\00\9eT\c0\00O\86\fa\00V\06\fc\00\e5y\ae\00\89\226\008\ad\22\00g\93\dc\00U\e8\aa\00\82&8\00\ca\e7\9b\00Q\0d\a4\00\993\b1\00\a9\d7\0e\00i\05H\00e\b2\f0\00\7f\88\a7\00\88L\97\00\f9\d16\00!\92\b3\00{\82J\00\98\cf!\00@\9f\dc\00\dcGU\00\e1t:\00g\ebB\00\fe\9d\df\00^\d4_\00{g\a4\00\ba\acz\00U\f6\a2\00+\88#\00A\baU\00Yn\08\00!*\86\009G\83\00\89\e3\e6\00\e5\9e\d4\00I\fb@\00\ffV\e9\00\1c\0f\ca\00\c5Y\8a\00\94\fa+\00\d3\c1\c5\00\0f\c5\cf\00\dbZ\ae\00G\c5\86\00\85Cb\00!\86;\00,y\94\00\10a\87\00*L{\00\80,\1a\00C\bf\12\00\88&\90\00x<\89\00\a8\c4\e4\00\e5\db{\00\c4:\c2\00&\f4\ea\00\f7g\8a\00\0d\92\bf\00e\a3+\00=\93\b1\00\bd|\0b\00\a4Q\dc\00'\ddc\00i\e1\dd\00\9a\94\19\00\a8)\95\00h\ce(\00\09\ed\b4\00D\9f \00N\98\ca\00p\82c\00~|#\00\0f\b92\00\a7\f5\8e\00\14V\e7\00!\f1\08\00\b5\9d*\00o~M\00\a5\19Q\00\b5\f9\ab\00\82\df\d6\00\96\dda\00\166\02\00\c4:\9f\00\83\a2\a1\00r\edm\009\8dz\00\82\b8\a9\00k2\5c\00F'[\00\004\ed\00\d2\00w\00\fc\f4U\00\01YM\00\e0q\80\00\00\00\00\00\00\00\00\00\00\00\00@\fb!\f9?\00\00\00\00-Dt>\00\00\00\80\98F\f8<\00\00\00`Q\ccx;\00\00\00\80\83\1b\f09\00\00\00@ %z8\00\00\00\80\22\82\e36\00\00\00\00\1d\f3i5\fe\82+eG\15g@\00\00\00\00\00\008C\00\00\fa\feB.v\bf:;\9e\bc\9a\f7\0c\bd\bd\fd\ff\ff\ff\ff\df?\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\5c\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\22PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\0a\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\224\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\0a\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\09f\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\09^\cb\9c\90T'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\09\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\22CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\0a\e15\d2m<##\e3\19c\c8\ee?c\22b\22\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?\16D\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\87X\00\00\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\00\00\00\00 eG\15\f7?\00\a2\ef.\fc\05\e7=9\83+eG\15\e7\bf\be\04:\dc\09\c7\de?\fb/pdG\15\d7\bfHL\03Plw\d2?\bc\92\ea(\b3\c7\ce\bf.\f9\17\e1%b\ca?\fe\82+eG\15\e7\bf\f7\03:\dc\09\c7\de??|+eG\15\d7\bf\e4[\f0Plw\d2?\e5\8fv\dd\09\c7\ce\bf6\e7\c4\1eva\ca?\9b\a7d\bc?\15\c7\bfJ\1b\f0T\d1\84\c4?<8,\a7\e4\89\c2\bff\eeZ(/\b3\c0?\f8\ac\b1k($\f7?\00\b0\cd\ee_\09\e1\bf\a1\cc\d2f\f7\e1\f6?\00\d0v\bd\94\84\e0\bf\8a\d40\0e=\a1\f6?\00\f8\e8\aeC\01\e0\bf\85l\d02\eca\f6?\00@\0b6\c5\fe\de\bf\f8\98\11\95\fa#\f6?\00\e0\b7\1a\d9\fd\dd\bfl\02\cf\a4[\e7\f5?\00\90\c7\0c\ae\ff\dc\bf\b8O!Z\05\ac\f5?\00\a0\fd\118\04\dc\bf\1en\16\0f\edq\f5?\00\e0:2g\0b\db\bf5\f8\0bY\099\f5?\00\b0-Z/\15\da\bf\dd\ada\edO\01\f5?\00`\f8Z\7f!\d9\bf\d0{H\8e\b8\ca\f4?\00\90q\b0M0\d8\bf\eeO3\b49\95\f4?\00\e0\a9\f9\89A\d7\bfi\d5\af\df\cb`\f4?\00\90\19\b5+U\d6\bfS\b9\e4Nf-\f4?\00\10\9b\a2#k\d5\bf\a6\d8\1d\11\01\fb\f3?\00\a0_\0fe\83\d4\bf6X\0c\b7\95\c9\f3?\00\a0\f67\e9\9d\d3\bfJ\fd\b6J\1c\99\f3?\00`\8dS\a1\ba\d2\bf\b5\99\e0\0c\8ei\f3?\00@\ca@\83\d9\d1\bf\b2\e7\13\82\e4:\f3?\00\e0@:\85\fa\d0\bf\b1\bd\85\19\19\0d\f3?\000\e72\9c\1d\d0\bf\d7q\b2\ca%\e0\f2?\00`\fa\a2}\85\ce\bf\82\cd\13\cf\04\b4\f2?\00\80=c\c8\d3\cc\bfP\cb|,\b0\88\f2?\00\a0\14L\03&\cb\bf\e5M\94c\22^\f2?\00\e0O/\1c|\c9\bf\b1\15\86=V4\f2?\00\00\80?\02\d6\c7\bf8\af>\e3F\0b\f2?\00\e0\05\1a\a73\c6\bf\dd\a3\cd\fd\ee\e2\f1?\00\00W\e9\f5\94\c4\bf09\0bXJ\bb\f1?\00\a0\e0$\e4\f9\c2\bf\00\22\7f\84S\94\f1?\00\c0\fdZYb\c1\bf<\d7\d5\c0\06n\f1?\00\80\bdu\9a\9c\bf\bf\c2\e4\b7G_H\f1?\00\c0\f9[W{\bc\bf\d1\85\00\adX#\f1?\00\80\f4\0f\c6`\b9\bf'\22S\0f\f0\fe\f0?\00\00\b6G\e2L\b6\bf\8f:\d0w \db\f0?\00@\01\b2x?\b3\bf\d9\80Y\d6\e6\b7\f0?\00\c0B\1a}8\b0\bf\8d@{\fe>\95\f0?\00\00\b5\08\92o\aa\bf\83;\c5\ca%s\f0?\00\00wO\95z\a4\bf\5c\1b\0d\e4\97Q\f0?\00\00\0c\c5\a8#\9d\bf\a2\8e \c1\910\f0?\00\00x)&j\91\bf!~\b3%\10\10\f0?\00\00\e8\d8\f8 w\bfk\a7\ca\f9~\c0\ef?\00\00P\b1S\fe\86?\84\f1\f6\d3eD\ef?\00\80\0f\e1\cc\1c\a1?\7f\10\84\9f\07\cc\ee?\00\80\8b\8c\fcM\ac?\e8Z\97\99:W\ee?\00@W\1e2\aa\b3?\e6=\bd\f0\d6\e5\ed?\00\80\8b\d0\a0\18\b9?\b38\ff\81\b6w\ed?\00@\04\da\e9r\be?C\e9Mr\b5\0c\ed?\00`\7fP\d2\dc\c1?cu\0e\dc\b2\a4\ec?\00\a0\de\03\abv\c4?Q\cb\d6\e8\8e?\ec?\00 \e2wC\07\c7?L\0c\02O+\dd\eb?\00@\a9\8b\de\8e\c9?\ca\15`\00l}\eb?\00\e0\d2j\b8\0d\cc?\8f3.n6 \eb?\00\e0\ce\af\0a\84\ce?9P)&p\c5\ea?\00\80g\b4\0ay\d0?\dd1'\bc\01m\ea?\00\c0\01h\05\ac\d1?\8b\f1?\bc\d3\16\ea?\00\e0\fe\d4\11\db\d2?\ad\fegI\d1\c2\e9?\00\80\c5NF\06\d4?\02\99|\f4\e4p\e9?\00\f0:\09\be-\d5?\f2\bc\829\fb \e9?\00\d0P \90Q\d6?\f1Y\f7\87\01\d3\e8?\00\f0\ea\cd\d2q\d7?m\f6\b9\eb\e5\86\e8?\00\90}\85\9c\8e\d8?\94\b9X\b6\97<\e8?\00`\e1U\01\a8\d9?\22\10\c6\ff\05\f4\e7?\00\d0\d3n\18\be\da?\ca\15\14\18\22\ad\e7?\00\e0\a0\ae\f2\d0\db?\8c\ff\9e\f9\dcg\e7?\00@\bf=\a4\e0\dc?\8e\0a\b9\12\00 \e6?\05\b6D\06\ab\04\89<\a64W\04\00`\e6?\a9\f7b\ea\9b\ffa<\c5\f2%\c3\ff\9f\e6?\ba\90<\cb\cf~\82<\04Z\b98\00\e0\e6?&\93sV\88\ff\88<\e3\94\99\e0\ff\1f\e7?\b1\82_'@\fd\8a<\10\0eY\15\00`\e7?A\83#\b4u\fdr\bc\d5[e\12\00\a0\e7?v+$|\e6\08x<\a6\e9Y2\00\e0\e7?\b7\22\f6&\e4\08b\bc\d2\b2\b4\ed\ff\1f\e8?/\c9\a5\1eF\02\84\bc\c3\fc\fa-\00`\e8?\1f\9a\f2\a2\f4\f7m)\e0\ff\df\f2?\f9\a6\b2\da9|\9b<\82\f0\dc\f7\ff\1f\f3?TR\dcn3\f1}<`\8bZ\f0\ff_\f3?\eb1\cdLV\03\9e\bc\cc\ae\0e.\00\a0\f3?w\a4\d3K\e7\f0u<6\b2;\04\00\e0\f3?3\88\9d\14\cb}\9c<\ff\87\d1\02\00 \f4?(=-\cf\af\08~<\b1|8\0d\00`\f4?\a6\99e\857\08\82<\89\9fV\04\00\a0\f4?\d2\bcO\90\5c\fa\89\bc\f3C5\04\00\e0\f4?)S\17\ed%\11x\bc\0f\7f\02\cc\ff\1f\f5?\dcTw\84\d8\83\98\e90.\90\80\91\bc\008\fa\feB.\e6?0g\c7\93W\f3.=\01\00\00\00\00\00\e0\bf[0QUUU\d5?\90E\eb\ff\ff\ff\cf\bf\11\01\f1$\b3\99\c9?\9f\c8\06\e5uU\c5\bf\00\00\00\00\00\00\e0\bfwUUUUU\d5?\cb\fd\ff\ff\ff\ff\cf\bf\0c\dd\95\99\99\99\c9?\a7EgUUU\c5\bf0\deD\a3$I\c2?e=B\a4\ff\ff\bf\bf\ca\d6*(\84q\bc?\ffh\b0C\eb\99\b9\bf\85\d0\af\f7\82\81\b7?\cdE\d1u\13R\b5\bf\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\22\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\5c\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90')\e1\e9\d1\bf\df\bd\b2\db\22\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\22\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\22\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\5c/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\0a\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_'\90\b9Q\f1?\00\e0\a1\de\5cH\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\5c\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\09\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\5c\a9?\b5\99\0a\83\91:\ee?\00\80W\efj'\ad?V\9a`\09\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\5c\fbf\ac\5c\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\0a\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\09\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\09\ef@W\ea?\00\80\f6T)\e9\c8?'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\5cQ[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\5c\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\09U\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa't\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\090\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\09qf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\0a\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\0a\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc\008\fa\feB.\e6?0g\c7\93W\f3.=\00\00\00\00\00\00\e0\bf`UUUUU\e5\bf\06\00\00\00\00\00\e0?NUY\99\99\99\e9?z\a4)UUU\e5\bf\e9EH\9b[I\f2\bf\c3?&\8b+\00\f0?\00\00\00\00\00\a0\f6?\00\00\00\00\00\00\00\00\00\c8\b9\f2\82,\d6\bf\80V7($\b4\fa<\00\00\00\00\00\80\f6?\00\00\00\00\00\00\00\00\00\08X\bf\bd\d1\d5\bf \f7\e0\d8\08\a5\1c\bd\00\00\00\00\00`\f6?\00\00\00\00\00\00\00\00\00XE\17wv\d5\bfmP\b6\d5\a4b#\bd\00\00\00\00\00@\f6?\00\00\00\00\00\00\00\00\00\f8-\87\ad\1a\d5\bf\d5g\b0\9e\e4\84\e6\bc\00\00\00\00\00 \f6?\00\00\00\00\00\00\00\00\00xw\95_\be\d4\bf\e0>)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\5cg\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\5c\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\09\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\0a\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\5c\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \0a\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\0a\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\5ck\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\0a=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8'\0a\00\00\00d\00\00\00\e8\03\00\00\10'\00\00\a0\86\01\00@B\0f\00\80\96\98\00\00\e1\f5\05\18\00\00\005\00\00\00q\00\00\00k\ff\ff\ff\ce\fb\ff\ff\92\bf\ff\ff\00\00\00\00\00\00\00\00/tmp/tmpfile_XXXXXX\00\00\00\00\00\00\00\00\00\00\00\00\00/tmp/tmpnam_XXXXXX\00\00\00\00\00\00\00\00\00\00\00\00\00\00\19\00\0a\00\19\19\19\00\00\00\00\05\00\00\00\00\00\00\09\00\00\00\00\0b\00\00\00\00\00\00\00\00\19\00\11\0a\19\19\19\03\0a\07\00\01\00\09\0b\18\00\00\09\06\0b\00\00\0b\00\06\19\00\00\00\19\19\19\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\19\00\0a\0d\19\19\19\00\0d\00\00\02\00\09\0e\00\00\00\09\00\0e\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\00\13\00\00\00\00\09\0c\00\00\00\00\00\0c\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\04\0f\00\00\00\00\09\10\00\00\00\00\00\10\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\00\11\00\00\00\00\09\12\00\00\00\00\00\12\00\00\12\00\00\1a\00\00\00\1a\1a\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\1a\1a\1a\00\00\00\00\00\00\09\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\00\17\00\00\00\00\09\14\00\00\00\00\00\14\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\00\15\00\00\00\00\09\16\00\00\00\00\00\16\00\00\16\00\000123456789ABCDEF\00\00\00\00D\f7\00\00\db\01\00\00\dc\01\00\00\dd\01\00\00\de\01\00\00\df\01\00\00\e0\01\00\00\e1\01\00\00\e2\01\00\00\e3\01\00\00\e4\01\00\00\e5\01\00\00\e6\01\00\00\e7\01\00\00\e8\01\00\00\00\00\00\00\80\f7\00\00\e9\01\00\00\ea\01\00\00\eb\01\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\00\ef\01\00\00\f0\01\00\00\f1\01\00\00\f2\01\00\00\f3\01\00\00\f4\01\00\00\f5\01\00\00\f6\01\00\00\08\00\00\00\00\00\00\00\b8\f7\00\00\f7\01\00\00\f8\01\00\00\f8\ff\ff\ff\f8\ff\ff\ff\b8\f7\00\00\f9\01\00\00\fa\01\00\00\cc\f5\00\00\e0\f5\00\00\08\00\00\00\00\00\00\00\00\f8\00\00\fb\01\00\00\fc\01\00\00\f8\ff\ff\ff\f8\ff\ff\ff\00\f8\00\00\fd\01\00\00\fe\01\00\00\fc\f5\00\00\10\f6\00\00\04\00\00\00\00\00\00\00H\f8\00\00\ff\01\00\00\00\02\00\00\fc\ff\ff\ff\fc\ff\ff\ffH\f8\00\00\01\02\00\00\02\02\00\00,\f6\00\00@\f6\00\00\04\00\00\00\00\00\00\00\90\f8\00\00\03\02\00\00\04\02\00\00\fc\ff\ff\ff\fc\ff\ff\ff\90\f8\00\00\05\02\00\00\06\02\00\00\5c\f6\00\00p\f6\00\00\00\00\00\00\bc\f6\00\00\07\02\00\00\08\02\00\00NSt3__29basic_iosIcNS_11char_traitsIcEEEE\00\00\00\98#\01\00\90\f6\00\00\04\f9\00\00\00\00\00\00\04\f7\00\00\09\02\00\00\0a\02\00\00NSt3__29basic_iosIwNS_11char_traitsIwEEEE\00\00\00\98#\01\00\d8\f6\00\00\04\f9\00\00NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\00\00\00\00p#\01\00\10\f7\00\00NSt3__215basic_streambufIwNS_11char_traitsIwEEEE\00\00\00\00p#\01\00L\f7\00\00NSt3__213basic_istreamIcNS_11char_traitsIcEEEE\00\00\f4#\01\00\88\f7\00\00\00\00\00\00\01\00\00\00\bc\f6\00\00\03\f4\ff\ffNSt3__213basic_istreamIwNS_11char_traitsIwEEEE\00\00\f4#\01\00\d0\f7\00\00\00\00\00\00\01\00\00\00\04\f7\00\00\03\f4\ff\ffNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\00\00\f4#\01\00\18\f8\00\00\00\00\00\00\01\00\00\00\bc\f6\00\00\03\f4\ff\ffNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE\00\00\f4#\01\00`\f8\00\00\00\00\00\00\01\00\00\00\04\f7\00\00\03\f4\ff\ff\00\00\00\00T\f9\00\00\0f\02\00\00\10\02\00\00\11\02\00\00\12\02\00\00\13\02\00\00\14\02\00\00\15\02\00\00\00\00\00\00(\f9\00\00\0e\02\00\00\16\02\00\00\17\02\00\00\00\00\00\00\04\f9\00\00\18\02\00\00\19\02\00\00NSt3__28ios_baseE\00\00\00p#\01\00\f0\f8\00\00NSt3__28ios_base7failureE\00\00\00\98#\01\00\0c\f9\00\00T\22\01\00NSt3__219__iostream_categoryE\00\00\00\98#\01\004\f9\00\00\9c\22\01\00\00\00\00\00\b8\f9\00\00\db\01\00\00\22\02\00\00#\02\00\00\de\01\00\00\df\01\00\00\e0\01\00\00\e1\01\00\00\e2\01\00\00\e3\01\00\00$\02\00\00%\02\00\00&\02\00\00\e7\01\00\00\e8\01\00\00NSt3__210__stdinbufIcEE\00\98#\01\00\a0\f9\00\00D\f7\00\00\00\00\00\00\1c\fa\00\00\e9\01\00\00'\02\00\00(\02\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\00\ef\01\00\00\f0\01\00\00\f1\01\00\00)\02\00\00*\02\00\00+\02\00\00\f5\01\00\00\f6\01\00\00NSt3__210__stdinbufIwEE\00\98#\01\00\04\fa\00\00\80\f7\00\00\00\00\00\00\84\fa\00\00\db\01\00\00,\02\00\00-\02\00\00\de\01\00\00\df\01\00\00\e0\01\00\00.\02\00\00\e2\01\00\00\e3\01\00\00\e4\01\00\00\e5\01\00\00\e6\01\00\00/\02\00\000\02\00\00NSt3__211__stdoutbufIcEE\00\00\00\00\98#\01\00h\fa\00\00D\f7\00\00\00\00\00\00\ec\fa\00\00\e9\01\00\001\02\00\002\02\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\003\02\00\00\f0\01\00\00\f1\01\00\00\f2\01\00\00\f3\01\00\00\f4\01\00\004\02\00\005\02\00\00NSt3__211__stdoutbufIwEE\00\00\00\00\98#\01\00\d0\fa\00\00\80\f7\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\01\02\03\04\05\06\07\08\09\ff\ff\ff\ff\ff\ff\ff\0a\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\22#\ff\ff\ff\ff\ff\ff\0a\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\22#\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\01\02\04\07\03\06\05\00\00\00\00\00\00\00\02\00\00\c0\03\00\00\c0\04\00\00\c0\05\00\00\c0\06\00\00\c0\07\00\00\c0\08\00\00\c0\09\00\00\c0\0a\00\00\c0\0b\00\00\c0\0c\00\00\c0\0d\00\00\c0\0e\00\00\c0\0f\00\00\c0\10\00\00\c0\11\00\00\c0\12\00\00\c0\13\00\00\c0\14\00\00\c0\15\00\00\c0\16\00\00\c0\17\00\00\c0\18\00\00\c0\19\00\00\c0\1a\00\00\c0\1b\00\00\c0\1c\00\00\c0\1d\00\00\c0\1e\00\00\c0\1f\00\00\c0\00\00\00\b3\01\00\00\c3\02\00\00\c3\03\00\00\c3\04\00\00\c3\05\00\00\c3\06\00\00\c3\07\00\00\c3\08\00\00\c3\09\00\00\c3\0a\00\00\c3\0b\00\00\c3\0c\00\00\c3\0d\00\00\d3\0e\00\00\c3\0f\00\00\c3\00\00\0c\bb\01\00\0c\c3\02\00\0c\c3\03\00\0c\c3\04\00\0c\db\e0\fd\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\03 \02 \02 \02 \02 \02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\01`\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d5\08\d5\08\d5\08\d5\08\d5\08\d5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d6\08\d6\08\d6\08\d6\08\d6\08\d6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\04\c0\04\c0\04\c0\04\c0\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\01\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00.\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00T\00\00\00U\00\00\00V\00\00\00W\00\00\00X\00\00\00Y\00\00\00Z\00\00\00[\00\00\00\5c\00\00\00]\00\00\00^\00\00\00_\00\00\00`\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00T\00\00\00U\00\00\00V\00\00\00W\00\00\00X\00\00\00Y\00\00\00Z\00\00\00{\00\00\00|\00\00\00}\00\00\00~\00\00\00\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00.\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00a\00\00\00b\00\00\00c\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00h\00\00\00i\00\00\00j\00\00\00k\00\00\00l\00\00\00m\00\00\00n\00\00\00o\00\00\00p\00\00\00q\00\00\00r\00\00\00s\00\00\00t\00\00\00u\00\00\00v\00\00\00w\00\00\00x\00\00\00y\00\00\00z\00\00\00[\00\00\00\5c\00\00\00]\00\00\00^\00\00\00_\00\00\00`\00\00\00a\00\00\00b\00\00\00c\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00h\00\00\00i\00\00\00j\00\00\00k\00\00\00l\00\00\00m\00\00\00n\00\00\00o\00\00\00p\00\00\00q\00\00\00r\00\00\00s\00\00\00t\00\00\00u\00\00\00v\00\00\00w\00\00\00x\00\00\00y\00\00\00z\00\00\00{\00\00\00|\00\00\00}\00\00\00~\00\00\00\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\000123456789abcdefABCDEFxX+-pPiInN\00%\00\00\00\00\00%p\00\00\00\00%I:%M:%S %p%H:%M\00\00\00%\00\00\00m\00\00\00/\00\00\00%\00\00\00d\00\00\00/\00\00\00%\00\00\00y\00\00\00%\00\00\00Y\00\00\00-\00\00\00%\00\00\00m\00\00\00-\00\00\00%\00\00\00d\00\00\00%\00\00\00I\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00p\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00\00\00\00\00T\11\01\00\e3\02\00\00\e4\02\00\00\e5\02\00\00\00\00\00\00\b4\11\01\00\e6\02\00\00\e7\02\00\00\e5\02\00\00\e8\02\00\00\e9\02\00\00\ea\02\00\00\eb\02\00\00\ec\02\00\00\ed\02\00\00\ee\02\00\00\ef\02\00\00\00\00\00\00\1c\11\01\00\f0\02\00\00\f1\02\00\00\e5\02\00\00\f2\02\00\00\f3\02\00\00\f4\02\00\00\f5\02\00\00\f6\02\00\00\f7\02\00\00\f8\02\00\00\00\00\00\00\ec\11\01\00\f9\02\00\00\fa\02\00\00\e5\02\00\00\fb\02\00\00\fc\02\00\00\fd\02\00\00\fe\02\00\00\ff\02\00\00\00\00\00\00\10\12\01\00\00\03\00\00\01\03\00\00\e5\02\00\00\02\03\00\00\03\03\00\00\04\03\00\00\05\03\00\00\06\03\00\00t\00\00\00r\00\00\00u\00\00\00e\00\00\00\00\00\00\00f\00\00\00a\00\00\00l\00\00\00s\00\00\00e\00\00\00\00\00\00\00%\00\00\00m\00\00\00/\00\00\00%\00\00\00d\00\00\00/\00\00\00%\00\00\00y\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00\00\00\00\00%\00\00\00a\00\00\00 \00\00\00%\00\00\00b\00\00\00 \00\00\00%\00\00\00d\00\00\00 \00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00Y\00\00\00\00\00\00\00%\00\00\00I\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00p\00\00\00\00\00\00\00\00\00\00\00\dc\0e\01\00\07\03\00\00\08\03\00\00\e5\02\00\00NSt3__26locale5facetE\00\00\00\98#\01\00\c4\0e\01\00 \22\01\00\00\00\00\00\5c\0f\01\00\07\03\00\00\09\03\00\00\e5\02\00\00\0a\03\00\00\0b\03\00\00\0c\03\00\00\0d\03\00\00\0e\03\00\00\0f\03\00\00\10\03\00\00\11\03\00\00\12\03\00\00\13\03\00\00\14\03\00\00\15\03\00\00NSt3__25ctypeIwEE\00NSt3__210ctype_baseE\00\00p#\01\00>\0f\01\00\f4#\01\00,\0f\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00T\0f\01\00\02\00\00\00\00\00\00\00\f0\0f\01\00\07\03\00\00\16\03\00\00\e5\02\00\00\17\03\00\00\18\03\00\00\19\03\00\00\1a\03\00\00\1b\03\00\00\1c\03\00\00\1d\03\00\00NSt3__27codecvtIcc11__mbstate_tEE\00NSt3__212codecvt_baseE\00\00\00\00p#\01\00\ce\0f\01\00\f4#\01\00\ac\0f\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\e8\0f\01\00\02\00\00\00\00\00\00\00d\10\01\00\07\03\00\00\1e\03\00\00\e5\02\00\00\1f\03\00\00 \03\00\00!\03\00\00\22\03\00\00#\03\00\00$\03\00\00%\03\00\00NSt3__27codecvtIDsc11__mbstate_tEE\00\00\f4#\01\00@\10\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\e8\0f\01\00\02\00\00\00\00\00\00\00\d8\10\01\00\07\03\00\00&\03\00\00\e5\02\00\00'\03\00\00(\03\00\00)\03\00\00*\03\00\00+\03\00\00,\03\00\00-\03\00\00NSt3__27codecvtIDic11__mbstate_tEE\00\00\f4#\01\00\b4\10\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\e8\0f\01\00\02\00\00\00NSt3__27codecvtIwc11__mbstate_tEE\00\00\00\f4#\01\00\f8\10\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\e8\0f\01\00\02\00\00\00NSt3__26locale5__impE\00\00\00\98#\01\00<\11\01\00\dc\0e\01\00NSt3__27collateIcEE\00\98#\01\00`\11\01\00\dc\0e\01\00NSt3__27collateIwEE\00\98#\01\00\80\11\01\00\dc\0e\01\00NSt3__25ctypeIcEE\00\00\00\f4#\01\00\a0\11\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00T\0f\01\00\02\00\00\00NSt3__28numpunctIcEE\00\00\00\00\98#\01\00\d4\11\01\00\dc\0e\01\00NSt3__28numpunctIwEE\00\00\00\00\98#\01\00\f8\11\01\00\dc\0e\01\00\00\00\00\00t\11\01\00.\03\00\00/\03\00\00\e5\02\00\000\03\00\001\03\00\002\03\00\00\00\00\00\00\94\11\01\003\03\00\004\03\00\00\e5\02\00\005\03\00\006\03\00\007\03\00\00\00\00\00\000\13\01\00\07\03\00\008\03\00\00\e5\02\00\009\03\00\00:\03\00\00;\03\00\00<\03\00\00=\03\00\00>\03\00\00?\03\00\00@\03\00\00A\03\00\00B\03\00\00C\03\00\00NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29__num_getIcEE\00NSt3__214__num_get_baseE\00\00p#\01\00\f6\12\01\00\f4#\01\00\e0\12\01\00\00\00\00\00\01\00\00\00\10\13\01\00\00\00\00\00\f4#\01\00\9c\12\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\18\13\01\00\00\00\00\00\00\00\00\00\04\14\01\00\07\03\00\00D\03\00\00\e5\02\00\00E\03\00\00F\03\00\00G\03\00\00H\03\00\00I\03\00\00J\03\00\00K\03\00\00L\03\00\00M\03\00\00N\03\00\00O\03\00\00NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__29__num_getIwEE\00\00\00\f4#\01\00\d4\13\01\00\00\00\00\00\01\00\00\00\10\13\01\00\00\00\00\00\f4#\01\00\90\13\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\ec\13\01\00\00\00\00\00\00\00\00\00\ec\14\01\00\07\03\00\00P\03\00\00\e5\02\00\00Q\03\00\00R\03\00\00S\03\00\00T\03\00\00U\03\00\00V\03\00\00W\03\00\00X\03\00\00NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29__num_putIcEE\00NSt3__214__num_put_baseE\00\00p#\01\00\b2\14\01\00\f4#\01\00\9c\14\01\00\00\00\00\00\01\00\00\00\cc\14\01\00\00\00\00\00\f4#\01\00X\14\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\d4\14\01\00\00\00\00\00\00\00\00\00\b4\15\01\00\07\03\00\00Y\03\00\00\e5\02\00\00Z\03\00\00[\03\00\00\5c\03\00\00]\03\00\00^\03\00\00_\03\00\00`\03\00\00a\03\00\00NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__29__num_putIwEE\00\00\00\f4#\01\00\84\15\01\00\00\00\00\00\01\00\00\00\cc\14\01\00\00\00\00\00\f4#\01\00@\15\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\9c\15\01\00\00\00\00\00\00\00\00\00\b4\16\01\00b\03\00\00c\03\00\00\e5\02\00\00d\03\00\00e\03\00\00f\03\00\00g\03\00\00h\03\00\00i\03\00\00j\03\00\00\f8\ff\ff\ff\b4\16\01\00k\03\00\00l\03\00\00m\03\00\00n\03\00\00o\03\00\00p\03\00\00q\03\00\00NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29time_baseE\00p#\01\00m\16\01\00NSt3__220__time_get_c_storageIcEE\00\00\00p#\01\00\88\16\01\00\f4#\01\00(\16\01\00\00\00\00\00\03\00\00\00\dc\0e\01\00\02\00\00\00\80\16\01\00\02\00\00\00\ac\16\01\00\00\08\00\00\00\00\00\00\a0\17\01\00r\03\00\00s\03\00\00\e5\02\00\00t\03\00\00u\03\00\00v\03\00\00w\03\00\00x\03\00\00y\03\00\00z\03\00\00\f8\ff\ff\ff\a0\17\01\00{\03\00\00|\03\00\00}\03\00\00~\03\00\00\7f\03\00\00\80\03\00\00\81\03\00\00NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__220__time_get_c_storageIwEE\00\00p#\01\00u\17\01\00\f4#\01\000\17\01\00\00\00\00\00\03\00\00\00\dc\0e\01\00\02\00\00\00\80\16\01\00\02\00\00\00\98\17\01\00\00\08\00\00\00\00\00\00D\18\01\00\82\03\00\00\83\03\00\00\e5\02\00\00\84\03\00\00NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__210__time_putE\00\00\00p#\01\00%\18\01\00\f4#\01\00\e0\17\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00<\18\01\00\00\08\00\00\00\00\00\00\c4\18\01\00\85\03\00\00\86\03\00\00\e5\02\00\00\87\03\00\00NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00\00\00\00\f4#\01\00|\18\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00<\18\01\00\00\08\00\00\00\00\00\00X\19\01\00\07\03\00\00\88\03\00\00\e5\02\00\00\89\03\00\00\8a\03\00\00\8b\03\00\00\8c\03\00\00\8d\03\00\00\8e\03\00\00\8f\03\00\00\90\03\00\00\91\03\00\00NSt3__210moneypunctIcLb0EEE\00NSt3__210money_baseE\00\00\00\00p#\01\008\19\01\00\f4#\01\00\1c\19\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00P\19\01\00\02\00\00\00\00\00\00\00\cc\19\01\00\07\03\00\00\92\03\00\00\e5\02\00\00\93\03\00\00\94\03\00\00\95\03\00\00\96\03\00\00\97\03\00\00\98\03\00\00\99\03\00\00\9a\03\00\00\9b\03\00\00NSt3__210moneypunctIcLb1EEE\00\f4#\01\00\b0\19\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00P\19\01\00\02\00\00\00\00\00\00\00@\1a\01\00\07\03\00\00\9c\03\00\00\e5\02\00\00\9d\03\00\00\9e\03\00\00\9f\03\00\00\a0\03\00\00\a1\03\00\00\a2\03\00\00\a3\03\00\00\a4\03\00\00\a5\03\00\00NSt3__210moneypunctIwLb0EEE\00\f4#\01\00$\1a\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00P\19\01\00\02\00\00\00\00\00\00\00\b4\1a\01\00\07\03\00\00\a6\03\00\00\e5\02\00\00\a7\03\00\00\a8\03\00\00\a9\03\00\00\aa\03\00\00\ab\03\00\00\ac\03\00\00\ad\03\00\00\ae\03\00\00\af\03\00\00NSt3__210moneypunctIwLb1EEE\00\f4#\01\00\98\1a\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00P\19\01\00\02\00\00\00\00\00\00\00X\1b\01\00\07\03\00\00\b0\03\00\00\e5\02\00\00\b1\03\00\00\b2\03\00\00NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__211__money_getIcEE\00\00p#\01\006\1b\01\00\f4#\01\00\f0\1a\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00P\1b\01\00\00\00\00\00\00\00\00\00\fc\1b\01\00\07\03\00\00\b3\03\00\00\e5\02\00\00\b4\03\00\00\b5\03\00\00NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__211__money_getIwEE\00\00p#\01\00\da\1b\01\00\f4#\01\00\94\1b\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\f4\1b\01\00\00\00\00\00\00\00\00\00\a0\1c\01\00\07\03\00\00\b6\03\00\00\e5\02\00\00\b7\03\00\00\b8\03\00\00NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__211__money_putIcEE\00\00p#\01\00~\1c\01\00\f4#\01\008\1c\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\98\1c\01\00\00\00\00\00\00\00\00\00D\1d\01\00\07\03\00\00\b9\03\00\00\e5\02\00\00\ba\03\00\00\bb\03\00\00NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__211__money_putIwEE\00\00p#\01\00\22\1d\01\00\f4#\01\00\dc\1c\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00<\1d\01\00\00\00\00\00\00\00\00\00\bc\1d\01\00\07\03\00\00\bc\03\00\00\e5\02\00\00\bd\03\00\00\be\03\00\00\bf\03\00\00NSt3__28messagesIcEE\00NSt3__213messages_baseE\00\00\00\00p#\01\00\99\1d\01\00\f4#\01\00\84\1d\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\b4\1d\01\00\02\00\00\00\00\00\00\00\14\1e\01\00\07\03\00\00\c0\03\00\00\e5\02\00\00\c1\03\00\00\c2\03\00\00\c3\03\00\00NSt3__28messagesIwEE\00\00\00\00\f4#\01\00\fc\1d\01\00\00\00\00\00\02\00\00\00\dc\0e\01\00\02\00\00\00\b4\1d\01\00\02\00\00\00S\00\00\00u\00\00\00n\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00M\00\00\00o\00\00\00n\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00T\00\00\00u\00\00\00e\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00W\00\00\00e\00\00\00d\00\00\00n\00\00\00e\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00T\00\00\00h\00\00\00u\00\00\00r\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00F\00\00\00r\00\00\00i\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00S\00\00\00a\00\00\00t\00\00\00u\00\00\00r\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00S\00\00\00u\00\00\00n\00\00\00\00\00\00\00M\00\00\00o\00\00\00n\00\00\00\00\00\00\00T\00\00\00u\00\00\00e\00\00\00\00\00\00\00W\00\00\00e\00\00\00d\00\00\00\00\00\00\00T\00\00\00h\00\00\00u\00\00\00\00\00\00\00F\00\00\00r\00\00\00i\00\00\00\00\00\00\00S\00\00\00a\00\00\00t\00\00\00\00\00\00\00J\00\00\00a\00\00\00n\00\00\00u\00\00\00a\00\00\00r\00\00\00y\00\00\00\00\00\00\00F\00\00\00e\00\00\00b\00\00\00r\00\00\00u\00\00\00a\00\00\00r\00\00\00y\00\00\00\00\00\00\00M\00\00\00a\00\00\00r\00\00\00c\00\00\00h\00\00\00\00\00\00\00A\00\00\00p\00\00\00r\00\00\00i\00\00\00l\00\00\00\00\00\00\00M\00\00\00a\00\00\00y\00\00\00\00\00\00\00J\00\00\00u\00\00\00n\00\00\00e\00\00\00\00\00\00\00J\00\00\00u\00\00\00l\00\00\00y\00\00\00\00\00\00\00A\00\00\00u\00\00\00g\00\00\00u\00\00\00s\00\00\00t\00\00\00\00\00\00\00S\00\00\00e\00\00\00p\00\00\00t\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00O\00\00\00c\00\00\00t\00\00\00o\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00N\00\00\00o\00\00\00v\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00D\00\00\00e\00\00\00c\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00J\00\00\00a\00\00\00n\00\00\00\00\00\00\00F\00\00\00e\00\00\00b\00\00\00\00\00\00\00M\00\00\00a\00\00\00r\00\00\00\00\00\00\00A\00\00\00p\00\00\00r\00\00\00\00\00\00\00J\00\00\00u\00\00\00n\00\00\00\00\00\00\00J\00\00\00u\00\00\00l\00\00\00\00\00\00\00A\00\00\00u\00\00\00g\00\00\00\00\00\00\00S\00\00\00e\00\00\00p\00\00\00\00\00\00\00O\00\00\00c\00\00\00t\00\00\00\00\00\00\00N\00\00\00o\00\00\00v\00\00\00\00\00\00\00D\00\00\00e\00\00\00c\00\00\00\00\00\00\00A\00\00\00M\00\00\00\00\00\00\00P\00\00\00M\00\00\00\00\00\00\00\00\00\00\00\ac\16\01\00k\03\00\00l\03\00\00m\03\00\00n\03\00\00o\03\00\00p\03\00\00q\03\00\00\00\00\00\00\98\17\01\00{\03\00\00|\03\00\00}\03\00\00~\03\00\00\7f\03\00\00\80\03\00\00\81\03\00\00\00\00\00\00 \22\01\00\c4\03\00\00\c5\03\00\00\c6\03\00\00NSt3__214__shared_countE\00\00\00\00p#\01\00\04\22\01\00\00\00\00\00T\22\01\00\d3\03\00\00\d4\03\00\00\17\02\00\00NSt3__212system_errorE\00\00\98#\01\00<\22\01\00d%\01\00NSt3__214error_categoryE\00\00\00\00p#\01\00`\22\01\00NSt3__212__do_messageE\00\00\98#\01\00\84\22\01\00|\22\01\00N10__cxxabiv116__shim_type_infoE\00\00\00\00\98#\01\00\a8\22\01\00\94%\01\00N10__cxxabiv117__class_type_infoE\00\00\00\98#\01\00\d8\22\01\00\cc\22\01\00N10__cxxabiv117__pbase_type_infoE\00\00\00\98#\01\00\08#\01\00\cc\22\01\00N10__cxxabiv119__pointer_type_infoE\00\98#\01\008#\01\00,#\01\00\00\00\00\00\fc\22\01\00\d7\03\00\00\d8\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\dc\03\00\00\dd\03\00\00\de\03\00\00\00\00\00\00\e0#\01\00\d7\03\00\00\df\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\e0\03\00\00\e1\03\00\00\e2\03\00\00N10__cxxabiv120__si_class_type_infoE\00\00\00\00\98#\01\00\b8#\01\00\fc\22\01\00\00\00\00\00<$\01\00\d7\03\00\00\e3\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\e4\03\00\00\e5\03\00\00\e6\03\00\00N10__cxxabiv121__vmi_class_type_infoE\00\00\00\98#\01\00\14$\01\00\fc\22\01\00\00\00\00\00\98$\01\00\cb\03\00\00\e7\03\00\00\e8\03\00\00\00\00\00\00\80$\01\00\cb\03\00\00\e9\03\00\00\ea\03\00\00St9exception\00\00\00\00p#\01\00p$\01\00St9bad_alloc\00\00\00\00\98#\01\00\88$\01\00\80$\01\00\00\00\00\00\dc$\01\00\81\00\00\00\eb\03\00\00\ec\03\00\00\00\00\00\00d%\01\00y\02\00\00\ed\03\00\00\17\02\00\00St11logic_error\00\98#\01\00\cc$\01\00\80$\01\00\00\00\00\00\10%\01\00\81\00\00\00\ee\03\00\00\ec\03\00\00St12length_error\00\00\00\00\98#\01\00\fc$\01\00\dc$\01\00\00\00\00\00D%\01\00\81\00\00\00\ef\03\00\00\ec\03\00\00St12out_of_range\00\00\00\00\98#\01\000%\01\00\dc$\01\00St13runtime_error\00\00\00\98#\01\00P%\01\00\80$\01\00\00\00\00\00\a8%\01\00\d9\01\00\00\f0\03\00\00\f1\03\00\00St9type_info\00\00\00\00p#\01\00\84%\01\00St8bad_cast\00\98#\01\00\9c%\01\00\80$\01\00") │ │ - (data $.data (i32.const 75200) "\a3\01\00\00\a4\01\00\00\a5\01\00\00\a6\01\00\00\14\00\00\00\a7\01\00\00\a8\01\00\00\a9\01\00\00\aa\01\00\00\ab\01\00\00\a3\01\00\00\ac\01\00\00\a5\01\00\00\a6\01\00\00\14\00\00\00\a7\01\00\00\a8\01\00\00\a9\01\00\00\aa\01\00\00\ab\01\00\00\01\00\00\00\08\00\00\00\c0%\01\00\e8%\01\00\af\01\00\00\b0\01\00\00\b1\01\00\00\00\00\00\00\b2\01\00\00\b3\01\00\00\b4\01\00\00\b5\01\00\00\b6\01\00\00\b7\01\00\00\b8\01\00\00\b9\01\00\00\ba\01\00\00\1f\00\00\00d&\01\00\03\00\00\00\00\00\00\00-\f4QX\cf\8c\b1\c0F\f6\b5\cb)1\03\c7\04[p0\b4]\fd x\7f\8b\9a\d8Y)PhH\89\ab\a7V\03l\ff\b7\cd\88?\d4w\b4+\a5\a3p\f1\ba\e4\a8\fcA\83\fd\d9o\e1\8az/-t\96\07\1f\0d\09^\03v,p\f7@\a5,\a7oWA\a8\aat\df\a0Xd\03J\c7\c4{ let img_id = UTF8ToString(img_id_ptr); let params = { \22angle_degrees\22: angle_degrees, \22flip_y\22: !!flip_y, \22flip_x\22: !!flip_x, \22brightness_percent\22: brightness_percent, \22invert\22: !!invert, }; draw_graphic(gfx, img_id, y, x, width, height, params); }\00(const char *text_ptr, size_t text_len, const char * colour_ptr, size_t colour_len, int y, int x, int size, int align)<::>{ let text_str = UTF8ToString(text_ptr, text_len); let colour_str = UTF8ToString(colour_ptr, colour_len); draw_text(gfx, text_str, colour_str, y, x, size, align); }\00(const char *colour_ptr, int line_size, int y1, int x1, int y2, int x2)<::>{ let colour = UTF8ToString(colour_ptr); draw_line(gfx, colour, line_size, y1, x1, y2, x2); }\00(const char *fill_colour_ptr, size_t fill_colour_len, int y_start, int x_start, int y_end, int x_end)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); draw_rect(gfx, fill_colour, y_start, x_start, y_end, x_end); }\00(const char *fill_colour_ptr, size_t fill_colour_len, int y1, int x1, int y2, int x2, int y3, int x3)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); draw_triangle(gfx, fill_colour, y1, x1, y2, x2, y3, x3); }\00(const char *fill_colour_ptr, size_t fill_colour_len, const char *outline_colour_ptr, size_t outline_colour_len, int y, int x, int radius, int outline_width)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); let outline_colour = UTF8ToString(outline_colour_ptr, outline_colour_len); draw_circle(gfx, fill_colour, outline_colour, y, x, radius, outline_width); }\00()<::>{ draw_clear(gfx); }\00()<::>{ }\00(const char *dst_ptr, size_t dst_len, const char *msg_ptr, size_t msg_len)<::>{ let dst = UTF8ToString(dst_ptr, dst_len); let msg = new Array(msg_len); for (let i=0; i{ let btn_id_str = UTF8ToString(btn_id_ptr); let btn_text_str = UTF8ToString(btn_text_ptr); create_btn(gfx, btn_id_str, btn_text_str, weight); }\00(const char *btn_id_ptr, _Bool enabled)<::>{ let btn_id_str = UTF8ToString(btn_id_ptr); set_btn_enabled(gfx, btn_id_str, enabled); }\00(const char *btn_id_ptr, _Bool visible)<::>{ let btn_id_str = UTF8ToString(btn_id_ptr); set_btn_visible(gfx, btn_id_str, visible); }\00(const char *popup_id_ptr, size_t popup_id_str_len, const char *info_json_ptr, size_t info_json_str_len)<::>{ let popup_id = UTF8ToString(popup_id_ptr, popup_id_str_len); let info_json_str = UTF8ToString(info_json_ptr, info_json_str_len); console.debug(\22popup info_json_str: \22, info_json_str); let info = JSON.parse(info_json_str); console.log(\22Showping popup\22, info); show_popup(gfx, popup_id, info); }\00(const char *option_id_ptr, const char *option_info, size_t option_info_len)<::>{ console.log(\22js_add_game_option_json_str\22); let option_id_str = UTF8ToString(option_id_ptr); let option_info_json_str = UTF8ToString(option_info, option_info_len); let option_info_json = JSON.parse(option_info_json_str); console.log(\22add_game_option\22, option_id_str, option_info_json); add_game_option(gfx, option_id_str, option_info_json); }\00(const char *title, size_t title_len, const char *msg, size_t msg_len)<::>{ { let title_str = UTF8ToString(title, title_len); let msg_str = UTF8ToString(msg, msg_len); prompt_string(gfx, title_str, msg_str); } }\00()<::>{ hide_popup(gfx); }\00(const char *msg_ptr, size_t msg_len)<::>{ let msg = UTF8ToString(msg_ptr, msg_len); set_status_msg(gfx, msg); }\00(const char *msg_ptr, size_t msg_len)<::>{ let msg = UTF8ToString(msg_ptr, msg_len); set_status_err(gfx, msg); }\00(int timer_period_ms)<::>{ return update_timer_period_ms(gfx, timer_period_ms); }\00(int handle)<::>{ delete_timer(gfx, handle); }\00(const char *evt_id_ptr, size_t evt_id_len)<::>{ let evt_id = UTF8ToString(evt_id_ptr, evt_id_len); enable_event(evt_id); }\00(const char *evt_id_ptr, size_t evt_id_len)<::>{ let evt_id = UTF8ToString(evt_id_ptr, evt_id_len); disable_event(evt_id); }\00()<::>{ return alexgames_get_time_ms(); }\00(void *L, const char *key_ptr, const uint8_t *val_ptr, size_t val_len)<::>{ let key_str = UTF8ToString(key_ptr); if (window.localStorage == null) { console.error(\22Can not store key \22, key_str, \22, localStorage is null\22); return; } let val_js_str = \22\22; for (let i=0; i{ let key_str = UTF8ToString(key_ptr); if (window.localStorage == null) { console.error(\22window.localStorage == null, can not load stored_data key \22, key_str); return -1; } let val = window.localStorage[key_str]; let rc; if (val === undefined) { rc = -1; } else { if (buff_out == 0) { return 1; } for (let i=0; i= buff_max) { console.error(\22tried to read stored data > buff_max\22, val.length, buff_max); break; } setValue(buff_out + i, val.charCodeAt(i), 'i8'); rc = i+1; } } return rc; }\00(const char *canvas_id_ptr, int y, int x, int width, int height)<::>{ let canvas_id_str = UTF8ToString(canvas_id_ptr); draw_extra_canvas(gfx, canvas_id_str, y, x, width, height); }\00(const char *canvas_id)<::>{ let canvas_id_str = UTF8ToString(canvas_id); new_extra_canvas(gfx, canvas_id_str); }\00(const char *canvas_id)<::>{ let canvas_id_str = UTF8ToString(canvas_id); set_active_canvas(gfx, canvas_id_str); }\00(void)<::>{ delete_extra_canvases(); }\00(char *colour_str_out, size_t max_colour_str_out_len)<::>{ let colour_pref_str_js = get_user_colour_pref(); let i; for (i=0; i= max_colour_str_out_len) { console.error(\22User colour pref str buff is not long enough\22); return -1; } setValue(colour_str_out + i, colour_pref_str_js.charCodeAt(i), 'i8'); } setValue(colour_str_out + i, 0, 'i8'); return colour_pref_str_js.length; }\00(const char *feature_id, size_t feature_id_len)<::>{ return false; }\00(char *time_str, size_t max_time_str_len)<::>{ let time_str_js = get_time_of_day(); for (let i=0; i= max_time_str_len) { console.error(\22Time string is not long enough\22); return -1; } setValue(time_str + i, time_str_js.charCodeAt(i), 'i8'); } return time_str_js.length; }\00(const void *L, const char *game_id)<::>{ let game_id_str = UTF8ToString(game_id); set_game_handle(L, game_id_str); }\00(const void *L, char *game_id_out, size_t game_id_out_len_max)<::>{ console.log(\22js_get_game_id called, returning gfx.game_id: \22, gfx.game_id); write_str(game_id_out, game_id_out_len_max, gfx.game_id); }\00(void)<::>{ console.log(\22destroy_all called\22); destroy_all(); }\00(const char *language_ptr)<::>{ console.log(\22[dict] emscripten_c_dict_api: em_js_dict_init called. Using C dictionary after words file download complete.\5cn\22); if (em_js_dict_init.call_counts === undefined) { em_js_dict_init.call_counts = 0; } em_js_dict_init.call_counts += 1; if (em_js_dict_init.call_counts > 2) { console.error(\22em_js_dict_init.call_counts is\22, em_js_dict_init.call_counts); return; } js_c_dict_init(); }\00") │ │ - (data $em_asm (i32.const 83427) "{ let s = UTF8ToString($0, $1); let freq = Number(s); return freq; }\00")) │ │ + (data $.rodata (i32.const 1024) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00]}\00, \22err\22: \22unhandled\22}\00{\00interval is empty\00infinity\00getregistry\00invalid value in central directory\00insufficient memory\00not enough memory\00February\00January\00monetary\00need dictionary\00binary\00attempt to yield across a C-call boundary\00July\00is_ready\00call_func_get_bytearray\00yday\00wday\00Thursday\00Tuesday\00Wednesday\00Saturday\00Sunday\00Monday\00Friday\00get_time_of_day\00May\00flip_y\00aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%||EcECExEXEyEYOdOeOHOIOmOMOSOuOUOVOwOWOy\00%m/%d/%y\000x%llx\00fluid_mix\00pattern too complex\00__newindex\00__index\00integer index\00invalid upvalue index\00get_word_matching_params_idx\00max\00flip_x\00state_%04x_%04x\00-+ 0X0x\00-0X+0X 0X-0x+0x 0x\00__pow\00integer overflow\00C stack overflow\00string length overflow\00table overflow\00unsigned overflow\00select_move_preview\00Nov\00getenv\00__idiv\00__div\00wu\00flnSrtu\00sudoku\00Thu\00invalid detail error %u\00words-en.txt\00lua_draw_text\00next\00handle_key_evt\00handle_game_option_evt\00handle_touch_evt\00handle_mouse_evt\00enable_evt\00_IO_output\00handle_user_string_input\00_IO_input\00unsupported locale for standard input\00stdout\00thrust\00August\00const\00multiple to-be-closed variables in local list\00draw_graphics_test\00timer_test\00touch_test\00card_angle_test\00card_test\00isdst\00std::bad_cast\00sqrt\00sort\00data string too short\00invert\00assert\00insert\00touchstart\00restart\00y_start\00x_start\00%s.XXXXXX.part\00__bnot\00handle_key_evt(evt_id=\22%s\22, code=\22%s\22) returned nil! (top was %d) Should return true or false to indicate if key was handled or not\00count\00Slnt\00print\00codepoint\00%s: could not convert %s to Lua number or int\00adjust_saved_state_offset called with invalid move_id_offset param, expected int\00adjust_saved_state_offset called with invalid session_id param, expected int\00Zip archive inconsistent\00absent\00Invalid argument\00invalid UTF-8 in comment\00UTF-8 comment is ASCII and doesn't match comment\00brightness_percent\00constant\00ult\00__lt\00exit\00init\00setcstacklimit\00height\00rawset\00unset\00adjust_saved_state_offset\00has_saved_state_offset\00invalid literal/lengths set\00invalid code lengths set\00unknown header flags set\00invalid distances set\00rawget\00init_lua_alex_dict\00alexgames.dict\00central directory count of entries is incorrect\00archive comment length incorrect\00EOCD64 magic incorrect\00lua_draw_rect\00collect\00select\00Oct\00bt\00float\00variable-length format\00invalid format\00namewhat\00invalid bit length repeat\00__concat\00Sat\00*t\00status\00radius\00File already exists\00too many arguments\00wrong number of arguments\00constants\00too many results\00chess\00ipairs\00__pairs\00get_words_made_from_letters\00crossword_letters\00function or expression needs too many registers\00checkers\00specifier '%%q' cannot have modifiers\00searchers\00nups\00poker_chips\00labels/gotos\00string contains zeros\00acos\00options\00too many nested functions\00items\00nparams\00lua_set_timer_update_ms\00get_time_ms\00update_period_ms\00too many length or distance symbols\00invalid stored block lengths\00too many upvalues\00attempt to compare two %s values\00delete_extra_canvases\00too many captures\00core and library have incompatible numeric types\00activelines\00chunk has too many lines\00add_word_to_frames\00alexgames\00local variables\00angle_degrees\00opcodes\00time out-of-bounds\00final position out of bounds\00initial position out of bounds\00garbage at end of extra fields\00abs\00set_active_canvas\00new_extra_canvas\00lua_draw_extra_canvas\0031s\00%.*s\00%s%s%s\00attempt to %s a %s value%s\00luaopen_%s\00@%s\00>%s\00module '%s' not found:%s\00%s/%s\00%s expected, got %s\00%s near %s\00too many %s (limit is %d) in %s\00attempt to compare %s with %s\00%s is type %s, expected %s\00cannot %s %s: %s\00%s:%d: %s\00entry %d: %s\00error loading module '%s' from file '%s':\0a\09%s\00hour\00cur\00popup_info_to_json_str\00option_info_to_json_str\00stderr\00set_status_err\00handle_lua_err\00Apr\00__bxor\00items in a constructor\00vector\00for iterator\00update_dict called, seeding random number generator\00unspecified iostream_category error\00syntax error\00money_get error\00buffer error\00No error\00stream error\00Tell error\00Internal error\00Seek error\00Write error\00file error\00Read error\00Zlib error\00data error\00CRC error\00floor\00for\00__bor\00Error getting root_dir\00Failed to get root dir\00__shr\00lower\00invalid long string delimiter\00upper\00minesweeper\00endless_runner\00lua_delete_timer\00lua_err_handler\00lua_pop_error_handler\00maxinteger\00tointeger\00mininteger\00object length is not an integer\00field '%s' is not an integer\00%s:%d: expected dropdown \22id\22 field to be integer\00lua_Integer\00%d-byte integer does not fit into Lua Integer\00ntransfer\00ftransfer\00read saved state into buffer\00freeing saved state buffer\00crossword_builder\00variable size fields overflow header\00October\00tonumber\00%s: expected param to be type number\00%s:%d value arg elem %d is type %d (%s), expected number\00malformed number\00lua_Number\00November\00September\00December\00char\00year\00draw_clear\00ios_base::clear\00Mar\00min_freq\00dict_get_word_freq\00__eq\00exp\00lua_show_popup\00hide_popup\00stop\00'__newindex' chain too long; possible loop\00'__index' chain too long; possible loop\00dump\00Not allowed in torrentzip\00step\00rep\00Sep\00wrap\00Pp\00%I:%M:%S %p\00%s: %p\00proto\00goto\00/usr/local/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/loadall.so;./?.so\00attempt to divide by zero\00'for' step is zero\00no\00io\00go\00getinfo\00do\00Sun\00Jun\00create_btn\00return\00charpattern\00missing '[' after '%%f' in pattern\00warn\00backgammon\00lua_add_game_option\00invalid option\00std::exception\00terminate_handler unexpectedly threw an exception\00Instruction\00main function\00unable to dump given function\00cannot use '...' outside a vararg function\00number%s has no integer representation\00number has no integer representation\00[dict] get_game_dict_api returning default C implementation\00date result cannot be represented in this installation\00time result cannot be represented in this installation\00dynamic libraries not enabled; check your Lua installation\00incompatible version\00Mon\00perform bitwise operation on\00perform arithmetic on\00asin\00upvaluejoin\00min\00=stdin\00main\00popen\00reopen\00rawlen\00__len\00then\00atan\00nan\00boolean\00Jan\00\5cn\00value has no literal form\00swarm\00/dev/urandom\00__unm\00card_sim\00central directory overlaps EOCD, or there is space between them\00EOCD64 overlaps EOCD, or there is space between them\00iostream\00setstepmul\00__mul\00Jul\00unexpected symbol\00full\00xpcall\00istailcall\00__call\00tail call\00destroy_all\00until\00April\00%s:%d: expected dropdown \22id\22 field to be number, not nil\00table index is nil\00%s: param %s is nil\00ceil\00no detail\00state_db_sess_tail\00__shl\00touchcancel\00label\00rawequal\00incremental\00hospital\00generational\00normal\00setlocal\00getlocal\00global\00Sl\00dark\00sethook\00gethook\00external hook\00not a binary chunk\00main chunk\00corrupted chunk\00truncated chunk\00seek\00clock\00invalid code -- missing end-of-block\00incorrect header check\00incorrect length check\00incorrect data check\00too many results to unpack\00traceback\00invalid distance too far back\00break\00handle_mouse_evt history browse ui\00Fri\00[dict] get_game_dict_api returning dict pointer set by set_game_dict_api\00month\00max_length\00min_length\00file length in header doesn't match actual file length\00wrong EOCD length\00outline_width\00searchpath\00cpath\00math\00flush\00draw_refresh\00float format mismatch\00integer format mismatch\00version mismatch\00%s size mismatch\00header crc mismatch\00gmatch\00local and central headers do not match\00local header and data descriptor do not match\00EOCD64 and EOCD64 locator do not match\00EOCD64 and EOCD do not match\00March\00debug\00Aug\00set_status_msg\00isvararg\00log\00lexical element too long\00control structure too long\00string slice too long\00spider_swing\00invalid order function for sorting\00error reading saved state, aborting\00__tostring\00prompt_string\00basic_string\00api->get_game_id() returned empty string\00binary string\00invalid use of '%c' in replacement string\00bad format for constant string\00%s: returned type %s, should be a table or string\00initial position out of string\00arg %d is type %s (%d), expected string\00unfinished string\00error object is not a string\00reader function must return a string\00'__tostring' must return a string\00'package.%s' must be a string\00isrunning\00error in error handling\00config\00array too big\00memory allocation error: block too big\00deg\00%.14g\00setvbuf\00get length of\00inf\00self\00elseif\00off\00get_user_colour_pref\00modf\00%.0Lf\00%Lf\00version mismatch: app. needs %f, Lua core provides %f\00packsize\00line_size\00invalid window size\00string length does not fit in given size\00string longer than given size\00allocator::allocate(size_t n) 'n' exceeds maximum supported size\00touchmove\00handle_mousemove\00remove\00too many elements to move\00Read-only archive\00Possibly truncated or corrupted zip archive\00Not a zip archive\00true\00blue\00setuservalue\00getuservalue\00setupvalue\00getupvalue\00no value\00initial value\00variable '%s' got a non-closable value\00Tue\00initial position is a continuation byte\00execute\00write\00get_init_state\00get_state\00save_state\00concatenate\00collate\00create\00update\00history_browse\00setpause\00Resource still in use\00reverse\00__close\00else\00false\00invalid pattern capture\00unfinished capture\00Malloc failure\00require\00solitaire\00ctype\00item_type\00invalid block type\00June\00cannot close a %s coroutine\00cannot resume non-suspended coroutine\00cannot resume dead coroutine\00attempt to yield from outside a coroutine\00currentline\00lua_draw_line\00too many arguments to resume\00too many results to resume\00difftime\00add_word_to_frame\00create_frame\00tmpname\00rename\00invalid UTF-8 in filename\00UTF-8 filename is ASCII and doesn't match filename\00unable to generate a unique filename\00__name\00NUL byte in file name\00destroy_game\00start_game\00load_game\00init_lua_game\00title\00while\00tmpfile\00dofile\00loadfile\00build_word_dict_from_file\00Failure to create temporary file\00Can't open file\00No such file\00Premature end of file\00Can't remove file\00cannot close standard file\00attempt to use a closed file\00compressed and uncompressed sizes don't match for stored file\00lua_draw_triangle\00lua_draw_circle\00set_btn_visible\00setmetatable\00getmetatable\00__metatable\00cannot change a protected metatable\00string/function/table\00nil or table\00field '%s' missing in date table\00%s:%d: expected arg %d to be table\00lua_dict_get_random_word: params is not nil or a table\00draw_graphic: params is not nil or a table\00'package.searchers' must be a table\00isyieldable\00setlocale\00__le\00snake\00huge\00format result too large\00buffer too large\00resulting string too large\00UTF-8 value too large\00decimal escape too large\00not an integer in proper range\00index out of range\00level out of range\00value out of range\00base out of range\00send_message\00package\00collectgarbage\00minesweeper_life\00__mode\00invalid mode\00invalid literal/length code\00invalid distance code\00invalid UTF-8 code\00source\00invalid escape sequence\00Ee\00lua_dict_get_random_word\00dict_is_valid_word\00fmod\00__mod\00metamethod\00unknown compression method\00destination wrap around\00field '%s' is out-of-bound\00word_mastermind\00find\00touchend\00y_end\00x_end\00stream end\00Aborting saved state read, reached the end\00__band\00%lld\00yield\00invalid WinZip AES extra field\00invalid Zip64 extra field\00extra field length is invalid\00central header invalid\00central directory length invalid\00Compressed data invalid\00upvalueid\00game_%s_last_sess_id\00get_new_session_id\00get_last_session_id\00save_state: invalid session_id\00state_%04x_last_move_id\00state_%04x_game_id\00handle_msg_received\00is_feature_supported\00Multi-disk zip archives not supported\00Operation not supported\00locale not supported\00Encryption method not supported\00Compression method not supported\00'popen' not supported\00Entry has been deleted\00hexadecimal digit expected\00function arguments expected\00%s expected\00Lua function expected\00value expected\00'=' or 'in' expected\00 or '...' expected\00selected\00state_%04x_last_updated\00file is already closed\00default %s file is closed\00Containing zip archive was closed\00terminate_handler unexpectedly returned\00lastlinedefined\00Operation cancelled\00[init] emscripten_api.c: init_game_api called\00[init] game_api.c: alex_init_game called\00Closing zip archive failed\00Renaming temporary file failed\00Game \22%.*s\22 not handled\00set_btn_enabled\00handle_user_clicked\00handle_popup_btn_clicked\00handle_btn_clicked\00handle_wheel_changed\00Entry has been changed\00randomseed\00suspended\00No password provided\00Wrong password provided\00loaded\00Wed\00__add\00rad\00upload\00preload\00thread\00state_db_sess_head\00dead\00state_preview_%03d\00\5c%03d\00%3d/%3d\00\5c%d\00invalid capture index %%%d\00%s:%d: expected \22item_type\22 field to be number, not %d\00%s:%d: expected \22id\22 field to be number, not %d\00%s:%d: expected \22text\22 field to be string, not %d\00%s:%d: expected \22label\22 field to be string, not %d\00%s:%d: expected \22msg\22 field to be string, not %d\00%s:%d: expected \22title\22 field to be string, not %d\00%s:%d: expected \22options\22 field to be table, not %d\00%s:%d: expected \22items\22 field to be table, not %d\00%s: returned %d bytes of state, max buff is %d\00%s: expected stack idx %d to contain field %s, but top was %d\00Unknown error %d\00%s: game returned %b bytes of state, larger than buff %d\00%s:%d: expected dropdown \22id\22 field to be number, not type %d\00%s:%d: expected \22type\22 field to be string, not type %d\00%s: Unhandled popup item type %d\00break outside loop at line %d\00function at line %d\00no visible label '%s' for at line %d\00label '%s' already defined on line %d\00api->adjust_saved_state_offset returned %d\00short_src\00std::bad_alloc\00lua_get_int_or_float_func\00numeric\00lua_draw_graphic\00__gc\00sec\00Dec\00#cccccc\00/home/vagrant/build/net.alexbarry.alexgames/src/dictionary/c_dictionary.c\00/home/vagrant/build/net.alexbarry.alexgames/src/lua_api/lua_api.c\00%c\00wb\00gsub\00__sub\00rb\00crib\00loadlib\00Feb\00read invalid number of bytes from db\00r+b\00rwa\00preload/games/test/draw_graphics_test.lua\00preload/games/test/timer_test.lua\00preload/games/touch_test/touch_test.lua\00preload/games/test/card_angle_test.lua\00preload//libs/cards/card_test.lua\00/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua\00preload/games/fluid_mix/fluid_mix_main.lua\00preload/games/wu/wu_main.lua\00preload/games/sudoku/sudoku_main.lua\00preload/games/thrust/thrust_main.lua\00preload/games/chess/chess_main.lua\00preload/games/crossword_letters/crossword_letters_main.lua\00preload/games/checkers/checkers_main.lua\00preload/games/poker_chips/poker_chips_main.lua\00preload/games/31s/31s_main.lua\00preload/games/minesweeper/minesweeper_main.lua\00preload/games/endless_runner/endless_runner_main.lua\00preload/games/crossword_builder/crossword_builder_main.lua\00preload/games/go/go_main.lua\00preload/games/backgammon/backgammon_main.lua\00preload/games/swarm/swarm_main.lua\00preload/games/hospital/hospital_main.lua\00preload/games/spider_swing/spider_swing_main.lua\00preload/games/blue/blue_main.lua\00preload/games/solitaire/solitaire_main.lua\00preload/games/snake/snake_main.lua\00preload/games/minesweeper_life/minesweeper_life_main.lua\00preload/games/life/life_main.lua\00preload/games/bound/bound_main.lua\00preload/games/word_mastermind/word_mastermind_main.lua\00preload/games/card_sim/card_generic_main.lua\00preload/games/crib/crib_main.lua\00/upload/game1/game.lua\00%s;%s/?.lua;%s/?.lua;%s/?.lua;%s/?.lua\00\1bLua\00light userdata\00lua_store_data\00read_stored_data\00Unexpected length of data\00garbage at end of compressed data\00#aaaaaaaa\00#aaaaaa\00%a\00_\00integral size (%d) out of limits [1,%d]\00=[C]\00no field package.preload['%s']\00\22]\00,\22options\22:[\00\22, \22items\22: [\00_HOOKKEY\00%a %b %d %H:%M:%S %Y\00xX\00POSIX\00_ENV\00LUA_NOENV\00%U\00GMT\00TEXT_ALIGN_RIGHT\00TEXT_ALIGN_LEFT\00_CLIBS\00%H:%M:%S\00TEXT_ALIGN_CENTER\00pP\00MOUSE_EVT_UP\00MOUSE_EVT_ALT_UP\00MOUSE_EVT_ALT2_UP\00.xXnN\00table index is NaN\00MOUSE_EVT_DOWN\00MOUSE_EVT_ALT_DOWN\00MOUSE_EVT_ALT2_DOWN\00POPUP_ITEM_TYPE_DROPDOWN\00OPTION_TYPE_BTN\00POPUP_ITEM_TYPE_BTN\00_VERSION\00NAN\00PM\00AM\00api->adjust_saved_state_offset is NULL\00api->has_saved_state_offset is NULL\00WARNING: popup_state is NULL\00frame != NULL\00dict_handle != NULL\00word_info.word != NULL\00LC_ALL\00%I\00LUA_PATH\00LUA_CPATH\00_G\00POPUP_ITEM_TYPE_MSG\00LANG\00INF\00eE\00MOUSE_EVT_LEAVE\00TEXT_ALIGN_CENTRE\00OPTION_TYPE_TOGGLE\00word_metadata == WORD_METADATA_VULGAR_OR_WEIRD\00_LOADED\00_PRELOAD\00C\00%s: debug.traceback is not a function?\00%s: arg 1 is not a string?\00%s: debug is not a table?\00why the hell is the length not an integer???\00=?\00\00\00\00\00\00function <%s:%d>\00>>\00~=\00, tail=\00, head=\00>=\00==\00<=\00<<\00;;\00stack traceback:\00:preload:\00::\00\22value\22:\00{\22type\22:\00\22,\22id\22:\00-1e9999\00-0123456789\00%s: byte %d is %d, expected uint8\00utf8\00#aaaaaa88\00#33333388\00C.UTF-8\00%s:%d value arg elem %d is %d, must be between 0 and 255\00_5_4\00write_b64\00alex_start_game_b64\00decode_b64\00Lua 5.4\00y3\00x3\00y2\00x2\00format asks for alignment not power of 2\00y1\00x1\00/upload/game1\001.3.1\000.1.1\00delim_idx != -1\00line_end != -1\00word_metadata_str_len == 1\00draw_graphic: params.brightness_percent should be an integer between 0 and 100\00#000000\00-0\00-#0\00bytes_written > 0\00History entries found: 0\00/proc/self/fd/\00upload/\00preload/\00//\00No contents found at \22%s\22, please upload a game or select another (preloaded) game. If you refreshed the page then you must re-upload your game zip.\00_G.\00-+#0 123456789.\00reading saved state...\00Reading state info ...\00TORRENTZIPPED-\00^$*+?.([%-\00,\00w+\00-+\00_UBOX*\00FILE*\00(temporary)\00(C temporary)\00\0a\09...\09(skipping %d levels)\00stack overflow (%s)\00%s: bad binary format (%s)\00calling '%s' on bad self (%s)\00bad argument #%d (%s)\00%s:%d: expected \22value\22 field to be bool, not %d (%s)\00%s:%d: expected \22label\22 field to be string, not %d (%s)\00%s: expected last stack value to be error handler func, was type %d (%s)\00bad argument #%d to '%s' (%s)\00cannot open file '%s' (%s)\00bad 'for' %s (number expected, got %s)\00invalid replacement value (a %s)\00file (%p)\00(null)\00draw_graphic: params.flip_y is not a boolean (and not nil)\00draw_graphic: params.flip_x is not a boolean (and not nil)\00draw_graphic: params.invert is not a boolean (and not nil)\00(vararg)\00invalid format (too long)\00%s: expected arg 1 to be popup id (string)\00(for state)\00(no name)\00=(debug command)\00file (closed)\00=(load)\00too many %s (limit is %d)\00%s expected (to close %s at line %d)\00unfinished long %s (starting at line %d)\00%s (moves: %d)\00pos - orig_pos == word_len + 1 + sizeof(freq) + sizeof(word_metadata)\00(0/0)\00\0a\09(...tail calls...)\00attempt to load a %s chunk (mode is '%s')\00 (%s '%s')\00malformed pattern (missing arguments to '%%b')\00malformed pattern (missing ']')\00malformed pattern (ends with '%%')\00 (\00missing '}'\00missing '{'\00unfinished string for format 'z'\00invalid key to 'next'\00wrong number of arguments to 'insert'\00invalid conversion '%s' to 'format'\00invalid value (%s) at index %I in table for 'concat'\00%s '%s'\00invalid option '%s'\00function '%s'\00 at line %d jumps into the scope of local '%s'\00unknown attribute '%s'\00no module '%s' in file '%s'\00attempt to assign to const variable '%s'\00attempt to %s a '%s' with a '%s'\00invalid conversion specification: '%s'\00invalid conversion specifier '%%%s'\00invalid option '%%%c' to 'lua_pushfstring'\00'618502e'\00missing size for format option 'c'\00invalid format option '%c'\00invalid next option for option 'X'\00'<\5c%d>'\00invalid option '>'\00attempt to perform 'n%%0'\00'\0a\09no file '\00%\00Starting game \22%s\22\00Failed to load game \22%s\22\00\5c\22\00,\22text\22:\22\00,\22label\22:\22\00,\22msg\22:\22\00{\22title\22:\22\00[string \22\00start_game function not defined!\00Pure virtual function called!\00assertion failed!\00%02x \00%s: byte %d is type %s, expected number \00error in \00\0a\09%s: in \00\0a\09%s:%d: in \00[saved_state] storing session id \00lua_debug> \00save_state: invalid_session_id = \00%04x: \00Found history entries: \00Lua warning: \00%s: Returning %d bytes of state: \00 move id: \00%s:%d: \00-+0 \00-+#0 \00%s: dec state: len %zu, \00 \0c\0a\0d\09\0b\00%s: String is %zu bytes, expected to have written %zu\0a\00read %d bytes from DB for key %s, expected %zu\0a\00File %3d: name=\22%s\22, size:%llu\0a\00cont\0a\00stack size can not fit %d more elements\0a\00[lua_init] called luaL_openlibs\0a\00Unhandled state preview game_id=\22%s\22, sess=%d, date=%s\0a\00Failed to open output file %s\0a\00called %s\0a\00AlexGames version %s, git hash = %s\0a\00[lua_init] err: %s\0a\00lua error: %s\0a\00lua_run_cmd stack top: %s\0a\00%s: enc state: len %zu, %s\0a\00[lua_init] lua_State is %p\0a\00[lua_init] setting lua panic function\0a\00%s: api_callbacks is null\0a\00lua_api.c:%d %s is null\0a\00lua_api.c:%d %s->%s() is null\0a\00%s: api_callbacks->get_new_session_id (func=%p) and/or game_api->start_game (func=%p) are null\0a\00%s: err_msg == null\0a\00%s: L == null\0a\00Returning %d bytes of state\0a\00destroy_lua_game\0a\00[lua_init] about to call luaL_dofile\0a\00[lua_init] done calling luaL_dofile\0a\00%s: received input len %zu enc (max %zu dec), too large\0a\00Loading saved state session_id=%lld, move_id_offset=%lld\0a\00[dict] ERROR: file %s could not be opened\0a\00[dict] c_dictionary: dict_init called\0a\00game %.*s not handled\0a\00lua_api.c get_state called, L=%p, top=%d\0a\00Read %zu bytes of state for session_id=%d\0a\00Checking for stored state with session_id=%d\0a\00%s: \22%.*s\22, is_cancelled=%d\0a\00%s:%d\0a\00chose random word idx %d\0a\00lua stack depth is %d\0a\00lua_run_cmd returned error %d\0a\00Lua package.path too big, max size %d, actual %d\0a\00found matching word count of %d\0a\00zip_stat_index returned %d\0a\00pcall_handler_err: lua_pcall returned %d\0a\00line %d: rc = %d\0a\00fwrite returned %d when writing %zu bytes of data\0a\00%s: malloc returned NULL\0a\00%s: L == NULL\0a\00%s: already busy processing lua API\0a\00Found %d files in zip archive:\0a\00%s: input length %d is not a multiple of 4\0a\00Confirmed that %s exists.\0a\00Total dict init took %4lld ms. Created %d frames (%.1f MB), containing a total of %d words.\0a\00[lua_init] %s: before finishing, lua_gettop(L) returned %d. Should be zero.\0a\00[lua_init] init_lua called...\0a\00[lua_init] Trying to load lua script at \22%s\22...\0a\00/\0a;\0a?\0a!\0a-\0a\00Failed to open file idx %d (%s)\0a\00PANIC: unprotected error in call to Lua API (%s)\0a\00[dict] %s(handle=%p)\0a\00%s: output buff (%d bytes) is too small to write encoded input (unenc %d, enc %d)\0a\00[lua_init] luaL_dofile returned rc = %d (LUA_OK)\0a\00Unhandled state preview game_id=\22%s\22\0a\00ROOT_DIR=\22%s\22\0a\00Creating new directory \22%s\22\0a\00error %d %d creating dir \22%s\22\0a\00[init] setting game handle to \22%s\22\0a\00emscripten_api.c: js_set_game_handle called with \22%s\22\0a\00Loading Lua game path \22%s\22\0a\00Writing to file \22%s\22\0a\00Uploaded game does not contain game main file \22%s\22\0a\00Successfully ran command \22%s\22\0a\00[init] preload_path = \22%s\22\0a\00Error opening file %s: \22%s\22\0a\00[lua_init] Including preload path: \22%s\22\0a\00[lua_init] Including upload path: \22%s\22\0a\00%s: %d items left on stack after completion!\0a\00%s: %d items on stack before starting!\0a\00\19\93\0d\0a\1a\0a\00\0a\09\00PK\06\06\00PK\05\06\00PK\03\04\00PK\01\02\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\8b\05\00\00/\00\00\00\b1\0b\00\000\00\00\00\cb,\00\001\00\00\00\bd\16\00\002\00\00\00\b6,\00\003\00\00\00\01\0e\00\004\00\00\00\00\00\00\00\00\00\00\00\00\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00Lua package.path too big\00\00\00\00\00\00\00\00\e16\00\00H\00\00\00?'\00\00I\00\00\00\dd\07\00\00J\00\00\00\03\0d\00\00K\00\00\00\95)\00\00L\00\00\00\a7)\00\00M\00\00\00\90\16\00\00N\00\00\009\1f\00\00O\00\00\00\fd+\00\00P\00\00\00&\18\00\00Q\00\00\00\cf1\00\00R\00\00\00\b3)\00\00S\00\00\00\d8\16\00\00T\00\00\00{\18\00\00U\00\00\00\1f!\00\00V\00\00\00\e3\16\00\00W\00\00\00Z \00\00X\00\00\00\80\12\00\00Y\00\00\00\05\0f\00\00Z\00\00\00`\14\00\00[\00\00\004\08\00\00\5c\00\00\00\19\0f\00\00]\00\00\00\ef\05\00\00^\00\00\00u.\00\00_\00\00\00\88.\00\00`\00\00\00\c9=\00\00a\00\00\00\d4=\00\00b\00\00\00\bc%\00\00c\00\00\00\f3\0b\00\00d\00\00\00\d9\0b\00\00e\00\00\00\04\11\00\00f\00\00\00\ef\10\00\00g\00\00\00\dd\10\00\00h\00\00\00\aa\0f\00\00i\00\00\00Y#\00\00j\00\00\00\fa.\00\00k\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00t&\00\00=-\00\00\1d\0e\00\00\ec\0d\00\00\10\18\00\00\a37\00\00_\0e\00\00l\18\00\00M\14\00\00A\14\00\00\c0 \00\00\16\11\00\00\9e\07\00\00h\06\00\00\9a\08\00\00\e4\1c\00\00-,\00\007-\00\00F\1b\00\00\a9\07\00\00\f6$\00\00-\1b\00\00\a8\15\00\00\00\00\00\00Game not handled\00\00\00\00\00\00\00\00\00\00\00\00d\00\00\00\00\00\00\00\00\00\00\00c\00\00\00\00\00\00\00\00\00\00\00\00\02\01\00\00\00\00\00\00\00\00\00ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/db.read_state_info did not return a game ID\00\92\00\00\00\93\00\00\00\94\00\00\00\95\00\00\00\96\00\00\00\97\00\00\00\98\00\00\00\99\00\00\00\9a\00\00\00\9b\00\00\00\9c\00\00\00\9d\00\00\00\9e\00\00\00\9f\00\00\00\a0\00\00\00\00\00\00\00\00\00\00\00\a1\00\00\00\00\00\00\00X]\00\00\a2\00\00\00\a3\00\00\00\a4\00\00\00\a5\00\00\00\a6\00\00\00\a7\00\00\0018SessionSelectState\0019HistoryBrowseWindow\00\00\e0$\01\009]\00\00\08%\01\00$]\00\00P]\00\00\00\00\00\00\98]\00\00\a8\00\00\00\a9\00\00\00\aa\00\00\00\ab\00\00\00\ac\00\00\00\ad\00\00\0015MoveSelectState\00\00\00\08%\01\00\84]\00\00P]\00\00\00\00\00\00\00\00\00\00\00\00\00\00Successfully loaded game state!\00Error loading saved state\00\00\00\00\00\00\00Loading saved game...\00key\00touch\00mouse_move\00mouse_updown\00wheel\00\00\00\ae\00\00\00\af\00\00\00\b0\00\00\00\b1\00\00\00\b2\00\00\00\b3\00\00\00\b4\00\00\00\b5\00\00\00\b6\00\00\00\b7\00\00\00\b8\00\00\00\b9\00\00\00\ba\00\00\00\bb\00\00\00\bc\00\00\00\bd\00\00\00\be\00\00\00\bf\00\00\00\c0\00\00\00\c1\00\00\00\c2\00\00\00\c3\00\00\00\c4\00\00\00\c5\00\00\00\c6\00\00\00\c7\00\00\00\c8\00\00\00\c9\00\00\00\ca\00\00\00\cb\00\00\00\cc\00\00\00\cd\00\00\00\ce\00\00\00\cf\00\00\00\d0\00\00\00\d1\00\00\00\d2\00\00\00\d3\00\00\00\d4\00\00\00\d5\00\00\00\da\00\00\00\db\00\00\00\dc\00\00\00\dd\00\00\00\de\00\00\00\df\00\00\00\00\00\00\00\00\00\00\00\ee6\00\00\e8\00\00\00\1f&\00\00\e8\00\00\00\00\00\00\00\00\00\00\00\01\03\03\04\04\05\06\00Z\09\00\00\f4\00\00\00\12,\00\00\f5\00\00\00\8b(\00\00\f6\00\00\00\cd\13\00\00\f7\00\00\00\d0)\00\00\f8\00\00\00\f2\0d\00\00\f9\00\00\00\92(\00\00\fa\00\00\00\ac2\00\00\fb\00\00\00\e7\07\00\00\f1\00\00\00\fb\0d\00\00\fc\00\00\00\fa\1b\00\00\fd\00\00\000\0a\00\00\fe\00\00\00g\18\00\00\ff\00\00\00\cf\1c\00\00\00\01\00\00\e9\1a\00\00\01\01\00\00n\0c\00\00\02\01\00\00\cc\0b\00\00\03\01\00\00\15\0d\00\00\04\01\00\00\c3)\00\00\05\01\00\00\e7\15\00\00\06\01\00\00\16!\00\00\07\01\00\00\9c&\00\00\08\01\00\00\f9\1b\00\00\09\01\00\00\b2@\00\00\00\00\00\00\e1?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ee\16\00\00s\09\00\00\0d\0d\00\00%\0a\00\00e\17\00\00\f8%\00\00\cd\1b\00\00\c7\22\00\00\ed\1c\00\00\d8\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\00\00\00\00\00\00\00\00\db%\00\00\0b\01\00\00z'\00\00\0c\01\00\00\c9\22\00\00\0d\01\00\00\82\0d\00\00\0e\01\00\00r\17\00\00\0f\01\00\00\a9-\00\00\10\01\00\00\fa*\00\00\11\01\00\00!&\00\00\12\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\c9\22\00\00\cb2\00\00V2\00\00\fa\1c\00\00P \00\00\14\01\00\00\08%\00\00\15\01\00\00*\1d\00\00\16\01\00\00\13\18\00\00\17\01\00\00\0a\1d\00\00\18\01\00\00\d6\04\00\00\19\01\00\00\d0)\00\00\1a\01\00\00 %\00\00\1b\01\00\00\c0\1a\00\00\1c\01\00\00V.\00\00\1d\01\00\00\fb$\00\00\1e\01\00\00\22\1d\00\00\1f\01\00\00\01\1d\00\00 \01\00\00\c3)\00\00!\01\00\00\15%\00\00\22\01\00\00\0c\1e\00\00#\01\00\00\b6\0b\00\00$\01\00\00\00\00\00\00\00\00\00\00\17\1c\00\001\18\00\00D'\00\00%\0a\00\00\12\1c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\b2@\00\00%\01\00\00\0a,\00\00&\01\00\00%'\00\00'\01\00\00\f4*\00\00(\01\00\00\0d\18\00\00)\01\00\00\ce\0e\00\00*\01\00\00\c0\22\00\00+\01\00\00.\1f\00\00,\01\00\00\a5B\00\00-\01\00\00P \00\00.\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00!&\00\003\01\00\003\1f\00\004\01\00\00\8d\08\00\005\01\00\00\22\10\00\006\01\00\00\e4\1a\00\007\01\00\00C\08\00\008\01\00\00\dc\1a\00\009\01\00\00\b32\00\00:\01\00\00\83(\00\00;\01\00\00\9c&\00\00<\01\00\00\9d%\00\00=\01\00\00\00\00\00\00\00\00\00\00\91\06\00\00\00\00\00\00\ee6\00\00>\01\00\00\1f&\00\00>\01\00\00\14!\00\00?\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\b32\00\00@\01\00\00\9d%\00\00A\01\00\00\22\10\00\00B\01\00\003\1f\00\00C\01\00\00~\1d\00\00D\01\00\00!&\00\00E\01\00\00/#\00\00F\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00j\0c\00\00F\12\00\00\99-\00\00\00\00\00\00\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\0a\18\00\00\f4\1b\00\00D'\00\00\00\00\00\00\d9\10\00\00G\01\00\00\cc\0e\00\00H\01\00\00\bb\1a\00\00I\01\00\00\fb\1a\00\00J\01\00\00\95\1c\00\00K\01\00\00\cd\0e\00\00L\01\00\00%#\00\00M\01\00\00\d0\16\00\00N\01\00\00\9e\14\00\00O\01\00\00\d3\13\00\00P\01\00\00\d9,\00\00Q\01\00\00\a3\0b\00\00R\01\00\00r \00\00S\01\00\00\da\06\00\00T\01\00\00\cc\1a\00\00U\01\00\00n#\00\00V\01\00\00\9e2\00\00W\01\00\00\bc\1a\00\00X\01\00\003\09\00\00Y\01\00\00\fc\1a\00\00Z\01\00\00\9c&\00\00[\01\00\009\1b\00\00\00\00\00\00K2\00\00\00\00\00\00\a7\1e\00\00\00\00\00\00\1b+\00\00\00\00\00\00\93\14\00\00\00\00\00\00\a8\14\00\00\00\00\00\00\00\00\00\00\00\00\00\009\1b\00\00\5c\01\00\00K2\00\00]\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\a87\00\00_\01\00\00\1d\1f\00\00`\01\00\00\a92\00\00\00\00\00\00(\1f\00\00\00\00\00\00)\1f\00\00\00\00\00\00\8e\0e\00\00\00\00\00\00\8d2\00\00\00\00\00\00\00\00\00\00\00\00\00\00l&\00\00a\01\00\00\00\00\00\00\00\00\00\00b\01\00\00c\01\00\00d\01\00\00e\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\08\08\08\08\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\04\04\04\04\04\04\04\04\04\04\04\04\04\04\04\16\16\16\16\16\16\16\16\16\16\04\04\04\04\04\04\04\15\15\15\15\15\15\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\04\04\04\04\05\04\15\15\15\15\15\15\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\04\04\04\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\02\02\03\03\03\03\04\04\04\04\04\04\04\04\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\05\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\06\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\07\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\0a\0a\09\09\08\08\08\08\08\00\08\08\08\08\00\00\00\00\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\80\80\80\08\08\08\08\08\00\00\04\10\10\10\10\10\10\10\10\10\10\18hh \00\00\09\09\01\00\09 \09H(\03\00\00\00\00\00\00\00\00\00\00\00\00\00\83\1d\00\00f\01\00\00\e4%\00\00g\01\00\00\81'\00\00h\01\00\00\95%\00\00i\01\00\00\ac\0b\00\00j\01\00\00\8a\07\00\00k\01\00\00\80$\00\00l\01\00\00\b1'\00\00m\01\00\00\06+\00\00n\01\00\00\85'\00\00o\01\00\00\a9'\00\00p\01\00\00\00\00\00\00\00\00\00\00\06\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00$\1c\00\00\d3%\00\00~&\00\00<\05\00\00\d56\00\00\85'\00\00\00\00\00\00\00\00\00\00\a0-\00\004\1e\00\00\1b\18\00\00'&\00\00N#\00\00\99-\00\00,&\00\00\d9\13\00\005\19\00\00\93\17\00\00R#\00\00\d9\1a\00\00\0d\1d\00\00\91\1c\00\00!\0a\00\00\e0\13\00\00k\0d\00\001\18\00\00\f6\1a\00\00\f1$\00\00(\1c\00\00}(\00\00mD\00\00DE\00\00CE\00\00+B\00\00(B\00\00.B\00\00\15B\00\001B\00\00\12B\00\00RB\00\00\f4A\00\00\e2A\00\00\d8A\00\00\faA\00\00\ebA\00\00\00\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00\0a\0a\0a\0a\0b\0b\0b\0b\0e\0d\0b\0b\0b\0b\06\06\04\04\05\05\07\07\07\07\09\08\03\03\03\03\03\03\03\03\03\03\03\03\02\02\01\01\00\00J\00\00\00K\00\00\00I\00\00\00M\00\00\00\00\00\00\00\90%\00\00u\01\00\00\86\16\00\00v\01\00\00F\17\00\00w\01\00\00M-\00\00x\01\00\00H\0d\00\00y\01\00\00\aa\1f\00\00z\01\00\00\957\00\00{\01\00\00\f2\1a\00\00|\01\00\00\17\14\00\00}\01\00\00D \00\00~\01\00\00j\17\00\00\7f\01\00\00\17&\00\00\80\01\00\00\9c7\00\00\81\01\00\00;\14\00\00\82\01\00\00\07\1e\00\00\83\01\00\00\b3#\00\00\84\01\00\00\05\1e\00\00\85\01\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\982\00\00\86\01\00\00\9a7\00\00\87\01\00\00\d8\1b\00\00\88\01\00\00\de,\00\00\89\01\00\00\12\07\00\00\8a\01\00\00\98\07\00\00\8b\01\00\00\91\07\00\00\8c\01\00\00@\1b\00\00\8d\01\00\00\91\06\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00t\0d\00\00\8e\01\00\00a\09\00\00\8f\01\00\00\07\1e\00\00\90\01\00\00\05\1e\00\00\91\01\00\00\80$\00\00\92\01\00\00\9c$\00\00\93\01\00\008\09\00\00\94\01\00\00\00\00\00\00\00\00\00\00userdata\00\00\00\00\00\00\00\00+%\00\00\91\1c\00\00\04\1b\00\00\a0i\00\00X\16\00\00\c0\22\00\00\f4*\00\005\19\00\00\a0i\00\00\b12\00\00#%\00\00\8d\17\00\00\91\06\00\00\86\06\00\00\ee6\00\002,\00\00\f0\1a\00\00\cb\16\00\00\982\00\00\9a7\00\00\d8\1b\00\00\de,\00\00\12\07\00\00\98\07\00\00\91\07\00\00\9d-\00\00\dd\13\00\00\a2\12\00\00\b7\1c\00\00\11\14\00\00@\1b\00\00\9a\09\00\00\a7\0b\00\00\10+\00\00r\0d\00\00\0b\1c\00\00\1f&\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03\0c\00\00\97\01\00\006\0a\00\00\98\01\00\00\86\16\00\00\99\01\00\00\f2\1a\00\00\9a\01\00\00e\10\00\00\9b\01\00\008\18\00\00\00\00\00\00\00\00\00\00\00\00\00\00[\00-\7f\c2-\fd][\80-\bf]*\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\80\00\00\00\00\08\00\00\00\00\01\00\00\00 \00\00\00\00\04\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00.\00\00\00-\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00\00\00\00\00\00\00\00\bc\98!\00\00\00\00\00\00\00\00\00\00\00\00:&;&e&f&c&`&\22 \d8%\cb%\d9%B&@&j&k&<&\ba%\c4%\95!< \b6\00\a7\00\ac%\a8!\91!\93!\92!\90!\1f\22\94!\b2%\bc% \00!\00\22\00#\00$\00%\00&\00'\00(\00)\00*\00+\00,\00-\00.\00/\000\001\002\003\004\005\006\007\008\009\00:\00;\00<\00=\00>\00?\00@\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00[\00\5c\00]\00^\00_\00`\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\00{\00|\00}\00~\00\02#\c7\00\fc\00\e9\00\e2\00\e4\00\e0\00\e5\00\e7\00\ea\00\eb\00\e8\00\ef\00\ee\00\ec\00\c4\00\c5\00\c9\00\e6\00\c6\00\f4\00\f6\00\f2\00\fb\00\f9\00\ff\00\d6\00\dc\00\a2\00\a3\00\a5\00\a7 \92\01\e1\00\ed\00\f3\00\fa\00\f1\00\d1\00\aa\00\ba\00\bf\00\10#\ac\00\bd\00\bc\00\a1\00\ab\00\bb\00\91%\92%\93%\02%$%a%b%V%U%c%Q%W%]%\5c%[%\10%\14%4%,%\1c%\00%<%^%_%Z%T%i%f%`%P%l%g%h%d%e%Y%X%R%S%k%j%\18%\0c%\88%\84%\8c%\90%\80%\b1\03\df\00\93\03\c0\03\a3\03\c3\03\b5\00\c4\03\a6\03\98\03\a9\03\b4\03\1e\22\c6\03\b5\03)\22a\22\b1\00e\22d\22 #!#\f7\00H\22\b0\00\19\22\b7\00\1a\22\7f \b2\00\a0%\a0\00\00\00\00\00V\13\00\00\00\00\00\00\0f/\00\00\01\00\00\00\981\00\00\01\00\00\00}1\00\00\01\00\00\00\86\13\00\00\01\00\00\00\a8\13\00\00\01\00\00\00\91\13\00\00\00\00\00\00\c9\13\00\00\00\00\00\00\b80\00\00\00\00\00\00\e6(\00\00\00\00\00\00\90\0d\00\00\01\00\00\00\d6(\00\00\01\00\00\00\b5(\00\00\02\00\00\00\b3\13\00\00\00\00\00\00]&\00\00\00\00\00\0042\00\00\00\00\00\00\82/\00\00\00\00\00\00\f3(\00\00\00\00\00\00,\0b\00\00\00\00\00\00\df$\00\00\00\00\00\00w\13\00\00\03\00\00\00\0c\0b\00\00\01\00\00\00\09)\00\00\00\00\00\00\b9/\00\00\00\00\00\00b/\00\00\00\00\00\00\a1$\00\00\00\00\00\00`2\00\00\00\00\00\00u2\00\00\00\00\00\005/\00\00\00\00\00\00\01&\00\00\01\00\00\00l\13\00\00\00\00\00\00>.\00\00\00\00\00\00\121\00\00\00\00\00\00\e5=\00\00\00\00\00\00K\17\00\00\00\00\00\00\b3$\00\00$\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\9a\1c\00\00\00\00\00\00O\1b\00\00\00\00\00\00\c7\0c\00\00\00\00\00\00\1d.\00\00\01\00\00\00\06.\00\00\00\00\00\00\97\0c\00\00\01\00\00\00\b1\1f\00\00\00\00\00\00\fd\1e\00\00\00\00\00\00\8f\1b\00\00\00\00\00\00\e8\0c\00\00\00\00\00\00- \00\00\00\00\00\00\e2\04\00\00\01\00\00\00\ba\15\00\00\01\00\00\00\b8'\00\00\01\00\00\00=\0b\00\00\01\00\00\00\ce-\00\00\01\00\00\00\af-\00\00\01\00\00\00\ba\10\00\00\01\00\00\00\e8-\00\00\01\00\00\00\c6\1e\00\00\01\00\00\00S)\00\00\01\00\00\00\d8\1f\00\00\00\00\00\00\06 \00\00\01\00\00\00\d2'\00\00\01\00\00\00V\0b\00\00\00\00\00\00\ff=\00\00\01\00\00\001(\00\00\1b\00\00\00\00\00\00\00\00\00\00\00\960\07w,a\0e\ee\baQ\09\99\19\c4m\07\8f\f4jp5\a5c\e9\a3\95d\9e2\88\db\0e\a4\b8\dcy\1e\e9\d5\e0\88\d9\d2\97+L\b6\09\bd|\b1~\07-\b8\e7\91\1d\bf\90d\10\b7\1d\f2 \b0jHq\b9\f3\deA\be\84}\d4\da\1a\eb\e4\ddmQ\b5\d4\f4\c7\85\d3\83V\98l\13\c0\a8kdz\f9b\fd\ec\c9e\8aO\5c\01\14\d9l\06cc=\0f\fa\f5\0d\08\8d\c8 n;^\10iL\e4A`\d5rqg\a2\d1\e4\03jm\0d\a8Zjz\0b\cf\0e\e4\9d\ff\09\93'\ae\00\0a\b1\9e\07}D\93\0f\f0\d2\a3\08\87h\f2\01\1e\fe\c2\06i]Wb\f7\cbge\80q6l\19\e7\06knv\1b\d4\fe\e0+\d3\89Zz\da\10\ccJ\ddgo\df\b9\f9\f9\ef\be\8eC\be\b7\17\d5\8e\b0`\e8\a3\d6\d6~\93\d1\a1\c4\c2\d88R\f2\dfO\f1g\bb\d1gW\bc\a6\dd\06\b5?K6\b2H\da+\0d\d8L\1b\0a\af\f6J\036`z\04A\c3\ef`\dfU\dfg\a8\ef\8en1y\beiF\8c\b3a\cb\1a\83f\bc\a0\d2o%6\e2hR\95w\0c\cc\03G\0b\bb\b9\16\02\22/&\05U\be;\ba\c5(\0b\bd\b2\92Z\b4+\04j\b3\5c\a7\ff\d7\c21\cf\d0\b5\8b\9e\d9,\1d\ae\de[\b0\c2d\9b&\f2c\ec\9c\a3ju\0a\93m\02\a9\06\09\9c?6\0e\eb\85g\07r\13W\00\05\82J\bf\95\14z\b8\e2\ae+\b1{8\1b\b6\0c\9b\8e\d2\92\0d\be\d5\e5\b7\ef\dc|!\df\db\0b\d4\d2\d3\86B\e2\d4\f1\f8\b3\ddhn\83\da\1f\cd\16\be\81[&\b9\f6\e1w\b0owG\b7\18\e6Z\08\88pj\0f\ff\ca;\06f\5c\0b\01\11\ff\9ee\8fi\aeb\f8\d3\ffkaE\cfl\16x\e2\0a\a0\ee\d2\0d\d7T\83\04N\c2\b3\039a&g\a7\f7\16`\d0MGiI\dbwn>Jj\d1\ae\dcZ\d6\d9f\0b\df@\f0;\d87S\ae\bc\a9\c5\9e\bb\de\7f\cf\b2G\e9\ff\b50\1c\f2\bd\bd\8a\c2\ba\ca0\93\b3S\a6\a3\b4$\056\d0\ba\93\06\d7\cd)W\deT\bfg\d9#.zf\b3\b8Ja\c4\02\1bh]\94+o*7\be\0b\b4\a1\8e\0c\c3\1b\df\05Z\8d\ef\02-\00\00\00\00F;ge\8cv\ce\ca\caM\a9\afY\eb\edN\1f\d0\8a+\d5\9d#\84\93\a6D\e1\b2\d6\db\9d\f4\ed\bc\f8>\a0\15Wx\9br2\eb=6\d3\ad\06Q\b6gK\f8\19!p\9f|%\ab\c6\e0c\90\a1\85\a9\dd\08*\ef\e6oO|@+\ae:{L\cb\f06\e5d\b6\0d\82\01\97}\1d}\d1Fz\18\1b\0b\d3\b7]0\b4\d2\ce\96\f03\88\ad\97VB\e0>\f9\04\dbY\9c\0bP\fc\1aMk\9b\7f\87&2\d0\c1\1dU\b5R\bb\11T\14\80v1\de\cd\df\9e\98\f6\b8\fb\b9\86'\87\ff\bd@\e25\f0\e9Ms\cb\8e(\e0m\ca\c9\a6V\ad\acl\1b\04\03* cf.\fb:\fah\c0]\9f\a2\8d\f40\e4\b6\93Uw\10\d7\b41+\b0\d1\fbf\19~\bd]~\1b\9c-\e1g\da\16\86\02\10[/\adV`H\c8\c5\c6\0c)\83\fdkLI\b0\c2\e3\0f\8b\a5\86\16\a0\f85P\9b\9fP\9a\d66\ff\dc\edQ\9aOK\15{\09pr\1e\c3=\db\b1\85\06\bc\d4\a4v#\a8\e2MD\cd(\00\edbn;\8a\07\fd\9d\ce\e6\bb\a6\a9\83q\eb\00,7\d0gI3\0b>\d5u0Y\b0\bf}\f0\1f\f9F\97zj\e0\d3\9b,\db\b4\fe\e6\96\1dQ\a0\adz4\81\dd\e5H\c7\e6\82-\0d\ab+\82K\90L\e7\d86\08\06\9e\0docT@\c6\cc\12{\a1\a9\1d\f0\04/[\cbcJ\91\86\ca\e5\d7\bd\ad\80D\1b\e9a\02 \8e\04\c8m'\ab\8eV@\ce\af&\df\b2\e9\1d\b8\d7#P\11xekv\1d\f6\cd2\fc\b0\f6U\99z\bb\fc6<\80\9bS8[\c2\cf~`\a5\aa\b4-\0c\05\f2\16k`a\b0/\81'\8bH\e4\ed\c6\e1K\ab\fd\86.\8a\8d\19R\cc\b6~7\06\fb\d7\98@\c0\b0\fd\d3f\f4\1c\95]\93y_\10:\d6\19+]\b3,@\f1kj{\96\0e\a06?\a1\e6\0dX\c4u\ab\1c%3\90{@\f9\dd\d2\ef\bf\e6\b5\8a\9e\96*\f6\d8\adM\93\12\e0\e4[P&\df\1dkA\ba\d7&\e8\15\91\1d\8fp\b0m\10\0c\f6Vwi<\1b\de\c6z \b9\a3\e9\86\fdB\af\bd\9a'e\f03\88#\cbT\ed:\e0\09^|\dbn;\b6\96\c7\94\f0\ad\a0\f1c\0b\e4\10%0\83u\ef}*\da\a9FM\bf\886\d2\c3\ce\0d\b5\a6\04@\1c\09B{{l\d1\dd?\8d\97\e6X\e8]\ab\f1G\1b\90\96\22\1fK\cf\beYp\a8\db\93=\01t\d5\06f\11F\a0\22\f0\00\9bE\95\ca\d6\ec:\8c\ed\8b_\ad\9d\14#\eb\a6sF!\eb\da\e9g\d0\bd\8c\f4v\f9m\b2M\9e\08x\007\a7>;P\c21\b0\f5Dw\8b\92!\bd\c6;\8e\fb\fd\5c\ebh[\18\0a.`\7fo\e4-\d6\c0\a2\16\b1\a5\83f.\d9\c5]I\bc\0f\10\e0\13I+\87v\da\8d\c3\97\9c\b6\a4\f2V\fb\0d]\10\c0j8\14\1b3\a4R T\c1\98m\fdn\deV\9a\0bM\f0\de\ea\0b\cb\b9\8f\c1\86\10 \87\bdwE\a6\cd\e89\e0\f6\8f\5c*\bb&\f3l\80A\96\ff&\05w\b9\1db\12sP\cb\bd5k\ac\d8\00\00\00\00X\80\e2\d7\f1\06\b4t\a9\86V\a3\e2\0dh\e9\ba\8d\8a>\13\0b\dc\9dK\8b>J\85\1d\a1\09\dd\9dC\det\1b\15},\9b\f7\aag\10\c9\e0?\90+7\96\16}\94\ce\96\9fC\0a;B\13R\bb\a0\c4\fb=\f6g\a3\bd\14\b0\e86*\fa\b0\b6\c8-\190\9e\8eA\b0|Y\8f&\e3\1a\d7\a6\01\cd~ Wn&\a0\b5\b9m+\8b\f35\abi$\9c-?\87\c4\ad\ddP\14v\84&L\f6f\f1\e5p0R\bd\f0\d2\85\f6{\ec\cf\ae\fb\0e\18\07}X\bb_\fd\bal\91k%/\c9\eb\c7\f8`m\91[8\eds\8csfM\c6+\e6\af\11\82`\f9\b2\da\e0\1be\1eM\c65F\cd$\e2\efKrA\b7\cb\90\96\fc@\ae\dc\a4\c0L\0b\0dF\1a\a8U\c6\f8\7f\9bPg<\c3\d0\85\ebjV\d3H2\d61\9fy]\0f\d5!\dd\ed\02\88[\bb\a1\d0\dbYv(\ec\08Mpl\ea\9a\d9\ea\bc9\81j^\ee\ca\e1`\a4\92a\82s;\e7\d4\d0cg6\07\ad\f1\a9D\f5qK\93\5c\f7\1d0\04w\ff\e7O\fc\c1\ad\17|#z\be\fau\d9\e6z\97\0e\22\d7J^zW\a8\89\d3\d1\fe*\8bQ\1c\fd\c0\da\22\b7\98Z\c0`1\dc\96\c3i\5ct\14\a7\ca\ebW\ffJ\09\80V\cc_#\0eL\bd\f4E\c7\83\be\1dGai\b4\c17\ca\ecA\d5\1d<\9a\8ckd\1an\bc\cd\9c8\1f\95\1c\da\c8\de\97\e4\82\86\17\06U/\91P\f6w\11\b2!\b9\87-b\e1\07\cf\b5H\81\99\16\10\01{\c1[\8aE\8b\03\0a\a7\5c\aa\8c\f1\ff\f2\0c\13(6\a1\cexn!,\af\c7\a7z\0c\9f'\98\db\d4\ac\a6\91\8c,DF%\aa\12\e5}*\f02\b3\bcoq\eb<\8d\a6B\ba\db\05\1a:9\d2Q\b1\07\98\091\e5O\a0\b7\b3\ec\f87Q;P\d8\11\9a\08X\f3M\a1\de\a5\ee\f9^G9\b2\d5ys\eaU\9b\a4C\d3\cd\07\1bS/\d0\d5\c5\b0\93\8dERD$\c3\04\e7|C\e607\c8\d8zoH:\ad\c6\cel\0e\9eN\8e\d9Z\e3S\89\02c\b1^\ab\e5\e7\fd\f3e\05*\b8\ee;`\e0n\d9\b7I\e8\8f\14\11hm\c3\df\fe\f2\80\87~\10W.\f8F\f4vx\a4#=\f3\9aiesx\be\cc\f5.\1d\94u\cc\caD\ae\95\bc\1c.wk\b5\a8!\c8\ed(\c3\1f\a6\a3\fdU\fe#\1f\82W\a5I!\0f%\ab\f6\c1\b34\b5\993\d6b0\b5\80\c1h5b\16#\be\5c\5c{>\be\8b\d2\b8\e8(\8a8\0a\ffN\95\d7\af\16\155x\bf\93c\db\e7\13\81\0c\ac\98\bfF\f4\18]\91]\9e\0b2\05\1e\e9\e5\cb\88v\a6\93\08\94q:\8e\c2\d2b\0e \05)\85\1eOq\05\fc\98\d8\83\aa;\80\03H\ecx4\19\d7 \b4\fb\00\892\ad\a3\d1\b2Ot\9a9q>\c2\b9\93\e9k?\c5J3\bf'\9d\fd)\b8\de\a5\a9Z\09\0c/\0c\aaT\af\ee}\1f$\d07G\a42\e0\ee\22dC\b6\a2\86\94r\0f[\c4*\8f\b9\13\83\09\ef\b0\db\89\0dg\90\023-\c8\82\d1\faa\04\87Y9\84e\8e\f7\12\fa\cd\af\92\18\1a\06\14N\b9^\94\acn\15\1f\92$M\9fp\f3\e4\19&P\bc\99\c4\87lB\9d\f14\c2\7f&\9dD)\85\c5\c4\cbR\8eO\f5\18\d6\cf\17\cf\7fIAl'\c9\a3\bb\e9_<\f8\b1\df\de/\18Y\88\8c@\d9j[\0bRT\11S\d2\b6\c6\faT\e0e\a2\d4\02\b2fy\df\e2>\f9=5\97\7fk\96\cf\ff\89A\84t\b7\0b\dc\f4U\dcur\03\7f-\f2\e1\a8\e3d~\eb\bb\e4\9c<\12b\ca\9fJ\e2(H\01i\16\02Y\e9\f4\d5\f0o\a2v\a8\ef@\a1\00\00\00\00\e1\b6R\ef\83k\d4\05b\dd\86\ea\06\d7\a8\0b\e7a\fa\e4\85\bc|\0ed\0a.\e1\0c\aeQ\17\ed\18\03\f8\8f\c5\85\12ns\d7\fd\0ay\f9\1c\eb\cf\ab\f3\89\12-\19h\a4\7f\f6\18\5c\a3.\f9\ea\f1\c1\9b7w+z\81%\c4\1e\8b\0b%\ff=Y\ca\9d\e0\df |V\8d\cf\14\f2\f29\f5D\a0\d6\97\99&\03\8d\10\88QbP\c8\cb\e7\b1~\99\08\d3\a3\1f\e22\15M\0dV\1fc\ec\b7\a91\03\d5t\b7\e94\c2\e5\06\5cf\9a\f0\bd\d0\c8\1f\df\0dN\f5>\bb\1c\1aZ\b12\fb\bb\07`\14\d9\da\e6\fe8l\b4\11H\94h\c9\a9\22:&\cb\ff\bc\cc*I\ee#NC\c0\c2\af\f5\92-\cd(\14\c7,\9eF(D:9\de\a5\8ck1\c7Q\ed\db&\e7\bf4B\ed\91\d5\a3[\c3:\c1\86E\d0 0\17?\81\e6k\ae`P9A\02\8d\bf\ab\e3;\edD\871\c3\a5f\87\91J\04Z\17\a0\e5\ecEO\8dH:\b9l\fehV\0e#\ee\bc\ef\95\bcS\8b\9f\92\b2j)\c0]\08\f4F\b7\e9B\14X\99\ba\c8\80x\0c\9ao\1a\d1\1c\85\fbgNj\9fm`\8b~\db2d\1c\06\b4\8e\fd\b0\e6a\95\14\99\97t\a2\cbx\16\7fM\92\f7\c9\1f}\93\c31\9crucs\10\a8\e5\99\f1\1e\b7v\b1^-\f3P\e8\7f\1c25\f9\f6\d3\83\ab\19\b7\89\85\f8V?\d7\174\e2Q\fd\d5T\03\12\bd\f0|\e4\5cF.\0b>\9b\a8\e1\df-\fa\0e\bb'\d4\efZ\91\86\008L\00\ea\d9\faR\05\a9\02\8e\ddH\b4\dc2*iZ\d8\cb\df\087\af\d5&\d6Nct9,\be\f2\d3\cd\08\a0<\a5\ac\df\caD\1a\8d%&\c7\0b\cf\c7qY \a3{w\c1B\cd%. \10\a3\c4\c1\a6\f1+\e1\96\e6\14\00 \b4\fbb\fd2\11\83K`\fe\e7AN\1f\06\f7\1c\f0d*\9a\1a\85\9c\c8\f5\ed8\b7\03\0c\8e\e5\ecnSc\06\8f\e51\e9\eb\ef\1f\08\0aYM\e7h\84\cb\0d\892\99\e2\f9\caE:\18|\17\d5z\a1\91?\9b\17\c3\d0\ff\1d\ed1\1e\ab\bf\de|v94\9d\c0k\db\f5d\14-\14\d2F\c2v\0f\c0(\97\b9\92\c7\f3\b3\bc&\12\05\ee\c9p\d8h#\91n:\cc\d1.\a0I0\98\f2\a6REtL\b3\f3&\a3\d7\f9\08B6OZ\adT\92\dcG\b5$\8e\a8\dd\80\f1^<6\a3\b1^\eb%[\bf]w\b4\dbWYU:\e1\0b\baX<\8dP\b9\8a\df\bf\c9r\03g(\c4Q\88J\19\d7b\ab\af\85\8d\cf\a5\abl.\13\f9\83L\ce\7fi\adx-\86\c5\dcRp$j\00\9fF\b7\86u\a7\01\d4\9a\c3\0b\fa{\22\bd\a8\94@`.~\a1\d6|\91\00\00\00\00C\cb\a6\87\c7\90<\d4\84[\9aS\cf'\08s\8c\ec\ae\f4\08\b74\a7K|\92 \9eO\10\e6\dd\84\b6aY\df,2\1a\14\8a\b5Qh\18\95\12\a3\be\12\96\f8$A\d53\82\c6}\99Q\17>R\f7\90\ba\09m\c3\f9\c2\cbD\b2\beYd\f1u\ff\e3u.e\b06\e5\c37\e3\d6A\f1\a0\1d\e7v$F}%g\8d\db\a2,\f1I\82o:\ef\05\ebauV\a8\aa\d3\d1\fa2\a3.\b9\f9\05\a9=\a2\9f\fa~i9}5\15\ab]v\de\0d\da\f2\85\97\89\b1N1\0ed}\b3\c8'\b6\15O\a3\ed\8f\1c\e0&)\9b\abZ\bb\bb\e8\91\1d\dc\0e;BN.x\89\e8\a9\fc\d2r\fa\bf\19\d4}j*V\bb)\e1\f0<\ad\bajo\eeq\cc\e8\a5\0d^\c8\e6\c6\f8Ob\9db\1c!V\c4\9b\89\fc\17J\ca7\b1\cdNl+\9e\0d\a7\8d\19F\db\1f9\05\10\b9\be\81K#\ed\c2\80\85j\17\b3\07\acTx\a1+\d0#;x\93\e8\9d\ff\d8\94\0f\df\9b_\a9X\1f\043\0b\5c\cf\95\8c\0eW\e5sM\9cC\f4\c9\c7\d9\a7\8a\0c\7f \c1p\ed\00\82\bbK\87\06\e0\d1\d4E+wS\90\18\f5\95\d3\d3S\12W\88\c9A\14Co\c6_?\fd\e6\1c\f4[a\98\af\c12\dbdg\b5s\ce\b4d0\05\12\e3\b4^\88\b0\f7\95.7\bc\e9\bc\17\ff\22\1a\90{y\80\c38\b2&D\ed\81\a4\82\aeJ\02\05*\11\98Vi\da>\d1\22\a6\ac\f1am\0av\e56\90%\a6\fd6\a2\e8\cb\8c\ba\ab\00*=/[\b0nl\90\16\e9'\ec\84\c9d'\22N\e0|\b8\1d\a3\b7\1e\9av\84\9c\5c5O:\db\b1\14\a0\88\f2\df\06\0f\b9\a3\94/\fah2\a8~3\a8\fb=\f8\0e|\95R\dd\ad\d6\99{*R\c2\e1y\11\09G\feZu\d5\de\19\besY\9d\e5\e9\0a\de.O\8d\0b\1d\cdKH\d6k\cc\cc\8d\f1\9f\8fFW\18\c4:\c58\87\f1c\bf\03\aa\f9\ec@a_k\12\f9/\94Q2\89\13\d5i\13@\96\a2\b5\c7\dd\de'\e7\9e\15\81`\1aN\1b3Y\85\bd\b4\8c\b6?r\cf}\99\f5K&\03\a6\08\ed\a5!C\917\01\00Z\91\86\84\01\0b\d5\c7\ca\adRo`~\83,\ab\d8\04\a8\f0BW\eb;\e4\d0\a0Gv\f0\e3\8c\d0wg\d7J$$\1c\ec\a3\f1/ne\b2\e4\c8\e26\bfR\b1ut\f46>\08f\16}\c3\c0\91\f9\98Z\c2\baS\fcE\1c\ae\ca\e7_el`\db>\f63\98\f5P\b4\d3\89\c2\94\90Bd\13\14\19\fe@W\d2X\c7\82\e1\da\01\c1*|\86Eq\e6\d5\06\ba@RM\c6\d2r\0e\0dt\f5\8aV\ee\a6\c9\9dH!a7\9b\f0\22\fc=w\a6\a7\a7$\e5l\01\a3\ae\10\93\83\ed\db5\04i\80\afW*K\09\d0\ffx\8b\16\bc\b3-\918\e8\b7\c2{#\11E0_\83es\94%\e2\f7\cf\bf\b1\b4\04\196\e6\9ci\c9\a5W\cfN!\0cU\1db\c7\f3\9a)\bba\bajp\c7=\ee+]n\ad\e0\fb\e9x\d3y/;\18\df\a8\bfCE\fb\fc\88\e3|\b7\f4q\5c\f4?\d7\dbpdM\883\af\eb\0f\9b\058\de\d8\ce\9eY\5c\95\04\0a\1f^\a2\8dT\220\ad\17\e9\96*\93\b2\0cy\d0y\aa\fe\05J(8F\81\8e\bf\c2\da\14\ec\81\11\b2k\cam K\89\a6\86\cc\0d\fd\1c\9fN6\ba\18\00\00\00\00\87\a6\cbC\d4<\90\c7S\9a[\84s\08'\cf\f4\ae\ec\8c\a74\b7\08 \92|K\e6\10O\9ea\b6\84\dd2,\dfY\b5\8a\14\1a\95\18hQ\12\be\a3\12A$\f8\96\c6\823\d5\17Q\99}\90\f7R>\c3m\09\baD\cb\c2\f9dY\be\b2\e3\ffu\f1\b0e.u7\c3\e56\f1A\d6\e3v\e7\1d\a0%}F$\a2\db\8dg\82I\f1,\05\ef:oVua\eb\d1\d3\aa\a8.\a32\fa\a9\05\f9\b9\fa\9f\a2=}9i~]\ab\155\da\0d\dev\89\97\85\f2\0e1N\b1\c8\b3}dO\15\b6'\1c\8f\ed\a3\9b)&\e0\bb\bbZ\ab<\1d\91\e8o\87\cal\e8!\01/9\f2\ab\87\beT`\c4\ed\ce;@jh\f0\03J\fa\8cH\cd\5cG\0b\9e\c6\1c\8f\19`\d7\cc\df\e2\e4\19XD/Z\0b\det\de\8cx\bf\9d\ac\ea\c3\d6+L\08\95x\d6S\11\ffp\98R]Fe\f4\da\e0\ae\b7\89z\f53\0e\dc>p.NB;\a9\e8\89x\far\d2\fc}\d4\19\bf\bbV*j<\f0\e1)oj\ba\ad\e8\ccq\ee\c8^\0d\a5O\f8\c6\e6\1cb\9db\9b\c4V!J\17\fc\89\cd\b17\ca\9e+lN\19\8d\a7\0d9\1f\dbF\be\b9\10\05\ed#K\81j\85\80\c2\ac\07\b3\17+\a1xTx;#\d0\ff\9d\e8\93\df\0f\94\d8X\a9_\9b\0b3\04\1f\8c\95\cf\5cs\e5W\0e\f4C\9cM\a7\d9\c7\c9 \7f\0c\8a\00\edp\c1\87K\bb\82\d4\d1\e0\06Sw+E\95\f5\18\90\12S\d3\d3A\c9\88W\c6oC\14\e6\fd?_a[\f4\1c2\c1\af\98\b5gd\dbd\b4\ces\e3\12\050\b0\88^\b47.\95\f7\17\bc\e9\bc\90\1a\22\ff\c3\80y{D&\b28\82\a4\81\ed\05\02J\aeV\98\11*\d1>\dai\f1\ac\a6\22v\0ama%\906\e5\a26\fd\a6\ba\8c\cb\e8=*\00\abn\b0[/\e9\16\90l\c9\84\ec'N\22'd\1d\b8|\e0\9a\1e\b7\a3\5c\9c\84v\db:O5\88\a0\14\b1\0f\06\df\f2/\94\a3\b9\a82h\fa\fb\a83~|\0e\f8=\ad\ddR\95*{\99\d6y\e1\c2R\feG\09\11\de\d5uZYs\be\19\0a\e9\e5\9d\8dO.\deK\cd\1d\0b\cck\d6H\9f\f1\8d\cc\18WF\8f8\c5:\c4\bfc\f1\87\ec\f9\aa\03k_a@\94/\f9\12\13\892Q@\13i\d5\c7\b5\a2\96\e7'\de\dd`\81\15\9e3\1bN\1a\b4\bd\85Yr?\b6\8c\f5\99}\cf\a6\03&K!\a5\ed\08\017\91C\86\91Z\00\d5\0b\01\84R\ad\ca\c7\83~`o\04\d8\ab,WB\f0\a8\d0\e4;\eb\f0vG\a0w\d0\8c\e3$J\d7g\a3\ec\1c$en/\f1\e2\c8\e4\b2\b1R\bf66\f4tu\16f\08>\91\c0\c3}\c2Z\98\f9E\fcS\ba\e7\ca\ae\1c`le_3\f6>\db\b4P\f5\98\94\c2\89\d3\13dB\90@\fe\19\14\c7X\d2W\01\da\e1\82\86|*\c1\d5\e6qER@\ba\06r\d2\c6M\f5t\0d\0e\a6\eeV\8a!H\9d\c9\f0\9b7aw=\fc\22$\a7\a7\a6\a3\01l\e5\83\93\10\ae\045\db\edW\af\80i\d0\09K*\16\8bx\ff\91-\b3\bc\c2\b7\e88E\11#{e\83_0\e2%\94s\b1\bf\cf\f76\19\04\b4\c9i\9c\e6N\cfW\a5\1dU\0c!\9a\f3\c7b\baa\bb)=\c7pjn]+\ee\e9\fb\e0\ad/y\d3x\a8\df\18;\fbEC\bf|\e3\88\fc\5cq\f4\b7\db\d7?\f4\88Mdp\0f\eb\af3\de8\05\9bY\9e\ce\d8\0a\04\95\5c\8d\a2^\1f\ad0\22T*\96\e9\17y\0c\b2\93\fe\aay\d08(J\05\bf\8e\81F\ec\14\da\c2k\b2\11\81K m\ca\cc\86\a6\89\9f\1c\fd\0d\18\ba6N\00\00\00\00\efR\b6\e1\05\d4k\83\ea\86\ddb\0b\a8\d7\06\e4\faa\e7\0e|\bc\85\e1.\0ad\17Q\ae\0c\f8\03\18\ed\12\85\c5\8f\fd\d7sn\1c\f9y\0a\f3\ab\cf\eb\19-\12\89\f6\7f\a4h.\a3\5c\18\c1\f1\ea\f9+w7\9b\c4%\81z%\0b\8b\1e\caY=\ff \df\e0\9d\cf\8dV|9\f2\f2\14\d6\a0D\f5<&\99\97\d3t/v2Z%\12\dd\08\93\f37\8eN\91\d8\dc\f8p]F\b80\b2\14\0e\d1X\92\d3\b3\b7\c0eRV\eeo6\b9\bc\d9\d7S:\04\b5\bch\b2TJ\17\16<\a5E\a0\ddO\c3}\bf\a0\91\cb^A\bf\c1:\ae\edw\dbDk\aa\b9\ab9\1cXs\e5\e4(\9c\b7R\c9v1\8f\ab\99c9JxM3.\97\1f\85\cf}\99X\ad\92\cb\eeLd\b4J$\8b\e6\fc\c5a`!\a7\8e2\97Fo\1c\9d\22\80N+\c3j\c8\f6\a1\85\9a@@\ba\8dp`U\df\c6\81\bfY\1b\e3P\0b\ad\02\b1%\a7f^w\11\87\b4\f1\cc\e5[\a3z\04\ad\dc\delB\8eh\8d\a8\08\b5\efGZ\03\0e\a6t\09jI&\bf\8b\a3\a0b\e9L\f2\d4\08\94.,x{|\9a\99\91\faG\fb~\a8\f1\1a\9f\86\fb~p\d4M\9f\9aR\90\fdu\00&\1c\83\7f\82tl-4\95\86\ab\e9\f7i\f9_\16\88\d7Urg\85\e3\93\8d\03>\f1bQ\88\10\e7\cb\c8P\08\99~\b1\e2\1f\a3\d3\0dM\152\ecc\1fV\031\a9\b7\e9\b7t\d5\06\e5\c24\f0\9af\5c\1f\c8\d0\bd\f5N\0d\df\1a\1c\bb>\fb2\b1Z\14`\07\bb\fe\e6\da\d9\11\b4l8\c9h\94H&:\22\a9\cc\bc\ff\cb#\eeI*\c2\c0CN-\92\f5\af\c7\14(\cd(F\9e,\de9:D1k\8c\a5\db\edQ\c74\bf\e7&\d5\91\edB:\c3[\a3\d0E\86\c1?\170 \aek\e6\81A9P`\ab\bf\8d\02D\ed;\e3\a5\c31\87J\91\87f\a0\17Z\04OE\ec\e5\b9:H\8dVh\fel\bc\ee#\0eS\bc\95\ef\b2\92\9f\8b]\c0)j\b7F\f4\08X\14B\e9\80\c8\ba\99o\9a\0cx\85\1c\d1\1ajNg\fb\8b`m\9fd2\db~\8e\b4\06\1ca\e6\b0\fd\97\99\14\95x\cb\a2t\92M\7f\16}\1f\c9\f7\9c1\c3\93scur\99\e5\a8\10v\b7\1e\f1\f3-^\b1\1c\7f\e8P\f6\f952\19\ab\83\d3\f8\85\89\b7\17\d7?V\fdQ\e24\12\03T\d5\e4|\f0\bd\0b.F\5c\e1\a8\9b>\0e\fa-\df\ef\d4'\bb\00\86\91Z\ea\00L8\05R\fa\d9\dd\8e\02\a92\dc\b4H\d8Zi*7\08\df\cb\d6&\d5\af9tcN\d3\f2\be,<\a0\08\cd\ca\df\ac\a5%\8d\1aD\cf\0b\c7& Yq\c7\c1w{\a3.%\cdB\c4\a3\10 +\f1\a6\c1\14\e6\96\e1\fb\b4 \00\112\fdb\fe`K\83\1fNA\e7\f0\1c\f7\06\1a\9a*d\f5\c8\9c\85\03\b78\ed\ec\e5\8e\0c\06cSn\e91\e5\8f\08\1f\ef\eb\e7MY\0a\0d\cb\84h\e2\992\89:E\ca\f9\d5\17|\18?\91\a1z\d0\c3\17\9b1\ed\1d\ff\de\bf\ab\1e49v|\dbk\c0\9d-\14d\f5\c2F\d2\14(\c0\0fv\c7\92\b9\97&\bc\b3\f3\c9\ee\05\12#h\d8p\cc:n\91I\a0.\d1\a6\f2\980LtER\a3&\f3\b3B\08\f9\d7\adZO6G\dc\92T\a8\8e$\b5^\f1\80\dd\b1\a36<[%\eb^\b4w]\bfUYW\db\ba\0b\e1:P\8d\8a\8d\ba\9d\dc\0b\13J>\8bK\09\a1\1d\85\deC\9d\dd}\15\1bt\aa\f7\9b,\e0\c9\10g7+\90?\94}\16\96C\9f\96\ce\13B;\0a\c4\a0\bbRg\f6=\fb\b0\14\bd\a3\fa*6\e8-\c8\b6\b0\8e\9e0\19Y|\b0A\1a\e3&\8f\cd\01\a6\d7nW ~\b9\b5\a0&\f3\8b+m$i\ab5\87?-\9cP\dd\ad\c4&\84v\14\f1f\f6LR0p\e5\85\d2\f0\bd\cf\ec{\f6\18\0e\fb\ae\bbX}\07l\ba\fd_/%k\91\f8\c7\eb\c9[\91m`\8cs\ed8\c6Mfs\11\af\e6+\b2\f9`\82e\1b\e0\da5\c6M\1e\e2$\cdFArK\ef\96\90\cb\b7\dc\ae@\fc\0bL\c0\a4\a8\1aF\0d\7f\f8\c6U{(\e8\b8\d2\ff\0a8\8a\af\d7\95Nx5\15\16\dbc\93\bf\0c\81\13\e7F\bf\98\ac\91]\18\f42\0b\9e]\e5\e9\1e\05\a6v\88\cbq\94\08\93\d2\c2\8e:\05 \0ebO\1e\85)\98\fc\05q;\aa\83\d8\ecH\03\80\d7\194x\00\fb\b4 \a3\ad2\89tO\b2\d1>q9\9a\e9\93\b9\c2J\c5?k\9d'\bf3\de\b8)\fd\09Z\a9\a5\aa\0c/\0c}\ee\afT7\d0$\1f\e02\a4GCd\22\ee\94\86\a2\b6\c4[\0fr\13\b9\8f*\b0\ef\09\83g\0d\89\db-3\02\90\fa\d1\82\c8Y\87\04a\8ee\849\cd\fa\12\f7\1a\18\92\af\b9N\14\06n\ac\94^$\92\1f\15\f3p\9fMP&\19\e4\87\c4\99\bc\f1\9dBl&\7f\c24\85)D\9dR\cb\c4\c5\18\f5O\8e\cf\17\cf\d6lAI\7f\bb\a3\c9'\f8<_\e9/\de\df\b1\8c\88Y\18[j\d9@\11TR\0b\c6\b6\d2Se\e0T\fa\b2\02\d4\a2\e2\dfyf5=\f9>\96k\7f\97A\89\ff\cf\0b\b7t\84\dcU\f4\dc\7f\03ru\a8\e1\f2-\eb~d\e3<\9c\e4\bb\9f\cab\12H(\e2J\02\16i\01\d5\f4\e9Yv\a2o\f0\a1@\ef\a8\00\00\00\00eg;F\ca\cev\8c\af\a9M\caN\ed\ebY+\8a\d0\1f\84#\9d\d5\e1D\a6\93\9d\db\d6\b2\f8\bc\ed\f4W\15\a0>2r\9bx\d36=\eb\b6Q\06\ad\19\f8Kg|\9fp!\e0\c6\ab%\85\a1\90c*\08\dd\a9Oo\e6\ef\ae+@|\cbL{:d\e56\f0\01\82\0d\b6}\1d}\97\18zF\d1\b7\d3\0b\1b\d2\b40]3\f0\96\ceV\97\ad\88\f9>\e0B\9cY\db\04\1a\fcP\0b\7f\9bkM\d02&\87\b5U\1d\c1T\11\bbR1v\80\14\9e\df\cd\de\fb\b8\f6\98\87'\86\b9\e2@\bd\ffM\e9\f05(\8e\cbs\c9\cam\e0\ac\adV\a6\03\04\1blfc *\fa:\fb.\9f]\c0h0\f4\8d\a2U\93\b6\e4\b4\d7\10w\d1\b0+1~\19f\fb\1b~]\bdg\e1-\9c\02\86\16\da\ad/[\10\c8H`V)\0c\c6\c5Lk\fd\83\e3\c2\b0I\86\a5\8b\0f5\f8\a0\16P\9f\9bP\ff6\d6\9a\9aQ\ed\dc{\15KO\1erp\09\b1\db=\c3\d4\bc\06\85\a8#v\a4\cdDM\e2b\ed\00(\07\8a;n\e6\ce\9d\fd\83\a9\a6\bb,\00\ebqIg\d07\d5>\0b3\b0Y0u\1f\f0}\bfz\97F\f9\9b\d3\e0j\fe\b4\db,Q\1d\96\e64z\ad\a0H\e5\dd\81-\82\e6\c7\82+\ab\0d\e7L\90K\06\086\d8co\0d\9e\cc\c6@T\a9\a1{\12/\04\f0\1dJc\cb[\e5\ca\86\91\80\ad\bd\d7a\e9\1bD\04\8e \02\ab'm\c8\ce@V\8e\b2\df&\af\d7\b8\1d\e9x\11P#\1dvke\fc2\cd\f6\99U\f6\b06\fc\bbzS\9b\80<\cf\c2[8\aa\a5`~\05\0c-\b4`k\16\f2\81/\b0a\e4H\8b'K\e1\c6\ed.\86\fd\abR\19\8d\8a7~\b6\cc\98\d7\fb\06\fd\b0\c0@\1c\f4f\d3y\93]\95\d6:\10_\b3]+\19k\f1@,\0e\96{j\a1?6\a0\c4X\0d\e6%\1c\abu@{\903\ef\d2\dd\f9\8a\b5\e6\bf\f6*\96\9e\93M\ad\d8<\e4\e0\12Y\83\dbT\b8\c7}\c7\dd\a0F\81r\09\0bK\17n0\0d\8b7\eb\09\eeP\d0OA\f9\9d\85$\9e\a6\c3\c5\da\00P\a0\bd;\16\0f\14v\dcjsM\9a\16\ec=\bbs\8b\06\fd\dc\22K7\b9EpqX\01\d6\e2=f\ed\a4\92\cf\a0n\f7\a8\9b(q\0d\10'\14j+a\bb\c3f\ab\de\a4]\ed?\e0\fb~Z\87\c08\f5.\8d\f2\90I\b6\b4\ec\d6\c6\95\89\b1\fd\d3&\18\b0\19C\7f\8b_\a2;-\cc\c7\5c\16\8ah\f5[@\0d\92`\06\91\cb\bb\02\f4\ac\80D[\05\cd\8e>b\f6\c8\df&P[\baAk\1d\15\e8&\d7p\8f\1d\91\0c\10m\b0iwV\f6\c6\de\1b<\a3\b9 zB\fd\86\e9'\9a\bd\af\883\f0e\edT\cb#^\09\e0:;n\db|\94\c7\96\b6\f1\a0\ad\f0\10\e4\0bcu\830%\da*}\ef\bfMF\a9\c3\d26\88\a6\b5\0d\ce\09\1c@\04l{{B\8d?\dd\d1\e8X\e6\97G\f1\ab]\22\96\90\1b\be\cfK\1f\db\a8pYt\01=\93\11f\06\d5\f0\22\a0F\95E\9b\00:\ec\d6\ca_\8b\ed\8c#\14\9d\adFs\a6\eb\e9\da\eb!\8c\bd\d0gm\f9v\f4\08\9eM\b2\a77\00x\c2P;>D\f5\b01!\92\8bw\8e;\c6\bd\eb\5c\fd\fb\0a\18[ho\7f`.\c0\d6-\e4\a5\b1\16\a2\d9.f\83\bcI]\c5\13\e0\10\0fv\87+I\97\c3\8d\da\f2\a4\b6\9c]\0d\fbV8j\c0\10\a43\1b\14\c1T Rn\fdm\98\0b\9aV\de\ea\de\f0M\8f\b9\cb\0b \10\86\c1Ew\bd\879\e8\cd\a6\5c\8f\f6\e0\f3&\bb*\96A\80lw\05&\ff\12b\1d\b9\bd\cbPs\d8\ack5\00\00\00\00w\070\96\ee\0ea,\99\09Q\ba\07m\c4\19pj\f4\8f\e9c\a55\9ed\95\a3\0e\db\882y\dc\b8\a4\e0\d5\e9\1e\97\d2\d9\88\09\b6L+~\b1|\bd\e7\b8-\07\90\bf\1d\91\1d\b7\10dj\b0 \f2\f3\b9qH\84\beA\de\1a\da\d4}m\dd\e4\eb\f4\d4\b5Q\83\d3\85\c7\13l\98Vdk\a8\c0\fdb\f9z\8ae\c9\ec\14\01\5cOc\06l\d9\fa\0f=c\8d\08\0d\f5;n \c8Li\10^\d5`A\e4\a2gqr<\03\e4\d1K\04\d4G\d2\0d\85\fd\a5\0a\b5k5\b5\a8\faB\b2\98l\db\bb\c9\d6\ac\bc\f9@2\d8l\e3E\df\5cu\dc\d6\0d\cf\ab\d1=Y&\d90\acQ\de\00:\c8\d7Q\80\bf\d0a\16!\b4\f4\b5V\b3\c4#\cf\ba\95\99\b8\bd\a5\0f(\02\b8\9e_\05\88\08\c6\0c\d9\b2\b1\0b\e9$/o|\87XhL\11\c1a\1d\ab\b6f-=v\dcA\90\01\dbq\06\98\d2 \bc\ef\d5\10*q\b1\85\89\06\b6\b5\1f\9f\bf\e4\a5\e8\b8\d43x\07\c9\a2\0f\00\f94\96\09\a8\8e\e1\0e\98\18\7fj\0d\bb\08m=-\91dl\97\e6c\5c\01kkQ\f4\1clab\85e0\d8\f2b\00Nl\06\95\ed\1b\01\a5{\82\08\f4\c1\f5\0f\c4We\b0\d9\c6\12\b7\e9P\8b\be\b8\ea\fc\b9\88|b\dd\1d\df\15\da-I\8c\d3|\f3\fb\d4LeM\b2aX:\b5Q\ce\a3\bc\00t\d4\bb0\e2J\df\a5A=\d8\95\d7\a4\d1\c4m\d3\d6\f4\fbCi\e9j4n\d9\fc\adg\88F\da`\b8\d0D\04-s3\03\1d\e5\aa\0aL_\dd\0d|\c9P\05q<'\02A\aa\be\0b\10\10\c9\0c \86Wh\b5% o\85\b3\b9f\d4\09\cea\e4\9f^\de\f9\0e)\d9\c9\98\b0\d0\98\22\c7\d7\a8\b4Y\b3=\17.\b4\0d\81\b7\bd\5c;\c0\bal\ad\ed\b8\83 \9a\bf\b3\b6\03\b6\e2\0ct\b1\d2\9a\ea\d5G9\9d\d2w\af\04\db&\15s\dc\16\83\e3c\0b\12\94d;\84\0dmj>zjZ\a8\e4\0e\cf\0b\93\09\ff\9d\0a\00\ae'}\07\9e\b1\f0\0f\93D\87\08\a3\d2\1e\01\f2hi\06\c2\fe\f7bW]\80eg\cb\19l6qnk\06\e7\fe\d4\1bv\89\d3+\e0\10\dazZg\ddJ\cc\f9\b9\dfo\8e\be\ef\f9\17\b7\beC`\b0\8e\d5\d6\d6\a3\e8\a1\d1\93~8\d8\c2\c4O\df\f2R\d1\bbg\f1\a6\bcWg?\b5\06\ddH\b26K\d8\0d+\da\af\0a\1bL6\03J\f6A\04z`\df`\ef\c3\a8g\dfU1n\8e\efFi\bey\cba\b3\8c\bcf\83\1a%o\d2\a0Rh\e26\cc\0cw\95\bb\0bG\03\22\02\16\b9U\05&/\c5\ba;\be\b2\bd\0b(+\b4Z\92\5c\b3j\04\c2\d7\ff\a7\b5\d0\cf1,\d9\9e\8b[\de\ae\1d\9bd\c2\b0\ecc\f2&uj\a3\9c\02m\93\0a\9c\09\06\a9\eb\0e6?r\07g\85\05\00W\13\95\bfJ\82\e2\b8z\14{\b1+\ae\0c\b6\1b8\92\d2\8e\9b\e5\d5\be\0d|\dc\ef\b7\0b\db\df!\86\d3\d2\d4\f1\d4\e2Bh\dd\b3\f8\1f\da\83n\81\be\16\cd\f6\b9&[o\b0w\e1\18\b7Gw\88\08Z\e6\ff\0fjpf\06;\ca\11\01\0b\5c\8fe\9e\ff\f8b\aeiak\ff\d3\16l\cfE\a0\0a\e2x\d7\0d\d2\eeN\04\83T9\03\b3\c2\a7g&a\d0`\16\f7IiGM>nw\db\ae\d1jJ\d9\d6Z\dc@\df\0bf7\d8;\f0\a9\bc\aeS\de\bb\9e\c5G\b2\cf\7f0\b5\ff\e9\bd\bd\f2\1c\ca\ba\c2\8aS\b3\930$\b4\a3\a6\ba\d06\05\cd\d7\06\93T\deW)#\d9g\bf\b3fz.\c4aJ\b8]h\1b\02*o+\94\b4\0b\be7\c3\0c\8e\a1Z\05\df\1b-\02\ef\8d1.3.1\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\bd\01\00\00\04\00\04\00\08\00\04\00\be\01\00\00\04\00\05\00\10\00\08\00\be\01\00\00\04\00\06\00 \00 \00\be\01\00\00\04\00\04\00\10\00\10\00\bf\01\00\00\08\00\10\00 \00 \00\bf\01\00\00\08\00\10\00\80\00\80\00\bf\01\00\00\08\00 \00\80\00\00\01\bf\01\00\00 \00\80\00\02\01\00\04\bf\01\00\00 \00\02\01\02\01\00\10\bf\01\00\00\00\00\00\00\00\00\00\00\10\00\11\00\12\00\00\00\08\00\07\00\09\00\06\00\0a\00\05\00\0b\00\04\00\0c\00\03\00\0d\00\02\00\0e\00\01\00\0f\00\00\00\00\00\00\00\00\00\00\00`\07\00\00\00\08P\00\00\08\10\00\14\08s\00\12\07\1f\00\00\08p\00\00\080\00\00\09\c0\00\10\07\0a\00\00\08`\00\00\08 \00\00\09\a0\00\00\08\00\00\00\08\80\00\00\08@\00\00\09\e0\00\10\07\06\00\00\08X\00\00\08\18\00\00\09\90\00\13\07;\00\00\08x\00\00\088\00\00\09\d0\00\11\07\11\00\00\08h\00\00\08(\00\00\09\b0\00\00\08\08\00\00\08\88\00\00\08H\00\00\09\f0\00\10\07\04\00\00\08T\00\00\08\14\00\15\08\e3\00\13\07+\00\00\08t\00\00\084\00\00\09\c8\00\11\07\0d\00\00\08d\00\00\08$\00\00\09\a8\00\00\08\04\00\00\08\84\00\00\08D\00\00\09\e8\00\10\07\08\00\00\08\5c\00\00\08\1c\00\00\09\98\00\14\07S\00\00\08|\00\00\08<\00\00\09\d8\00\12\07\17\00\00\08l\00\00\08,\00\00\09\b8\00\00\08\0c\00\00\08\8c\00\00\08L\00\00\09\f8\00\10\07\03\00\00\08R\00\00\08\12\00\15\08\a3\00\13\07#\00\00\08r\00\00\082\00\00\09\c4\00\11\07\0b\00\00\08b\00\00\08\22\00\00\09\a4\00\00\08\02\00\00\08\82\00\00\08B\00\00\09\e4\00\10\07\07\00\00\08Z\00\00\08\1a\00\00\09\94\00\14\07C\00\00\08z\00\00\08:\00\00\09\d4\00\12\07\13\00\00\08j\00\00\08*\00\00\09\b4\00\00\08\0a\00\00\08\8a\00\00\08J\00\00\09\f4\00\10\07\05\00\00\08V\00\00\08\16\00@\08\00\00\13\073\00\00\08v\00\00\086\00\00\09\cc\00\11\07\0f\00\00\08f\00\00\08&\00\00\09\ac\00\00\08\06\00\00\08\86\00\00\08F\00\00\09\ec\00\10\07\09\00\00\08^\00\00\08\1e\00\00\09\9c\00\14\07c\00\00\08~\00\00\08>\00\00\09\dc\00\12\07\1b\00\00\08n\00\00\08.\00\00\09\bc\00\00\08\0e\00\00\08\8e\00\00\08N\00\00\09\fc\00`\07\00\00\00\08Q\00\00\08\11\00\15\08\83\00\12\07\1f\00\00\08q\00\00\081\00\00\09\c2\00\10\07\0a\00\00\08a\00\00\08!\00\00\09\a2\00\00\08\01\00\00\08\81\00\00\08A\00\00\09\e2\00\10\07\06\00\00\08Y\00\00\08\19\00\00\09\92\00\13\07;\00\00\08y\00\00\089\00\00\09\d2\00\11\07\11\00\00\08i\00\00\08)\00\00\09\b2\00\00\08\09\00\00\08\89\00\00\08I\00\00\09\f2\00\10\07\04\00\00\08U\00\00\08\15\00\10\08\02\01\13\07+\00\00\08u\00\00\085\00\00\09\ca\00\11\07\0d\00\00\08e\00\00\08%\00\00\09\aa\00\00\08\05\00\00\08\85\00\00\08E\00\00\09\ea\00\10\07\08\00\00\08]\00\00\08\1d\00\00\09\9a\00\14\07S\00\00\08}\00\00\08=\00\00\09\da\00\12\07\17\00\00\08m\00\00\08-\00\00\09\ba\00\00\08\0d\00\00\08\8d\00\00\08M\00\00\09\fa\00\10\07\03\00\00\08S\00\00\08\13\00\15\08\c3\00\13\07#\00\00\08s\00\00\083\00\00\09\c6\00\11\07\0b\00\00\08c\00\00\08#\00\00\09\a6\00\00\08\03\00\00\08\83\00\00\08C\00\00\09\e6\00\10\07\07\00\00\08[\00\00\08\1b\00\00\09\96\00\14\07C\00\00\08{\00\00\08;\00\00\09\d6\00\12\07\13\00\00\08k\00\00\08+\00\00\09\b6\00\00\08\0b\00\00\08\8b\00\00\08K\00\00\09\f6\00\10\07\05\00\00\08W\00\00\08\17\00@\08\00\00\13\073\00\00\08w\00\00\087\00\00\09\ce\00\11\07\0f\00\00\08g\00\00\08'\00\00\09\ae\00\00\08\07\00\00\08\87\00\00\08G\00\00\09\ee\00\10\07\09\00\00\08_\00\00\08\1f\00\00\09\9e\00\14\07c\00\00\08\7f\00\00\08?\00\00\09\de\00\12\07\1b\00\00\08o\00\00\08/\00\00\09\be\00\00\08\0f\00\00\08\8f\00\00\08O\00\00\09\fe\00`\07\00\00\00\08P\00\00\08\10\00\14\08s\00\12\07\1f\00\00\08p\00\00\080\00\00\09\c1\00\10\07\0a\00\00\08`\00\00\08 \00\00\09\a1\00\00\08\00\00\00\08\80\00\00\08@\00\00\09\e1\00\10\07\06\00\00\08X\00\00\08\18\00\00\09\91\00\13\07;\00\00\08x\00\00\088\00\00\09\d1\00\11\07\11\00\00\08h\00\00\08(\00\00\09\b1\00\00\08\08\00\00\08\88\00\00\08H\00\00\09\f1\00\10\07\04\00\00\08T\00\00\08\14\00\15\08\e3\00\13\07+\00\00\08t\00\00\084\00\00\09\c9\00\11\07\0d\00\00\08d\00\00\08$\00\00\09\a9\00\00\08\04\00\00\08\84\00\00\08D\00\00\09\e9\00\10\07\08\00\00\08\5c\00\00\08\1c\00\00\09\99\00\14\07S\00\00\08|\00\00\08<\00\00\09\d9\00\12\07\17\00\00\08l\00\00\08,\00\00\09\b9\00\00\08\0c\00\00\08\8c\00\00\08L\00\00\09\f9\00\10\07\03\00\00\08R\00\00\08\12\00\15\08\a3\00\13\07#\00\00\08r\00\00\082\00\00\09\c5\00\11\07\0b\00\00\08b\00\00\08\22\00\00\09\a5\00\00\08\02\00\00\08\82\00\00\08B\00\00\09\e5\00\10\07\07\00\00\08Z\00\00\08\1a\00\00\09\95\00\14\07C\00\00\08z\00\00\08:\00\00\09\d5\00\12\07\13\00\00\08j\00\00\08*\00\00\09\b5\00\00\08\0a\00\00\08\8a\00\00\08J\00\00\09\f5\00\10\07\05\00\00\08V\00\00\08\16\00@\08\00\00\13\073\00\00\08v\00\00\086\00\00\09\cd\00\11\07\0f\00\00\08f\00\00\08&\00\00\09\ad\00\00\08\06\00\00\08\86\00\00\08F\00\00\09\ed\00\10\07\09\00\00\08^\00\00\08\1e\00\00\09\9d\00\14\07c\00\00\08~\00\00\08>\00\00\09\dd\00\12\07\1b\00\00\08n\00\00\08.\00\00\09\bd\00\00\08\0e\00\00\08\8e\00\00\08N\00\00\09\fd\00`\07\00\00\00\08Q\00\00\08\11\00\15\08\83\00\12\07\1f\00\00\08q\00\00\081\00\00\09\c3\00\10\07\0a\00\00\08a\00\00\08!\00\00\09\a3\00\00\08\01\00\00\08\81\00\00\08A\00\00\09\e3\00\10\07\06\00\00\08Y\00\00\08\19\00\00\09\93\00\13\07;\00\00\08y\00\00\089\00\00\09\d3\00\11\07\11\00\00\08i\00\00\08)\00\00\09\b3\00\00\08\09\00\00\08\89\00\00\08I\00\00\09\f3\00\10\07\04\00\00\08U\00\00\08\15\00\10\08\02\01\13\07+\00\00\08u\00\00\085\00\00\09\cb\00\11\07\0d\00\00\08e\00\00\08%\00\00\09\ab\00\00\08\05\00\00\08\85\00\00\08E\00\00\09\eb\00\10\07\08\00\00\08]\00\00\08\1d\00\00\09\9b\00\14\07S\00\00\08}\00\00\08=\00\00\09\db\00\12\07\17\00\00\08m\00\00\08-\00\00\09\bb\00\00\08\0d\00\00\08\8d\00\00\08M\00\00\09\fb\00\10\07\03\00\00\08S\00\00\08\13\00\15\08\c3\00\13\07#\00\00\08s\00\00\083\00\00\09\c7\00\11\07\0b\00\00\08c\00\00\08#\00\00\09\a7\00\00\08\03\00\00\08\83\00\00\08C\00\00\09\e7\00\10\07\07\00\00\08[\00\00\08\1b\00\00\09\97\00\14\07C\00\00\08{\00\00\08;\00\00\09\d7\00\12\07\13\00\00\08k\00\00\08+\00\00\09\b7\00\00\08\0b\00\00\08\8b\00\00\08K\00\00\09\f7\00\10\07\05\00\00\08W\00\00\08\17\00@\08\00\00\13\073\00\00\08w\00\00\087\00\00\09\cf\00\11\07\0f\00\00\08g\00\00\08'\00\00\09\af\00\00\08\07\00\00\08\87\00\00\08G\00\00\09\ef\00\10\07\09\00\00\08_\00\00\08\1f\00\00\09\9f\00\14\07c\00\00\08\7f\00\00\08?\00\00\09\df\00\12\07\1b\00\00\08o\00\00\08/\00\00\09\bf\00\00\08\0f\00\00\08\8f\00\00\08O\00\00\09\ff\00\10\05\01\00\17\05\01\01\13\05\11\00\1b\05\01\10\11\05\05\00\19\05\01\04\15\05A\00\1d\05\01@\10\05\03\00\18\05\01\02\14\05!\00\1c\05\01 \12\05\09\00\1a\05\01\08\16\05\81\00@\05\00\00\10\05\02\00\17\05\81\01\13\05\19\00\1b\05\01\18\11\05\07\00\19\05\01\06\15\05a\00\1d\05\01`\10\05\04\00\18\05\01\03\14\051\00\1c\05\010\12\05\0d\00\1a\05\01\0c\16\05\c1\00@\05\00\00\03\00\04\00\05\00\06\00\07\00\08\00\09\00\0a\00\0b\00\0d\00\0f\00\11\00\13\00\17\00\1b\00\1f\00#\00+\003\00;\00C\00S\00c\00s\00\83\00\a3\00\c3\00\e3\00\02\01\00\00\00\00\00\00\10\00\10\00\10\00\10\00\10\00\10\00\10\00\10\00\11\00\11\00\11\00\11\00\12\00\12\00\12\00\12\00\13\00\13\00\13\00\13\00\14\00\14\00\14\00\14\00\15\00\15\00\15\00\15\00\10\00\cb\00M\00\00\00\01\00\02\00\03\00\04\00\05\00\07\00\09\00\0d\00\11\00\19\00!\001\00A\00a\00\81\00\c1\00\01\01\81\01\01\02\01\03\01\04\01\06\01\08\01\0c\01\10\01\18\01 \010\01@\01`\00\00\00\00\10\00\10\00\10\00\10\00\11\00\11\00\12\00\12\00\13\00\13\00\14\00\14\00\15\00\15\00\16\00\16\00\17\00\17\00\18\00\18\00\19\00\19\00\1a\00\1a\00\1b\00\1b\00\1c\00\1c\00\1d\00\1d\00@\00@\00\00\01\02\03\04\04\05\05\06\06\06\06\07\07\07\07\08\08\08\08\08\08\08\08\09\09\09\09\09\09\09\09\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0b\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0c\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0d\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0e\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\0f\00\00\10\11\12\12\13\13\14\14\14\14\15\15\15\15\16\16\16\16\16\16\16\16\17\17\17\17\17\17\17\17\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1c\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\1d\00\01\02\03\04\05\06\07\08\08\09\09\0a\0a\0b\0b\0c\0c\0c\0c\0d\0d\0d\0d\0e\0e\0e\0e\0f\0f\0f\0f\10\10\10\10\10\10\10\10\11\11\11\11\11\11\11\11\12\12\12\12\12\12\12\12\13\13\13\13\13\13\13\13\14\14\14\14\14\14\14\14\14\14\14\14\14\14\14\14\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\16\16\16\16\16\16\16\16\16\16\16\16\16\16\16\16\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\17\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\19\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1a\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1b\1c\b0\a5\00\00\b0\aa\00\00\01\01\00\00\1e\01\00\00\0f\00\00\000\aa\00\000\ab\00\00\00\00\00\00\1e\00\00\00\0f\00\00\00\00\00\00\00\b0\ab\00\00\00\00\00\00\13\00\00\00\07\00\00\00\00\00\00\00\0c\00\08\00\8c\00\08\00L\00\08\00\cc\00\08\00,\00\08\00\ac\00\08\00l\00\08\00\ec\00\08\00\1c\00\08\00\9c\00\08\00\5c\00\08\00\dc\00\08\00<\00\08\00\bc\00\08\00|\00\08\00\fc\00\08\00\02\00\08\00\82\00\08\00B\00\08\00\c2\00\08\00\22\00\08\00\a2\00\08\00b\00\08\00\e2\00\08\00\12\00\08\00\92\00\08\00R\00\08\00\d2\00\08\002\00\08\00\b2\00\08\00r\00\08\00\f2\00\08\00\0a\00\08\00\8a\00\08\00J\00\08\00\ca\00\08\00*\00\08\00\aa\00\08\00j\00\08\00\ea\00\08\00\1a\00\08\00\9a\00\08\00Z\00\08\00\da\00\08\00:\00\08\00\ba\00\08\00z\00\08\00\fa\00\08\00\06\00\08\00\86\00\08\00F\00\08\00\c6\00\08\00&\00\08\00\a6\00\08\00f\00\08\00\e6\00\08\00\16\00\08\00\96\00\08\00V\00\08\00\d6\00\08\006\00\08\00\b6\00\08\00v\00\08\00\f6\00\08\00\0e\00\08\00\8e\00\08\00N\00\08\00\ce\00\08\00.\00\08\00\ae\00\08\00n\00\08\00\ee\00\08\00\1e\00\08\00\9e\00\08\00^\00\08\00\de\00\08\00>\00\08\00\be\00\08\00~\00\08\00\fe\00\08\00\01\00\08\00\81\00\08\00A\00\08\00\c1\00\08\00!\00\08\00\a1\00\08\00a\00\08\00\e1\00\08\00\11\00\08\00\91\00\08\00Q\00\08\00\d1\00\08\001\00\08\00\b1\00\08\00q\00\08\00\f1\00\08\00\09\00\08\00\89\00\08\00I\00\08\00\c9\00\08\00)\00\08\00\a9\00\08\00i\00\08\00\e9\00\08\00\19\00\08\00\99\00\08\00Y\00\08\00\d9\00\08\009\00\08\00\b9\00\08\00y\00\08\00\f9\00\08\00\05\00\08\00\85\00\08\00E\00\08\00\c5\00\08\00%\00\08\00\a5\00\08\00e\00\08\00\e5\00\08\00\15\00\08\00\95\00\08\00U\00\08\00\d5\00\08\005\00\08\00\b5\00\08\00u\00\08\00\f5\00\08\00\0d\00\08\00\8d\00\08\00M\00\08\00\cd\00\08\00-\00\08\00\ad\00\08\00m\00\08\00\ed\00\08\00\1d\00\08\00\9d\00\08\00]\00\08\00\dd\00\08\00=\00\08\00\bd\00\08\00}\00\08\00\fd\00\08\00\13\00\09\00\13\01\09\00\93\00\09\00\93\01\09\00S\00\09\00S\01\09\00\d3\00\09\00\d3\01\09\003\00\09\003\01\09\00\b3\00\09\00\b3\01\09\00s\00\09\00s\01\09\00\f3\00\09\00\f3\01\09\00\0b\00\09\00\0b\01\09\00\8b\00\09\00\8b\01\09\00K\00\09\00K\01\09\00\cb\00\09\00\cb\01\09\00+\00\09\00+\01\09\00\ab\00\09\00\ab\01\09\00k\00\09\00k\01\09\00\eb\00\09\00\eb\01\09\00\1b\00\09\00\1b\01\09\00\9b\00\09\00\9b\01\09\00[\00\09\00[\01\09\00\db\00\09\00\db\01\09\00;\00\09\00;\01\09\00\bb\00\09\00\bb\01\09\00{\00\09\00{\01\09\00\fb\00\09\00\fb\01\09\00\07\00\09\00\07\01\09\00\87\00\09\00\87\01\09\00G\00\09\00G\01\09\00\c7\00\09\00\c7\01\09\00'\00\09\00'\01\09\00\a7\00\09\00\a7\01\09\00g\00\09\00g\01\09\00\e7\00\09\00\e7\01\09\00\17\00\09\00\17\01\09\00\97\00\09\00\97\01\09\00W\00\09\00W\01\09\00\d7\00\09\00\d7\01\09\007\00\09\007\01\09\00\b7\00\09\00\b7\01\09\00w\00\09\00w\01\09\00\f7\00\09\00\f7\01\09\00\0f\00\09\00\0f\01\09\00\8f\00\09\00\8f\01\09\00O\00\09\00O\01\09\00\cf\00\09\00\cf\01\09\00/\00\09\00/\01\09\00\af\00\09\00\af\01\09\00o\00\09\00o\01\09\00\ef\00\09\00\ef\01\09\00\1f\00\09\00\1f\01\09\00\9f\00\09\00\9f\01\09\00_\00\09\00_\01\09\00\df\00\09\00\df\01\09\00?\00\09\00?\01\09\00\bf\00\09\00\bf\01\09\00\7f\00\09\00\7f\01\09\00\ff\00\09\00\ff\01\09\00\00\00\07\00@\00\07\00 \00\07\00`\00\07\00\10\00\07\00P\00\07\000\00\07\00p\00\07\00\08\00\07\00H\00\07\00(\00\07\00h\00\07\00\18\00\07\00X\00\07\008\00\07\00x\00\07\00\04\00\07\00D\00\07\00$\00\07\00d\00\07\00\14\00\07\00T\00\07\004\00\07\00t\00\07\00\03\00\08\00\83\00\08\00C\00\08\00\c3\00\08\00#\00\08\00\a3\00\08\00c\00\08\00\e3\00\08\00\00\00\05\00\10\00\05\00\08\00\05\00\18\00\05\00\04\00\05\00\14\00\05\00\0c\00\05\00\1c\00\05\00\02\00\05\00\12\00\05\00\0a\00\05\00\1a\00\05\00\06\00\05\00\16\00\05\00\0e\00\05\00\1e\00\05\00\01\00\05\00\11\00\05\00\09\00\05\00\19\00\05\00\05\00\05\00\15\00\05\00\0d\00\05\00\1d\00\05\00\03\00\05\00\13\00\05\00\0b\00\05\00\1b\00\05\00\07\00\05\00\17\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\06\00\00\00\06\00\00\00\07\00\00\00\07\00\00\00\08\00\00\00\08\00\00\00\09\00\00\00\09\00\00\00\0a\00\00\00\0a\00\00\00\0b\00\00\00\0b\00\00\00\0c\00\00\00\0c\00\00\00\0d\00\00\00\0d\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\07\00\00\00\00\00\00\00\10\11\12\00\08\07\09\06\0a\05\0b\04\0c\03\0d\02\0e\01\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\0a\00\00\00\0c\00\00\00\0e\00\00\00\10\00\00\00\14\00\00\00\18\00\00\00\1c\00\00\00 \00\00\00(\00\00\000\00\00\008\00\00\00@\00\00\00P\00\00\00`\00\00\00p\00\00\00\80\00\00\00\a0\00\00\00\c0\00\00\00\e0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\06\00\00\00\08\00\00\00\0c\00\00\00\10\00\00\00\18\00\00\00 \00\00\000\00\00\00@\00\00\00`\00\00\00\80\00\00\00\c0\00\00\00\00\01\00\00\80\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\06\00\00\00\08\00\00\00\0c\00\00\00\10\00\00\00\18\00\00\00 \00\00\000\00\00\00@\00\00\00`\00\00\00\00\00\00\00\00\00\00E\05\00\00g-\00\00\bbY\00\00\9d\13\00\00_\13\00\00\be\13\00\00\05\05\00\00I\13\00\00o\1a\00\00\bbY\00\00\00\00\00\00\00\00\00\00O\bba\05g\ac\dd?\18-DT\fb!\e9?\9b\f6\81\d2\0bs\ef?\18-DT\fb!\f9?\e2e/\22\7f+z<\07\5c\143&\a6\81<\bd\cb\f0z\88\07p<\07\5c\143&\a6\91<\18-DT\fb!\e9?\18-DT\fb!\e9\bf\d2!3\7f|\d9\02@\d2!3\7f|\d9\02\c0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\18-DT\fb!\09@\18-DT\fb!\09\c0\03\00\00\00\04\00\00\00\04\00\00\00\06\00\00\00\83\f9\a2\00DNn\00\fc)\15\00\d1W'\00\dd4\f5\00b\db\c0\00<\99\95\00A\90C\00cQ\fe\00\bb\de\ab\00\b7a\c5\00:n$\00\d2MB\00I\06\e0\00\09\ea.\00\1c\92\d1\00\eb\1d\fe\00)\b1\1c\00\e8>\a7\00\f55\82\00D\bb.\00\9c\e9\84\00\b4&p\00A~_\00\d6\919\00S\839\00\9c\f49\00\8b_\84\00(\f9\bd\00\f8\1f;\00\de\ff\97\00\0f\98\05\00\11/\ef\00\0aZ\8b\00m\1fm\00\cf~6\00\09\cb'\00FO\b7\00\9ef?\00-\ea_\00\ba'u\00\e5\eb\c7\00={\f1\00\f79\07\00\92R\8a\00\fbk\ea\00\1f\b1_\00\08]\8d\000\03V\00{\fcF\00\f0\abk\00 \bc\cf\006\f4\9a\00\e3\a9\1d\00^a\91\00\08\1b\e6\00\85\99e\00\a0\14_\00\8d@h\00\80\d8\ff\00'sM\00\06\061\00\caV\15\00\c9\a8s\00{\e2`\00k\8c\c0\00\19\c4G\00\cdg\c3\00\09\e8\dc\00Y\83*\00\8bv\c4\00\a6\1c\96\00D\af\dd\00\19W\d1\00\a5>\05\00\05\07\ff\003~?\00\c22\e8\00\98O\de\00\bb}2\00&=\c3\00\1ek\ef\00\9f\f8^\005\1f:\00\7f\f2\ca\00\f1\87\1d\00|\90!\00j$|\00\d5n\fa\000-w\00\15;C\00\b5\14\c6\00\c3\19\9d\00\ad\c4\c2\00,MA\00\0c\00]\00\86}F\00\e3q-\00\9b\c6\9a\003b\00\00\b4\d2|\00\b4\a7\97\007U\d5\00\d7>\f6\00\a3\10\18\00Mv\fc\00d\9d*\00p\d7\ab\00c|\f8\00z\b0W\00\17\15\e7\00\c0IV\00;\d6\d9\00\a7\848\00$#\cb\00\d6\8aw\00ZT#\00\00\1f\b9\00\f1\0a\1b\00\19\ce\df\00\9f1\ff\00f\1ej\00\99Wa\00\ac\fbG\00~\7f\d8\00\22e\b7\002\e8\89\00\e6\bf`\00\ef\c4\cd\00l6\09\00]?\d4\00\16\de\d7\00X;\de\00\de\9b\92\00\d2\22(\00(\86\e8\00\e2XM\00\c6\ca2\00\08\e3\16\00\e0}\cb\00\17\c0P\00\f3\1d\a7\00\18\e0[\00.\134\00\83\12b\00\83H\01\00\f5\8e[\00\ad\b0\7f\00\1e\e9\f2\00HJC\00\10g\d3\00\aa\dd\d8\00\ae_B\00ja\ce\00\0a(\a4\00\d3\99\b4\00\06\a6\f2\00\5cw\7f\00\a3\c2\83\00a<\88\00\8asx\00\af\8cZ\00o\d7\bd\00-\a6c\00\f4\bf\cb\00\8d\81\ef\00&\c1g\00U\caE\00\ca\d96\00(\a8\d2\00\c2a\8d\00\12\c9w\00\04&\14\00\12F\9b\00\c4Y\c4\00\c8\c5D\00M\b2\91\00\00\17\f3\00\d4C\ad\00)I\e5\00\fd\d5\10\00\00\be\fc\00\1e\94\cc\00p\ce\ee\00\13>\f5\00\ec\f1\80\00\b3\e7\c3\00\c7\f8(\00\93\05\94\00\c1q>\00.\09\b3\00\0bE\f3\00\88\12\9c\00\ab {\00.\b5\9f\00G\92\c2\00{2/\00\0cUm\00r\a7\90\00k\e7\1f\001\cb\96\00y\16J\00Ay\e2\00\f4\df\89\00\e8\94\97\00\e2\e6\84\00\991\97\00\88\edk\00__6\00\bb\fd\0e\00H\9a\b4\00g\a4l\00qrB\00\8d]2\00\9f\15\b8\00\bc\e5\09\00\8d1%\00\f7t9\000\05\1c\00\0d\0c\01\00K\08h\00,\eeX\00G\aa\90\00t\e7\02\00\bd\d6$\00\f7}\a6\00nHr\00\9f\16\ef\00\8e\94\a6\00\b4\91\f6\00\d1SQ\00\cf\0a\f2\00 \983\00\f5K~\00\b2ch\00\dd>_\00@]\03\00\85\89\7f\00UR)\007d\c0\00m\d8\10\002H2\00[Lu\00Nq\d4\00ETn\00\0b\09\c1\00*\f5i\00\14f\d5\00'\07\9d\00]\04P\00\b4;\db\00\eav\c5\00\87\f9\17\00Ik}\00\1d'\ba\00\96i)\00\c6\cc\ac\00\ad\14T\00\90\e2j\00\88\d9\89\00,rP\00\04\a4\be\00w\07\94\00\f30p\00\00\fc'\00\eaq\a8\00f\c2I\00d\e0=\00\97\dd\83\00\a3?\97\00C\94\fd\00\0d\86\8c\001A\de\00\929\9d\00\ddp\8c\00\17\b7\e7\00\08\df;\00\157+\00\5c\80\a0\00Z\80\93\00\10\11\92\00\0f\e8\d8\00l\80\af\00\db\ffK\008\90\0f\00Y\18v\00b\a5\15\00a\cb\bb\00\c7\89\b9\00\10@\bd\00\d2\f2\04\00Iu'\00\eb\b6\f6\00\db\22\bb\00\0a\14\aa\00\89&/\00d\83v\00\09;3\00\0e\94\1a\00Q:\aa\00\1d\a3\c2\00\af\ed\ae\00\5c&\12\00m\c2M\00-z\9c\00\c0V\97\00\03?\83\00\09\f0\f6\00+@\8c\00m1\99\009\b4\07\00\0c \15\00\d8\c3[\00\f5\92\c4\00\c6\adK\00N\ca\a5\00\a77\cd\00\e6\a96\00\ab\92\94\00\ddBh\00\19c\de\00v\8c\ef\00h\8bR\00\fc\db7\00\ae\a1\ab\00\df\151\00\00\ae\a1\00\0c\fb\da\00dMf\00\ed\05\b7\00)e0\00WV\bf\00G\ff:\00j\f9\b9\00u\be\f3\00(\93\df\00\ab\800\00f\8c\f6\00\04\cb\15\00\fa\22\06\00\d9\e4\1d\00=\b3\a4\00W\1b\8f\006\cd\09\00NB\e9\00\13\be\a4\003#\b5\00\f0\aa\1a\00Oe\a8\00\d2\c1\a5\00\0b?\0f\00[x\cd\00#\f9v\00{\8b\04\00\89\17r\00\c6\a6S\00on\e2\00\ef\eb\00\00\9bJX\00\c4\da\b7\00\aaf\ba\00v\cf\cf\00\d1\02\1d\00\b1\f1-\00\8c\99\c1\00\c3\adw\00\86H\da\00\f7]\a0\00\c6\80\f4\00\ac\f0/\00\dd\ec\9a\00?\5c\bc\00\d0\dem\00\90\c7\1f\00*\db\b6\00\a3%:\00\00\af\9a\00\adS\93\00\b6W\04\00)-\b4\00K\80~\00\da\07\a7\00v\aa\0e\00{Y\a1\00\16\12*\00\dc\b7-\00\fa\e5\fd\00\89\db\fe\00\89\be\fd\00\e4vl\00\06\a9\fc\00>\80p\00\85n\15\00\fd\87\ff\00(>\07\00ag3\00*\18\86\00M\bd\ea\00\b3\e7\af\00\8fmn\00\95g9\001\bf[\00\84\d7H\000\df\16\00\c7-C\00%a5\00\c9p\ce\000\cb\b8\00\bfl\fd\00\a4\00\a2\00\05l\e4\00Z\dd\a0\00!oG\00b\12\d2\00\b9\5c\84\00paI\00kV\e0\00\99R\01\00PU7\00\1e\d5\b7\003\f1\c4\00\13n_\00]0\e4\00\85.\a9\00\1d\b2\c3\00\a126\00\08\b7\a4\00\ea\b1\d4\00\16\f7!\00\8fi\e4\00'\ffw\00\0c\03\80\00\8d@-\00O\cd\a0\00 \a5\99\00\b3\a2\d3\00/]\0a\00\b4\f9B\00\11\da\cb\00}\be\d0\00\9b\db\c1\00\ab\17\bd\00\ca\a2\81\00\08j\5c\00.U\17\00'\00U\00\7f\14\f0\00\e1\07\86\00\14\0bd\00\96A\8d\00\87\be\de\00\da\fd*\00k%\b6\00{\894\00\05\f3\fe\00\b9\bf\9e\00hjO\00J*\a8\00O\c4Z\00-\f8\bc\00\d7Z\98\00\f4\c7\95\00\0dM\8d\00 :\a6\00\a4W_\00\14?\b1\00\808\95\00\cc \01\00q\dd\86\00\c9\de\b6\00\bf`\f5\00Me\11\00\01\07k\00\8c\b0\ac\00\b2\c0\d0\00QUH\00\1e\fb\0e\00\95r\c3\00\a3\06;\00\c0@5\00\06\dc{\00\e0E\cc\00N)\fa\00\d6\ca\c8\00\e8\f3A\00|d\de\00\9bd\d8\00\d9\be1\00\a4\97\c3\00wX\d4\00i\e3\c5\00\f0\da\13\00\ba:<\00F\18F\00Uu_\00\d2\bd\f5\00n\92\c6\00\ac.]\00\0eD\ed\00\1c>B\00a\c4\87\00)\fd\e9\00\e7\d6\f3\00\22|\ca\00o\915\00\08\e0\c5\00\ff\d7\8d\00nj\e2\00\b0\fd\c6\00\93\08\c1\00|]t\00k\ad\b2\00\cdn\9d\00>r{\00\c6\11j\00\f7\cf\a9\00)s\df\00\b5\c9\ba\00\b7\00Q\00\e2\b2\0d\00t\ba$\00\e5}`\00t\d8\8a\00\0d\15,\00\81\18\0c\00~f\94\00\01)\16\00\9fzv\00\fd\fd\be\00VE\ef\00\d9~6\00\ec\d9\13\00\8b\ba\b9\00\c4\97\fc\001\a8'\00\f1n\c3\00\94\c56\00\d8\a8V\00\b4\a8\b5\00\cf\cc\0e\00\12\89-\00oW4\00,V\89\00\99\ce\e3\00\d6 \b9\00k^\aa\00>*\9c\00\11_\cc\00\fd\0bJ\00\e1\f4\fb\00\8e;m\00\e2\86,\00\e9\d4\84\00\fc\b4\a9\00\ef\ee\d1\00.5\c9\00/9a\008!D\00\1b\d9\c8\00\81\fc\0a\00\fbJj\00/\1c\d8\00S\b4\84\00N\99\8c\00T\22\cc\00*U\dc\00\c0\c6\d6\00\0b\19\96\00\1ap\b8\00i\95d\00&Z`\00?R\ee\00\7f\11\0f\00\f4\b5\11\00\fc\cb\f5\004\bc-\004\bc\ee\00\e8]\cc\00\dd^`\00g\8e\9b\00\923\ef\00\c9\17\b8\00aX\9b\00\e1W\bc\00Q\83\c6\00\d8>\10\00\ddqH\00-\1c\dd\00\af\18\a1\00!,F\00Y\f3\d7\00\d9z\98\00\9eT\c0\00O\86\fa\00V\06\fc\00\e5y\ae\00\89\226\008\ad\22\00g\93\dc\00U\e8\aa\00\82&8\00\ca\e7\9b\00Q\0d\a4\00\993\b1\00\a9\d7\0e\00i\05H\00e\b2\f0\00\7f\88\a7\00\88L\97\00\f9\d16\00!\92\b3\00{\82J\00\98\cf!\00@\9f\dc\00\dcGU\00\e1t:\00g\ebB\00\fe\9d\df\00^\d4_\00{g\a4\00\ba\acz\00U\f6\a2\00+\88#\00A\baU\00Yn\08\00!*\86\009G\83\00\89\e3\e6\00\e5\9e\d4\00I\fb@\00\ffV\e9\00\1c\0f\ca\00\c5Y\8a\00\94\fa+\00\d3\c1\c5\00\0f\c5\cf\00\dbZ\ae\00G\c5\86\00\85Cb\00!\86;\00,y\94\00\10a\87\00*L{\00\80,\1a\00C\bf\12\00\88&\90\00x<\89\00\a8\c4\e4\00\e5\db{\00\c4:\c2\00&\f4\ea\00\f7g\8a\00\0d\92\bf\00e\a3+\00=\93\b1\00\bd|\0b\00\a4Q\dc\00'\ddc\00i\e1\dd\00\9a\94\19\00\a8)\95\00h\ce(\00\09\ed\b4\00D\9f \00N\98\ca\00p\82c\00~|#\00\0f\b92\00\a7\f5\8e\00\14V\e7\00!\f1\08\00\b5\9d*\00o~M\00\a5\19Q\00\b5\f9\ab\00\82\df\d6\00\96\dda\00\166\02\00\c4:\9f\00\83\a2\a1\00r\edm\009\8dz\00\82\b8\a9\00k2\5c\00F'[\00\004\ed\00\d2\00w\00\fc\f4U\00\01YM\00\e0q\80\00\00\00\00\00\00\00\00\00\00\00\00@\fb!\f9?\00\00\00\00-Dt>\00\00\00\80\98F\f8<\00\00\00`Q\ccx;\00\00\00\80\83\1b\f09\00\00\00@ %z8\00\00\00\80\22\82\e36\00\00\00\00\1d\f3i5\fe\82+eG\15g@\00\00\00\00\00\008C\00\00\fa\feB.v\bf:;\9e\bc\9a\f7\0c\bd\bd\fd\ff\ff\ff\ff\df?\9a\ec\ef?\d1f\87\10z^\90\bc\85\7fn\e8\15\e3\ef?\13\f6g5R\d2\8c\be\ef?m{\83]\a6\9a\97<\0f\89\f9lX\b5\ef?\fc\ef\fd\92\1a\b5\8e<\f7Gr+\92\ac\ef?\d1\9c/p=\be><\a2\d1\d32\ec\a3\ef?\0bn\90\894\03j\bc\1b\d3\fe\aff\9b\ef?\0e\bd/*RV\95\bcQ[\12\d0\01\93\ef?U\eaN\8c\ef\80P\bc\cc1l\c0\bd\8a\ef?\16\f4\d5\b9#\c9\91\bc\e0-\a9\ae\9a\82\ef?\afU\5c\e9\e3\d3\80\f7\ec\9a<\aa\b9h1\87T\ef?\9d8\86\cb\82\e7\8f\bc\1d\d9\fc\22PM\ef?\8d\c3\a6DAo\8a<\d6\8cb\88;F\ef?}\04\e4\b0\05z\80<\96\dc}\91I?\ef?\94\a8\a8\e3\fd\8e\96<8bunz8\ef?}Ht\f2\18^\87\a9\af\0c\ef?\b6\ab\b0MuM\83<\15\b71\0a\fe\06\ef?Lt\ac\e2\01B\86<1\d8L\fcp\01\ef?J\f8\d3]9\dd\8f<\ff\16d\b2\08\fc\ee?\04[\8e;\80\a3\86\bc\f1\9f\92_\c5\f6\ee?hPK\cc\edJ\92\bc\cb\a9:7\a7\f1\ee?\8e-Q\1b\f8\07\99\bcf\d8\05m\ae\ec\ee?\d26\94>\e8\d1q\bc\f7\9f\e54\db\e7\ee?\15\1b\ce\b3\19\19\99\bc\e5\a8\13\c3-\e3\ee?mL*\a7H\9f\85<\224\12L\a6\de\ee?\8ai(z`\12\93\bc\1c\80\ac\04E\da\ee?[\89\17H\8f\a7X\bc*.\f7!\0a\d6\ee?\1b\9aIg\9b,|\bc\97\a8P\d9\f5\d1\ee?\11\ac\c2`\edcC<-\89a`\08\ce\ee?\efd\06;\09f\96Z~d\1fx\bct_\ec\e8u\9f\ee?\b0}\8b\c0J\ee\86\bct\81\a5H\9a\9f\ee?\8a\e6U\1e2\19\86\bc\c9gBV\eb\9f\ee?\d3\d4\09^\cb\9c\90T'\a4\ee?47;\f1\b6i\93\bc\13\ceL\99\89\a5\ee?\1e\ff\19:\84^\80\bc\ad\c7#F\1a\a7\ee?nWr\d8P\d4\94\bc\ed\92D\9b\d9\a8\ee?\00\8a\0e[g\ad\90<\99f\8a\d9\c7\aa\ee?\b4\ea\f0\c1/\b7\8d<\db\a0*B\e5\ac\ee?\ff\e7\c5\9c`\b6e\bc\8cD\b5\162\af\ee?D_\f3Y\83\f6{<6w\15\99\ae\b1\ee?\83=\1e\a7\1f\09\93\bc\c6\ff\91\0b[\b4\ee?)\1el\8b\b8\a9]\bc\e5\c5\cd\b07\b7\ee?Y\b9\90|\f9#l\bc\0fR\c8\cbD\ba\ee?\aa\f9\f4\22CC\92\bcPN\de\9f\82\bd\ee?K\8ef\d7l\ca\85\bc\ba\07\cap\f1\c0\ee?'\ce\91+\fc\afq<\90\f0\a3\82\91\c4\ee?\bbs\0a\e15\d2m<##\e3\19c\c8\ee?c\22b\22\04\c5\87\bce\e5]{f\cc\ee?\d51\e2\e3\86\1c\8b<3-J\ec\9b\d0\ee?\15\bb\bc\d3\d1\bb\91\bc]%>\b2\03\d5\ee?\d21\ee\9c1\cc\90\b4\07!\d5\82\bc_\9b{3\97|\ef?\c9\0dG;\b9*\89\bc)\a1\f5\14F\86\ef?\d3\88:`\04\b6t<\f6?\8b\e7.\90\ef?qr\9dQ\ec\c5\83<\83L\c7\fbQ\9a\ef?\f0\91\d3\8f\12\f7\8f\bc\da\90\a4\a2\af\a4\ef?}t#\e2\98\ae\8d\bc\f1g\8e-H\af\ef?\08 \aaA\bc\c3\8e<'Za\ee\1b\ba\ef?2\eb\a9\c3\94+\84<\97\bak7+\c5\ef?\ee\85\d11\a9d\8a<@En[v\d0\ef?\ed\e3;\e4\ba7\8e\bc\14\be\9c\ad\fd\db\ef?\9d\cd\91M;\89w<\d8\90\9e\81\c1\e7\ef?\89\cc`A\c1\05S<\f1q\8f+\c2\f3\ef?EE\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\bbY\00\00\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\7f\00\00\00\00 eG\15\f7?\00\a2\ef.\fc\05\e7=9\83+eG\15\e7\bf\be\04:\dc\09\c7\de?\fb/pdG\15\d7\bfHL\03Plw\d2?\bc\92\ea(\b3\c7\ce\bf.\f9\17\e1%b\ca?\fe\82+eG\15\e7\bf\f7\03:\dc\09\c7\de??|+eG\15\d7\bf\e4[\f0Plw\d2?\e5\8fv\dd\09\c7\ce\bf6\e7\c4\1eva\ca?\9b\a7d\bc?\15\c7\bfJ\1b\f0T\d1\84\c4?<8,\a7\e4\89\c2\bff\eeZ(/\b3\c0?\f8\ac\b1k($\f7?\00\b0\cd\ee_\09\e1\bf\a1\cc\d2f\f7\e1\f6?\00\d0v\bd\94\84\e0\bf\8a\d40\0e=\a1\f6?\00\f8\e8\aeC\01\e0\bf\85l\d02\eca\f6?\00@\0b6\c5\fe\de\bf\f8\98\11\95\fa#\f6?\00\e0\b7\1a\d9\fd\dd\bfl\02\cf\a4[\e7\f5?\00\90\c7\0c\ae\ff\dc\bf\b8O!Z\05\ac\f5?\00\a0\fd\118\04\dc\bf\1en\16\0f\edq\f5?\00\e0:2g\0b\db\bf5\f8\0bY\099\f5?\00\b0-Z/\15\da\bf\dd\ada\edO\01\f5?\00`\f8Z\7f!\d9\bf\d0{H\8e\b8\ca\f4?\00\90q\b0M0\d8\bf\eeO3\b49\95\f4?\00\e0\a9\f9\89A\d7\bfi\d5\af\df\cb`\f4?\00\90\19\b5+U\d6\bfS\b9\e4Nf-\f4?\00\10\9b\a2#k\d5\bf\a6\d8\1d\11\01\fb\f3?\00\a0_\0fe\83\d4\bf6X\0c\b7\95\c9\f3?\00\a0\f67\e9\9d\d3\bfJ\fd\b6J\1c\99\f3?\00`\8dS\a1\ba\d2\bf\b5\99\e0\0c\8ei\f3?\00@\ca@\83\d9\d1\bf\b2\e7\13\82\e4:\f3?\00\e0@:\85\fa\d0\bf\b1\bd\85\19\19\0d\f3?\000\e72\9c\1d\d0\bf\d7q\b2\ca%\e0\f2?\00`\fa\a2}\85\ce\bf\82\cd\13\cf\04\b4\f2?\00\80=c\c8\d3\cc\bfP\cb|,\b0\88\f2?\00\a0\14L\03&\cb\bf\e5M\94c\22^\f2?\00\e0O/\1c|\c9\bf\b1\15\86=V4\f2?\00\00\80?\02\d6\c7\bf8\af>\e3F\0b\f2?\00\e0\05\1a\a73\c6\bf\dd\a3\cd\fd\ee\e2\f1?\00\00W\e9\f5\94\c4\bf09\0bXJ\bb\f1?\00\a0\e0$\e4\f9\c2\bf\00\22\7f\84S\94\f1?\00\c0\fdZYb\c1\bf<\d7\d5\c0\06n\f1?\00\80\bdu\9a\9c\bf\bf\c2\e4\b7G_H\f1?\00\c0\f9[W{\bc\bf\d1\85\00\adX#\f1?\00\80\f4\0f\c6`\b9\bf'\22S\0f\f0\fe\f0?\00\00\b6G\e2L\b6\bf\8f:\d0w \db\f0?\00@\01\b2x?\b3\bf\d9\80Y\d6\e6\b7\f0?\00\c0B\1a}8\b0\bf\8d@{\fe>\95\f0?\00\00\b5\08\92o\aa\bf\83;\c5\ca%s\f0?\00\00wO\95z\a4\bf\5c\1b\0d\e4\97Q\f0?\00\00\0c\c5\a8#\9d\bf\a2\8e \c1\910\f0?\00\00x)&j\91\bf!~\b3%\10\10\f0?\00\00\e8\d8\f8 w\bfk\a7\ca\f9~\c0\ef?\00\00P\b1S\fe\86?\84\f1\f6\d3eD\ef?\00\80\0f\e1\cc\1c\a1?\7f\10\84\9f\07\cc\ee?\00\80\8b\8c\fcM\ac?\e8Z\97\99:W\ee?\00@W\1e2\aa\b3?\e6=\bd\f0\d6\e5\ed?\00\80\8b\d0\a0\18\b9?\b38\ff\81\b6w\ed?\00@\04\da\e9r\be?C\e9Mr\b5\0c\ed?\00`\7fP\d2\dc\c1?cu\0e\dc\b2\a4\ec?\00\a0\de\03\abv\c4?Q\cb\d6\e8\8e?\ec?\00 \e2wC\07\c7?L\0c\02O+\dd\eb?\00@\a9\8b\de\8e\c9?\ca\15`\00l}\eb?\00\e0\d2j\b8\0d\cc?\8f3.n6 \eb?\00\e0\ce\af\0a\84\ce?9P)&p\c5\ea?\00\80g\b4\0ay\d0?\dd1'\bc\01m\ea?\00\c0\01h\05\ac\d1?\8b\f1?\bc\d3\16\ea?\00\e0\fe\d4\11\db\d2?\ad\fegI\d1\c2\e9?\00\80\c5NF\06\d4?\02\99|\f4\e4p\e9?\00\f0:\09\be-\d5?\f2\bc\829\fb \e9?\00\d0P \90Q\d6?\f1Y\f7\87\01\d3\e8?\00\f0\ea\cd\d2q\d7?m\f6\b9\eb\e5\86\e8?\00\90}\85\9c\8e\d8?\94\b9X\b6\97<\e8?\00`\e1U\01\a8\d9?\22\10\c6\ff\05\f4\e7?\00\d0\d3n\18\be\da?\ca\15\14\18\22\ad\e7?\00\e0\a0\ae\f2\d0\db?\8c\ff\9e\f9\dcg\e7?\00@\bf=\a4\e0\dc?\8e\0a\b9\12\00 \e6?\05\b6D\06\ab\04\89<\a64W\04\00`\e6?\a9\f7b\ea\9b\ffa<\c5\f2%\c3\ff\9f\e6?\ba\90<\cb\cf~\82<\04Z\b98\00\e0\e6?&\93sV\88\ff\88<\e3\94\99\e0\ff\1f\e7?\b1\82_'@\fd\8a<\10\0eY\15\00`\e7?A\83#\b4u\fdr\bc\d5[e\12\00\a0\e7?v+$|\e6\08x<\a6\e9Y2\00\e0\e7?\b7\22\f6&\e4\08b\bc\d2\b2\b4\ed\ff\1f\e8?/\c9\a5\1eF\02\84\bc\c3\fc\fa-\00`\e8?\1f\9a\f2\a2\f4\f7m)\e0\ff\df\f2?\f9\a6\b2\da9|\9b<\82\f0\dc\f7\ff\1f\f3?TR\dcn3\f1}<`\8bZ\f0\ff_\f3?\eb1\cdLV\03\9e\bc\cc\ae\0e.\00\a0\f3?w\a4\d3K\e7\f0u<6\b2;\04\00\e0\f3?3\88\9d\14\cb}\9c<\ff\87\d1\02\00 \f4?(=-\cf\af\08~<\b1|8\0d\00`\f4?\a6\99e\857\08\82<\89\9fV\04\00\a0\f4?\d2\bcO\90\5c\fa\89\bc\f3C5\04\00\e0\f4?)S\17\ed%\11x\bc\0f\7f\02\cc\ff\1f\f5?\dcTw\84\d8\83\98\e90.\90\80\91\bc\008\fa\feB.\e6?0g\c7\93W\f3.=\01\00\00\00\00\00\e0\bf[0QUUU\d5?\90E\eb\ff\ff\ff\cf\bf\11\01\f1$\b3\99\c9?\9f\c8\06\e5uU\c5\bf\00\00\00\00\00\00\e0\bfwUUUUU\d5?\cb\fd\ff\ff\ff\ff\cf\bf\0c\dd\95\99\99\99\c9?\a7EgUUU\c5\bf0\deD\a3$I\c2?e=B\a4\ff\ff\bf\bf\ca\d6*(\84q\bc?\ffh\b0C\eb\99\b9\bf\85\d0\af\f7\82\81\b7?\cdE\d1u\13R\b5\bf\9f\de\e0\c3\f04\f7?\00\90\e6y\7f\cc\d7\bf\1f\e9,jx\13\f7?\00\00\0d\c2\eeo\d7\bf\a0\b5\fa\08`\f2\f6?\00\e0Q\13\e3\13\d7\bf}\8c\13\1f\a6\d1\f6?\00x(8[\b8\d6\bf\d1\b4\c5\0bI\b1\f6?\00x\80\90U]\d6\bf\ba\0c/3G\91\f6?\00\00\18v\d0\02\d6\bf#B\22\18\9fq\f6?\00\90\90\86\ca\a8\d5\bf\d9\1e\a5\99OR\f6?\00P\03VCO\d5\bf\c4$\8f\aaV3\f6?\00@k\c37\f6\d4\bf\14\dc\9dk\b3\14\f6?\00P\a8\fd\a7\9d\d4\bfL\5c\c6Rd\f6\f5?\00\a8\899\92E\d4\bfO,\91\b5g\d8\f5?\00\b8\b09\f4\ed\d3\bf\de\90[\cb\bc\ba\f5?\00p\8fD\ce\96\d3\bfx\1a\d9\f2a\9d\f5?\00\a0\bd\17\1e@\d3\bf\87VF\12V\80\f5?\00\80F\ef\e2\e9\d2\bf\d3k\e7\ce\97c\f5?\00\e008\1b\94\d2\bf\93\7f\a7\e2%G\f5?\00\88\da\8c\c5>\d2\bf\83E\06B\ff*\f5?\00\90')\e1\e9\d1\bf\df\bd\b2\db\22\0f\f5?\00\f8H+m\95\d1\bf\d7\de4G\8f\f3\f4?\00\f8\b9\9agA\d1\bf@(\de\cfC\d8\f4?\00\98\ef\94\d0\ed\d0\bf\c8\a3x\c0>\bd\f4?\00\10\db\18\a5\9a\d0\bf\8a%\e0\c3\7f\a2\f4?\00\b8cR\e6G\d0\bf4\84\d4$\05\88\f4?\00\f0\86E\22\eb\cf\bf\0b-\19\1b\cem\f4?\00\b0\17uJG\cf\bfT\189\d3\d9S\f4?\000\10=D\a4\ce\bfZ\84\b4D':\f4?\00\b0\e9D\0d\02\ce\bf\fb\f8\15A\b5 \f4?\00\f0w)\a2`\cd\bf\b1\f4>\da\82\07\f4?\00\90\95\04\01\c0\cc\bf\8f\feW]\8f\ee\f3?\00\10\89V) \cc\bf\e9L\0b\a0\d9\d5\f3?\00\10\81\8d\17\81\cb\bf+\c1\10\c0`\bd\f3?\00\d0\d3\cc\c9\e2\ca\bf\b8\dau+$\a5\f3?\00\90\12.@E\ca\bf\02\d0\9f\cd\22\8d\f3?\00\f0\1dhw\a8\c9\bf\1cz\84\c5[u\f3?\000Him\0c\c9\bf\e26\adI\ce]\f3?\00\c0E\a6 q\c8\bf@\d4M\98yF\f3?\000\14\b4\8f\d6\c7\bf$\cb\ff\ce\5c/\f3?\00pb<\b8<\c7\bfI\0d\a1uw\18\f3?\00`7\9b\9a\a3\c6\bf\909>7\c8\01\f3?\00\a0\b7T1\0b\c6\bfA\f8\95\bbN\eb\f2?\000$v}s\c5\bf\d1\a9\19\02\0a\d5\f2?\000\c2\8f{\dc\c4\bf*\fd\b7\a8\f9\be\f2?\00\00\d2Q,F\c4\bf\ab\1b\0cz\1c\a9\f2?\00\00\83\bc\8a\b0\c3\bf0\b5\14`r\93\f2?\00\00Ik\99\1b\c3\bf\f5\a1WW\fa}\f2?\00@\a4\90T\87\c2\bf\bf;\1d\9b\b3h\f2?\00\a0y\f8\b9\f3\c1\bf\bd\f5\8f\83\9dS\f2?\00\a0,%\c8`\c1\bf;\08\c9\aa\b7>\f2?\00 \f7W\7f\ce\c0\bf\b6@\a9+\01*\f2?\00\a0\feI\dc<\c0\bf2A\cc\96y\15\f2?\00\80K\bc\bdW\bf\bf\9b\fc\d2\1d \01\f2?\00@@\96\087\be\bf\0bHMI\f4\ec\f1?\00@\f9>\98\17\bd\bfie\8fR\f5\d8\f1?\00\a0\d8Ng\f9\bb\bf|~W\11#\c5\f1?\00`/ y\dc\ba\bf\e9&\cbt|\b1\f1?\00\80(\e7\c3\c0\b9\bf\b6\1a,\0c\01\9e\f1?\00\c0r\b3F\a6\b8\bf\bdp\b6{\b0\8a\f1?\00\00\ac\b3\01\8d\b7\bf\b6\bc\ef%\8aw\f1?\00\008E\f1t\b6\bf\da1L5\8dd\f1?\00\80\87m\0e^\b5\bf\dd_'\90\b9Q\f1?\00\e0\a1\de\5cH\b4\bfL\d22\a4\0e?\f1?\00\a0jM\d93\b3\bf\da\f9\10r\8b,\f1?\00`\c5\f8y \b2\bf1\b5\ec(0\1a\f1?\00 b\98F\0e\b1\bf\af4\84\da\fb\07\f1?\00\00\d2jl\fa\af\bf\b3kN\0f\ee\f5\f0?\00@wJ\8d\da\ad\bf\ce\9f*]\06\e4\f0?\00\00\85\e4\ec\bc\ab\bf!\a5,cD\d2\f0?\00\c0\12@\89\a1\a9\bf\1a\98\e2|\a7\c0\f0?\00\c0\023X\88\a7\bf\d16\c6\83/\af\f0?\00\80\d6g^q\a5\bf9\13\a0\98\db\9d\f0?\00\80eI\8a\5c\a3\bf\df\e7R\af\ab\8c\f0?\00@\15d\e3I\a1\bf\fb(N/\9f{\f0?\00\80\eb\82\c0r\9e\bf\19\8f5\8c\b5j\f0?\00\80RR\f1U\9a\bf,\f9\ec\a5\eeY\f0?\00\80\81\cfb=\96\bf\90,\d1\cdII\f0?\00\00\aa\8c\fb(\92\bf\a9\ad\f0\c6\c68\f0?\00\00\f9 {1\8c\bf\a92y\13e(\f0?\00\00\aa]5\19\84\bfHs\ea'$\18\f0?\00\00\ec\c2\03\12x\bf\95\b1\14\06\04\08\f0?\00\00$y\09\04`\bf\1a\fa&\f7\1f\e0\ef?\00\00\90\84\f3\efo?t\eaa\c2\1c\a1\ef?\00\00=5A\dc\87?.\99\81\b0\10c\ef?\00\80\c2\c4\a3\ce\93?\cd\ad\ee<\f6%\ef?\00\00\89\14\c1\9f\9b?\e7\13\91\03\c8\e9\ee?\00\00\11\ce\d8\b0\a1?\ab\b1\cbx\80\ae\ee?\00\c0\01\d0[\8a\a5?\9b\0c\9d\a2\1at\ee?\00\80\d8@\83\5c\a9?\b5\99\0a\83\91:\ee?\00\80W\efj'\ad?V\9a`\09\e0\01\ee?\00\c0\98\e5\98u\b0?\98\bbw\e5\01\ca\ed?\00 \0d\e3\f5S\b2?\03\91|\0b\f2\92\ed?\00\008\8b\dd.\b4?\ce\5c\fbf\ac\5c\ed?\00\c0W\87Y\06\b6?\9d\de^\aa,'\ed?\00\00j5v\da\b7?\cd,k>n\f2\ec?\00`\1cNC\ab\b9?\02y\a7\a2m\be\ec?\00`\0d\bb\c7x\bb?m\087m&\8b\ec?\00 \e72\13C\bd?\04X]\bd\94X\ec?\00`\deq1\0a\bf?\8c\9f\bb3\b5&\ec?\00@\91+\15g\c0??\e7\ec\ee\83\f5\eb?\00\b0\92\82\85G\c1?\c1\96\dbu\fd\c4\eb?\000\ca\cdn&\c2?(J\86\0c\1e\95\eb?\00P\c5\a6\d7\03\c3?,>\ef\c5\e2e\eb?\00\103<\c3\df\c3?\8b\88\c9gH7\eb?\00\80zk6\ba\c4?J0\1d!K\09\eb?\00\f0\d1(9\93\c5?~\ef\f2\85\e8\db\ea?\00\f0\18$\cdj\c6?\a2=`1\1d\af\ea?\00\90f\ec\f8@\c7?\a7X\d3?\e6\82\ea?\00\f0\1a\f5\c0\15\c8?\8bs\09\ef@W\ea?\00\80\f6T)\e9\c8?'K\ab\90*,\ea?\00@\f8\026\bb\c9?\d1\f2\93\13\a0\01\ea?\00\00,\1c\ed\8b\ca?\1b<\db$\9f\d7\e9?\00\d0\01\5cQ[\cb?\90\b1\c7\05%\ae\e9?\00\c0\bc\ccg)\cc?/\ce\97\f2.\85\e9?\00`H\d55\f6\cc?uK\a4\ee\ba\5c\e9?\00\c0F4\bd\c1\cd?8H\e7\9d\c64\e9?\00\e0\cf\b8\01\8c\ce?\e6Rg/O\0d\e9?\00\90\17\c0\09U\cf?\9d\d7\ff\8eR\e6\e8?\00\b8\1f\12l\0e\d0?|\00\cc\9f\ce\bf\e8?\00\d0\93\0e\b8q\d0?\0e\c3\be\da\c0\99\e8?\00p\86\9ek\d4\d0?\fb\17#\aa't\e8?\00\d0K3\876\d1?\08\9a\b3\ac\00O\e8?\00H#g\0d\98\d1?U>e\e8I*\e8?\00\80\cc\e0\ff\f8\d1?`\02\f4\95\01\06\e8?\00hc\d7_Y\d2?)\a3\e0c%\e2\e7?\00\a8\14\090\b9\d2?\ad\b5\dcw\b3\be\e7?\00`C\10r\18\d3?\c2%\97g\aa\9b\e7?\00\18\ecm&w\d3?W\06\17\f2\07y\e7?\000\af\fbO\d5\d3?\0c\13\d6\db\caV\e7?\00\e0/\e3\ee2\d4?k\b6O\01\00\10\e6?<[B\91l\02~<\95\b4M\03\000\e6?A]\00H\ea\bf\8d\f6\05\eb\ff\ef\e6?S-\e2\1a\04\80~\bc\80\97\86\0e\00\10\e7?Ry\09qf\ff{<\12\e9g\fc\ff/\e7?$\87\bd&\e2\00\8c\89<\b9{F\13\000\e9?v\02\98KN\80\7f.\98\dd\ff\af\e9?7\93Z\8a\e0@\87\bcf\fbI\ed\ff\cf\e9?\00\e0\9b\c1\08\ce?O*\00\b0\ea?_?\ff<\04\fdi\bc\d1\1e\ae\d7\ff\cf\ea?\b4p\90\12\e7>\82\bcx\04Q\ee\ff\ef\ea?\a3\de\0e\e0>\06j<[\0de\db\ff\0f\eb?\b9\0a\1f8\c8\06ZO\86\d0E\ff\8a<@\16\87\f9\ff\8f\eb?\f9\c3\c2\96w\fe|\f0\0f\00\f0\f4?\1cS\85\0b\89\7f\97<\d1K\dc\12\00\10\f5?6\a4fqe\04`\c9\03\00\b0\f5?\c0\0c\bf\0a\08A\9f\bc\bc\19I\1d\00\d0\f5?)G%\fb*\81\98\bc\89z\b8\e7\ff\ef\f5?\04i\ed\80\b7~\94\bc\008\fa\feB.\e6?0g\c7\93W\f3.=\00\00\00\00\00\00\e0\bf`UUUUU\e5\bf\06\00\00\00\00\00\e0?NUY\99\99\99\e9?z\a4)UUU\e5\bf\e9EH\9b[I\f2\bf\c3?&\8b+\00\f0?\00\00\00\00\00\a0\f6?\00\00\00\00\00\00\00\00\00\c8\b9\f2\82,\d6\bf\80V7($\b4\fa<\00\00\00\00\00\80\f6?\00\00\00\00\00\00\00\00\00\08X\bf\bd\d1\d5\bf \f7\e0\d8\08\a5\1c\bd\00\00\00\00\00`\f6?\00\00\00\00\00\00\00\00\00XE\17wv\d5\bfmP\b6\d5\a4b#\bd\00\00\00\00\00@\f6?\00\00\00\00\00\00\00\00\00\f8-\87\ad\1a\d5\bf\d5g\b0\9e\e4\84\e6\bc\00\00\00\00\00 \f6?\00\00\00\00\00\00\00\00\00xw\95_\be\d4\bf\e0>)\93i\1b\04\bd\00\00\00\00\00\00\f6?\00\00\00\00\00\00\00\00\00`\1c\c2\8ba\d4\bf\cc\84LH/\d8\13=\00\00\00\00\00\e0\f5?\00\00\00\00\00\00\00\00\00\a8\86\860\04\d4\bf:\0b\82\ed\f3B\dc<\00\00\00\00\00\c0\f5?\00\00\00\00\00\00\00\00\00HiUL\a6\d3\bf`\94Q\86\c6\b1 =\00\00\00\00\00\a0\f5?\00\00\00\00\00\00\00\00\00\80\98\9a\ddG\d3\bf\92\80\c5\d4MY%=\00\00\00\00\00\80\f5?\00\00\00\00\00\00\00\00\00 \e1\ba\e2\e8\d2\bf\d8+\b7\99\1e{&=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00`\f5?\00\00\00\00\00\00\00\00\00\88\de\13Z\89\d2\bf?\b0\cf\b6\14\ca\15=\00\00\00\00\00@\f5?\00\00\00\00\00\00\00\00\00x\cf\fbA)\d2\bfv\daS($Z\16\bd\00\00\00\00\00 \f5?\00\00\00\00\00\00\00\00\00\98i\c1\98\c8\d1\bf\04T\e7h\bc\af\1f\bd\00\00\00\00\00\00\f5?\00\00\00\00\00\00\00\00\00\a8\ab\ab\5cg\d1\bf\f0\a8\823\c6\1f\1f=\00\00\00\00\00\e0\f4?\00\00\00\00\00\00\00\00\00H\ae\f9\8b\05\d1\bffZ\05\fd\c4\a8&\bd\00\00\00\00\00\c0\f4?\00\00\00\00\00\00\00\00\00\90s\e2$\a3\d0\bf\0e\03\f4~\eek\0c\bd\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\a0\f4?\00\00\00\00\00\00\00\00\00\d0\b4\94%@\d0\bf\7f-\f4\9e\b86\f0\bc\00\00\00\00\00\80\f4?\00\00\00\00\00\00\00\00\00@^m\18\b9\cf\bf\87<\99\ab*W\0d=\00\00\00\00\00`\f4?\00\00\00\00\00\00\00\00\00`\dc\cb\ad\f0\ce\bf$\af\86\9c\b7&+=\00\00\00\00\00@\f4?\00\00\00\00\00\00\00\00\00\f0*n\07'\ce\bf\10\ff?TO/\17\bd\00\00\00\00\00 \f4?\00\00\00\00\00\00\00\00\00\c0Ok!\5c\cd\bf\1bh\ca\bb\91\ba!=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy'=\00\00\00\00\00\00\f4?\00\00\00\00\00\00\00\00\00\a0\9a\c7\f7\8f\cc\bf4\84\9fhOy'=\00\00\00\00\00\e0\f3?\00\00\00\00\00\00\00\00\00\90-t\86\c2\cb\bf\8f\b7\8b1\b0N\19=\00\00\00\00\00\c0\f3?\00\00\00\00\00\00\00\00\00\c0\80N\c9\f3\ca\bff\90\cd?cN\ba<\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\a0\f3?\00\00\00\00\00\00\00\00\00\b0\e2\1f\bc#\ca\bf\ea\c1F\dcd\8c%\bd\00\00\00\00\00\80\f3?\00\00\00\00\00\00\00\00\00P\f4\9cZR\c9\bf\e3\d4\c1\04\d9\d1*\bd\00\00\00\00\00`\f3?\00\00\00\00\00\00\00\00\00\d0 e\a0\7f\c8\bf\09\fa\db\7f\bf\bd+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00@\f3?\00\00\00\00\00\00\00\00\00\e0\10\02\89\ab\c7\bfXJSr\90\db+=\00\00\00\00\00 \f3?\00\00\00\00\00\00\00\00\00\d0\19\e7\0f\d6\c6\bff\e2\b2\a3j\e4\10\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\00\f3?\00\00\00\00\00\00\00\00\00\90\a7p0\ff\c5\bf9P\10\9fC\9e\1e\bd\00\00\00\00\00\e0\f2?\00\00\00\00\00\00\00\00\00\b0\a1\e3\e5&\c5\bf\8f[\07\90\8b\de \bd\00\00\00\00\00\c0\f2?\00\00\00\00\00\00\00\00\00\80\cbl+M\c4\bf\11\0e\bd\00\00\00\00\00\e0\ed?\00\00\00\00\00\00\00\00\00`F\d1;\97\b1?\9b\9e\0dV]2%\bd\00\00\00\00\00\a0\ed?\00\00\00\00\00\00\00\00\00\e0\d1\a7\f5\bd\b3?\d7N\db\a5^\c8,=\00\00\00\00\00`\ed?\00\00\00\00\00\00\00\00\00\a0\97MZ\e9\b5?\1e\1d]<\06i,\bd\00\00\00\00\00@\ed?\00\00\00\00\00\00\00\00\00\c0\ea\0a\d3\00\b7?2\ed\9d\a9\8d\1e\ec<\00\00\00\00\00\00\ed?\00\00\00\00\00\00\00\00\00@Y]^3\b9?\daG\bd:\5c\11#=\00\00\00\00\00\c0\ec?\00\00\00\00\00\00\00\00\00`\ad\8d\c8j\bb?\e5h\f7+\80\90\13\bd\00\00\00\00\00\a0\ec?\00\00\00\00\00\00\00\00\00@\bc\01X\88\bc?\d3\acZ\c6\d1F&=\00\00\00\00\00`\ec?\00\00\00\00\00\00\00\00\00 \0a\839\c7\be?\e0E\e6\afh\c0-\bd\00\00\00\00\00@\ec?\00\00\00\00\00\00\00\00\00\e0\db9\91\e8\bf?\fd\0a\a1O\d64%\bd\00\00\00\00\00\00\ec?\00\00\00\00\00\00\00\00\00\e0'\82\8e\17\c1?\f2\07-\cex\ef!=\00\00\00\00\00\e0\eb?\00\00\00\00\00\00\00\00\00\f0#~+\aa\c1?4\998D\8e\a7,=\00\00\00\00\00\a0\eb?\00\00\00\00\00\00\00\00\00\80\86\0ca\d1\c2?\a1\b4\81\cbl\9d\03=\00\00\00\00\00\80\eb?\00\00\00\00\00\00\00\00\00\90\15\b0\fce\c3?\89rK#\a8/\c6<\00\00\00\00\00@\eb?\00\00\00\00\00\00\00\00\00\b03\83=\91\c4?x\b6\fdTy\83%=\00\00\00\00\00 \eb?\00\00\00\00\00\00\00\00\00\b0\a1\e4\e5'\c5?\c7}i\e5\e83&=\00\00\00\00\00\e0\ea?\00\00\00\00\00\00\00\00\00\10\8c\beNW\c6?x.<,\8b\cf\19=\00\00\00\00\00\c0\ea?\00\00\00\00\00\00\00\00\00pu\8b\12\f0\c6?\e1!\9c\e5\8d\11%\bd\00\00\00\00\00\a0\ea?\00\00\00\00\00\00\00\00\00PD\85\8d\89\c7?\05C\91p\10f\1c\bd\00\00\00\00\00`\ea?\00\00\00\00\00\00\00\00\00\009\eb\af\be\c8?\d1,\e9\aaT=\07\bd\00\00\00\00\00@\ea?\00\00\00\00\00\00\00\00\00\00\f7\dcZZ\c9?o\ff\a0X(\f2\07=\00\00\00\00\00\00\ea?\00\00\00\00\00\00\00\00\00\e0\8a<\ed\93\ca?i!VPCr(\bd\00\00\00\00\00\e0\e9?\00\00\00\00\00\00\00\00\00\d0[W\d81\cb?\aa\e1\acN\8d5\0c\bd\00\00\00\00\00\c0\e9?\00\00\00\00\00\00\00\00\00\e0;8\87\d0\cb?\b6\12TY\c4K-\bd\00\00\00\00\00\a0\e9?\00\00\00\00\00\00\00\00\00\10\f0\c6\fbo\cc?\d2+\96\c5r\ec\f1\bc\00\00\00\00\00`\e9?\00\00\00\00\00\00\00\00\00\90\d4\b0=\b1\cd?5\b0\15\f7*\ff*\bd\00\00\00\00\00@\e9?\00\00\00\00\00\00\00\00\00\10\e7\ff\0eS\ce?0\f4A`'\12\c2<\00\00\00\00\00 \e9?\00\00\00\00\00\00\00\00\00\00\dd\e4\ad\f5\ce?\11\8e\bbe\15!\ca\bc\00\00\00\00\00\00\e9?\00\00\00\00\00\00\00\00\00\b0\b3l\1c\99\cf?0\df\0c\ca\ec\cb\1b=\00\00\00\00\00\c0\e8?\00\00\00\00\00\00\00\00\00XM`8q\d0?\91N\ed\16\db\9c\f8<\00\00\00\00\00\a0\e8?\00\00\00\00\00\00\00\00\00`ag-\c4\d0?\e9\ea<\16\8b\18'=\00\00\00\00\00\80\e8?\00\00\00\00\00\00\00\00\00\e8'\82\8e\17\d1?\1c\f0\a5c\0e!,\bd\00\00\00\00\00`\e8?\00\00\00\00\00\00\00\00\00\f8\ac\cb\5ck\d1?\81\16\a5\f7\cd\9a+=\00\00\00\00\00@\e8?\00\00\00\00\00\00\00\00\00hZc\99\bf\d1?\b7\bdGQ\ed\a6,=\00\00\00\00\00 \e8?\00\00\00\00\00\00\00\00\00\b8\0emE\14\d2?\ea\baF\ba\de\87\0a=\00\00\00\00\00\e0\e7?\00\00\00\00\00\00\00\00\00\90\dc|\f0\be\d2?\f4\04PJ\fa\9c*=\00\00\00\00\00\c0\e7?\00\00\00\00\00\00\00\00\00`\d3\e1\f1\14\d3?\b8'\0a\00\00\00d\00\00\00\e8\03\00\00\10'\00\00\a0\86\01\00@B\0f\00\80\96\98\00\00\e1\f5\05\18\00\00\005\00\00\00q\00\00\00k\ff\ff\ff\ce\fb\ff\ff\92\bf\ff\ff\00\00\00\00\00\00\00\00/tmp/tmpfile_XXXXXX\00\00\00\00\00\00\00\00\00\00\00\00\00/tmp/tmpnam_XXXXXX\00\00\00\00\00\00\00\00\00\00\00\00\00\00\19\00\0a\00\19\19\19\00\00\00\00\05\00\00\00\00\00\00\09\00\00\00\00\0b\00\00\00\00\00\00\00\00\19\00\11\0a\19\19\19\03\0a\07\00\01\00\09\0b\18\00\00\09\06\0b\00\00\0b\00\06\19\00\00\00\19\19\19\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0e\00\00\00\00\00\00\00\00\19\00\0a\0d\19\19\19\00\0d\00\00\02\00\09\0e\00\00\00\09\00\0e\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\13\00\00\00\00\13\00\00\00\00\09\0c\00\00\00\00\00\0c\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\0f\00\00\00\04\0f\00\00\00\00\09\10\00\00\00\00\00\10\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00\11\00\00\00\00\11\00\00\00\00\09\12\00\00\00\00\00\12\00\00\12\00\00\1a\00\00\00\1a\1a\1a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\1a\00\00\00\1a\1a\1a\00\00\00\00\00\00\09\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\17\00\00\00\00\17\00\00\00\00\09\14\00\00\00\00\00\14\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00\15\00\00\00\00\15\00\00\00\00\09\16\00\00\00\00\00\16\00\00\16\00\000123456789ABCDEF\00\00\00\00\b4\f8\00\00\db\01\00\00\dc\01\00\00\dd\01\00\00\de\01\00\00\df\01\00\00\e0\01\00\00\e1\01\00\00\e2\01\00\00\e3\01\00\00\e4\01\00\00\e5\01\00\00\e6\01\00\00\e7\01\00\00\e8\01\00\00\00\00\00\00\f0\f8\00\00\e9\01\00\00\ea\01\00\00\eb\01\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\00\ef\01\00\00\f0\01\00\00\f1\01\00\00\f2\01\00\00\f3\01\00\00\f4\01\00\00\f5\01\00\00\f6\01\00\00\08\00\00\00\00\00\00\00(\f9\00\00\f7\01\00\00\f8\01\00\00\f8\ff\ff\ff\f8\ff\ff\ff(\f9\00\00\f9\01\00\00\fa\01\00\00<\f7\00\00P\f7\00\00\08\00\00\00\00\00\00\00p\f9\00\00\fb\01\00\00\fc\01\00\00\f8\ff\ff\ff\f8\ff\ff\ffp\f9\00\00\fd\01\00\00\fe\01\00\00l\f7\00\00\80\f7\00\00\04\00\00\00\00\00\00\00\b8\f9\00\00\ff\01\00\00\00\02\00\00\fc\ff\ff\ff\fc\ff\ff\ff\b8\f9\00\00\01\02\00\00\02\02\00\00\9c\f7\00\00\b0\f7\00\00\04\00\00\00\00\00\00\00\00\fa\00\00\03\02\00\00\04\02\00\00\fc\ff\ff\ff\fc\ff\ff\ff\00\fa\00\00\05\02\00\00\06\02\00\00\cc\f7\00\00\e0\f7\00\00\00\00\00\00,\f8\00\00\07\02\00\00\08\02\00\00NSt3__29basic_iosIcNS_11char_traitsIcEEEE\00\00\00\08%\01\00\00\f8\00\00t\fa\00\00\00\00\00\00t\f8\00\00\09\02\00\00\0a\02\00\00NSt3__29basic_iosIwNS_11char_traitsIwEEEE\00\00\00\08%\01\00H\f8\00\00t\fa\00\00NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\00\00\00\00\e0$\01\00\80\f8\00\00NSt3__215basic_streambufIwNS_11char_traitsIwEEEE\00\00\00\00\e0$\01\00\bc\f8\00\00NSt3__213basic_istreamIcNS_11char_traitsIcEEEE\00\00d%\01\00\f8\f8\00\00\00\00\00\00\01\00\00\00,\f8\00\00\03\f4\ff\ffNSt3__213basic_istreamIwNS_11char_traitsIwEEEE\00\00d%\01\00@\f9\00\00\00\00\00\00\01\00\00\00t\f8\00\00\03\f4\ff\ffNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\00\00d%\01\00\88\f9\00\00\00\00\00\00\01\00\00\00,\f8\00\00\03\f4\ff\ffNSt3__213basic_ostreamIwNS_11char_traitsIwEEEE\00\00d%\01\00\d0\f9\00\00\00\00\00\00\01\00\00\00t\f8\00\00\03\f4\ff\ff\00\00\00\00\c4\fa\00\00\0f\02\00\00\10\02\00\00\11\02\00\00\12\02\00\00\13\02\00\00\14\02\00\00\15\02\00\00\00\00\00\00\98\fa\00\00\0e\02\00\00\16\02\00\00\17\02\00\00\00\00\00\00t\fa\00\00\18\02\00\00\19\02\00\00NSt3__28ios_baseE\00\00\00\e0$\01\00`\fa\00\00NSt3__28ios_base7failureE\00\00\00\08%\01\00|\fa\00\00\c4#\01\00NSt3__219__iostream_categoryE\00\00\00\08%\01\00\a4\fa\00\00\0c$\01\00\00\00\00\00(\fb\00\00\db\01\00\00\22\02\00\00#\02\00\00\de\01\00\00\df\01\00\00\e0\01\00\00\e1\01\00\00\e2\01\00\00\e3\01\00\00$\02\00\00%\02\00\00&\02\00\00\e7\01\00\00\e8\01\00\00NSt3__210__stdinbufIcEE\00\08%\01\00\10\fb\00\00\b4\f8\00\00\00\00\00\00\8c\fb\00\00\e9\01\00\00'\02\00\00(\02\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\00\ef\01\00\00\f0\01\00\00\f1\01\00\00)\02\00\00*\02\00\00+\02\00\00\f5\01\00\00\f6\01\00\00NSt3__210__stdinbufIwEE\00\08%\01\00t\fb\00\00\f0\f8\00\00\00\00\00\00\f4\fb\00\00\db\01\00\00,\02\00\00-\02\00\00\de\01\00\00\df\01\00\00\e0\01\00\00.\02\00\00\e2\01\00\00\e3\01\00\00\e4\01\00\00\e5\01\00\00\e6\01\00\00/\02\00\000\02\00\00NSt3__211__stdoutbufIcEE\00\00\00\00\08%\01\00\d8\fb\00\00\b4\f8\00\00\00\00\00\00\5c\fc\00\00\e9\01\00\001\02\00\002\02\00\00\ec\01\00\00\ed\01\00\00\ee\01\00\003\02\00\00\f0\01\00\00\f1\01\00\00\f2\01\00\00\f3\01\00\00\f4\01\00\004\02\00\005\02\00\00NSt3__211__stdoutbufIwEE\00\00\00\00\08%\01\00@\fc\00\00\f0\f8\00\00\00\00\00\00\00\00\00\00\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\01\02\03\04\05\06\07\08\09\ff\ff\ff\ff\ff\ff\ff\0a\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\22#\ff\ff\ff\ff\ff\ff\0a\0b\0c\0d\0e\0f\10\11\12\13\14\15\16\17\18\19\1a\1b\1c\1d\1e\1f !\22#\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\ff\00\01\02\04\07\03\06\05\00\00\00\00\00\00\00\02\00\00\c0\03\00\00\c0\04\00\00\c0\05\00\00\c0\06\00\00\c0\07\00\00\c0\08\00\00\c0\09\00\00\c0\0a\00\00\c0\0b\00\00\c0\0c\00\00\c0\0d\00\00\c0\0e\00\00\c0\0f\00\00\c0\10\00\00\c0\11\00\00\c0\12\00\00\c0\13\00\00\c0\14\00\00\c0\15\00\00\c0\16\00\00\c0\17\00\00\c0\18\00\00\c0\19\00\00\c0\1a\00\00\c0\1b\00\00\c0\1c\00\00\c0\1d\00\00\c0\1e\00\00\c0\1f\00\00\c0\00\00\00\b3\01\00\00\c3\02\00\00\c3\03\00\00\c3\04\00\00\c3\05\00\00\c3\06\00\00\c3\07\00\00\c3\08\00\00\c3\09\00\00\c3\0a\00\00\c3\0b\00\00\c3\0c\00\00\c3\0d\00\00\d3\0e\00\00\c3\0f\00\00\c3\00\00\0c\bb\01\00\0c\c3\02\00\0c\c3\03\00\0c\c3\04\00\0c\dbP\ff\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\03 \02 \02 \02 \02 \02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\02\00\01`\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\08\d8\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d5\08\d5\08\d5\08\d5\08\d5\08\d5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\08\c5\04\c0\04\c0\04\c0\04\c0\04\c0\04\c0\08\d6\08\d6\08\d6\08\d6\08\d6\08\d6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\08\c6\04\c0\04\c0\04\c0\04\c0\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00`\03\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00.\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00T\00\00\00U\00\00\00V\00\00\00W\00\00\00X\00\00\00Y\00\00\00Z\00\00\00[\00\00\00\5c\00\00\00]\00\00\00^\00\00\00_\00\00\00`\00\00\00A\00\00\00B\00\00\00C\00\00\00D\00\00\00E\00\00\00F\00\00\00G\00\00\00H\00\00\00I\00\00\00J\00\00\00K\00\00\00L\00\00\00M\00\00\00N\00\00\00O\00\00\00P\00\00\00Q\00\00\00R\00\00\00S\00\00\00T\00\00\00U\00\00\00V\00\00\00W\00\00\00X\00\00\00Y\00\00\00Z\00\00\00{\00\00\00|\00\00\00}\00\00\00~\00\00\00\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00p\09\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\09\00\00\00\0a\00\00\00\0b\00\00\00\0c\00\00\00\0d\00\00\00\0e\00\00\00\0f\00\00\00\10\00\00\00\11\00\00\00\12\00\00\00\13\00\00\00\14\00\00\00\15\00\00\00\16\00\00\00\17\00\00\00\18\00\00\00\19\00\00\00\1a\00\00\00\1b\00\00\00\1c\00\00\00\1d\00\00\00\1e\00\00\00\1f\00\00\00 \00\00\00!\00\00\00\22\00\00\00#\00\00\00$\00\00\00%\00\00\00&\00\00\00'\00\00\00(\00\00\00)\00\00\00*\00\00\00+\00\00\00,\00\00\00-\00\00\00.\00\00\00/\00\00\000\00\00\001\00\00\002\00\00\003\00\00\004\00\00\005\00\00\006\00\00\007\00\00\008\00\00\009\00\00\00:\00\00\00;\00\00\00<\00\00\00=\00\00\00>\00\00\00?\00\00\00@\00\00\00a\00\00\00b\00\00\00c\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00h\00\00\00i\00\00\00j\00\00\00k\00\00\00l\00\00\00m\00\00\00n\00\00\00o\00\00\00p\00\00\00q\00\00\00r\00\00\00s\00\00\00t\00\00\00u\00\00\00v\00\00\00w\00\00\00x\00\00\00y\00\00\00z\00\00\00[\00\00\00\5c\00\00\00]\00\00\00^\00\00\00_\00\00\00`\00\00\00a\00\00\00b\00\00\00c\00\00\00d\00\00\00e\00\00\00f\00\00\00g\00\00\00h\00\00\00i\00\00\00j\00\00\00k\00\00\00l\00\00\00m\00\00\00n\00\00\00o\00\00\00p\00\00\00q\00\00\00r\00\00\00s\00\00\00t\00\00\00u\00\00\00v\00\00\00w\00\00\00x\00\00\00y\00\00\00z\00\00\00{\00\00\00|\00\00\00}\00\00\00~\00\00\00\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\000123456789abcdefABCDEFxX+-pPiInN\00%\00\00\00\00\00%p\00\00\00\00%I:%M:%S %p%H:%M\00\00\00%\00\00\00m\00\00\00/\00\00\00%\00\00\00d\00\00\00/\00\00\00%\00\00\00y\00\00\00%\00\00\00Y\00\00\00-\00\00\00%\00\00\00m\00\00\00-\00\00\00%\00\00\00d\00\00\00%\00\00\00I\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00p\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00\00\00\00\00\c4\12\01\00\e3\02\00\00\e4\02\00\00\e5\02\00\00\00\00\00\00$\13\01\00\e6\02\00\00\e7\02\00\00\e5\02\00\00\e8\02\00\00\e9\02\00\00\ea\02\00\00\eb\02\00\00\ec\02\00\00\ed\02\00\00\ee\02\00\00\ef\02\00\00\00\00\00\00\8c\12\01\00\f0\02\00\00\f1\02\00\00\e5\02\00\00\f2\02\00\00\f3\02\00\00\f4\02\00\00\f5\02\00\00\f6\02\00\00\f7\02\00\00\f8\02\00\00\00\00\00\00\5c\13\01\00\f9\02\00\00\fa\02\00\00\e5\02\00\00\fb\02\00\00\fc\02\00\00\fd\02\00\00\fe\02\00\00\ff\02\00\00\00\00\00\00\80\13\01\00\00\03\00\00\01\03\00\00\e5\02\00\00\02\03\00\00\03\03\00\00\04\03\00\00\05\03\00\00\06\03\00\00t\00\00\00r\00\00\00u\00\00\00e\00\00\00\00\00\00\00f\00\00\00a\00\00\00l\00\00\00s\00\00\00e\00\00\00\00\00\00\00%\00\00\00m\00\00\00/\00\00\00%\00\00\00d\00\00\00/\00\00\00%\00\00\00y\00\00\00\00\00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00\00\00\00\00%\00\00\00a\00\00\00 \00\00\00%\00\00\00b\00\00\00 \00\00\00%\00\00\00d\00\00\00 \00\00\00%\00\00\00H\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00Y\00\00\00\00\00\00\00%\00\00\00I\00\00\00:\00\00\00%\00\00\00M\00\00\00:\00\00\00%\00\00\00S\00\00\00 \00\00\00%\00\00\00p\00\00\00\00\00\00\00\00\00\00\00L\10\01\00\07\03\00\00\08\03\00\00\e5\02\00\00NSt3__26locale5facetE\00\00\00\08%\01\004\10\01\00\90#\01\00\00\00\00\00\cc\10\01\00\07\03\00\00\09\03\00\00\e5\02\00\00\0a\03\00\00\0b\03\00\00\0c\03\00\00\0d\03\00\00\0e\03\00\00\0f\03\00\00\10\03\00\00\11\03\00\00\12\03\00\00\13\03\00\00\14\03\00\00\15\03\00\00NSt3__25ctypeIwEE\00NSt3__210ctype_baseE\00\00\e0$\01\00\ae\10\01\00d%\01\00\9c\10\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c4\10\01\00\02\00\00\00\00\00\00\00`\11\01\00\07\03\00\00\16\03\00\00\e5\02\00\00\17\03\00\00\18\03\00\00\19\03\00\00\1a\03\00\00\1b\03\00\00\1c\03\00\00\1d\03\00\00NSt3__27codecvtIcc11__mbstate_tEE\00NSt3__212codecvt_baseE\00\00\00\00\e0$\01\00>\11\01\00d%\01\00\1c\11\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00X\11\01\00\02\00\00\00\00\00\00\00\d4\11\01\00\07\03\00\00\1e\03\00\00\e5\02\00\00\1f\03\00\00 \03\00\00!\03\00\00\22\03\00\00#\03\00\00$\03\00\00%\03\00\00NSt3__27codecvtIDsc11__mbstate_tEE\00\00d%\01\00\b0\11\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00X\11\01\00\02\00\00\00\00\00\00\00H\12\01\00\07\03\00\00&\03\00\00\e5\02\00\00'\03\00\00(\03\00\00)\03\00\00*\03\00\00+\03\00\00,\03\00\00-\03\00\00NSt3__27codecvtIDic11__mbstate_tEE\00\00d%\01\00$\12\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00X\11\01\00\02\00\00\00NSt3__27codecvtIwc11__mbstate_tEE\00\00\00d%\01\00h\12\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00X\11\01\00\02\00\00\00NSt3__26locale5__impE\00\00\00\08%\01\00\ac\12\01\00L\10\01\00NSt3__27collateIcEE\00\08%\01\00\d0\12\01\00L\10\01\00NSt3__27collateIwEE\00\08%\01\00\f0\12\01\00L\10\01\00NSt3__25ctypeIcEE\00\00\00d%\01\00\10\13\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c4\10\01\00\02\00\00\00NSt3__28numpunctIcEE\00\00\00\00\08%\01\00D\13\01\00L\10\01\00NSt3__28numpunctIwEE\00\00\00\00\08%\01\00h\13\01\00L\10\01\00\00\00\00\00\e4\12\01\00.\03\00\00/\03\00\00\e5\02\00\000\03\00\001\03\00\002\03\00\00\00\00\00\00\04\13\01\003\03\00\004\03\00\00\e5\02\00\005\03\00\006\03\00\007\03\00\00\00\00\00\00\a0\14\01\00\07\03\00\008\03\00\00\e5\02\00\009\03\00\00:\03\00\00;\03\00\00<\03\00\00=\03\00\00>\03\00\00?\03\00\00@\03\00\00A\03\00\00B\03\00\00C\03\00\00NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29__num_getIcEE\00NSt3__214__num_get_baseE\00\00\e0$\01\00f\14\01\00d%\01\00P\14\01\00\00\00\00\00\01\00\00\00\80\14\01\00\00\00\00\00d%\01\00\0c\14\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\88\14\01\00\00\00\00\00\00\00\00\00t\15\01\00\07\03\00\00D\03\00\00\e5\02\00\00E\03\00\00F\03\00\00G\03\00\00H\03\00\00I\03\00\00J\03\00\00K\03\00\00L\03\00\00M\03\00\00N\03\00\00O\03\00\00NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__29__num_getIwEE\00\00\00d%\01\00D\15\01\00\00\00\00\00\01\00\00\00\80\14\01\00\00\00\00\00d%\01\00\00\15\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\5c\15\01\00\00\00\00\00\00\00\00\00\5c\16\01\00\07\03\00\00P\03\00\00\e5\02\00\00Q\03\00\00R\03\00\00S\03\00\00T\03\00\00U\03\00\00V\03\00\00W\03\00\00X\03\00\00NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29__num_putIcEE\00NSt3__214__num_put_baseE\00\00\e0$\01\00\22\16\01\00d%\01\00\0c\16\01\00\00\00\00\00\01\00\00\00<\16\01\00\00\00\00\00d%\01\00\c8\15\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00D\16\01\00\00\00\00\00\00\00\00\00$\17\01\00\07\03\00\00Y\03\00\00\e5\02\00\00Z\03\00\00[\03\00\00\5c\03\00\00]\03\00\00^\03\00\00_\03\00\00`\03\00\00a\03\00\00NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__29__num_putIwEE\00\00\00d%\01\00\f4\16\01\00\00\00\00\00\01\00\00\00<\16\01\00\00\00\00\00d%\01\00\b0\16\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\0c\17\01\00\00\00\00\00\00\00\00\00$\18\01\00b\03\00\00c\03\00\00\e5\02\00\00d\03\00\00e\03\00\00f\03\00\00g\03\00\00h\03\00\00i\03\00\00j\03\00\00\f8\ff\ff\ff$\18\01\00k\03\00\00l\03\00\00m\03\00\00n\03\00\00o\03\00\00p\03\00\00q\03\00\00NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__29time_baseE\00\e0$\01\00\dd\17\01\00NSt3__220__time_get_c_storageIcEE\00\00\00\e0$\01\00\f8\17\01\00d%\01\00\98\17\01\00\00\00\00\00\03\00\00\00L\10\01\00\02\00\00\00\f0\17\01\00\02\00\00\00\1c\18\01\00\00\08\00\00\00\00\00\00\10\19\01\00r\03\00\00s\03\00\00\e5\02\00\00t\03\00\00u\03\00\00v\03\00\00w\03\00\00x\03\00\00y\03\00\00z\03\00\00\f8\ff\ff\ff\10\19\01\00{\03\00\00|\03\00\00}\03\00\00~\03\00\00\7f\03\00\00\80\03\00\00\81\03\00\00NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__220__time_get_c_storageIwEE\00\00\e0$\01\00\e5\18\01\00d%\01\00\a0\18\01\00\00\00\00\00\03\00\00\00L\10\01\00\02\00\00\00\f0\17\01\00\02\00\00\00\08\19\01\00\00\08\00\00\00\00\00\00\b4\19\01\00\82\03\00\00\83\03\00\00\e5\02\00\00\84\03\00\00NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__210__time_putE\00\00\00\e0$\01\00\95\19\01\00d%\01\00P\19\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\ac\19\01\00\00\08\00\00\00\00\00\004\1a\01\00\85\03\00\00\86\03\00\00\e5\02\00\00\87\03\00\00NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00\00\00\00d%\01\00\ec\19\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\ac\19\01\00\00\08\00\00\00\00\00\00\c8\1a\01\00\07\03\00\00\88\03\00\00\e5\02\00\00\89\03\00\00\8a\03\00\00\8b\03\00\00\8c\03\00\00\8d\03\00\00\8e\03\00\00\8f\03\00\00\90\03\00\00\91\03\00\00NSt3__210moneypunctIcLb0EEE\00NSt3__210money_baseE\00\00\00\00\e0$\01\00\a8\1a\01\00d%\01\00\8c\1a\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c0\1a\01\00\02\00\00\00\00\00\00\00<\1b\01\00\07\03\00\00\92\03\00\00\e5\02\00\00\93\03\00\00\94\03\00\00\95\03\00\00\96\03\00\00\97\03\00\00\98\03\00\00\99\03\00\00\9a\03\00\00\9b\03\00\00NSt3__210moneypunctIcLb1EEE\00d%\01\00 \1b\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c0\1a\01\00\02\00\00\00\00\00\00\00\b0\1b\01\00\07\03\00\00\9c\03\00\00\e5\02\00\00\9d\03\00\00\9e\03\00\00\9f\03\00\00\a0\03\00\00\a1\03\00\00\a2\03\00\00\a3\03\00\00\a4\03\00\00\a5\03\00\00NSt3__210moneypunctIwLb0EEE\00d%\01\00\94\1b\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c0\1a\01\00\02\00\00\00\00\00\00\00$\1c\01\00\07\03\00\00\a6\03\00\00\e5\02\00\00\a7\03\00\00\a8\03\00\00\a9\03\00\00\aa\03\00\00\ab\03\00\00\ac\03\00\00\ad\03\00\00\ae\03\00\00\af\03\00\00NSt3__210moneypunctIwLb1EEE\00d%\01\00\08\1c\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c0\1a\01\00\02\00\00\00\00\00\00\00\c8\1c\01\00\07\03\00\00\b0\03\00\00\e5\02\00\00\b1\03\00\00\b2\03\00\00NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__211__money_getIcEE\00\00\e0$\01\00\a6\1c\01\00d%\01\00`\1c\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\c0\1c\01\00\00\00\00\00\00\00\00\00l\1d\01\00\07\03\00\00\b3\03\00\00\e5\02\00\00\b4\03\00\00\b5\03\00\00NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__211__money_getIwEE\00\00\e0$\01\00J\1d\01\00d%\01\00\04\1d\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00d\1d\01\00\00\00\00\00\00\00\00\00\10\1e\01\00\07\03\00\00\b6\03\00\00\e5\02\00\00\b7\03\00\00\b8\03\00\00NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\00NSt3__211__money_putIcEE\00\00\e0$\01\00\ee\1d\01\00d%\01\00\a8\1d\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\08\1e\01\00\00\00\00\00\00\00\00\00\b4\1e\01\00\07\03\00\00\b9\03\00\00\e5\02\00\00\ba\03\00\00\bb\03\00\00NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\00NSt3__211__money_putIwEE\00\00\e0$\01\00\92\1e\01\00d%\01\00L\1e\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00\ac\1e\01\00\00\00\00\00\00\00\00\00,\1f\01\00\07\03\00\00\bc\03\00\00\e5\02\00\00\bd\03\00\00\be\03\00\00\bf\03\00\00NSt3__28messagesIcEE\00NSt3__213messages_baseE\00\00\00\00\e0$\01\00\09\1f\01\00d%\01\00\f4\1e\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00$\1f\01\00\02\00\00\00\00\00\00\00\84\1f\01\00\07\03\00\00\c0\03\00\00\e5\02\00\00\c1\03\00\00\c2\03\00\00\c3\03\00\00NSt3__28messagesIwEE\00\00\00\00d%\01\00l\1f\01\00\00\00\00\00\02\00\00\00L\10\01\00\02\00\00\00$\1f\01\00\02\00\00\00S\00\00\00u\00\00\00n\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00M\00\00\00o\00\00\00n\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00T\00\00\00u\00\00\00e\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00W\00\00\00e\00\00\00d\00\00\00n\00\00\00e\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00T\00\00\00h\00\00\00u\00\00\00r\00\00\00s\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00F\00\00\00r\00\00\00i\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00S\00\00\00a\00\00\00t\00\00\00u\00\00\00r\00\00\00d\00\00\00a\00\00\00y\00\00\00\00\00\00\00S\00\00\00u\00\00\00n\00\00\00\00\00\00\00M\00\00\00o\00\00\00n\00\00\00\00\00\00\00T\00\00\00u\00\00\00e\00\00\00\00\00\00\00W\00\00\00e\00\00\00d\00\00\00\00\00\00\00T\00\00\00h\00\00\00u\00\00\00\00\00\00\00F\00\00\00r\00\00\00i\00\00\00\00\00\00\00S\00\00\00a\00\00\00t\00\00\00\00\00\00\00J\00\00\00a\00\00\00n\00\00\00u\00\00\00a\00\00\00r\00\00\00y\00\00\00\00\00\00\00F\00\00\00e\00\00\00b\00\00\00r\00\00\00u\00\00\00a\00\00\00r\00\00\00y\00\00\00\00\00\00\00M\00\00\00a\00\00\00r\00\00\00c\00\00\00h\00\00\00\00\00\00\00A\00\00\00p\00\00\00r\00\00\00i\00\00\00l\00\00\00\00\00\00\00M\00\00\00a\00\00\00y\00\00\00\00\00\00\00J\00\00\00u\00\00\00n\00\00\00e\00\00\00\00\00\00\00J\00\00\00u\00\00\00l\00\00\00y\00\00\00\00\00\00\00A\00\00\00u\00\00\00g\00\00\00u\00\00\00s\00\00\00t\00\00\00\00\00\00\00S\00\00\00e\00\00\00p\00\00\00t\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00O\00\00\00c\00\00\00t\00\00\00o\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00N\00\00\00o\00\00\00v\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00D\00\00\00e\00\00\00c\00\00\00e\00\00\00m\00\00\00b\00\00\00e\00\00\00r\00\00\00\00\00\00\00J\00\00\00a\00\00\00n\00\00\00\00\00\00\00F\00\00\00e\00\00\00b\00\00\00\00\00\00\00M\00\00\00a\00\00\00r\00\00\00\00\00\00\00A\00\00\00p\00\00\00r\00\00\00\00\00\00\00J\00\00\00u\00\00\00n\00\00\00\00\00\00\00J\00\00\00u\00\00\00l\00\00\00\00\00\00\00A\00\00\00u\00\00\00g\00\00\00\00\00\00\00S\00\00\00e\00\00\00p\00\00\00\00\00\00\00O\00\00\00c\00\00\00t\00\00\00\00\00\00\00N\00\00\00o\00\00\00v\00\00\00\00\00\00\00D\00\00\00e\00\00\00c\00\00\00\00\00\00\00A\00\00\00M\00\00\00\00\00\00\00P\00\00\00M\00\00\00\00\00\00\00\00\00\00\00\1c\18\01\00k\03\00\00l\03\00\00m\03\00\00n\03\00\00o\03\00\00p\03\00\00q\03\00\00\00\00\00\00\08\19\01\00{\03\00\00|\03\00\00}\03\00\00~\03\00\00\7f\03\00\00\80\03\00\00\81\03\00\00\00\00\00\00\90#\01\00\c4\03\00\00\c5\03\00\00\c6\03\00\00NSt3__214__shared_countE\00\00\00\00\e0$\01\00t#\01\00\00\00\00\00\c4#\01\00\d3\03\00\00\d4\03\00\00\17\02\00\00NSt3__212system_errorE\00\00\08%\01\00\ac#\01\00\d4&\01\00NSt3__214error_categoryE\00\00\00\00\e0$\01\00\d0#\01\00NSt3__212__do_messageE\00\00\08%\01\00\f4#\01\00\ec#\01\00N10__cxxabiv116__shim_type_infoE\00\00\00\00\08%\01\00\18$\01\00\04'\01\00N10__cxxabiv117__class_type_infoE\00\00\00\08%\01\00H$\01\00<$\01\00N10__cxxabiv117__pbase_type_infoE\00\00\00\08%\01\00x$\01\00<$\01\00N10__cxxabiv119__pointer_type_infoE\00\08%\01\00\a8$\01\00\9c$\01\00\00\00\00\00l$\01\00\d7\03\00\00\d8\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\dc\03\00\00\dd\03\00\00\de\03\00\00\00\00\00\00P%\01\00\d7\03\00\00\df\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\e0\03\00\00\e1\03\00\00\e2\03\00\00N10__cxxabiv120__si_class_type_infoE\00\00\00\00\08%\01\00(%\01\00l$\01\00\00\00\00\00\ac%\01\00\d7\03\00\00\e3\03\00\00\d9\03\00\00\da\03\00\00\db\03\00\00\e4\03\00\00\e5\03\00\00\e6\03\00\00N10__cxxabiv121__vmi_class_type_infoE\00\00\00\08%\01\00\84%\01\00l$\01\00\00\00\00\00\08&\01\00\cb\03\00\00\e7\03\00\00\e8\03\00\00\00\00\00\00\f0%\01\00\cb\03\00\00\e9\03\00\00\ea\03\00\00St9exception\00\00\00\00\e0$\01\00\e0%\01\00St9bad_alloc\00\00\00\00\08%\01\00\f8%\01\00\f0%\01\00\00\00\00\00L&\01\00\81\00\00\00\eb\03\00\00\ec\03\00\00\00\00\00\00\d4&\01\00y\02\00\00\ed\03\00\00\17\02\00\00St11logic_error\00\08%\01\00<&\01\00\f0%\01\00\00\00\00\00\80&\01\00\81\00\00\00\ee\03\00\00\ec\03\00\00St12length_error\00\00\00\00\08%\01\00l&\01\00L&\01\00\00\00\00\00\b4&\01\00\81\00\00\00\ef\03\00\00\ec\03\00\00St12out_of_range\00\00\00\00\08%\01\00\a0&\01\00L&\01\00St13runtime_error\00\00\00\08%\01\00\c0&\01\00\f0%\01\00\00\00\00\00\18'\01\00\d9\01\00\00\f0\03\00\00\f1\03\00\00St9type_info\00\00\00\00\e0$\01\00\f4&\01\00St8bad_cast\00\08%\01\00\0c'\01\00\f0%\01\00") │ │ + (data $.data (i32.const 75568) "\a3\01\00\00\a4\01\00\00\a5\01\00\00\a6\01\00\00\14\00\00\00\a7\01\00\00\a8\01\00\00\a9\01\00\00\aa\01\00\00\ab\01\00\00\a3\01\00\00\ac\01\00\00\a5\01\00\00\a6\01\00\00\14\00\00\00\a7\01\00\00\a8\01\00\00\a9\01\00\00\aa\01\00\00\ab\01\00\00\01\00\00\00\08\00\00\000'\01\00X'\01\00\af\01\00\00\b0\01\00\00\b1\01\00\00\00\00\00\00\b2\01\00\00\b3\01\00\00\b4\01\00\00\b5\01\00\00\b6\01\00\00\b7\01\00\00\b8\01\00\00\b9\01\00\00\ba\01\00\00\1f\00\00\00\d4'\01\00\03\00\00\00\00\00\00\00-\f4QX\cf\8c\b1\c0F\f6\b5\cb)1\03\c7\04[p0\b4]\fd x\7f\8b\9a\d8Y)PhH\89\ab\a7V\03l\ff\b7\cd\88?\d4w\b4+\a5\a3p\f1\ba\e4\a8\fcA\83\fd\d9o\e1\8az/-t\96\07\1f\0d\09^\03v,p\f7@\a5,\a7oWA\a8\aat\df\a0Xd\03J\c7\c4{ let img_id = UTF8ToString(img_id_ptr); let params = { \22angle_degrees\22: angle_degrees, \22flip_y\22: !!flip_y, \22flip_x\22: !!flip_x, \22brightness_percent\22: brightness_percent, \22invert\22: !!invert, }; draw_graphic(gfx, img_id, y, x, width, height, params); }\00(const char *text_ptr, size_t text_len, const char * colour_ptr, size_t colour_len, int y, int x, int size, int align)<::>{ let text_str = UTF8ToString(text_ptr, text_len); let colour_str = UTF8ToString(colour_ptr, colour_len); draw_text(gfx, text_str, colour_str, y, x, size, align); }\00(const char *colour_ptr, int line_size, int y1, int x1, int y2, int x2)<::>{ let colour = UTF8ToString(colour_ptr); draw_line(gfx, colour, line_size, y1, x1, y2, x2); }\00(const char *fill_colour_ptr, size_t fill_colour_len, int y_start, int x_start, int y_end, int x_end)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); draw_rect(gfx, fill_colour, y_start, x_start, y_end, x_end); }\00(const char *fill_colour_ptr, size_t fill_colour_len, int y1, int x1, int y2, int x2, int y3, int x3)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); draw_triangle(gfx, fill_colour, y1, x1, y2, x2, y3, x3); }\00(const char *fill_colour_ptr, size_t fill_colour_len, const char *outline_colour_ptr, size_t outline_colour_len, int y, int x, int radius, int outline_width)<::>{ let fill_colour = UTF8ToString(fill_colour_ptr, fill_colour_len); let outline_colour = UTF8ToString(outline_colour_ptr, outline_colour_len); draw_circle(gfx, fill_colour, outline_colour, y, x, radius, outline_width); }\00()<::>{ draw_clear(gfx); }\00()<::>{ }\00(const char *dst_ptr, size_t dst_len, const char *msg_ptr, size_t msg_len)<::>{ let dst = UTF8ToString(dst_ptr, dst_len); let msg = new Array(msg_len); for (let i=0; i{ let btn_id_str = UTF8ToString(btn_id_ptr); let btn_text_str = UTF8ToString(btn_text_ptr); create_btn(gfx, btn_id_str, btn_text_str, weight); }\00(const char *btn_id_ptr, _Bool enabled)<::>{ let btn_id_str = UTF8ToString(btn_id_ptr); set_btn_enabled(gfx, btn_id_str, enabled); }\00(const char *btn_id_ptr, _Bool visible)<::>{ let btn_id_str = UTF8ToString(btn_id_ptr); set_btn_visible(gfx, btn_id_str, visible); }\00(const char *popup_id_ptr, size_t popup_id_str_len, const char *info_json_ptr, size_t info_json_str_len)<::>{ let popup_id = UTF8ToString(popup_id_ptr, popup_id_str_len); let info_json_str = UTF8ToString(info_json_ptr, info_json_str_len); console.debug(\22popup info_json_str: \22, info_json_str); let info = JSON.parse(info_json_str); console.log(\22Showping popup\22, info); show_popup(gfx, popup_id, info); }\00(const char *option_id_ptr, const char *option_info, size_t option_info_len)<::>{ console.log(\22js_add_game_option_json_str\22); let option_id_str = UTF8ToString(option_id_ptr); let option_info_json_str = UTF8ToString(option_info, option_info_len); let option_info_json = JSON.parse(option_info_json_str); console.log(\22add_game_option\22, option_id_str, option_info_json); add_game_option(gfx, option_id_str, option_info_json); }\00(const char *title, size_t title_len, const char *msg, size_t msg_len)<::>{ { let title_str = UTF8ToString(title, title_len); let msg_str = UTF8ToString(msg, msg_len); prompt_string(gfx, title_str, msg_str); } }\00()<::>{ hide_popup(gfx); }\00(const char *msg_ptr, size_t msg_len)<::>{ let msg = UTF8ToString(msg_ptr, msg_len); set_status_msg(gfx, msg); }\00(const char *msg_ptr, size_t msg_len)<::>{ let msg = UTF8ToString(msg_ptr, msg_len); set_status_err(gfx, msg); }\00(int timer_period_ms)<::>{ return update_timer_period_ms(gfx, timer_period_ms); }\00(int handle)<::>{ delete_timer(gfx, handle); }\00(const char *evt_id_ptr, size_t evt_id_len)<::>{ let evt_id = UTF8ToString(evt_id_ptr, evt_id_len); enable_event(evt_id); }\00(const char *evt_id_ptr, size_t evt_id_len)<::>{ let evt_id = UTF8ToString(evt_id_ptr, evt_id_len); disable_event(evt_id); }\00()<::>{ return alexgames_get_time_ms(); }\00(void *L, const char *key_ptr, const uint8_t *val_ptr, size_t val_len)<::>{ let key_str = UTF8ToString(key_ptr); if (window.localStorage == null) { console.error(\22Can not store key \22, key_str, \22, localStorage is null\22); return; } let val_js_str = \22\22; for (let i=0; i{ let key_str = UTF8ToString(key_ptr); if (window.localStorage == null) { console.error(\22window.localStorage == null, can not load stored_data key \22, key_str); return -1; } let val = window.localStorage[key_str]; let rc; if (val === undefined) { rc = -1; } else { if (buff_out == 0) { return 1; } for (let i=0; i= buff_max) { console.error(\22tried to read stored data > buff_max\22, val.length, buff_max); break; } setValue(buff_out + i, val.charCodeAt(i), 'i8'); rc = i+1; } } return rc; }\00(const char *canvas_id_ptr, int y, int x, int width, int height)<::>{ let canvas_id_str = UTF8ToString(canvas_id_ptr); draw_extra_canvas(gfx, canvas_id_str, y, x, width, height); }\00(const char *canvas_id)<::>{ let canvas_id_str = UTF8ToString(canvas_id); new_extra_canvas(gfx, canvas_id_str); }\00(const char *canvas_id)<::>{ let canvas_id_str = UTF8ToString(canvas_id); set_active_canvas(gfx, canvas_id_str); }\00(void)<::>{ delete_extra_canvases(); }\00(char *colour_str_out, size_t max_colour_str_out_len)<::>{ let colour_pref_str_js = get_user_colour_pref(); let i; for (i=0; i= max_colour_str_out_len) { console.error(\22User colour pref str buff is not long enough\22); return -1; } setValue(colour_str_out + i, colour_pref_str_js.charCodeAt(i), 'i8'); } setValue(colour_str_out + i, 0, 'i8'); return colour_pref_str_js.length; }\00(const char *feature_id, size_t feature_id_len)<::>{ return false; }\00(char *time_str, size_t max_time_str_len)<::>{ let time_str_js = get_time_of_day(); for (let i=0; i= max_time_str_len) { console.error(\22Time string is not long enough\22); return -1; } setValue(time_str + i, time_str_js.charCodeAt(i), 'i8'); } return time_str_js.length; }\00(const void *L, const char *game_id)<::>{ let game_id_str = UTF8ToString(game_id); set_game_handle(L, game_id_str); }\00(const void *L, char *game_id_out, size_t game_id_out_len_max)<::>{ console.log(\22js_get_game_id called, returning gfx.game_id: \22, gfx.game_id); write_str(game_id_out, game_id_out_len_max, gfx.game_id); }\00(void)<::>{ console.log(\22destroy_all called\22); destroy_all(); }\00(const char *language_ptr)<::>{ console.log(\22[dict] emscripten_c_dict_api: em_js_dict_init called. Using C dictionary after words file download complete.\5cn\22); if (em_js_dict_init.call_counts === undefined) { em_js_dict_init.call_counts = 0; } em_js_dict_init.call_counts += 1; if (em_js_dict_init.call_counts > 2) { console.error(\22em_js_dict_init.call_counts is\22, em_js_dict_init.call_counts); return; } js_c_dict_init(); }\00") │ │ + (data $em_asm (i32.const 83795) "{ let s = UTF8ToString($0, $1); let freq = Number(s); return freq; }\00")) ├── assets/html/alexgames_wasm.js │ ├── js-beautify {} │ │ @@ -636,50 +636,50 @@ │ │ function runWithFS() { │ │ │ │ function assert(check, msg) { │ │ if (!check) throw msg + new Error().stack; │ │ } │ │ Module['FS_createPath']("/", "preload", true, true); │ │ Module['FS_createPath']("/preload", "games", true, true); │ │ - Module['FS_createPath']("/preload/games", "life", true, true); │ │ - Module['FS_createPath']("/preload/games", "poker_chips", true, true); │ │ - Module['FS_createPath']("/preload/games/poker_chips", "ui", true, true); │ │ - Module['FS_createPath']("/preload/games", "swarm", true, true); │ │ - Module['FS_createPath']("/preload/games", "touch_test", true, true); │ │ - Module['FS_createPath']("/preload/games", "thrust", true, true); │ │ - Module['FS_createPath']("/preload/games", "chess", true, true); │ │ - Module['FS_createPath']("/preload/games", "blue", true, true); │ │ - Module['FS_createPath']("/preload/games", "crossword_builder", true, true); │ │ + Module['FS_createPath']("/preload/games", "api_demo", true, true); │ │ Module['FS_createPath']("/preload/games", "spider_swing", true, true); │ │ + Module['FS_createPath']("/preload/games", "thrust", true, true); │ │ Module['FS_createPath']("/preload/games", "fluid_mix", true, true); │ │ + Module['FS_createPath']("/preload/games", "checkers", true, true); │ │ + Module['FS_createPath']("/preload/games", "blue", true, true); │ │ Module['FS_createPath']("/preload/games", "bound", true, true); │ │ - Module['FS_createPath']("/preload/games", "sudoku", true, true); │ │ + Module['FS_createPath']("/preload/games", "test", true, true); │ │ + Module['FS_createPath']("/preload/games", "crib", true, true); │ │ Module['FS_createPath']("/preload/games", "31s", true, true); │ │ Module['FS_createPath']("/preload/games", "minesweeper", true, true); │ │ - Module['FS_createPath']("/preload/games", "word_mastermind", true, true); │ │ - Module['FS_createPath']("/preload/games", "api_demo", true, true); │ │ - Module['FS_createPath']("/preload/games", "endless_runner", true, true); │ │ + Module['FS_createPath']("/preload/games", "minesweeper_life", true, true); │ │ + Module['FS_createPath']("/preload/games", "card_sim", true, true); │ │ + Module['FS_createPath']("/preload/games", "sudoku", true, true); │ │ + Module['FS_createPath']("/preload/games", "chess", true, true); │ │ + Module['FS_createPath']("/preload/games", "swarm", true, true); │ │ Module['FS_createPath']("/preload/games", "hospital", true, true); │ │ + Module['FS_createPath']("/preload/games", "touch_test", true, true); │ │ Module['FS_createPath']("/preload/games", "go", true, true); │ │ + Module['FS_createPath']("/preload/games", "endless_runner", true, true); │ │ + Module['FS_createPath']("/preload/games", "poker_chips", true, true); │ │ + Module['FS_createPath']("/preload/games/poker_chips", "ui", true, true); │ │ + Module['FS_createPath']("/preload/games", "solitaire", true, true); │ │ Module['FS_createPath']("/preload/games", "backgammon", true, true); │ │ - Module['FS_createPath']("/preload/games", "card_sim", true, true); │ │ - Module['FS_createPath']("/preload/games", "minesweeper_life", true, true); │ │ + Module['FS_createPath']("/preload/games", "life", true, true); │ │ + Module['FS_createPath']("/preload/games", "crossword_builder", true, true); │ │ + Module['FS_createPath']("/preload/games", "word_mastermind", true, true); │ │ Module['FS_createPath']("/preload/games", "wu", true, true); │ │ - Module['FS_createPath']("/preload/games", "solitaire", true, true); │ │ Module['FS_createPath']("/preload/games", "crossword_letters", true, true); │ │ - Module['FS_createPath']("/preload/games", "checkers", true, true); │ │ - Module['FS_createPath']("/preload/games", "test", true, true); │ │ - Module['FS_createPath']("/preload/games", "crib", true, true); │ │ Module['FS_createPath']("/preload", "libs", true, true); │ │ - Module['FS_createPath']("/preload/libs", "dice", true, true); │ │ - Module['FS_createPath']("/preload/libs", "serialize", true, true); │ │ - Module['FS_createPath']("/preload/libs", "cards", true, true); │ │ Module['FS_createPath']("/preload/libs", "multiplayer", true, true); │ │ - Module['FS_createPath']("/preload/libs", "draw", true, true); │ │ Module['FS_createPath']("/preload/libs", "ui", true, true); │ │ + Module['FS_createPath']("/preload/libs", "draw", true, true); │ │ + Module['FS_createPath']("/preload/libs", "serialize", true, true); │ │ + Module['FS_createPath']("/preload/libs", "cards", true, true); │ │ + Module['FS_createPath']("/preload/libs", "dice", true, true); │ │ │ │ /** @constructor */ │ │ function DataRequest(start, end, audio) { │ │ this.start = start; │ │ this.end = end; │ │ this.audio = audio; │ │ } │ │ @@ -744,564 +744,564 @@ │ │ if (!Module['preRun']) Module['preRun'] = []; │ │ Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it │ │ } │ │ │ │ } │ │ loadPackage({ │ │ "files": [{ │ │ - "filename": "/preload/games/life/life_draw.lua", │ │ + "filename": "/preload/games/api_demo/game_draw.lua", │ │ "start": 0, │ │ - "end": 990 │ │ - }, { │ │ - "filename": "/preload/games/life/life_main.lua", │ │ - "start": 990, │ │ - "end": 3163 │ │ + "end": 6402 │ │ }, { │ │ - "filename": "/preload/games/life/life_core.lua", │ │ - "start": 3163, │ │ - "end": 5909 │ │ - }, { │ │ - "filename": "/preload/games/poker_chips/poker_chips_serialize.lua", │ │ - "start": 5909, │ │ - "end": 8524 │ │ + "filename": "/preload/games/api_demo/game.lua", │ │ + "start": 6402, │ │ + "end": 14115 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/poker_chips_main.lua", │ │ - "start": 8524, │ │ - "end": 12719 │ │ + "filename": "/preload/games/api_demo/game_core.lua", │ │ + "start": 14115, │ │ + "end": 16288 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/poker_chips_ui.lua", │ │ - "start": 12719, │ │ - "end": 15092 │ │ + "filename": "/preload/games/spider_swing/spider_swing_core.lua", │ │ + "start": 16288, │ │ + "end": 21739 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/poker_chips_core.lua", │ │ - "start": 15092, │ │ - "end": 20463 │ │ + "filename": "/preload/games/spider_swing/spider_swing_main.lua", │ │ + "start": 21739, │ │ + "end": 24459 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/ui/control.lua", │ │ - "start": 20463, │ │ - "end": 24503 │ │ + "filename": "/preload/games/spider_swing/spider_swing_draw.lua", │ │ + "start": 24459, │ │ + "end": 30580 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/ui/view_others.lua", │ │ - "start": 24503, │ │ - "end": 30451 │ │ + "filename": "/preload/games/thrust/thrust_keyboard_input.lua", │ │ + "start": 30580, │ │ + "end": 32445 │ │ }, { │ │ - "filename": "/preload/games/poker_chips/ui/bet_input.lua", │ │ - "start": 30451, │ │ - "end": 38890 │ │ + "filename": "/preload/games/thrust/thrust_draw.lua", │ │ + "start": 32445, │ │ + "end": 39496 │ │ }, { │ │ - "filename": "/preload/games/swarm/swarm_keyboard_input.lua", │ │ - "start": 38890, │ │ - "end": 40458 │ │ + "filename": "/preload/games/thrust/thrust_main.lua", │ │ + "start": 39496, │ │ + "end": 41760 │ │ }, { │ │ - "filename": "/preload/games/swarm/swarm_core.lua", │ │ - "start": 40458, │ │ - "end": 54807 │ │ + "filename": "/preload/games/thrust/thrust_core.lua", │ │ + "start": 41760, │ │ + "end": 52714 │ │ }, { │ │ - "filename": "/preload/games/swarm/swarm_main.lua", │ │ - "start": 54807, │ │ - "end": 56851 │ │ + "filename": "/preload/games/fluid_mix/fluid_mix_draw.lua", │ │ + "start": 52714, │ │ + "end": 58522 │ │ }, { │ │ - "filename": "/preload/games/swarm/swarm_draw.lua", │ │ - "start": 56851, │ │ - "end": 60168 │ │ + "filename": "/preload/games/fluid_mix/fluid_mix_core.lua", │ │ + "start": 58522, │ │ + "end": 60765 │ │ }, { │ │ - "filename": "/preload/games/touch_test/touch_test.lua", │ │ - "start": 60168, │ │ - "end": 62518 │ │ + "filename": "/preload/games/fluid_mix/fluid_mix_serialize.lua", │ │ + "start": 60765, │ │ + "end": 62920 │ │ }, { │ │ - "filename": "/preload/games/thrust/thrust_core.lua", │ │ - "start": 62518, │ │ - "end": 73472 │ │ + "filename": "/preload/games/fluid_mix/fluid_mix_main.lua", │ │ + "start": 62920, │ │ + "end": 65916 │ │ }, { │ │ - "filename": "/preload/games/thrust/thrust_keyboard_input.lua", │ │ - "start": 73472, │ │ - "end": 75337 │ │ + "filename": "/preload/games/checkers/checkers_draw.lua", │ │ + "start": 65916, │ │ + "end": 70145 │ │ }, { │ │ - "filename": "/preload/games/thrust/thrust_main.lua", │ │ - "start": 75337, │ │ - "end": 77601 │ │ + "filename": "/preload/games/checkers/checkers_core.lua", │ │ + "start": 70145, │ │ + "end": 80152 │ │ }, { │ │ - "filename": "/preload/games/thrust/thrust_draw.lua", │ │ - "start": 77601, │ │ - "end": 84652 │ │ + "filename": "/preload/games/checkers/checkers_main.lua", │ │ + "start": 80152, │ │ + "end": 87480 │ │ }, { │ │ - "filename": "/preload/games/chess/chess_draw.lua", │ │ - "start": 84652, │ │ - "end": 93959 │ │ + "filename": "/preload/games/checkers/checkers_serialize.lua", │ │ + "start": 87480, │ │ + "end": 89634 │ │ }, { │ │ - "filename": "/preload/games/chess/chess_core.lua", │ │ - "start": 93959, │ │ - "end": 108228 │ │ + "filename": "/preload/games/blue/blue_draw.lua", │ │ + "start": 89634, │ │ + "end": 117010 │ │ }, { │ │ - "filename": "/preload/games/chess/chess_main.lua", │ │ - "start": 108228, │ │ - "end": 118223 │ │ + "filename": "/preload/games/blue/blue_main.lua", │ │ + "start": 117010, │ │ + "end": 118009 │ │ }, { │ │ - "filename": "/preload/games/chess/chess_serialize.lua", │ │ - "start": 118223, │ │ - "end": 119149 │ │ + "filename": "/preload/games/blue/blue_ui.lua", │ │ + "start": 118009, │ │ + "end": 120909 │ │ }, { │ │ "filename": "/preload/games/blue/blue_core.lua", │ │ - "start": 119149, │ │ - "end": 122604 │ │ + "start": 120909, │ │ + "end": 124364 │ │ }, { │ │ - "filename": "/preload/games/blue/blue_main.lua", │ │ - "start": 122604, │ │ - "end": 123603 │ │ + "filename": "/preload/games/bound/bound_core.lua", │ │ + "start": 124364, │ │ + "end": 152921 │ │ }, { │ │ - "filename": "/preload/games/blue/blue_ui.lua", │ │ - "start": 123603, │ │ - "end": 126503 │ │ + "filename": "/preload/games/bound/bound_draw.lua", │ │ + "start": 152921, │ │ + "end": 175959 │ │ }, { │ │ - "filename": "/preload/games/blue/blue_draw.lua", │ │ - "start": 126503, │ │ - "end": 153879 │ │ + "filename": "/preload/games/bound/bound_main.lua", │ │ + "start": 175959, │ │ + "end": 188028 │ │ }, { │ │ - "filename": "/preload/games/crossword_builder/crossword_builder_main.lua", │ │ - "start": 153879, │ │ - "end": 157461 │ │ + "filename": "/preload/games/bound/bound_serialize.lua", │ │ + "start": 188028, │ │ + "end": 199015 │ │ }, { │ │ - "filename": "/preload/games/crossword_builder/crossword_builder_draw.lua", │ │ - "start": 157461, │ │ - "end": 161765 │ │ + "filename": "/preload/games/test/draw_graphics_test.lua", │ │ + "start": 199015, │ │ + "end": 200926 │ │ }, { │ │ - "filename": "/preload/games/crossword_builder/crossword_builder_core.lua", │ │ - "start": 161765, │ │ - "end": 176286 │ │ + "filename": "/preload/games/test/timer_test.lua", │ │ + "start": 200926, │ │ + "end": 203081 │ │ }, { │ │ - "filename": "/preload/games/spider_swing/spider_swing_main.lua", │ │ - "start": 176286, │ │ - "end": 179006 │ │ + "filename": "/preload/games/test/card_angle_test.lua", │ │ + "start": 203081, │ │ + "end": 206301 │ │ }, { │ │ - "filename": "/preload/games/spider_swing/spider_swing_draw.lua", │ │ - "start": 179006, │ │ - "end": 185127 │ │ + "filename": "/preload/games/crib/crib_test.lua", │ │ + "start": 206301, │ │ + "end": 210138 │ │ }, { │ │ - "filename": "/preload/games/spider_swing/spider_swing_core.lua", │ │ - "start": 185127, │ │ - "end": 190578 │ │ + "filename": "/preload/games/crib/crib_serialize.lua", │ │ + "start": 210138, │ │ + "end": 216010 │ │ }, { │ │ - "filename": "/preload/games/fluid_mix/fluid_mix_core.lua", │ │ - "start": 190578, │ │ - "end": 192821 │ │ + "filename": "/preload/games/crib/crib_main.lua", │ │ + "start": 216010, │ │ + "end": 222580 │ │ }, { │ │ - "filename": "/preload/games/fluid_mix/fluid_mix_main.lua", │ │ - "start": 192821, │ │ - "end": 195817 │ │ + "filename": "/preload/games/crib/crib_core.lua", │ │ + "start": 222580, │ │ + "end": 258663 │ │ }, { │ │ - "filename": "/preload/games/fluid_mix/fluid_mix_draw.lua", │ │ - "start": 195817, │ │ - "end": 201625 │ │ + "filename": "/preload/games/crib/crib_draw.lua", │ │ + "start": 258663, │ │ + "end": 273699 │ │ }, { │ │ - "filename": "/preload/games/fluid_mix/fluid_mix_serialize.lua", │ │ - "start": 201625, │ │ - "end": 203780 │ │ + "filename": "/preload/games/31s/31s_core.lua", │ │ + "start": 273699, │ │ + "end": 286111 │ │ }, { │ │ - "filename": "/preload/games/bound/bound_serialize.lua", │ │ - "start": 203780, │ │ - "end": 214767 │ │ + "filename": "/preload/games/31s/31s_draw.lua", │ │ + "start": 286111, │ │ + "end": 294595 │ │ }, { │ │ - "filename": "/preload/games/bound/bound_draw.lua", │ │ - "start": 214767, │ │ - "end": 237805 │ │ + "filename": "/preload/games/31s/31s_main.lua", │ │ + "start": 294595, │ │ + "end": 304489 │ │ }, { │ │ - "filename": "/preload/games/bound/bound_main.lua", │ │ - "start": 237805, │ │ - "end": 249874 │ │ + "filename": "/preload/games/minesweeper/minesweeper_core.lua", │ │ + "start": 304489, │ │ + "end": 313412 │ │ }, { │ │ - "filename": "/preload/games/bound/bound_core.lua", │ │ - "start": 249874, │ │ - "end": 278431 │ │ + "filename": "/preload/games/minesweeper/minesweeper_serialize.lua", │ │ + "start": 313412, │ │ + "end": 318615 │ │ }, { │ │ - "filename": "/preload/games/sudoku/sudoku_draw.lua", │ │ - "start": 278431, │ │ - "end": 282415 │ │ + "filename": "/preload/games/minesweeper/minesweeper_main.lua", │ │ + "start": 318615, │ │ + "end": 331160 │ │ }, { │ │ - "filename": "/preload/games/sudoku/sudoku_core.lua", │ │ - "start": 282415, │ │ - "end": 292918 │ │ + "filename": "/preload/games/minesweeper/minesweeper_draw.lua", │ │ + "start": 331160, │ │ + "end": 336601 │ │ }, { │ │ - "filename": "/preload/games/sudoku/sudoku_main.lua", │ │ - "start": 292918, │ │ - "end": 293639 │ │ + "filename": "/preload/games/minesweeper_life/minesweeper_life_main.lua", │ │ + "start": 336601, │ │ + "end": 355537 │ │ }, { │ │ - "filename": "/preload/games/31s/31s_core.lua", │ │ - "start": 293639, │ │ - "end": 306051 │ │ + "filename": "/preload/games/minesweeper_life/minesweeper_serialize.lua", │ │ + "start": 355537, │ │ + "end": 360750 │ │ }, { │ │ - "filename": "/preload/games/31s/31s_draw.lua", │ │ - "start": 306051, │ │ - "end": 314535 │ │ + "filename": "/preload/games/minesweeper_life/minesweeper_draw.lua", │ │ + "start": 360750, │ │ + "end": 366355 │ │ }, { │ │ - "filename": "/preload/games/31s/31s_main.lua", │ │ - "start": 314535, │ │ - "end": 324429 │ │ + "filename": "/preload/games/minesweeper_life/minesweeper_life_core.lua", │ │ + "start": 366355, │ │ + "end": 382119 │ │ }, { │ │ - "filename": "/preload/games/minesweeper/minesweeper_draw.lua", │ │ - "start": 324429, │ │ - "end": 329870 │ │ + "filename": "/preload/games/card_sim/card_generic_core.lua", │ │ + "start": 382119, │ │ + "end": 390142 │ │ }, { │ │ - "filename": "/preload/games/minesweeper/minesweeper_main.lua", │ │ - "start": 329870, │ │ - "end": 342415 │ │ + "filename": "/preload/games/card_sim/card_generic_draw.lua", │ │ + "start": 390142, │ │ + "end": 392349 │ │ }, { │ │ - "filename": "/preload/games/minesweeper/minesweeper_core.lua", │ │ - "start": 342415, │ │ - "end": 351338 │ │ + "filename": "/preload/games/card_sim/card_generic_main.lua", │ │ + "start": 392349, │ │ + "end": 398502 │ │ }, { │ │ - "filename": "/preload/games/minesweeper/minesweeper_serialize.lua", │ │ - "start": 351338, │ │ - "end": 356541 │ │ + "filename": "/preload/games/card_sim/card_generic_serialize.lua", │ │ + "start": 398502, │ │ + "end": 401724 │ │ }, { │ │ - "filename": "/preload/games/word_mastermind/word_mastermind_main.lua", │ │ - "start": 356541, │ │ - "end": 362655 │ │ + "filename": "/preload/games/sudoku/sudoku_draw.lua", │ │ + "start": 401724, │ │ + "end": 405708 │ │ }, { │ │ - "filename": "/preload/games/word_mastermind/word_mastermind_serialize.lua", │ │ - "start": 362655, │ │ - "end": 364579 │ │ + "filename": "/preload/games/sudoku/sudoku_core.lua", │ │ + "start": 405708, │ │ + "end": 416211 │ │ }, { │ │ - "filename": "/preload/games/word_mastermind/word_mastermind_core.lua", │ │ - "start": 364579, │ │ - "end": 371319 │ │ + "filename": "/preload/games/sudoku/sudoku_main.lua", │ │ + "start": 416211, │ │ + "end": 416932 │ │ }, { │ │ - "filename": "/preload/games/word_mastermind/word_mastermind_draw.lua", │ │ - "start": 371319, │ │ - "end": 380840 │ │ + "filename": "/preload/games/chess/chess_main.lua", │ │ + "start": 416932, │ │ + "end": 426927 │ │ }, { │ │ - "filename": "/preload/games/api_demo/game_draw.lua", │ │ - "start": 380840, │ │ - "end": 387242 │ │ + "filename": "/preload/games/chess/chess_draw.lua", │ │ + "start": 426927, │ │ + "end": 436234 │ │ }, { │ │ - "filename": "/preload/games/api_demo/game.lua", │ │ - "start": 387242, │ │ - "end": 394955 │ │ + "filename": "/preload/games/chess/chess_serialize.lua", │ │ + "start": 436234, │ │ + "end": 437160 │ │ }, { │ │ - "filename": "/preload/games/api_demo/game_core.lua", │ │ - "start": 394955, │ │ - "end": 397128 │ │ + "filename": "/preload/games/chess/chess_core.lua", │ │ + "start": 437160, │ │ + "end": 451429 │ │ }, { │ │ - "filename": "/preload/games/endless_runner/endless_runner_main.lua", │ │ - "start": 397128, │ │ - "end": 398565 │ │ + "filename": "/preload/games/swarm/swarm_core.lua", │ │ + "start": 451429, │ │ + "end": 465778 │ │ }, { │ │ - "filename": "/preload/games/endless_runner/endless_runner_core.lua", │ │ - "start": 398565, │ │ - "end": 403765 │ │ + "filename": "/preload/games/swarm/swarm_main.lua", │ │ + "start": 465778, │ │ + "end": 467822 │ │ }, { │ │ - "filename": "/preload/games/endless_runner/endless_runner_draw.lua", │ │ - "start": 403765, │ │ - "end": 406695 │ │ + "filename": "/preload/games/swarm/swarm_keyboard_input.lua", │ │ + "start": 467822, │ │ + "end": 469390 │ │ }, { │ │ - "filename": "/preload/games/hospital/hospital_draw.lua", │ │ - "start": 406695, │ │ - "end": 429151 │ │ + "filename": "/preload/games/swarm/swarm_draw.lua", │ │ + "start": 469390, │ │ + "end": 472707 │ │ }, { │ │ "filename": "/preload/games/hospital/hospital_core.lua", │ │ - "start": 429151, │ │ - "end": 455417 │ │ + "start": 472707, │ │ + "end": 498973 │ │ }, { │ │ "filename": "/preload/games/hospital/hospital_serialize.lua", │ │ - "start": 455417, │ │ - "end": 465427 │ │ - }, { │ │ - "filename": "/preload/games/hospital/hospital_main.lua", │ │ - "start": 465427, │ │ - "end": 474238 │ │ + "start": 498973, │ │ + "end": 508983 │ │ }, { │ │ - "filename": "/preload/games/go/go_core.lua", │ │ - "start": 474238, │ │ - "end": 483661 │ │ + "filename": "/preload/games/hospital/hospital_draw.lua", │ │ + "start": 508983, │ │ + "end": 531439 │ │ }, { │ │ - "filename": "/preload/games/go/go_ctrl.lua", │ │ - "start": 483661, │ │ - "end": 484411 │ │ + "filename": "/preload/games/hospital/hospital_main.lua", │ │ + "start": 531439, │ │ + "end": 540250 │ │ }, { │ │ - "filename": "/preload/games/go/go_ui.lua", │ │ - "start": 484411, │ │ - "end": 487801 │ │ + "filename": "/preload/games/touch_test/touch_test.lua", │ │ + "start": 540250, │ │ + "end": 542600 │ │ }, { │ │ "filename": "/preload/games/go/go_main.lua", │ │ - "start": 487801, │ │ - "end": 500991 │ │ + "start": 542600, │ │ + "end": 555790 │ │ }, { │ │ - "filename": "/preload/games/backgammon/backgammon_core.lua", │ │ - "start": 500991, │ │ - "end": 529222 │ │ + "filename": "/preload/games/go/go_core.lua", │ │ + "start": 555790, │ │ + "end": 565213 │ │ }, { │ │ - "filename": "/preload/games/backgammon/backgammon_serialize.lua", │ │ - "start": 529222, │ │ - "end": 533596 │ │ + "filename": "/preload/games/go/go_ui.lua", │ │ + "start": 565213, │ │ + "end": 568603 │ │ }, { │ │ - "filename": "/preload/games/backgammon/backgammon_draw.lua", │ │ - "start": 533596, │ │ - "end": 555940 │ │ + "filename": "/preload/games/go/go_ctrl.lua", │ │ + "start": 568603, │ │ + "end": 569353 │ │ }, { │ │ - "filename": "/preload/games/backgammon/backgammon_main.lua", │ │ - "start": 555940, │ │ - "end": 574834 │ │ + "filename": "/preload/games/endless_runner/endless_runner_draw.lua", │ │ + "start": 569353, │ │ + "end": 572283 │ │ }, { │ │ - "filename": "/preload/games/card_sim/card_generic_draw.lua", │ │ - "start": 574834, │ │ - "end": 577041 │ │ + "filename": "/preload/games/endless_runner/endless_runner_core.lua", │ │ + "start": 572283, │ │ + "end": 577483 │ │ }, { │ │ - "filename": "/preload/games/card_sim/card_generic_main.lua", │ │ - "start": 577041, │ │ - "end": 583194 │ │ + "filename": "/preload/games/endless_runner/endless_runner_main.lua", │ │ + "start": 577483, │ │ + "end": 578920 │ │ }, { │ │ - "filename": "/preload/games/card_sim/card_generic_serialize.lua", │ │ - "start": 583194, │ │ - "end": 586416 │ │ + "filename": "/preload/games/poker_chips/poker_chips_ui.lua", │ │ + "start": 578920, │ │ + "end": 581293 │ │ }, { │ │ - "filename": "/preload/games/card_sim/card_generic_core.lua", │ │ - "start": 586416, │ │ - "end": 594439 │ │ + "filename": "/preload/games/poker_chips/poker_chips_core.lua", │ │ + "start": 581293, │ │ + "end": 586664 │ │ }, { │ │ - "filename": "/preload/games/minesweeper_life/minesweeper_draw.lua", │ │ - "start": 594439, │ │ - "end": 600044 │ │ + "filename": "/preload/games/poker_chips/poker_chips_main.lua", │ │ + "start": 586664, │ │ + "end": 590859 │ │ }, { │ │ - "filename": "/preload/games/minesweeper_life/minesweeper_life_main.lua", │ │ - "start": 600044, │ │ - "end": 618980 │ │ + "filename": "/preload/games/poker_chips/poker_chips_serialize.lua", │ │ + "start": 590859, │ │ + "end": 593474 │ │ }, { │ │ - "filename": "/preload/games/minesweeper_life/minesweeper_serialize.lua", │ │ - "start": 618980, │ │ - "end": 624193 │ │ + "filename": "/preload/games/poker_chips/ui/bet_input.lua", │ │ + "start": 593474, │ │ + "end": 601913 │ │ }, { │ │ - "filename": "/preload/games/minesweeper_life/minesweeper_life_core.lua", │ │ - "start": 624193, │ │ - "end": 639957 │ │ + "filename": "/preload/games/poker_chips/ui/view_others.lua", │ │ + "start": 601913, │ │ + "end": 607861 │ │ }, { │ │ - "filename": "/preload/games/wu/wu_ctrl.lua", │ │ - "start": 639957, │ │ - "end": 640778 │ │ + "filename": "/preload/games/poker_chips/ui/control.lua", │ │ + "start": 607861, │ │ + "end": 611901 │ │ }, { │ │ - "filename": "/preload/games/wu/wu_main.lua", │ │ - "start": 640778, │ │ - "end": 650417 │ │ + "filename": "/preload/games/solitaire/solitaire_core.lua", │ │ + "start": 611901, │ │ + "end": 631597 │ │ }, { │ │ - "filename": "/preload/games/wu/wu_core.lua", │ │ - "start": 650417, │ │ - "end": 656541 │ │ + "filename": "/preload/games/solitaire/solitaire_solve.lua", │ │ + "start": 631597, │ │ + "end": 649578 │ │ }, { │ │ "filename": "/preload/games/solitaire/solitaire_main.lua", │ │ - "start": 656541, │ │ - "end": 673823 │ │ + "start": 649578, │ │ + "end": 666860 │ │ + }, { │ │ + "filename": "/preload/games/solitaire/solitaire_serialize.lua", │ │ + "start": 666860, │ │ + "end": 671913 │ │ }, { │ │ "filename": "/preload/games/solitaire/solitaire_draw.lua", │ │ - "start": 673823, │ │ - "end": 692165 │ │ + "start": 671913, │ │ + "end": 690255 │ │ }, { │ │ - "filename": "/preload/games/solitaire/solitaire_solve.lua", │ │ - "start": 692165, │ │ - "end": 710146 │ │ + "filename": "/preload/games/backgammon/backgammon_main.lua", │ │ + "start": 690255, │ │ + "end": 709149 │ │ }, { │ │ - "filename": "/preload/games/solitaire/solitaire_core.lua", │ │ - "start": 710146, │ │ - "end": 729842 │ │ + "filename": "/preload/games/backgammon/backgammon_serialize.lua", │ │ + "start": 709149, │ │ + "end": 713523 │ │ }, { │ │ - "filename": "/preload/games/solitaire/solitaire_serialize.lua", │ │ - "start": 729842, │ │ - "end": 734895 │ │ + "filename": "/preload/games/backgammon/backgammon_draw.lua", │ │ + "start": 713523, │ │ + "end": 735867 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_serialize.lua", │ │ - "start": 734895, │ │ - "end": 738557 │ │ + "filename": "/preload/games/backgammon/backgammon_core.lua", │ │ + "start": 735867, │ │ + "end": 764098 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/gen_crossword_letters.py", │ │ - "start": 738557, │ │ - "end": 746987 │ │ + "filename": "/preload/games/life/life_main.lua", │ │ + "start": 764098, │ │ + "end": 766271 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/gen_crossword_letters2.py", │ │ - "start": 746987, │ │ - "end": 760946 │ │ + "filename": "/preload/games/life/life_draw.lua", │ │ + "start": 766271, │ │ + "end": 767261 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_puzzles.lua", │ │ - "start": 760946, │ │ - "end": 886322 │ │ + "filename": "/preload/games/life/life_core.lua", │ │ + "start": 767261, │ │ + "end": 770007 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_core.lua", │ │ - "start": 886322, │ │ - "end": 905317 │ │ + "filename": "/preload/games/crossword_builder/crossword_builder_main.lua", │ │ + "start": 770007, │ │ + "end": 773589 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_main.lua", │ │ - "start": 905317, │ │ - "end": 914254 │ │ + "filename": "/preload/games/crossword_builder/crossword_builder_core.lua", │ │ + "start": 773589, │ │ + "end": 788110 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/list_right_diffs.py", │ │ - "start": 914254, │ │ - "end": 914609 │ │ + "filename": "/preload/games/crossword_builder/crossword_builder_draw.lua", │ │ + "start": 788110, │ │ + "end": 792414 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_gen_puzzles.lua", │ │ - "start": 914609, │ │ - "end": 918990 │ │ + "filename": "/preload/games/word_mastermind/word_mastermind_serialize.lua", │ │ + "start": 792414, │ │ + "end": 794338 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/list_puzzle_words.lua", │ │ - "start": 918990, │ │ - "end": 919884 │ │ + "filename": "/preload/games/word_mastermind/word_mastermind_draw.lua", │ │ + "start": 794338, │ │ + "end": 803859 │ │ }, { │ │ - "filename": "/preload/games/crossword_letters/crossword_letters_draw.lua", │ │ - "start": 919884, │ │ - "end": 930996 │ │ + "filename": "/preload/games/word_mastermind/word_mastermind_main.lua", │ │ + "start": 803859, │ │ + "end": 809973 │ │ }, { │ │ - "filename": "/preload/games/checkers/checkers_main.lua", │ │ - "start": 930996, │ │ - "end": 938324 │ │ + "filename": "/preload/games/word_mastermind/word_mastermind_core.lua", │ │ + "start": 809973, │ │ + "end": 816713 │ │ }, { │ │ - "filename": "/preload/games/checkers/checkers_core.lua", │ │ - "start": 938324, │ │ - "end": 948331 │ │ + "filename": "/preload/games/wu/wu_core.lua", │ │ + "start": 816713, │ │ + "end": 822837 │ │ }, { │ │ - "filename": "/preload/games/checkers/checkers_serialize.lua", │ │ - "start": 948331, │ │ - "end": 950485 │ │ + "filename": "/preload/games/wu/wu_main.lua", │ │ + "start": 822837, │ │ + "end": 832476 │ │ }, { │ │ - "filename": "/preload/games/checkers/checkers_draw.lua", │ │ - "start": 950485, │ │ - "end": 954714 │ │ + "filename": "/preload/games/wu/wu_ctrl.lua", │ │ + "start": 832476, │ │ + "end": 833297 │ │ }, { │ │ - "filename": "/preload/games/test/timer_test.lua", │ │ - "start": 954714, │ │ - "end": 956869 │ │ + "filename": "/preload/games/crossword_letters/gen_crossword_letters2.py", │ │ + "start": 833297, │ │ + "end": 847256 │ │ }, { │ │ - "filename": "/preload/games/test/draw_graphics_test.lua", │ │ - "start": 956869, │ │ - "end": 958780 │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_core.lua", │ │ + "start": 847256, │ │ + "end": 866251 │ │ }, { │ │ - "filename": "/preload/games/test/card_angle_test.lua", │ │ - "start": 958780, │ │ - "end": 962000 │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_puzzles.lua", │ │ + "start": 866251, │ │ + "end": 991627 │ │ }, { │ │ - "filename": "/preload/games/crib/crib_core.lua", │ │ - "start": 962000, │ │ - "end": 998083 │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_gen_puzzles.lua", │ │ + "start": 991627, │ │ + "end": 996008 │ │ }, { │ │ - "filename": "/preload/games/crib/crib_draw.lua", │ │ - "start": 998083, │ │ - "end": 1013119 │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_main.lua", │ │ + "start": 996008, │ │ + "end": 1004945 │ │ }, { │ │ - "filename": "/preload/games/crib/crib_main.lua", │ │ - "start": 1013119, │ │ - "end": 1019689 │ │ + "filename": "/preload/games/crossword_letters/gen_crossword_letters.py", │ │ + "start": 1004945, │ │ + "end": 1013375 │ │ }, { │ │ - "filename": "/preload/games/crib/crib_serialize.lua", │ │ - "start": 1019689, │ │ - "end": 1025561 │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_serialize.lua", │ │ + "start": 1013375, │ │ + "end": 1017037 │ │ }, { │ │ - "filename": "/preload/games/crib/crib_test.lua", │ │ - "start": 1025561, │ │ + "filename": "/preload/games/crossword_letters/list_right_diffs.py", │ │ + "start": 1017037, │ │ + "end": 1017392 │ │ + }, { │ │ + "filename": "/preload/games/crossword_letters/crossword_letters_draw.lua", │ │ + "start": 1017392, │ │ + "end": 1028504 │ │ + }, { │ │ + "filename": "/preload/games/crossword_letters/list_puzzle_words.lua", │ │ + "start": 1028504, │ │ "end": 1029398 │ │ }, { │ │ - "filename": "/preload/libs/touch_to_mouse_evts.lua", │ │ + "filename": "/preload/libs/shuffle.lua", │ │ "start": 1029398, │ │ - "end": 1030531 │ │ - }, { │ │ - "filename": "/preload/libs/combinations.lua", │ │ - "start": 1030531, │ │ - "end": 1032823 │ │ + "end": 1029751 │ │ }, { │ │ - "filename": "/preload/libs/letter_tiles.lua", │ │ - "start": 1032823, │ │ - "end": 1056002 │ │ + "filename": "/preload/libs/utils.lua", │ │ + "start": 1029751, │ │ + "end": 1034277 │ │ }, { │ │ "filename": "/preload/libs/words.lua", │ │ - "start": 1056002, │ │ - "end": 1059303 │ │ + "start": 1034277, │ │ + "end": 1037578 │ │ }, { │ │ - "filename": "/preload/libs/utils.lua", │ │ - "start": 1059303, │ │ - "end": 1063829 │ │ + "filename": "/preload/libs/letter_tiles.lua", │ │ + "start": 1037578, │ │ + "end": 1060757 │ │ }, { │ │ - "filename": "/preload/libs/shuffle.lua", │ │ - "start": 1063829, │ │ + "filename": "/preload/libs/combinations.lua", │ │ + "start": 1060757, │ │ + "end": 1063049 │ │ + }, { │ │ + "filename": "/preload/libs/touch_to_mouse_evts.lua", │ │ + "start": 1063049, │ │ "end": 1064182 │ │ }, { │ │ - "filename": "/preload/libs/dice/dice_draw.lua", │ │ + "filename": "/preload/libs/multiplayer/wait_for_players.lua", │ │ "start": 1064182, │ │ - "end": 1065617 │ │ + "end": 1070845 │ │ }, { │ │ - "filename": "/preload/libs/dice/dice.lua", │ │ - "start": 1065617, │ │ - "end": 1065876 │ │ + "filename": "/preload/libs/multiplayer/two_player.lua", │ │ + "start": 1070845, │ │ + "end": 1082224 │ │ }, { │ │ - "filename": "/preload/libs/serialize/storage_helpers.lua", │ │ - "start": 1065876, │ │ - "end": 1066656 │ │ + "filename": "/preload/libs/ui/buttons.lua", │ │ + "start": 1082224, │ │ + "end": 1086113 │ │ }, { │ │ - "filename": "/preload/libs/serialize/bit_pack.lua", │ │ - "start": 1066656, │ │ - "end": 1069679 │ │ + "filename": "/preload/libs/ui/soft_numpad.lua", │ │ + "start": 1086113, │ │ + "end": 1090106 │ │ }, { │ │ - "filename": "/preload/libs/serialize/serialize.lua", │ │ - "start": 1069679, │ │ - "end": 1075120 │ │ + "filename": "/preload/libs/ui/show_buttons_popup.lua", │ │ + "start": 1090106, │ │ + "end": 1090885 │ │ }, { │ │ - "filename": "/preload/libs/cards/cards.lua", │ │ - "start": 1075120, │ │ - "end": 1080527 │ │ + "filename": "/preload/libs/ui/touchpad.lua", │ │ + "start": 1090885, │ │ + "end": 1092223 │ │ }, { │ │ - "filename": "/preload/libs/cards/card_test.lua", │ │ - "start": 1080527, │ │ - "end": 1081321 │ │ + "filename": "/preload/libs/draw/draw_colours.lua", │ │ + "start": 1092223, │ │ + "end": 1093044 │ │ }, { │ │ - "filename": "/preload/libs/cards/cards_set.lua", │ │ - "start": 1081321, │ │ - "end": 1081672 │ │ + "filename": "/preload/libs/draw/draw_shapes.lua", │ │ + "start": 1093044, │ │ + "end": 1094669 │ │ }, { │ │ - "filename": "/preload/libs/cards/cards_draw.lua", │ │ - "start": 1081672, │ │ - "end": 1091241 │ │ + "filename": "/preload/libs/draw/draw_more.lua", │ │ + "start": 1094669, │ │ + "end": 1098636 │ │ }, { │ │ - "filename": "/preload/libs/multiplayer/two_player.lua", │ │ - "start": 1091241, │ │ - "end": 1102620 │ │ + "filename": "/preload/libs/draw/draw_celebration_anim.lua", │ │ + "start": 1098636, │ │ + "end": 1108050 │ │ }, { │ │ - "filename": "/preload/libs/multiplayer/wait_for_players.lua", │ │ - "start": 1102620, │ │ - "end": 1109283 │ │ + "filename": "/preload/libs/draw/draw_keyboard.lua", │ │ + "start": 1108050, │ │ + "end": 1112859 │ │ }, { │ │ - "filename": "/preload/libs/draw/draw_colours.lua", │ │ - "start": 1109283, │ │ - "end": 1110104 │ │ + "filename": "/preload/libs/serialize/storage_helpers.lua", │ │ + "start": 1112859, │ │ + "end": 1113639 │ │ }, { │ │ - "filename": "/preload/libs/draw/draw_more.lua", │ │ - "start": 1110104, │ │ - "end": 1114071 │ │ + "filename": "/preload/libs/serialize/bit_pack.lua", │ │ + "start": 1113639, │ │ + "end": 1116662 │ │ }, { │ │ - "filename": "/preload/libs/draw/draw_celebration_anim.lua", │ │ - "start": 1114071, │ │ - "end": 1123485 │ │ + "filename": "/preload/libs/serialize/serialize.lua", │ │ + "start": 1116662, │ │ + "end": 1122103 │ │ }, { │ │ - "filename": "/preload/libs/draw/draw_shapes.lua", │ │ - "start": 1123485, │ │ - "end": 1125110 │ │ + "filename": "/preload/libs/cards/cards_draw.lua", │ │ + "start": 1122103, │ │ + "end": 1131672 │ │ }, { │ │ - "filename": "/preload/libs/draw/draw_keyboard.lua", │ │ - "start": 1125110, │ │ - "end": 1129919 │ │ + "filename": "/preload/libs/cards/cards.lua", │ │ + "start": 1131672, │ │ + "end": 1137079 │ │ }, { │ │ - "filename": "/preload/libs/ui/show_buttons_popup.lua", │ │ - "start": 1129919, │ │ - "end": 1130698 │ │ + "filename": "/preload/libs/cards/card_test.lua", │ │ + "start": 1137079, │ │ + "end": 1137873 │ │ }, { │ │ - "filename": "/preload/libs/ui/soft_numpad.lua", │ │ - "start": 1130698, │ │ - "end": 1134691 │ │ + "filename": "/preload/libs/cards/cards_set.lua", │ │ + "start": 1137873, │ │ + "end": 1138224 │ │ }, { │ │ - "filename": "/preload/libs/ui/touchpad.lua", │ │ - "start": 1134691, │ │ - "end": 1136029 │ │ + "filename": "/preload/libs/dice/dice.lua", │ │ + "start": 1138224, │ │ + "end": 1138483 │ │ }, { │ │ - "filename": "/preload/libs/ui/buttons.lua", │ │ - "start": 1136029, │ │ + "filename": "/preload/libs/dice/dice_draw.lua", │ │ + "start": 1138483, │ │ "end": 1139918 │ │ }], │ │ "remote_package_size": 1139918, │ │ - "package_uuid": "1a5a32cb-7490-4ae7-8a8d-eaf878cee40a" │ │ + "package_uuid": "eb89b523-98b9-402a-a3e3-d7b98035d147" │ │ }); │ │ │ │ })(); │ │ │ │ │ │ // All the pre-js content up to here must remain later on, we need to run │ │ // it. │ │ @@ -3049,15 +3049,15 @@ │ │ // Globals used by JS i64 conversions (see makeSetValue) │ │ var tempDouble; │ │ var tempI64; │ │ │ │ // === Body === │ │ │ │ var ASM_CONSTS = { │ │ - 83427: function($0, $1) { │ │ + 83795: function($0, $1) { │ │ let s = UTF8ToString($0, $1); │ │ let freq = Number(s); │ │ return freq; │ │ } │ │ }; │ │ │ │ function em_js_dict_init(language_ptr) { ├── assets/html/alexgames_wasm.data │┄ Ordering differences only │ @@ -1,2177 +1,1294 @@ │ -local alexgames = require("alexgames") │ - │ -local lua_draw = {} │ - │ -local cell_size_y = nil │ -local cell_size_x = nil │ - │ -local present_colour = '#000000' │ -local absent_colour = '#ffffff' │ - │ -if alexgames.get_user_colour_pref() == "dark" then │ - present_colour = '#888888' │ - absent_colour = '#000000' │ -end │ - │ -function lua_draw.init(cell_size) │ - cell_size_y = cell_size │ - cell_size_x = cell_size │ -end │ - │ -function lua_draw.update(board) │ - alexgames.draw_clear() │ - for y=1,#board do │ - for x=1,#board[y] do │ - local fill_colour │ - if board[y][x] ~= 0 then │ - fill_colour = present_colour │ - else │ - fill_colour = absent_colour │ - end │ - alexgames.draw_rect(fill_colour, │ - (y-1)*cell_size_y, (x-1)*cell_size_x, │ - y * cell_size_y, x * cell_size_x) │ - end │ - end │ - alexgames.draw_refresh() │ -end │ - │ -function lua_draw.coords_to_cell_idx(coords_y, coords_x) │ - return { y = 1 + math.floor(coords_y/cell_size_y), │ - x = 1 + math.floor(coords_x/cell_size_x) } │ -end │ +local draw = {} │ │ -return lua_draw │ -local life_core = require("games/life/life_core") │ -local life_draw = require("games/life/life_draw") │ local alexgames = require("alexgames") │ │ -local BTN_ID_TOGGLE_PLAY_PAUSE = "toggle_play_pause" │ -local BTN_ID_STEP = "step" │ -local BTN_ID_RANDOM = "random" │ -local BTN_ID_CLEAR = "clear" │ +-- Helper library to draw shapes from the base APIs defined in alexgames │ +local draw_more = require("libs/draw/draw_shapes") │ │ -local cell_size = 10 │ -local board_width = 480 │ -local board_height = 480 │ ---local cells_y = 40 │ ---local cells_x = 30 │ -local cells_y = math.floor(board_height/cell_size) │ -local cells_x = math.floor(board_width/cell_size) │ +local g_board_width │ +local g_board_height │ │ -local state = nil │ -local is_drawing = true │ +local BORDER_COLOUR = '#8888ff88' │ +local BORDER_THICKNESS = 3 │ │ -function draw_board_internal() │ - life_core.update_state(state) │ - life_draw.update(life_core.get_active_board(state)) │ +function draw.init(board_width, board_height) │ + g_board_width = board_width │ + g_board_height = board_height │ end │ │ -function update() │ - if is_drawing then │ - draw_board_internal() │ - end │ +local function in_range(min_val, val, max_val) │ + return min_val <= val and val <= max_val │ end │ │ -function handle_user_clicked(y_coords, x_coords) │ - local cell_pos = life_draw.coords_to_cell_idx(y_coords, x_coords) │ - life_core.toggle_cell_state(state, cell_pos) │ - life_draw.update(life_core.get_active_board(state)) │ -end │ │ -function handle_btn_clicked(btn_id) │ - if btn_id == BTN_ID_STEP then │ - life_core.update_state(state) │ - life_draw.update(life_core.get_active_board(state)) │ - elseif btn_id == BTN_ID_TOGGLE_PLAY_PAUSE then │ - is_drawing = not is_drawing │ - elseif btn_id == BTN_ID_RANDOM then │ - life_core.random_board(state) │ - life_draw.update(life_core.get_active_board(state)) │ - elseif btn_id == BTN_ID_CLEAR then │ - life_core.clear_board(state) │ - life_draw.update(life_core.get_active_board(state)) │ - else │ - print(string.format("Unhandled btn_id \"%s\"", btn_id)) │ - end │ -end │ +function draw.draw(state) │ + -- This clears anything on the screen from previous `update` calls. │ + alexgames.draw_clear() │ │ -function get_state() │ - -- TODO it wouldn't be unreasonable to implement importing/exporting state for this, but │ - -- since it's more of a tech demo than a game, I don't want to bother │ - -- with it right now. │ - return nil │ -end │ │ -life_draw.init(cell_size) │ + -- Draw a border around the screen to show where the ball will bounce │ + local padding = 3 │ + local outline_pt1 = { y = padding, x = padding } │ + local outline_pt2 = { y = g_board_height - padding, x = g_board_width - padding } │ + draw_more.draw_rect_outline(BORDER_COLOUR, BORDER_THICKNESS, │ + outline_pt1.y, outline_pt1.x, │ + outline_pt2.y, outline_pt2.x) │ + -- draw_more.draw_rect_outline(...) is a helper function to do this (draw 4 lines in a rectangle): │ + --[[ │ + alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ + 0, 0, │ + 0, g_board_width) │ + alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ + 0, g_board_width, │ + g_board_height, g_board_width) │ + alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ + g_board_height, g_board_width, │ + g_board_height, 0) │ + alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ + g_board_height, 0, │ + 0 , 0) │ + --]] │ │ -function start_game() │ - alexgames.create_btn(BTN_ID_TOGGLE_PLAY_PAUSE, "Play/pause", 1) │ - alexgames.create_btn(BTN_ID_STEP, "Step", 1) │ - alexgames.create_btn(BTN_ID_RANDOM, "Random", 1) │ - alexgames.create_btn(BTN_ID_CLEAR, "Clear", 1) │ - │ - state = life_core.new_state(cells_y, cells_x) │ - │ - alexgames.set_timer_update_ms(math.floor(1000/20)) │ -end │ -local life = {} │ + local msg = string.format("time: %s, frame: %5d", alexgames.get_time_of_day(), state.frame_idx) │ + local text_color = '#000000' │ + local text_size = 18 │ │ -local dirs = { │ - { y = 0, x = 1}, │ - { y = 0, x = -1}, │ - { y = 1, x = 0}, │ - { y = -1, x = 0}, │ + local padding = 5 │ │ + local y_pos = text_size + padding │ + local x_pos = padding │ │ - { y = 1, x = -1}, │ - { y = 1, x = 1}, │ - { y = -1, x = -1}, │ - { y = -1, x = 1}, │ -} │ + -- Draw text on the screen │ + alexgames.draw_text(msg, text_color, │ + y_pos, x_pos, │ + text_size, │ + alexgames.TEXT_ALIGN_LEFT) │ │ -function add_pts(arg1, arg2) │ - return { y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ -end │ + alexgames.draw_text('Hello, world!', '#ff0000', │ + y_pos + padding + text_size, x_pos, │ + text_size, │ + alexgames.TEXT_ALIGN_LEFT) │ │ + local square_size = 40 │ + local squares_per_row = math.ceil(g_board_width / square_size) │ + local squares_per_col = math.ceil(g_board_height / square_size) │ + --[[ │ + local square_y_pos = math.floor(state.ball_pos_y/square_size)*square_size │ + local square_x_pos = math.floor(state.ball_pos_x/square_size)*square_size │ │ -function life.new_board(y_size, x_size) │ - local board = {} │ - for y=1,y_size do │ - board[#board+1] = {} │ - for x=1,x_size do │ - board[y][#board[y]+1] = 0 │ - end │ + local square_color │ + if (square_y_pos + square_x_pos * squares_per_row) % squares_per_row == 0 then │ + square_color = '#ffffff88' │ + else │ + square_color = '#00000088' │ end │ - return board │ -end │ - │ -function life.new_state(y_size, x_size) │ - local state = { │ - boards = { │ - life.new_board(y_size, x_size), │ - life.new_board(y_size, x_size), │ - }, │ - board_idx = 1, │ - } │ - return state │ -end │ - │ -function life.get_active_board(state) │ - return state.boards[state.board_idx] │ -end │ - │ -function in_range(board, pt) │ - return (1 <= pt.x and pt.x <= #board[1] and │ - 1 <= pt.y and pt.y <= #board) │ -end │ - │ -function count_neighbours(board, pos) │ - local count = 0 │ - for _, dir in ipairs(dirs) do │ - local pt2 = add_pts(pos, dir) │ - if not in_range(board, pt2) then │ - goto next_dir │ - end │ - │ - if board[pt2.y][pt2.x] ~= 0 then │ - count = count + 1 │ - end │ │ - ::next_dir:: │ - end │ + alexgames.draw_rect(square_color, │ + square_y_pos, square_x_pos, │ + square_y_pos + square_size, square_x_pos + square_size) │ + --]] │ + for square_y_idx=0,squares_per_col-1 do │ + for square_x_idx=0,squares_per_row-1 do │ + local square_y_pos1 = square_y_idx * square_size │ + local square_x_pos1 = square_x_idx * square_size │ + local square_y_pos2 = (square_y_idx+1) * square_size │ + local square_x_pos2 = (square_x_idx+1) * square_size │ │ - return count │ -end │ + local ball_in_square = (in_range(0, (math.floor(state.ball_pos_y/square_size + 0.5) - square_y_idx), 1) and │ + in_range(0, (math.floor(state.ball_pos_x/square_size + 0.5) - square_x_idx), 1)) │ + local square_is_white = ((square_y_idx + square_x_idx * (squares_per_row+1)) % 2 == 0) │ │ -function life.update_board(in_board, out_board) │ - for y=1,#in_board do │ - for x=1,#in_board[y] do │ - local neighbour_count = count_neighbours(in_board, {y=y, x=x}) │ - --if neighbour_count > 0 then │ - -- print(string.format("{y=%2d, x=%2d} found neighbour count %d", y,x,neighbour_count)) │ - --end │ - if in_board[y][x] ~= 0 and 2 <= neighbour_count and neighbour_count <= 3 then │ - out_board[y][x] = 1 │ - elseif in_board[y][x] == 0 and neighbour_count == 3 then │ - out_board[y][x] = 1 │ + local square_color │ + if square_is_white then │ + if ball_in_square then square_color = '#ffffff' │ + else square_color = '#ffffff33' end │ else │ - out_board[y][x] = 0 │ + if ball_in_square then square_color = '#000000' │ + else square_color = '#00000033' end │ end │ + │ + alexgames.draw_rect(square_color, │ + square_y_pos1, square_x_pos1, │ + square_y_pos2, square_x_pos2) │ end │ end │ -end │ - │ -function life.update_state(state) │ - local src_board_idx = state.board_idx │ - local dst_board_idx │ - if src_board_idx == 1 then │ - dst_board_idx = 2 │ - else │ - dst_board_idx = 1 │ - end │ - │ - life.update_board(state.boards[src_board_idx], state.boards[dst_board_idx]) │ + │ + local circle_color = '#aaaacc88' │ + local circle_outline = '#0000ff' │ + alexgames.draw_circle(circle_color, circle_outline, │ + state.ball_pos_y, state.ball_pos_x, state.ball_radius) │ │ - state.board_idx = dst_board_idx │ -end │ + -- TODO I need to implement the ability to upload custom graphics │ + -- For now this API uses an ID that is hardcoded in a hashmap mapping this to │ + -- a graphic file. │ + alexgames.draw_graphic('chess_rook_black', │ + state.ball_pos_y, state.ball_pos_x, │ + 2*state.ball_radius, 2*state.ball_radius, │ + { angle_degrees = state.frame_idx / 60 * 90, }) │ │ -function life.toggle_cell_board(board, y, x) │ - if not in_range(board, {y=y, x=x}) then │ - return │ + -- Draw a red line in the direction of the desired user position │ + -- if they are pressing keys, clicking, or touching the screen. │ + if state.user_input_vec ~= nil then │ + local angle = math.atan(state.user_input_vec.y, state.user_input_vec.x) │ + alexgames.draw_line('#ff0000', 4, │ + state.ball_pos_y, state.ball_pos_x, │ + state.ball_pos_y + 2*state.ball_radius*math.sin(angle), state.ball_pos_x + 2*state.ball_radius*math.cos(angle)) │ end │ - │ - local val = board[y][x] │ - if val == 0 then │ - val = 1 │ + │ + -- Show text indicating user input to help debug, also │ + -- explain to user how they can provide input to move the ball. │ + if state.mouse_down then │ + alexgames.draw_text(string.format('Mouse pos: {y=%3.0f, x=%3.0f}', state.user_input_pos_y, state.user_input_pos_x), text_color, │ + g_board_height - padding, padding, │ + text_size, alexgames.TEXT_ALIGN_LEFT) │ + elseif state.active_touch ~= nil then │ + alexgames.draw_text(string.format('Touch pos: {y=%3.0f, x=%3.0f}', state.user_input_pos_y, state.user_input_pos_x), text_color, │ + g_board_height - padding, padding, │ + text_size, alexgames.TEXT_ALIGN_LEFT) │ else │ - val = 0 │ + -- Admittedly I don't have a multi line draw_text function yet │ + alexgames.draw_text('Press arrow keys, WASD, or mouse/touch', text_color, │ + g_board_height - 2*padding - text_size, padding, │ + text_size, alexgames.TEXT_ALIGN_LEFT) │ + alexgames.draw_text('to move ball', text_color, │ + g_board_height - padding, padding, │ + text_size, alexgames.TEXT_ALIGN_LEFT) │ end │ │ - board[y][x] = val │ + -- On the web version, this does nothing. │ + -- On other implementations, this is needed to cause the previous draw APIs to take effect. │ + alexgames.draw_refresh() │ end │ │ -function life.toggle_cell_state(state, cell_pos_pt) │ - local board = life.get_active_board(state) │ - life.toggle_cell_board(board, cell_pos_pt.y, cell_pos_pt.x) │ -end │ +return draw │ +-- This is the "main" file of the example game "api_demo". │ +-- It is intended to show some examples of how the APIs work, including: │ +-- * drawing graphics, │ +-- * drawing lines, rectangles, │ +-- * setting a timer to update the game state and redraw 60 (`FPS`) times per second │ +-- * receiving keyboard ("key") events, │ +-- * receiving mouse events (mouse button pressed ("down"), released ("up"), move), │ +-- * receiving touch events (finger(s) pressed), only available on mobile. │ │ -function life.clear_board(state) │ - local board = life.get_active_board(state) │ - for y=1,#board do │ - for x=1,#board[y] do │ - board[y][x] = 0 │ - end │ - end │ -end │ +-- These are other Lua files defined in the rest of the game bundle. │ +-- If this line is failing then either you removed them or renamed them in the zip you uploaded, │ +-- or I forgot to include the right path in Lua `package.path`. │ +-- Note that in most of the other games I wrote, I instead referenced the global path (something like "games/whatever_game/game_core") │ +-- and didn't bother adding the game's local directory to `package.path`. │ +-- For uploaded games, I made an exception and added it. │ +local core = require("game_core") -- game_core.lua │ +local draw = require("game_draw") -- game_draw.lua │ │ -function bool_to_int(b) │ - if b then return 1 │ - else return 0 end │ -end │ +-- This is the API that I defined, defined in `lua_api.c`. │ +local alexgames = require("alexgames") │ │ -function life.random_board(state) │ - local board = life.get_active_board(state) │ - for y=1,#board do │ - for x=1,#board[y] do │ - board[y][x] = bool_to_int(math.random(0,10) <= 3) │ - end │ - end │ -end │ │ -return life │ -local serialize = {} │ +print( │ +"Hello, world! You should see this message in the developer tools console " .. │ +"if you\'re using the web version.") │ │ -local serialize_lib = require("libs/serialize/serialize") │ +-- The dots are simply to concatentate strings (instead of "+" like in most │ +-- languages). They could be omitted here, I just wanted to break │ +-- this long string across multiple lines. │ +print(string.format("If you're new to Lua, this is a way to achieve printf " .. │ + "like behaviour: %d %s %q", │ + 123, "test", nil)) │ │ -local function serialize_player_state(player_state) │ - local output = "" │ - output = output .. serialize_lib.serialize_string(player_state.name) │ - output = output .. serialize_lib.serialize_s32(player_state.chips) │ - output = output .. serialize_lib.serialize_s32(player_state.bet) │ - output = output .. serialize_lib.serialize_bool(player_state.folded) │ - output = output .. serialize_lib.serialize_string(player_state.last_action) │ - output = output .. serialize_lib.serialize_s32_nilable(player_state.last_bet) │ +-- TODO these should come from an API │ +local board_height = 480 │ +local board_width = 480 │ │ - return output │ -end │ │ -local function deserialize_player_state(bytes) │ - local player_state = {} │ - player_state.name = serialize_lib.deserialize_string(bytes) │ - player_state.chips = serialize_lib.deserialize_s32(bytes) │ - player_state.bet = serialize_lib.deserialize_s32(bytes) │ - player_state.folded = serialize_lib.deserialize_bool(bytes) │ - player_state.last_action = serialize_lib.deserialize_string(bytes) │ - player_state.last_bet = serialize_lib.deserialize_s32_nilable(bytes) │ +-- This is calling into the "game_core.lua" file to create │ +-- a new table with the game's initial state. │ +local state = core.new_state(board_height, board_width) │ │ - return player_state │ -end │ +local FPS = 60 │ +local MS_PER_FRAME = math.floor(1000/FPS) │ │ -local function serialize_pots(pots) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(#pots) │ - for _, pot in ipairs(pots) do │ - output = output .. serialize_lib.serialize_s32(pot) │ - end │ - return output │ -end │ │ -local function deserialize_pots(bytes) │ - local pots = {} │ - local pot_count = serialize_lib.deserialize_byte(bytes) │ - for i=1,pot_count do │ - pots[i] = serialize_lib.deserialize_s32(bytes) │ - end │ - return pots │ -end │ +-- This function is called initially, and then many times repeatedly if `alexgames.set_timer_update_ms(time_ms)` │ +-- is called, to update state. │ +-- TODO It really should be renamed from "update" to "update" or something. │ +-- │ +-- TODO I think it would also be cleaner to move away from global symbols like this, and instead register the important methods │ +-- in something like `alexgames.init({update=update})`, and register the others (key, touch, mousemove) when I enable those events. │ +function update() │ + local dt_ms = MS_PER_FRAME │ │ -function serialize.deserialize_state(bytes_str) │ - local bytes = serialize_lib.bytestr_to_byteary(bytes_str) │ - print("deserializing " .. #bytes .. " bytes") │ - local state = {} │ - state.pots = deserialize_pots(bytes) │ - local player_count = serialize_lib.deserialize_byte(bytes) │ - state.players = {} │ - for i=1,player_count do │ - state.players[i] = deserialize_player_state(bytes) │ - end │ - state.min_bet = serialize_lib.deserialize_s32(bytes) │ - state.player_turn = serialize_lib.deserialize_byte(bytes) │ │ - if #bytes ~= 0 then │ - error(string.format("%d bytes leftover after deserializing", #bytes)) │ + if state.mouse_down or state.active_touch ~= nil then │ + core.set_user_input_pos(state, {y=state.user_input_pos_y, x=state.user_input_pos_x}) │ end │ │ + -- Lua doesn't have an increment operator. This is not ideal, but whenever you encounter │ + -- minor annoyances like this, try to remember that the entire interpreter compiles to ~400 kB of WASM and │ + -- is wonderfully nice to integrate with C. │ + -- And rather than apply a patch that does have an increment operator, I'd like be consistent with standard │ + -- Lua (for now, at least). │ + state.frame_idx = state.frame_idx + 1 │ │ - return state │ -end │ - │ -function serialize.serialize_state(state) │ - local output = "" │ - output = output .. serialize_pots(state.pots) │ - output = output .. serialize_lib.serialize_byte(#state.players) │ - for _, player_state in ipairs(state.players) do │ - output = output .. serialize_player_state(player_state) │ - end │ - output = output .. serialize_lib.serialize_s32(state.min_bet) │ - output = output .. serialize_lib.serialize_byte(state.player_turn) │ + core.update_ball_pos(state, dt_ms) │ │ - return output │ + draw.draw(state) │ end │ │ -return serialize │ --- Author: Alex Barry (github.com/alexbarry) │ --- │ ---[[ │ - │ -Should support both: │ -* "local" multiplayer (where a single user is using this app to track all players' bets/pots), or │ -* network multiplayer (where all players are using this app on their phones/computers and entering their own bets) │ - │ - │ -Expected sequence for network multiplayer: │ -* new player starts app, acts as host │ -* sends message to all, asking for state if anyone is host │ -* if receives a message from someone claiming to be a host, change to client, and load received state │ - │ -TODO: │ -* need to show raising as relative to min bet │ - * when raising, need to set "min bet" in keypad UI │ -* show dashed line above person who last raised │ - │ ---]] │ -local alexgames = require("alexgames") │ -local ui = require("games/poker_chips/poker_chips_ui") │ -local core = require("games/poker_chips/poker_chips_core") │ -local serialize = require("games/poker_chips/poker_chips_serialize") │ - │ -local wait_for_players = require("libs/multiplayer/wait_for_players") │ ---local two_player = require("libs/multiplayer/two_player") │ - │ - │ -local player = 1 │ - │ -local players = { │ - [1] = "You", │ -} │ - │ - │ -local SHOW_TEST_DATA = true │ +-- Lua table (like a dictionary/hashmap) to track if a key is down │ +-- or not. │ +-- This way, when a user presses "up", we can check if they're also │ +-- pressing "left", and then move them diagonally. │ +local keys_pressed = {} │ │ +-- Lua table (like a dictionary/hashmap) to track if keys are handled or not. │ +-- This step is somewhat optional, I'm doing this so that we can tell the browser │ +-- which keys we don't handle, so it can choose to handle them │ +-- (e.g. not call evt.preventDefault() for Ctrl L (jump to address bar), │ +-- but it should call evt.preventDefault() for the arrow keys/WASD, so that │ +-- the arrow keys don't scroll on the page (as they normally would). │ +-- Instead, arrow keys move the player around. │ +local keys_handled = { │ + ['ArrowLeft'] = true, │ + ['ArrowRight'] = true, │ + ['ArrowUp'] = true, │ + ['ArrowDown'] = true, │ │ -local state = { │ - game = nil, │ - ui = nil, │ + ['KeyW'] = true, │ + ['KeyA'] = true, │ + ['KeyS'] = true, │ + ['KeyD'] = true, │ } │ -state.game = core.new_state() │ - │ -function get_player() │ - -- TODO handle network multiplayer │ - return state.game.player_turn │ -end │ - │ -if SHOW_TEST_DATA then │ - core.add_player(state.game, "Alex", 135) │ - core.add_player(state.game, "Conor", 205) │ - core.add_player(state.game, "Justin", 55) │ - core.add_player(state.game, "Nick", 175) │ - core.add_player(state.game, "Marc", 100) │ - core.add_player(state.game, "Liam", 335) │ - core.add_player(state.game, "Pranav", 220) │ - core.add_player(state.game, "Shubham", 95) │ -end │ - │ -core.print_state(state.game) │ - │ -state.ui = ui.init() │ -ui.update(state.ui, state.game, get_player()) │ - │ -function update() │ - ui.draw(state.ui) │ -end │ - │ -local function update_state() │ - for _, player in pairs(players) do │ - if player == "You" then goto next_player end │ - local serialized_state = serialize.serialize_state(state.game) │ - print(string.format("Broadcasting state to player \"%s\", bytes %d", player, #serialized_state)) │ - alexgames.send_message(player, "state:" .. serialized_state) │ - ::next_player:: │ - end │ │ -end │ - │ -function handle_user_string_input(str_input, is_cancelled) │ - print(string.format("handle_user_string_input(str_input=\"%s\", is_cancelled=%q)", str_input, is_cancelled)) │ - alexgames.set_status_msg(string.format("handle_user_string_input(str_input=\"%s\", is_cancelled=%q)", str_input, is_cancelled)) │ -end │ +function handle_key_evt(evt_id, key_code) │ + print(string.format("handle_key_evt(evt=%s, code=%s)", evt_id, key_code)) │ │ -function handle_user_clicked(y_pos, x_pos) │ - local actions = ui.handle_user_clicked(state.ui, y_pos, x_pos) │ - for _, action in ipairs(actions) do │ - alexgames.set_status_msg(string.format("Received action %s", core.action_to_string(action))) │ - local rc = core.handle_action(state.game, action) │ - if rc ~= core.RC_SUCCESS then │ - if rc == core.RC_BET_TOO_SMALL then │ - alexgames.set_status_err(string.format("Your bet (%d) is lower than the minimum bet (%d)", action.param, state.game.min_bet)) │ - else │ - alexgames.set_status_err(core.rc_to_string(rc)) │ - end │ - else │ - update_state() │ - if action.on_success_callback ~= nil then │ - action.on_success_callback() │ - end │ - end │ + if not keys_handled[key_code] then │ + local msg = string.format("key %s not handled", key_code) │ + alexgames.set_status_msg(msg) │ + print(msg) │ + return false │ end │ - ui.update(state.ui, state.game, get_player()) │ - ui.draw(state.ui) │ -end │ - │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - if wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) then │ - -- handled │ + if evt_id == 'keydown' then │ + keys_pressed[key_code] = true │ + elseif evt_id == 'keyup' then │ + keys_pressed[key_code] = false │ else │ - error(string.format("Unhandled popup_id=%s, btn_idx=%s", popup_id, btn_idx)) │ + error(string.format("unhandled evt_id=%s", evt_id)) │ end │ -end │ │ + local x_vec = 0 │ + local y_vec = 0 │ │ -function handle_msg_received(src, msg) │ - if wait_for_players.handle_msg_received(src, msg) then │ - return │ - end │ - │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ + if keys_pressed['ArrowLeft'] or keys_pressed['KeyA'] then x_vec = x_vec - 1 end │ + if keys_pressed['ArrowRight'] or keys_pressed['KeyD'] then x_vec = x_vec + 1 end │ + if keys_pressed['ArrowUp'] or keys_pressed['KeyW'] then y_vec = y_vec - 1 end │ + if keys_pressed['ArrowDown'] or keys_pressed['KeyS'] then y_vec = y_vec + 1 end │ │ - if header == "state" then │ - print(string.format("Received state from \"%s\", bytes %d", src, #payload)) │ - local received_state = serialize.deserialize_state(payload) │ - state.game = received_state │ - ui.update(state.ui, state.game, get_player()) │ - update() │ - else │ - error(string.format("Unhandled message: %s", header)) │ + local vec = nil │ + if x_vec ~= 0 or y_vec ~= 0 then │ + vec = { y = y_vec, x = x_vec } │ end │ │ + core.set_user_input_vec(state, vec) │ + return true │ end │ │ -function start_host_game() │ - -- TODO │ -end │ - │ -function start_client_game() │ - -- TODO │ -end │ - │ -function start_game() │ - wait_for_players.init(players, player, start_host_game, start_client_game) │ -end │ --- Author: Alex Barry (github.com/alexbarry) │ -local ui = {} │ - │ -local alexgames = require("alexgames") │ -local ui_pane_bet_input = require("games/poker_chips/ui/bet_input") │ -local ui_pane_control = require("games/poker_chips/ui/control") │ -local ui_pane_view_others = require("games/poker_chips/ui/view_others") │ -local core = require("games/poker_chips/poker_chips_core") │ - │ -local ui_params = { │ - board_height = 480, │ - board_width = 480, │ - margin = 20, │ - padding = 5, │ - big_padding = 15, │ - BTN_TEXT_SIZE = 24, │ - BTN_BG_COLOUR = '#ccccffaa', │ - BTN_FG_COLOUR = '#000000', │ - BTN_FG_COLOUR_FADED = '#aaaaaa', │ - BTN_OUTLINE_COLOUR = '#000000', │ - BTN_OUTLINE_WIDTH = 1, │ - BTN_TEXT_SIZE = 24, │ - info_text_size = 18, │ - │ -} │ - │ -local function add_action(ui_state, action) │ - table.insert(ui_state.actions, action) │ -end │ - │ -local function init_control_menu() │ -end │ - │ -function ui.init() │ - local ui_state = { │ - panes = {}, │ - actions = {}, │ - } │ - │ - ui_state.panes.view_others = ui_pane_view_others.init(ui_params, { │ - move_to_control_state = function () │ - ui_state.active_state = ui_state.panes.control │ - end, │ - }) │ - │ - ui_state.panes.bet_input = ui_pane_bet_input.init(ui_params, { │ - move_to_control_state = function () │ - ui_state.active_state = ui_state.panes.control │ - end, │ - move_to_view_others_state = function () │ - ui_state.active_state = ui_state.panes.view_others │ - end, │ - │ - add_action = function (action) │ - add_action(ui_state, action) │ - end, │ - }) │ │ - ui_state.panes.control = ui_pane_control.init(ui_params, { │ - move_to_raise_state = function () │ - ui_state.active_state = ui_state.panes.bet_input │ - end, │ - move_to_view_others_state = function () │ - ui_state.active_state = ui_state.panes.view_others │ - end, │ - add_action = function (action) │ - add_action(ui_state, action) │ - end, │ - }) │ - ui_state.active_state = ui_state.panes.view_others │ - return ui_state │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + print(string.format("handle_mouse_evt(evt_id=%d, pos_y=%d, pos_x=%d)", evt_id, pos_y, pos_x)) │ + if evt_id == alexgames.MOUSE_EVT_DOWN then │ + state.mouse_down = true │ + state.user_input_pos_y = pos_y │ + state.user_input_pos_x = pos_x │ + --core.set_user_input_pos(state, {y=pos_y, x=pos_x}) │ + elseif evt_id == alexgames.MOUSE_EVT_UP then │ + state.mouse_down = false │ + core.set_user_input_pos(state, nil) │ + elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ + -- not handled, but including it here as an example │ + end │ end │ │ -function ui.draw(ui_state) │ - alexgames.draw_clear() │ - ui_state.active_state.draw(ui_state.active_state) │ +function handle_mousemove(pos_y, pos_x) │ + if state.mouse_down then │ + state.user_input_pos_y = pos_y │ + state.user_input_pos_x = pos_x │ + --core.set_user_input_pos(state, {y=pos_y, x=pos_x}) │ + end │ end │ │ -function ui.update(ui_state, game_state, player_idx) │ - print("ui.update called") │ - for _, pane in pairs(ui_state.panes) do │ - pane.update(pane, game_state, player_idx) │ +function handle_touch_evt(evt_id, touches) │ + print(string.format("handle_touch_evt(evt_id=%s, touches[%d])", evt_id, #touches)) │ + for _, touch in ipairs(touches) do │ + if evt_id == 'touchstart' and state.active_touch == nil then │ + state.active_touch = touch.id │ + state.user_input_pos_y = touch.y │ + state.user_input_pos_x = touch.x │ + elseif evt_id == 'touchmove' and touch.id == state.active_touch then │ + state.user_input_pos_y = touch.y │ + state.user_input_pos_x = touch.x │ + elseif evt_id == 'touchend' or evt_id == 'touchcancel' and touch.id == state.active_touch then │ + state.active_touch = nil │ + core.set_user_input_pos(state, nil) │ + end │ end │ + │ end │ │ -function ui.handle_user_clicked(ui_state, y_pos, x_pos) │ - ui_state.active_state.handle_user_clicked(ui_state.active_state, y_pos, x_pos) │ - local actions = ui_state.actions │ - ui_state.actions = {} │ - return actions │ +-- This function is called when the game is started. │ +-- It is better to put game init stuff here than at the top level, │ +-- so that the game code could be loaded only once, but multiple game states │ +-- could be rendered (e.g. history browser). │ +-- │ +-- The session_id_arg and state_serialized should be set if the game │ +-- is being loaded from the history browser (for the player to play, or │ +-- to render a preview), or the state is loaded from the URL parameter. │ +-- session_id_arg is only used when storing state with the │ +-- `alexgames.save_state` API, it indicates whether the state of a previous │ +-- game should be updated, or if a new saved state session should be created. │ +function start_game(session_id_arg, state_serialized) │ + draw.init(board_height, board_width) │ + │ + -- This causes update to be called every `MS_PER_FRAME` ms. │ + alexgames.set_timer_update_ms(MS_PER_FRAME) │ + │ + -- This causes handle_key_evt to get key presses. │ + alexgames.enable_evt("key") │ + │ + -- This causes handle_mouse_evt to get events on mouse up/down. │ + alexgames.enable_evt("mouse_updown") │ + │ + -- This causes handle_mousemove to get events on mouse move. │ + alexgames.enable_evt("mouse_move") │ + │ + -- This causes handle_touch_evt to get events on touchscreen inputs. │ + alexgames.enable_evt("touch") │ end │ - │ -return ui │ local core = {} │ │ -core.ACTION_CHECK = "check" │ -core.ACTION_CALL = "call" │ -core.ACTION_RAISE = "raise" │ -core.ACTION_FOLD = "fold" │ +local BALL_RADIUS = 20 │ │ -core.RC_SUCCESS = 0 │ -core.RC_BET_TOO_SMALL = -1 │ +local MAX_DIM_VEL = 200 │ │ -function core.action_to_string(action) │ - if action.action == core.ACTION_RAISE then │ - return string.format("(%s: %d)", action.action, action.param) │ - else │ - return string.format("(%s)", action.action) │ - end │ -end │ +local USER_INPUT_SPEED = 300 │ │ -function core.rc_to_string(rc) │ - local rc_strings = { │ - [core.RC_SUCCESS] = "Success", │ - [core.RC_BET_TOO_SMALL] = "Bet too small", │ - } │ - return rc_strings[rc] │ -end │ +function core.new_state(board_width, board_height) │ + local state = { │ + frame_idx = 0, │ │ -function core.add_player(state, name, chips) │ - local player_state = { │ - name = name, │ - chips = chips, │ - bet = 0, │ - folded = false, │ + board_height = board_height, │ + board_width = board_width, │ │ - -- To be displayed in UI │ - last_action = nil, │ - last_bet = nil, │ - } │ - table.insert(state.players, player_state) │ -end │ + ball_radius = BALL_RADIUS, │ + ball_pos_y = BALL_RADIUS, │ + ball_pos_x = BALL_RADIUS, │ + ball_vel_y = 200, │ + ball_vel_x = 80, │ │ -function core.get_pot_string(pots) │ - if #pots == 0 then return "0" │ - else │ - -- TODO This is a placeholder. │ - -- I don't think it will actually be a list of integers like this, │ - -- but I don't know what it will look like yet. │ - -- I assume each side pot would need a list of players eligible to receive it. │ - -- I don't actually know the rules... if someone goes all-in and creates a side pot, and wins, │ - -- who gets the other pots? Are they returned? │ - local s = "" │ - if #pots > 1 then s = s .. "{" end │ - for pot_idx, pot in ipairs(pots) do │ - if pot_idx ~= 1 then │ - s = s .. ', ' │ - end │ - s = s .. pot │ - end │ - if #pots > 1 then s = s .. "}" end │ - return s │ - end │ -end │ + user_input_vec = nil, │ │ -function core.new_state() │ - local state = { │ - pots = {0}, │ - players = {}, │ - min_bet = 0, │ - player_turn = 1, │ - last_player_min_bet = nil, │ + mouse_down = false, │ + active_touch = nil, │ + user_input_pos_y = nil, │ + user_input_pos_x = nil, │ } │ - │ return state │ end │ │ -function core.print_state(state) │ - print(string.format("players (len: %d) = {", #state.players)) │ - for player_idx, player_state in ipairs(state.players) do │ - print(string.format("[%d] = { name: \"%s\", chips: %d, bet: %d, folded: %s }", │ - player_idx, player_state.name, │ - player_state.chips, player_state.bet, player_state.folded)) │ - end │ - print("}") │ +local function clip(min_val, val, max_val) │ + if val < min_val then return min_val │ + elseif val > max_val then return max_val │ + else return val end │ end │ │ -local function get_player_name(state, player_idx) │ - if state.players[player_idx] == nil then │ - error(string.format("Player %s not found", player_idx), 2) │ +function core.update_ball_pos(state, dt_ms) │ + if state.user_input_vec ~= nil then │ + print(string.format("Adjusting ball pos from user input {y=%f, x=%f}", state.user_input_vec.y, state.user_input_vec.x)) │ + state.ball_vel_x = state.ball_vel_x + state.user_input_vec.x * USER_INPUT_SPEED / 1000 * dt_ms │ + state.ball_vel_y = state.ball_vel_y + state.user_input_vec.y * USER_INPUT_SPEED / 1000 * dt_ms │ end │ │ - return string.format("%d (\"%s\")", player_idx, state.players[player_idx].name) │ -end │ - │ -local function handle_player_bet(state, player_idx, bet) │ - print(string.format("Player %s making bet %d", get_player_name(state, player_idx), bet)) │ - │ - local action │ - if bet < state.min_bet then │ - return core.RC_BET_TOO_SMALL │ - elseif bet == 0 then │ - action = core.ACTION_CHECK │ - elseif bet == state.min_bet then │ - action = core.ACTION_CALL │ - elseif bet > state.min_bet then │ - action = core.ACTION_RAISE │ - else │ - -- I don't think this is possible unless bet is negative or something │ - error(string.format("could not handle bet=%s, state.min_bet=%s", bet, state.min_bet)) │ - end │ + state.ball_vel_x = clip(-MAX_DIM_VEL, state.ball_vel_x, MAX_DIM_VEL) │ + state.ball_vel_y = clip(-MAX_DIM_VEL, state.ball_vel_y, MAX_DIM_VEL) │ │ - local player_state = state.players[player_idx] │ - local bet_increase = bet -- TODO should change this to "bet_increase"? │ - player_state.bet = player_state.bet + bet │ - player_state.chips = player_state.chips - bet │ - player_state.last_action = action │ - player_state.last_bet = bet │ + state.ball_pos_y = state.ball_pos_y + state.ball_vel_y * dt_ms/1000 │ + state.ball_pos_x = state.ball_pos_x + state.ball_vel_x * dt_ms/1000 │ │ - state.min_bet = bet │ - -- TODO figure out how to handle side pots │ - print(string.format("pots: %d, %s", #state.pots, state.pots)) │ - state.pots[1] = state.pots[1] + bet_increase │ - if action == core.ACTION_RAISE then │ - state.last_player_min_bet = player_idx │ + if state.ball_pos_y < state.ball_radius or state.ball_pos_y + state.ball_radius >= state.board_height then │ + state.ball_vel_y = -state.ball_vel_y │ end │ │ - return core.RC_SUCCESS │ + if state.ball_pos_x < state.ball_radius or state.ball_pos_x + state.ball_radius >= state.board_width then │ + state.ball_vel_x = -state.ball_vel_x │ + end │ end │ │ -local function next_player(state) │ - print(string.format("Advancing to next player, after player %s", get_player_name(state, state.player_turn))) │ +local function get_vec_towards_pt(state, pt) │ + if pt == nil then return nil end │ + local dy = pt.y - state.ball_pos_y │ + local dx = pt.x - state.ball_pos_x │ │ - for _=1,#state.players do │ - state.player_turn = (state.player_turn % #state.players) + 1 │ + if dy == 0 and dx == 0 then return nil end │ │ - if state.players[state.player_turn].folded then │ - print(string.format("Skipping player %d (%s), as they folded", │ - state.player_turn, state.players[state.player_turn].name)) │ - goto next_player │ - else │ - break │ - end │ + local mag = math.sqrt(dy*dy + dx*dx) │ │ - ::next_player:: │ - end │ - if state.players[state.player_turn].folded then │ - -- TODO handle case where everyone has folded │ - end │ - print(string.format("Now it is player's turn: %s", get_player_name(state, state.player_turn))) │ + dy = dy / mag │ + dx = dx / mag │ │ - -- TODO need something to call attention to the case where everyone has bet, │ - -- to tell dealer to draw another card │ + return { y = dy, x = dx } │ end │ │ -function core.handle_action(state, action) │ - if action.action == core.ACTION_CHECK then │ - local rc = handle_player_bet(state, state.player_turn, 0) │ - if rc ~= core.RC_SUCCESS then │ - return rc │ - end │ - next_player(state) │ - elseif action.action == core.ACTION_CALL then │ - local rc = handle_player_bet(state, state.player_turn, state.min_bet) │ - if rc ~= core.RC_SUCCESS then │ - return rc │ - end │ - next_player(state) │ - elseif action.action == core.ACTION_RAISE then │ - local bet = action.param │ - local rc = handle_player_bet(state, state.player_turn, bet) │ - if rc ~= core.RC_SUCCESS then │ - return rc │ - end │ - next_player(state) │ - elseif action.action == core.ACTION_FOLD then │ - print(string.format("Player %s has folded", get_player_name(state, state.player_turn))) │ - state.players[state.player_turn].folded = true │ - state.players[state.player_turn].last_action = core.ACTION_FOLD │ - state.players[state.player_turn].last_bet = 0 │ - next_player(state) │ - else │ - error(string.format("Unhandled action type %s", action.action)) │ - -- TODO notify remote player (client) │ - end │ +function core.set_user_input_vec(state, vec) │ + state.user_input_vec = vec │ +end │ │ - return core.RC_SUCCESS │ +function core.set_user_input_pos(state, pos) │ + local vec = get_vec_towards_pt(state, pos) │ + core.set_user_input_vec(state, vec) │ end │ │ return core │ --- Author: Alex Barry (github.com/alexbarry) │ -local control = {} │ - │ -local buttons = require("libs/ui/buttons") │ -local alexgames = require("alexgames") │ - │ -local core = require("games/poker_chips/poker_chips_core") │ - │ -local BTN_ID_VIEW_OTHERS_CHIPS = "view_others_chips" │ -local BTN_ID_CHECK = "check" │ -local BTN_ID_CALL = "call" │ -local BTN_ID_RAISE = "raise" │ -local BTN_ID_FOLD = "fold" │ +local core = {} │ │ -local g_ui_params = nil │ +local PLAYER_MASS = 1 │ │ -local function new_button(buttons_state, params) │ - if params.callback == nil then │ - error(string.format("missing callback"), 2) │ +local function generate_spots(spots, x_pos) │ + for i=1,10 do │ + table.insert(spots, { │ + y = 40 + math.random()*400, │ + x = x_pos + math.random()*480, │ + }) │ end │ - buttons.new_button(buttons_state, { │ - id = params.id, │ - text = params.text, │ - bg_colour = g_ui_params.BTN_BG_COLOUR, │ - fg_colour = g_ui_params.BTN_FG_COLOUR, │ - outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ - outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ - btn_shape = params.btn_shape, │ - shape_param = params.shape_param, │ - text_size = g_ui_params.BTN_TEXT_SIZE, │ - padding = padding, │ - y_start = params.y_start, │ - x_start = params.x_start, │ - y_end = params.y_end, │ - x_end = params.x_end, │ - callback = params.callback, │ - │ - }) │ end │ │ -local function btn_pressed(control_state, btn_id) │ - if btn_id == BTN_ID_VIEW_OTHERS_CHIPS then │ - control_state.move_to_view_others_state() │ - elseif btn_id == BTN_ID_CHECK then │ - control_state.move_to_view_others_state() │ - control_state.add_action({ action = core.ACTION_CHECK }) │ - elseif btn_id == BTN_ID_CALL then │ - control_state.move_to_view_others_state() │ - control_state.add_action({ action = core.ACTION_CALL }) │ - elseif btn_id == BTN_ID_RAISE then │ - control_state.move_to_raise_state() │ - elseif btn_id == BTN_ID_FOLD then │ - control_state.move_to_view_others_state() │ - control_state.add_action({ action = core.ACTION_FOLD }) │ - end │ +function core.reset_player_state(state, player_idx) │ + local player = state.players[player_idx] │ + player.y = 250 │ + player.x = 0 │ + player.dy = 0 │ + player.dx = 0 │ + core.player_attach_swing(state, 1, 1) │ end │ │ -local function set_game_state(control_state, game_state, player_idx) │ - buttons.set_enabled(control_state.buttons, BTN_ID_CHECK, game_state.min_bet == 0) │ - buttons.set_enabled(control_state.buttons, BTN_ID_CALL, game_state.min_bet > 0) │ - local call_text = "Call" │ - if game_state.min_bet > 0 then │ - call_text = call_text .. string.format(" (+$%d)", game_state.min_bet) │ - end │ - buttons.set_text(control_state.buttons, BTN_ID_CALL, call_text) │ +local function squared(x) │ + return x*x │ end │ │ -function control.init(ui_params, control_params) │ - g_ui_params = ui_params │ - local control_state = {} │ - control_state.buttons = buttons.new_state() │ - control_state.move_to_raise_state = control_params.move_to_raise_state │ - control_state.move_to_view_others_state = control_params.move_to_view_others_state │ - control_state.add_action = control_params.add_action │ - │ - local callback = function (btn_id) btn_pressed(control_state, btn_id) end │ - local btn_infos = { │ - { id = BTN_ID_VIEW_OTHERS_CHIPS, text = 'View others\' chips', extra_space = g_ui_params.big_padding }, │ - { id = BTN_ID_CHECK, text = 'Check' }, │ - { id = BTN_ID_CALL, text = 'Call' }, │ - { id = BTN_ID_RAISE, text = 'Raise' }, │ - { id = BTN_ID_FOLD, text = 'Fold' }, │ - } │ - local y_pos = 100 │ - local button_height = math.floor((g_ui_params.board_height - y_pos - g_ui_params.big_padding) / 5) - g_ui_params.padding │ - for btn_idx, btn_info in ipairs(btn_infos) do │ - new_button(control_state.buttons, { │ - id = btn_info.id, │ - text = btn_info.text, │ - y_start = y_pos, │ - y_end = y_pos + button_height, │ - x_start = g_ui_params.margin, │ - x_end = g_ui_params.board_width - g_ui_params.margin, │ - callback = callback, │ - }) │ - y_pos = y_pos + button_height + g_ui_params.padding │ - if btn_info.extra_space ~= nil then │ - y_pos = y_pos + btn_info.extra_space │ - end │ - end │ - │ - control_state.draw = function (control_state) │ - buttons.draw(control_state.buttons) │ - end │ - │ - control_state.handle_user_clicked = function (control_state, y_pos, x_pos) │ - buttons.on_user_click(control_state.buttons, y_pos, x_pos) │ +local function get_speed(player) │ + if player.swinging_on == nil then │ + return math.sqrt(squared(player.dx) + squared(player.dy)) │ + else │ + return math.abs(player.angleV * player.swing_len) │ end │ +end │ │ - control_state.update = function (control_state, game_state, player_idx) │ - set_game_state(control_state, game_state, player_idx) │ - end │ +function core.get_energy(state, player_idx) │ + local player = state.players[player_idx] │ │ - return control_state │ + local player_height = (state.max_y - player.y) │ + return PLAYER_MASS * (0.5*squared(get_speed(player)) + state.gravity_y * player_height) │ end │ │ -return control │ --- Author: Alex Barry (github.com/alexbarry) │ -local view_others = {} │ - │ -local buttons = require("libs/ui/buttons") │ -local draw_more = require("libs/draw/draw_more") │ -local alexgames = require("alexgames") │ +function core.new_state() │ + local state = { │ + players = { │ + { │ + y = 250, │ + x = 0, │ + --dy = -250, │ + --dx = 150, │ + dy = 0, │ + dx = 0, │ + swinging_on = nil, │ + swing_len = nil, │ + }, │ + }, │ + swing_spots = { │ + -- { y = 225, x = 250, }, │ + │ + { y = 150, x = 0, }, │ │ -local core = require("games/poker_chips/poker_chips_core") │ + --[[ │ + { y = 25, x = 250, }, │ + { y = 25, x = 500, }, │ + { y = 25, x = 750, }, │ + { y = 150, x = 1000, }, │ + --]] │ │ -local g_ui_params = nil │ + --[[ │ + { y = 480 - 25, x = 1150, }, │ + { y = 480 - 25, x = 1150 + 1*75, }, │ + { y = 480 - 25, x = 1150 + 2*75, }, │ + { y = 480 - 25, x = 1150 + 3*75, }, │ + { y = 480 - 25, x = 1150 + 4*75, }, │ + { y = 480 - 25, x = 1150 + 5*75, }, │ + --]] │ + }, │ │ -local BTN_ID_CHOOSE_BET = "choose_bet" │ + gravity_y = 312, │ + gravity_x = 0, │ │ -local CURRENT_PLAYER_TEXT_ICON = ">" │ + max_y = 480, │ + game_over = false, │ │ -local CURRENT_PLAYER_ICON_WIDTH = 20 │ -local PLAYER_NAME_WIDTH = 175 │ -local PLAYER_ACTION_WIDTH = 195 │ -local PLAYER_CHIPS_WIDTH = 50 │ + finish_line_x = 5125, │ + } │ │ -local function btn_pressed(view_others_state, btn_id) │ - if btn_id == BTN_ID_CHOOSE_BET then │ - view_others_state.move_to_control_state() │ + for i=0,10 do │ + generate_spots(state.swing_spots, 0 + 480*i) │ end │ + core.player_attach_swing(state, 1, 1) │ + return state │ end │ │ -local function get_player_status(player_info) │ - if player_info.last_action == nil then return "" │ - elseif player_info.last_action == core.ACTION_CHECK then return "Check" │ - elseif player_info.last_action == core.ACTION_CALL then return "Call" │ - elseif player_info.last_action == core.ACTION_RAISE then return string.format("Raise (+$%s)", player_info.last_bet) │ - elseif player_info.last_action == core.ACTION_FOLD then return "Folded" │ - else │ - return string.format("Unknown action \"%s\"", player_info.last_action) │ - end │ - │ +local function update_position(state, entity, dt_ms) │ + entity.dy = entity.dy + state.gravity_y * dt_ms/1000 │ + entity.dx = entity.dx + state.gravity_x * dt_ms/1000 │ + entity.y = entity.y + entity.dy * dt_ms/1000 │ + entity.x = entity.x + entity.dx * dt_ms/1000 │ end │ │ -function view_others.init(ui_params, view_others_params) │ - g_ui_params = ui_params │ - local view_others_state = { │ - buttons = buttons.new_state(), │ - move_to_control_state = view_others_params.move_to_control_state, │ - players = { │ ---[[ │ - { name = "Alex", action = "Checked", chips = 135 }, │ - { name = "Conor", action = "Checked", chips = 205 }, │ - { name = "Justin", action = "Raised +$30", chips = 55 }, │ - { name = "Nick", action = "Called +$30", chips = 175 }, │ - { name = "Marc", action = "Folded", chips = 100 }, │ - { name = "Liam", action = "", chips = 335 }, │ - { name = "Pranav", action = "", chips = 220 }, │ - { name = "Shubham", action = "", chips = 95 }, │ ---]] │ - }, │ - player_turn = 6, │ - } │ - │ - local button_height = 75 │ - │ - buttons.new_button(view_others_state.buttons, { │ - id = BTN_ID_CHOOSE_BET, │ - text = "Choose Bet", │ - bg_colour = g_ui_params.BTN_BG_COLOUR, │ - fg_colour = g_ui_params.BTN_FG_COLOUR, │ - outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ - outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ - text_size = g_ui_params.BTN_TEXT_SIZE, │ - padding = g_ui_params.padding, │ - y_start = g_ui_params.board_height - g_ui_params.margin - button_height, │ - x_start = g_ui_params.margin, │ - y_end = g_ui_params.board_height - g_ui_params.margin, │ - x_end = g_ui_params.board_width - g_ui_params.margin, │ - callback = function (btn_id) btn_pressed(view_others_state, btn_id) end, │ - }) │ - │ - view_others_state.draw = function (view_others_state) │ - local init_info_offset = g_ui_params.margin + g_ui_params.info_text_size │ - local text_size = g_ui_params.info_text_size │ - │ +local function update_swinging_position(state, player, dt_ms) │ + local node = state.swing_spots[player.swinging_on] │ + local swing_dy = player.y - node.y │ + local swing_dx = player.x - node.x │ + player.swing_angle = math.atan(swing_dy,swing_dx) │ + player.swing_len = math.sqrt(swing_dy*swing_dy + swing_dx*swing_dx) │ │ - local min_bet_txt = string.format("Minimum Bet: %3d", view_others_state.min_bet) │ - alexgames.draw_text(min_bet_txt, g_ui_params.BTN_FG_COLOUR, │ - init_info_offset, g_ui_params.margin, │ - text_size, 1) │ + local gravity_force_perp_to_swing = state.gravity_y * math.sin(player.angle) │ + local angleA = -gravity_force_perp_to_swing / player.swing_len │ + player.angleV = player.angleV + angleA * dt_ms/1000 │ + player.angle = player.angle + player.angleV * dt_ms/1000 │ │ - local pots_strs = string.format("Pot: %3s", core.get_pot_string(view_others_state.pots)) │ - alexgames.draw_text(pots_strs, g_ui_params.BTN_FG_COLOUR, │ - init_info_offset, g_ui_params.board_width - g_ui_params.margin, │ - text_size, -1) │ + player.x = node.x + player.swing_len * math.sin(player.angle) │ + player.y = node.y + player.swing_len * math.cos(player.angle) │ │ - if #view_others_state.players == 0 then │ - init_info_offset = init_info_offset + text_size + g_ui_params.margin │ - │ - alexgames.draw_text(string.format("Player count: %d", #view_others_state.players), │ - g_ui_params.BTN_FG_COLOUR, │ - init_info_offset, g_ui_params.margin, │ - text_size, 1) │ - end │ + --[[ │ │ - buttons.draw(view_others_state.buttons) │ - local y_pos = g_ui_params.margin + text_size + init_info_offset │ - for i, player_info in ipairs(view_others_state.players) do │ - if view_others_state.last_player_min_bet == i then │ - local line_y_pos = y_pos - math.floor(g_ui_params.padding/2) - text_size │ - draw_more.draw_dashed_line(g_ui_params.BTN_FG_COLOUR, 1, nil, nil, │ - line_y_pos, g_ui_params.margin, │ - line_y_pos, g_ui_params.board_width - g_ui_params.margin) │ - end │ - local text_colour │ - if player_info.folded then │ - text_colour = g_ui_params.BTN_FG_COLOUR_FADED │ - else │ - text_colour = g_ui_params.BTN_FG_COLOUR │ - end │ - local x_pos = g_ui_params.margin │ - if i == view_others_state.player_turn then │ - alexgames.draw_text(CURRENT_PLAYER_TEXT_ICON, text_colour, │ - y_pos, x_pos, text_size, 1) │ - end │ - x_pos = x_pos + CURRENT_PLAYER_ICON_WIDTH │ + local x2 = swing_dx │ + local y2 = swing_dy │ │ - alexgames.draw_text(player_info.name, text_colour, │ - y_pos, x_pos, text_size, 1) │ - x_pos = x_pos + PLAYER_NAME_WIDTH │ + local accel = -state.gravity_y * (x2/swing_len) * (swing_len - y2)/swing_len │ + player.x = player.x + (player.dx + (accel/2 * dt_ms/1000)) * dt_ms/1000 │ + player.y = node.y + math.sqrt(swing_len*swing_len - x2*x2) - swing_len │ │ - if player_info.last_action ~= nil then │ - local status = get_player_status(player_info) │ - alexgames.draw_text(status, text_colour, │ - y_pos, x_pos, text_size, 1) │ - end │ - x_pos = x_pos + PLAYER_ACTION_WIDTH │ + player.dx = player.dx + accel * dt_ms/1000 │ + --]] │ │ - x_pos = x_pos + PLAYER_CHIPS_WIDTH │ - alexgames.draw_text(string.format("%4d", player_info.chips), text_colour, │ - y_pos, x_pos, text_size, -1) │ + --[[ │ + player.swing_angle = math.atan(swing_dy,swing_dx) │ │ - y_pos = y_pos + text_size + g_ui_params.padding │ - end │ - end │ + local swinging_gravity_y = state.gravity_y * math.sin(player.swing_angle + math.pi/2) │ + local swinging_gravity_x = state.gravity_y * math.cos(player.swing_angle + math.pi/2) │ │ - view_others_state.handle_user_clicked = function (view_others_state, pos_y, pos_x) │ - buttons.on_user_click(view_others_state.buttons, pos_y, pos_x) │ - end │ + player.dy = player.dy + swinging_gravity_y * dt_ms/1000 │ + player.dx = player.dx + swinging_gravity_x * dt_ms/1000 │ + │ + player.y = player.y + player.dy * dt_ms/1000 │ + player.x = player.x + player.dx * dt_ms/1000 │ + --]] │ │ - view_others_state.update = function (view_others_state, game_state) │ - print("Updating view others state...") │ - view_others_state.min_bet = game_state.min_bet │ - view_others_state.pots = game_state.pots │ - view_others_state.players = game_state.players │ - view_others_state.player_turn = game_state.player_turn │ - view_others_state.last_player_min_bet = game_state.last_player_min_bet │ - │ - end │ + │ │ - return view_others_state │ + │ end │ │ -return view_others │ --- Author: Alex Barry (github.com/alexbarry) │ -local bet_input = {} │ - │ -local soft_numpad = require("libs/ui/soft_numpad") │ -local buttons = require("libs/ui/buttons") │ - │ -local core = require("games/poker_chips/poker_chips_core") │ - │ -local alexgames = require("alexgames") │ - │ - │ -local g_ui_params = nil │ - │ -local BTN_ID_ADJ_MINUS_5 = "adjust_minus5" │ -local BTN_ID_ADJ_MINUS_1 = "adjust_minus1" │ -local BTN_ID_ADJ_PLUS_1 = "adjust_plus1" │ -local BTN_ID_ADJ_PLUS_5 = "adjust_plus5" │ - │ -local BTN_ID_SUBMIT_BET = "submit_bet" │ -local BTN_ID_BACK = "back" │ - │ -BTN_ADJ_ID_TO_AMOUNT = { │ - [BTN_ID_ADJ_MINUS_5] = -5, │ - [BTN_ID_ADJ_MINUS_1] = -1, │ - [BTN_ID_ADJ_PLUS_1] = 1, │ - [BTN_ID_ADJ_PLUS_5] = 5, │ -} │ +function core.update_state(state, dt_ms) │ + if state.game_over then return end │ + for _, player in ipairs(state.players) do │ + if player.swinging_on == nil then │ + update_position(state, player, dt_ms) │ + else │ + update_swinging_position(state, player, dt_ms) │ + end │ │ -local function get_numpad_val(numpad_val) │ - if #numpad_val == 0 then return 0 │ - else │ - return tonumber(numpad_val) │ + if player.y > state.max_y then │ + state.game_over = true │ + end │ end │ end │ │ -local function adjust_bet(bet_input_state, inc) │ - local bet_val = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)) │ - bet_val = tonumber(bet_val) + inc │ - -- TODO need to get numpad val, or update numpad val here │ - if bet_val < 0 then │ - bet_val = 0 │ - elseif bet_val > bet_input_state.max_bet then │ - bet_val = bet_input_state.max_bet │ - end │ - │ - soft_numpad.set_val(bet_input_state.numpad, bet_val) │ -end │ +function core.get_closest_swing_spot(state, pos) │ + local min_dist = nil │ + local closest_node = nil │ │ -local function new_button(buttons_state, params) │ - if params.callback == nil then │ - error(string.format("missing callback"), 2) │ + -- TODO store these nodes in groups of screen size or something, │ + -- to avoid looking through all of them │ + for node_idx, node in ipairs(state.swing_spots) do │ + local dy = pos.y - node.y │ + local dx = pos.x - node.x │ + local dist = math.sqrt(dy*dy + dx*dx) │ + if min_dist == nil or dist < min_dist then │ + closest_node = node_idx │ + min_dist = dist │ + end │ end │ - buttons.new_button(buttons_state, { │ - id = params.id, │ - text = params.text, │ - bg_colour = g_ui_params.BTN_BG_COLOUR, │ - fg_colour = g_ui_params.BTN_FG_COLOUR, │ - outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ - outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ - btn_shape = params.btn_shape, │ - shape_param = params.shape_param, │ - text_size = g_ui_params.BTN_TEXT_SIZE, │ - padding = g_ui_params.padding, │ - y_start = params.y_start, │ - x_start = params.x_start, │ - y_end = params.y_end, │ - x_end = params.x_end, │ - callback = params.callback, │ │ - }) │ + return closest_node │ end │ │ +function core.player_attach_swing(state, player_idx, node_idx) │ + local player = state.players[player_idx] │ + local node = state.swing_spots[node_idx] │ │ -local function bet_input_button_pressed(bet_input_state, btn_id) │ - if BTN_ADJ_ID_TO_AMOUNT[btn_id] then │ - local inc = BTN_ADJ_ID_TO_AMOUNT[btn_id] │ - adjust_bet(bet_input_state, inc) │ - elseif btn_id == BTN_ID_SUBMIT_BET then │ - bet_input_state.add_action({ │ - action = core.ACTION_RAISE, │ - param = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)), │ - on_success_callback = function () │ - soft_numpad.set_val(bet_input_state.numpad, "") │ - bet_input_state.move_to_view_others_state() │ - end, │ - }) │ - elseif btn_id == BTN_ID_BACK then │ - bet_input_state.move_to_control_state() │ - end │ - bet_input_state.draw(bet_input_state) │ -end │ - │ -function bet_input.init(ui_params, bet_input_params) │ - g_ui_params = ui_params │ - top_info_height = 50 │ - num_button_rows = 7 │ - local button_y_size = math.floor((g_ui_params.board_height - 2*g_ui_params.margin - top_info_height - g_ui_params.big_padding)/num_button_rows) │ - │ - local BACK_BUTTON_WIDTH = 135 │ + player.swinging_on = node_idx │ + local dy = node.y - player.y │ + local dx = node.x - player.x │ │ - local ADJUST_BUTTON_Y_START = g_ui_params.margin + top_info_height │ - local CENTRE_MONEY_INDICATOR_WIDTH = 150 │ - local CENTRE_MONEY_INDICATOR_X_MIDDLE = math.floor(g_ui_params.board_width/2) │ - local ADJUST_BUTTON_HEIGHT = 75 │ - local ADJUST_BUTTON_HEIGHT = button_y_size │ - │ - local BET_BUTTON_HEIGHT = button_y_size │ - │ - │ - local NUMPAD_Y_START = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT + g_ui_params.big_padding │ - local NUMPAD_Y_END = g_ui_params.board_height - g_ui_params.margin - BET_BUTTON_HEIGHT │ - │ + player.swing_len = math.sqrt(dy*dy + dx*dx) │ + --player.swing_angle = math.atan(dy, dx) + math.pi │ │ - local BTN_SUBMIT_BET_Y_START = NUMPAD_Y_END + g_ui_params.padding │ - local BTN_SUBMIT_BET_Y_END = g_ui_params.board_height - g_ui_params.margin │ - │ - local bet_input_state = { │ - -- TODO │ - max_bet = 100, │ - chips = 135, │ - pots = {30}, │ - move_to_control_state = bet_input_params.move_to_control_state, │ - move_to_view_others_state = bet_input_params.move_to_view_others_state, │ - add_action = bet_input_params.add_action, │ - } │ - bet_input_state.numpad = soft_numpad.init({ │ - y_start = NUMPAD_Y_START, │ - y_end = NUMPAD_Y_END, │ - │ - x_start = g_ui_params.margin, │ - x_end = g_ui_params.board_width - g_ui_params.margin, │ - │ - btn_bg_colour = g_ui_params.BTN_BG_COLOUR, │ - btn_fg_colour = g_ui_params.BTN_FG_COLOUR, │ - outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ - outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ - }) │ + player.angle = math.atan(-dy, dx) - math.pi/2 │ + local angle2 = math.atan(dy, -dx) + math.pi │ + player.angleV = (player.dx * math.sin(angle2) + player.dy * math.cos(angle2)) / player.swing_len │ + player.dy = 0 -- TODO │ + player.dx = 0 -- TODO │ +end │ +function core.player_release_swing(state, player_idx) │ + local player = state.players[player_idx] │ + if player.swinging_on == nil then return end │ + local node = state.swing_spots[player.swinging_on] │ + player.swinging_on = nil │ + local angle2 = math.atan(player.y - node.y, -player.x + node.x) │ + player.dy = math.cos(angle2) * player.swing_len * player.angleV │ + player.dx = math.sin(angle2) * player.swing_len * player.angleV │ + player.angleV = 0 │ +end │ │ - local callback = function (btn_id) │ - bet_input_button_pressed(bet_input_state, btn_id) │ - end │ +function core.player_won(state, player_idx) │ + return state.players[player_idx].x >= state.finish_line_x │ +end │ │ - local adjust_button_width = math.floor((g_ui_params.board_width-2*g_ui_params.margin - CENTRE_MONEY_INDICATOR_WIDTH)/4) │ - bet_input_state.buttons = buttons.new_state() │ │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_BACK, │ - text = 'Back', │ - y_start = g_ui_params.margin, │ - y_end = g_ui_params.margin + top_info_height - g_ui_params.padding, │ - x_start = g_ui_params.margin, │ - x_end = g_ui_params.margin + BACK_BUTTON_WIDTH, │ +return core │ +-- Game: Spider Swing │ +-- Author: Alex Barry (github.com/alexbarry) │ +-- │ +--[[ │ +-- TODO: │ +-- * add different stages, including moving swing spots such as: │ +-- - butterflies (moving eratically, perhaps? Or any direction) │ +-- - leaves (could just fall down, or blow up, or blow side to side steadily) │ +--]] │ │ - callback = callback, │ - }) │ +local core = require("games/spider_swing/spider_swing_core") │ +local draw = require("games/spider_swing/spider_swing_draw") │ │ - --buttons.new_button(bet_input_state.buttons, { │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_ADJ_MINUS_5, │ - text = '-5', │ - y_start = ADJUST_BUTTON_Y_START, │ - y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ - x_start = g_ui_params.margin, │ - x_end = g_ui_params.margin + adjust_button_width, │ +local alexgames = require("alexgames") │ │ - btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ - shape_param = true, │ - callback = callback, │ - }) │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_ADJ_MINUS_1, │ - text = '-1', │ - y_start = ADJUST_BUTTON_Y_START, │ - y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ - x_start = g_ui_params.margin + adjust_button_width + g_ui_params.padding, │ - x_end = g_ui_params.margin + 2*adjust_button_width + g_ui_params.padding, │ +local state = {} │ +state.game = core.new_state() │ +local player_idx = 1 │ │ - btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ - shape_param = true, │ - callback = callback, │ - }) │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_ADJ_PLUS_1, │ - text = '+1', │ - y_start = ADJUST_BUTTON_Y_START, │ - y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ - x_start = g_ui_params.board_width - g_ui_params.margin - 2*adjust_button_width - 2*g_ui_params.padding, │ - x_end = g_ui_params.board_width - g_ui_params.margin - adjust_button_width - 2*g_ui_params.padding, │ +local player_won = false │ │ - btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ - shape_param = false, │ - callback = callback, │ - }) │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_ADJ_PLUS_5, │ - text = '+5', │ - y_start = ADJUST_BUTTON_Y_START, │ - y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ - x_start = g_ui_params.board_width - g_ui_params.margin - adjust_button_width - g_ui_params.padding, │ - x_end = g_ui_params.board_width - g_ui_params.margin - 0*adjust_button_width - g_ui_params.padding, │ +local FPS = 60 │ +local TIME_PER_FRAME_MS = 1000/FPS │ │ - btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ - shape_param = false, │ - callback = callback, │ - }) │ +local GAME_OPTION_NEW_GAME = "option_new_game" │ │ - new_button(bet_input_state.buttons, { │ - id = BTN_ID_SUBMIT_BET, │ - text = 'Submit bet', │ - y_start = BTN_SUBMIT_BET_Y_START, │ - y_end = BTN_SUBMIT_BET_Y_END, │ - x_start = g_ui_params.margin, │ - x_end = g_ui_params.board_width - g_ui_params.margin, │ - callback = callback, │ - }) │ - bet_input_state.draw = function (bet_input_state) │ - soft_numpad.draw(bet_input_state.numpad) │ - buttons.draw(bet_input_state.buttons) │ - local numpad_val = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)) │ - local bet_val_str = string.format("$%s", numpad_val) │ - local text_size = 18 │ - local text_y_start = math.floor(ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT/2 + text_size/2) │ - alexgames.draw_text(bet_val_str, '#000000', text_y_start, CENTRE_MONEY_INDICATOR_X_MIDDLE, text_size, 0) │ - alexgames.draw_text(string.format("Your chips: $%d", bet_input_state.chips), '#000000', │ - g_ui_params.margin + text_size, g_ui_params.margin + BACK_BUTTON_WIDTH + g_ui_params.padding, text_size, 1) │ - alexgames.draw_text(string.format("Pot: %s", core.get_pot_string(bet_input_state.pots)), '#000000', │ - g_ui_params.margin + text_size, g_ui_params.board_width - g_ui_params.margin, text_size, -1) │ - end │ - bet_input_state.handle_user_clicked = function(bet_input_state, y_pos, x_pos) │ - soft_numpad.on_user_click(bet_input_state.numpad, y_pos, x_pos) │ - buttons.on_user_click(bet_input_state.buttons, y_pos, x_pos) │ +function update(dt_ms) │ + if state.game.game_over then │ + state.game.game_over = false │ + core.reset_player_state(state.game, player_idx) │ + player_won = false │ end │ - │ - bet_input_state.update = function (bet_input_state, game_state, player_idx) │ - print(string.format("bet_input_state(player_idx=%d)", player_idx)) │ - bet_input_state.max_bet = game_state.players[player_idx].chips │ - bet_input_state.chips = game_state.players[player_idx].chips │ - bet_input_state.pots = game_state.pots │ + --print(string.format("Pos is now {y=%.1f, x=%.1f}", state.game.players[1].y, state.game.players[1].x)) │ + if not player_won then │ + player_won = core.player_won(state.game, player_idx) │ + if player_won then │ + draw.player_finished() │ + end │ end │ - return bet_input_state │ -end │ - │ -return bet_input │ -local keyboard_input = {} │ - │ -local INV_SQRT2 = 1/math.sqrt(2) │ - │ -function keyboard_input.new_key_state() │ - local state = { │ - keys_pressed = {}, │ - } │ - return state │ + core.update_state(state.game, dt_ms) │ + draw.draw_state(state.game, player_idx, dt_ms) │ end │ │ -local function abs(x) │ - if x >= 0 then return x │ - else return -x end │ +local function user_press(pos_y, pos_x) │ + local pos = draw.get_mouse_pos_in_game(state.game, player_idx, pos_y, pos_x) │ + local node_idx = core.get_closest_swing_spot(state.game, pos) │ + core.player_attach_swing(state.game, player_idx, node_idx) │ end │ │ -local function sign(x) │ - if x >= 0 then return 1 │ - else return -1 end │ +local function user_release() │ + core.player_release_swing(state.game, player_idx) │ end │ │ -function keyboard_input.get_move_vec_from_key_evt(state, evt, code) │ - if state.keys_pressed[code] == nil then │ - state.keys_pressed[code] = false │ - end │ - │ - state.keys_pressed[code] = (evt == "keydown") │ - │ - local keys_handled = { │ - ["ArrowLeft"] = true, │ - ["ArrowRight"] = true, │ - ["ArrowUp"] = true, │ - ["ArrowDown"] = true, │ - │ - ["ArrowH"] = true, │ - ["ArrowJ"] = true, │ - ["ArrowK"] = true, │ - ["ArrowL"] = true, │ - } │ - │ - local left = state.keys_pressed["ArrowLeft"] or state.keys_pressed["KeyH"] │ - local right = state.keys_pressed["ArrowRight"] or state.keys_pressed["KeyL"] │ - local down = state.keys_pressed["ArrowDown"] or state.keys_pressed["KeyJ"] │ - local up = state.keys_pressed["ArrowUp"] or state.keys_pressed["KeyK"] │ - │ - local move_vec_y = 0 │ - local move_vec_x = 0 │ │ - if left and right then │ - -- pass │ - elseif left then │ - move_vec_x = -1 │ - elseif right then │ - move_vec_x = 1 │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + -- print("handle_mouse_evt" .. evt_id) │ + if evt_id == 2 then │ + user_press(pos_y, pos_x) │ + elseif evt_id == 1 then │ + user_release() │ end │ +end │ │ - if up and down then │ - -- pass │ - elseif up then │ - move_vec_y = -1 │ - elseif down then │ - move_vec_y = 1 │ +function handle_touch_evt(evt_id, changed_touches) │ + -- print("handle_touch_evt: " .. evt_id) │ + if evt_id == "touchstart" then │ + user_press(changed_touches[1].y, changed_touches[1].x) │ + elseif evt_id == "touchend" then │ + user_release() │ end │ +end │ │ - if abs(move_vec_y) > 0 and abs(move_vec_x) > 0 then │ - move_vec_y = sign(move_vec_y)*INV_SQRT2 │ - move_vec_x = sign(move_vec_x)*INV_SQRT2 │ +function handle_game_option_evt(option_id) │ + if option_id == GAME_OPTION_NEW_GAME then │ + state.game = core.new_state() │ + player_won = false │ end │ - │ - return { │ - handled = keys_handled[code], │ - vec = { │ - y = move_vec_y, │ - x = move_vec_x, │ - }, │ - } │ - │ end │ │ -return keyboard_input │ -local core = {} │ - │ -local utils = require("libs/utils") │ - │ ---local ENEMY_MOVE_SPEED = 60 │ -local ENEMY_MOVE_SPEED = 120 │ -local PLAYER_MOVE_SPEED = 150 │ - │ -local ENEMY_SPAWN_DIST_FROM_PLAYER = 400 │ -local ENEMY_DIST_TO_PLAYER = 10 │ - │ -local MAX_BROCCOLI_OFFSET = 400 │ -local BROC_DMG = 200 │ -local BROCCOLI_MOVE_SPEED = 35 │ - │ -local HAMMER_RADIUS = 150 │ -local HAMMER_ROT_SPEED = 1.0/2*(2*math.pi) │ +-- Since this game is fast, it doesn't really make sense to share the state. │ +-- Well, it sort of does, since it's randomly generated, maybe you really want to │ +-- try again on a different device. │ +-- But since I didn't implement saving state yet, I didn't implement serialization, │ +-- so for now I am just going to return nil here to suppress the warning. │ +function get_state() │ + return nil │ +end │ │ -local HAMMER_SIZE = 20 │ +function start_game() │ + alexgames.set_timer_update_ms(TIME_PER_FRAME_MS) │ + alexgames.enable_evt("mouse_updown") │ + alexgames.enable_evt("touch") │ │ -core.ATTACK_TYPE_BROCCOLI = 1 │ -core.ATTACK_TYPE_FROG = 2 │ -core.ATTACK_TYPE_HAMMER = 3 │ + alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New game", type = alexgames.OPTION_TYPE_BTN }) │ +end │ +local draw = {} │ +local core = require("games/spider_swing/spider_swing_core") │ │ -core.ENTITY_TYPE_PLAYER = 1 │ -core.ENTITY_TYPE_ENEMY = 2 │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ │ +local alexgames = require("alexgames") │ │ -core.ATTACK_INFO = { │ - [core.ATTACK_TYPE_BROCCOLI] = { │ - size_y = 80, │ - size_x = 80, │ - }, │ - [core.ATTACK_TYPE_HAMMER] = { │ - size_y = HAMMER_SIZE, │ - size_x = HAMMER_SIZE, │ - }, │ +local PLAYER_COLOURS = { │ + [1] = { fill = '#cc8888', outline = '#ff0000', }, │ } │ +local PLAYER_RADIUS = 20 │ +local PLAYER_WIDTH = 70 │ +local PLAYER_HEIGHT = 50 │ +local WEB_OFFSET = 10 │ │ -local function get_enemy_spawn_time(state) │ -end │ +local SWING_SPOT_RADIUS = 5 │ +local SWING_SPOT_COLOUR = { fill = '#00ffff', outline = '#0000ff', } │ │ -local function squared(x) │ - return x*x │ -end │ +local ROPE_THICKNESS = 4 │ │ -local function abs(x) │ - if x >= 0 then return x │ - else return -x end │ -end │ +local anim_state = draw_celebration_anim.new_state({ │ + on_finish = function () │ + end, │ +}) │ │ -local ENTITY_MAP_STEP = 20 │ │ -local function entity_map_round(val) │ - return math.floor(val/ENTITY_MAP_STEP)*ENTITY_MAP_STEP │ +local function get_camera_pos(game_state, player_idx) │ + --local camera = { y = 240, x = 240 } │ + --local camera = { y = 0, x = 0 } │ + local player = game_state.players[player_idx] │ + local camera = { │ + --y = player.y - 480/2, │ + y = 0, │ + x = math.max(player.x - 480/3, -480/3), │ + } │ + return camera │ end │ │ -local function get_entity_map_pos(pos) │ - if pos.y == nil or pos.x == nil then │ - error(string.format("invalid pos{y=%s,x=%s}", pos.y, pos.x), 2) │ - end │ - return { │ - y = entity_map_round(pos.y), │ - x = entity_map_round(pos.x), │ + │ +-- translate mouse position to game position │ +function draw.get_mouse_pos_in_game(game_state, player_idx, pos_y, pos_x) │ + local player = game_state.players[player_idx] │ + local camera = get_camera_pos(game_state, player_idx) │ + local pos = { │ + y = camera.y + pos_y, │ + x = camera.x + pos_x, │ } │ + return pos │ end │ │ -local function get_entity_map_cell_or_create(entity_map, y, x) │ - if entity_map[y] == nil then │ - entity_map[y] = {} │ - end │ - │ - if entity_map[y][x] == nil then │ - entity_map[y][x] = {} │ - end │ +local function draw_finish_line(screen_x_pos, bg_height) │ │ - return entity_map[y][x] │ -end │ + local checker_count_y = 20 │ + local checker_count_x = 3 │ + local checker_size = bg_height / checker_count_y │ │ -local function add_to_entity_map(entity_map, item_type, item_state) │ - local entity_map_pos = get_entity_map_pos(item_state) │ - local new_cell = get_entity_map_cell_or_create(entity_map, entity_map_pos.y, entity_map_pos.x) │ + local FINISH_LINE_OUTLINE_COLOUR = '#888888' │ │ - table.insert(new_cell, { │ - item_type = item_type, │ - state = item_state, │ - }) │ - --print(string.format("Added entity type=%s, state=%s to entity map at y=%d, x=%d", │ - -- item_type, item_state, entity_map_pos.y, entity_map_pos.x)) │ - │ -end │ + alexgames.draw_line(FINISH_LINE_OUTLINE_COLOUR, 1, │ + 0, screen_x_pos, │ + bg_height, screen_x_pos) │ + alexgames.draw_line(FINISH_LINE_OUTLINE_COLOUR, 1, │ + 0, screen_x_pos + checker_size * checker_count_x, │ + bg_height, screen_x_pos + checker_size * checker_count_x) │ │ -local function print_entity_map(entity_map) │ - for y, row in pairs(entity_map) do │ - for x, entities in pairs(row) do │ - if #entities > 0 then │ - print(string.format("entity_map[y=%3d][x=%3d] has %d entities", │ - y, x, #entities)) │ + for i=0,checker_count_y-1 do │ + for j=0,checker_count_x-1 do │ + local checker_colour │ + if (i*checker_count_x + j) % 2 == 0 then │ + checker_colour = '#000000' │ + else │ + checker_colour = '#ffffff' │ end │ + │ + alexgames.draw_rect(checker_colour, │ + (i )*checker_size, screen_x_pos + (j )*checker_size, │ + (i+1)*checker_size, screen_x_pos + (j+1)*checker_size) │ end │ end │ end │ │ -local function get_entity_map_cell(entity_map, y, x) │ - if entity_map[y] == nil or │ - entity_map[y][x] == nil then │ - error(string.format("y=%d,x=%d not found in entity_map", y, x), 2) │ - end │ +function draw.draw_state(game_state, player_idx, dt_ms) │ + local camera = get_camera_pos(game_state, player_idx) │ + alexgames.draw_clear() │ │ - return entity_map[y][x] │ -end │ + --alexgames.draw_rect('#aaaaaa', 0, 0, 480, 480) │ + local bg_height = 480 │ + local bg_width = 480 │ + local screen_bg_pos = { │ + y = math.floor(-(camera.y-math.floor(camera.y/bg_height)*bg_height)), │ + x = math.floor(-(camera.x-math.floor(camera.x/bg_width)*bg_width)), │ + } │ │ -local function update_attack_states(state, player_state, dt_ms) │ - for _, attack_state in pairs(player_state.attack_states) do │ - if attack_state.enabled then │ - attack_state.update(state, player_state, attack_state, dt_ms) │ - end │ - end │ -end │ + -- Draw two tiles of the background, that's the most that are ever visible at a time. │ + for i=0,1 do │ + local offset = 3 -- WTF why is this needed? Why doesn't my image tile nicely with this "offset" set to 0?? │ + -- ah, I shouldn't have the brick outline on both sides. TODO remove outline on right │ │ -local function area_contains_enemy(state, start_y, start_x, end_y, end_x) │ - local found_enemies = {} │ - for y=entity_map_round(start_y),entity_map_round(end_y),ENTITY_MAP_STEP do │ - for x=entity_map_round(start_x),entity_map_round(end_x),ENTITY_MAP_STEP do │ - for val_idx, val in ipairs(get_entity_map_cell_or_create(state.entity_map, y, x)) do │ - if val.item_type == core.ENTITY_TYPE_ENEMY then │ - table.insert(found_enemies, val.state) │ - end │ - end │ - end │ + -- TODO I couldn't figure out how to make the bg image stop tiling at a certain position │ + --if i == 1 then print(string.format("camera_real_pos_x = %8.1f", camera.x + i*bg_width)) end │ + --if camera.x + (i+1)*bg_width > game_state.max_x then │ + -- goto draw_bg_continue │ + --end │ + alexgames.draw_rect('#aaaaaa', math.floor(screen_bg_pos.y), math.floor(screen_bg_pos.x + i * bg_width-offset), │ + math.floor(screen_bg_pos.y) + bg_height, math.floor(screen_bg_pos.x + i * bg_width-offset) + bg_width) │ + alexgames.draw_graphic('brick_wall', │ + screen_bg_pos.y + bg_height/2, i*(bg_width-offset) + math.floor(screen_bg_pos.x) + bg_width/2, bg_width, bg_height) │ + ::draw_bg_continue:: │ end │ │ - return { found = #found_enemies > 0, enemies = found_enemies } │ -end │ + draw_finish_line(game_state.finish_line_x - camera.x, bg_height) │ │ -local function remove_entity(state, entity) │ - local pos = get_entity_map_pos(entity) │ - local cell = get_entity_map_cell(state.entity_map, pos.y, pos.x) │ - local entity_idx │ - for idx, val in ipairs(cell) do │ - if val.state == entity then │ - entity_idx = idx │ + for player_idx, player in ipairs(game_state.players) do │ + --alexgames.draw_circle(PLAYER_COLOURS[player_idx].fill, PLAYER_COLOURS[player_idx].outline, │ + -- math.floor(player.y - camera.y), math.floor(player.x - camera.x), PLAYER_RADIUS) │ + local angle = 0 │ + if player.angle then │ + angle = -math.floor(player.angle*180/math.pi) │ end │ - end │ - │ - if entity_idx == nil then │ - error(string.format("Could not find entity %s in entity_map", entity)) │ - end │ - │ - table.remove(cell, entity_idx) │ -end │ + alexgames.draw_graphic("spider", │ + math.floor(player.y - camera.y), math.floor(player.x - camera.x), PLAYER_WIDTH, PLAYER_HEIGHT, { angle_degrees = angle }) │ + if player.swinging_on ~= nil then │ + --local y2 = player.y + 30 * math.sin(player.swing_angle + math.pi/2) │ + --local x2 = player.x + 30 * math.cos(player.swing_angle + math.pi/2) │ + local node = game_state.swing_spots[player.swinging_on] │ + local y1 = player.y - WEB_OFFSET * math.cos(player.angle) │ + local x1 = player.x - WEB_OFFSET * math.sin(player.angle) │ + local y2 = node.y │ + local x2 = node.x │ + alexgames.draw_line('#dddddd', ROPE_THICKNESS, math.floor(y1 - camera.y), math.floor(x1 - camera.x), math.floor(y2 - camera.y), math.floor(x2 - camera.x)) │ │ -local function remove_enemy(state, enemy) │ - remove_entity(state, enemy) │ - local enemy_idx │ - for val_idx, val in ipairs(state.enemies) do │ - if val == enemy then │ - enemy_idx = val_idx │ + --[[ │ + local dy = player.y - node.y │ + local dx = player.x - node.x │ + local angle = math.atan(dy,dx) - math.pi/2 │ + local y3 = player.y + 30 * math.sin(angle) │ + local x3 = player.x + 30 * math.cos(angle) │ + alexgames.draw_line('#00ff00', 2, math.floor(player.y - camera.y), math.floor(player.x - camera.x), math.floor(y3 - camera.y), math.floor(x3 - camera.x)) │ + --]] │ end │ + alexgames.draw_text(string.format("E: %5.0f", math.floor(core.get_energy(game_state, player_idx)/100)), '#ff0000', 24, 5, 24, 1) │ + alexgames.draw_text(string.format("pos: %5.0f", math.floor(player.x/10)), '#ff0000', 24, 480-150, 24, 1) │ end │ │ - if enemy_idx == nil then │ - error(string.format("Could not find enemy %s in state.enemies", enemy)) │ + for _, node in ipairs(game_state.swing_spots) do │ + alexgames.draw_circle(SWING_SPOT_COLOUR.fill, SWING_SPOT_COLOUR.outline, │ + math.floor(node.y - camera.y), math.floor(node.x - camera.x), SWING_SPOT_RADIUS) │ end │ - table.remove(state.enemies, enemy_idx) │ - print(string.format("Removed enemy %s", enemy)) │ -end │ │ -local function damage_enemy(state, enemy, dmg) │ - enemy.health = enemy.health - dmg │ - if enemy.health <= 0 then │ - remove_enemy(state, enemy) │ + if dt_ms ~= 0 then │ + draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ end │ + draw_celebration_anim.draw(anim_state) │ + alexgames.draw_refresh() │ end │ │ -function update_broccoli_state(state, player_state, attack_state, dt_ms) │ - local spawn_dirs = { │ - { y_vel = 0, x_vel = 1 }, │ - { y_vel = 0, x_vel = -1 }, │ - { y_vel = 1, x_vel = 0 }, │ - { y_vel =-1, x_vel = 0 }, │ - } │ - attack_state.time_to_next_spawn_ms = attack_state.time_to_next_spawn_ms - dt_ms │ - if attack_state.time_to_next_spawn_ms < 0 then │ - attack_state.time_to_next_spawn_ms = attack_state.spawn_period_ms │ - │ - for i=1,attack_state.entities_per_spawn do │ - print("spawning broccoli") │ - local y_vel = spawn_dirs[attack_state.next_spawn_dir].y_vel * BROCCOLI_MOVE_SPEED * dt_ms/1000 │ - local x_vel = spawn_dirs[attack_state.next_spawn_dir].x_vel * BROCCOLI_MOVE_SPEED * dt_ms/1000 │ - │ - attack_state.next_spawn_dir = (attack_state.next_spawn_dir % #spawn_dirs) + 1 │ - table.insert(attack_state.particles, { │ - y_offset = 0, │ - x_offset = 0, │ - │ - y_vel = y_vel, │ - x_vel = x_vel, │ - }) │ - end │ - end │ - │ - local broc_idxes_to_remove = {} │ - │ - for particle_idx, particle in ipairs(attack_state.particles) do │ - particle.y_offset = particle.y_offset + particle.y_vel * dt_ms │ - particle.x_offset = particle.x_offset + particle.x_vel * dt_ms │ +function draw.player_finished() │ + draw_celebration_anim.fireworks_display(anim_state, { │ + -- I didn't implement dark mode in this game, so │ + -- when showing the fireworks display, the dark background │ + -- needs to be drawn so that the fireworks are more visible. │ + colour_pref = "light", │ + }) │ +end │ │ - if abs(particle.y_offset) > MAX_BROCCOLI_OFFSET or │ - abs(particle.x_offset) > MAX_BROCCOLI_OFFSET then │ - table.insert(broc_idxes_to_remove, particle_idx) │ - end │ - end │ +return draw │ +local input = {} │ │ - local positions = core.get_broccoli_particle_positions(state, player_state, attack_state) │ - local BROC_SIZE_Y = 80 │ - local BROC_SIZE_X = 80 │ - --print_entity_map(state.entity_map) │ - for pos_idx, pos in ipairs(positions) do │ - local info = area_contains_enemy(state, │ - pos.y - BROC_SIZE_Y/2, pos.x - BROC_SIZE_X/2, │ - pos.y + BROC_SIZE_Y/2, pos.x + BROC_SIZE_X/2) │ - --[[ │ - print(string.format("area y in {%s, %s}, x in {%s, %s} contained enemies: %s", │ - pos.y - BROC_SIZE_Y/2, pos.y + BROC_SIZE_Y/2, │ - pos.x - BROC_SIZE_Y/2, pos.x + BROC_SIZE_Y/2, │ - info.found)) │ - --]] │ - if info.found then │ - print("broccoli hit enemy!") │ - for _, enemy in ipairs(info.enemies) do │ - damage_enemy(state, enemy, BROC_DMG) │ - end │ - if attack_state.consumed_on_dmg then │ - table.insert(broc_idxes_to_remove, pos_idx) │ - end │ - end │ - end │ - -- TODO handle removing more than one at a time │ - if #broc_idxes_to_remove > 0 then │ - table.remove(attack_state.particles, broc_idxes_to_remove[1]) │ - end │ - │ -end │ +local need_to_rotate_enabled = true │ │ --- TODO make private │ -function core.get_broccoli_particle_positions(state, player_state, attack_state) │ - local positions = {} │ - for _, particle in ipairs(attack_state.particles) do │ - table.insert(positions, { │ - y = player_state.y + particle.y_offset, │ - x = player_state.x + particle.x_offset, │ - }) │ - end │ +function input.new_input_state() │ + return { │ + rot_left = false, │ + rot_right = false, │ │ - return positions │ + thrust_left = false, │ + thrust_right = false, │ + thrust_up = false, │ + thrust_down = false, │ + } │ end │ │ -local function get_missing_hammer_idx(attack_state) │ - for i=1,attack_state.max_particles do │ - if attack_state.particles[i] == nil then │ - return i │ +function input.handle_key_evt(input_state, player_state, evt_id, code) │ + --print(string.format("handle_key_evt, code=%s, evt=%s", code, evt_id)) │ + if need_to_rotate_enabled then │ + if code == "ArrowLeft" then │ + player_state.rot_left = (evt_id == "keydown") │ + elseif code == "ArrowRight" then │ + player_state.rot_right = (evt_id == "keydown") │ + elseif code == "ArrowUp" then │ + player_state.thrust_on = (evt_id == "keydown") │ + elseif code == "ArrowDown" then │ + player_state.brake_on = (evt_id == "keydown") │ + else │ + return false │ end │ - end │ - return nil │ -end │ - │ -local function update_hammer_state(state, player_state, attack_state, dt_ms) │ - print("update_hammer_state") │ - attack_state.time_to_next_spawn_ms = attack_state.time_to_next_spawn_ms - dt_ms │ - if attack_state.time_to_next_spawn_ms < 0 then │ - while utils.table_len(attack_state.particles) < attack_state.max_particles do │ - attack_state.time_to_next_spawn_ms = attack_state.spawn_period_ms │ - local i = get_missing_hammer_idx(attack_state) │ - attack_state.particles[i] = { │ - hammer_radius = HAMMER_RADIUS + i*HAMMER_SIZE, │ - angle = 0, │ - idx = i, │ - } │ + return true │ + else │ + if code == "ArrowLeft" then │ + input_state.thrust_left = (evt_id == "keydown") │ + elseif code == "ArrowRight" then │ + input_state.thrust_right = (evt_id == "keydown") │ + elseif code == "ArrowUp" then │ + input_state.thrust_up = (evt_id == "keydown") │ + elseif code == "ArrowDown" then │ + input_state.thrust_down = (evt_id == "keydown") │ + else │ + return false │ end │ - end │ │ - for _, particle in pairs(attack_state.particles) do │ - particle.angle = particle.angle + HAMMER_ROT_SPEED*dt_ms/1000 │ - end │ - │ - local hammers_to_remove = {} │ + local thrust_vec_y = 0 │ + local thrust_vec_x = 0 │ │ - local positions = core.get_hammer_particle_positions(state, player_state, attack_state) │ - for hammer_idx, hammer in ipairs(positions) do │ - local info = area_contains_enemy(state, │ - hammer.y - HAMMER_SIZE/2, hammer.x - HAMMER_SIZE/2, │ - hammer.y + HAMMER_SIZE/2, hammer.x + HAMMER_SIZE/2) │ - if info.found then │ - print(string.format("Hammer hit %d enemies", #info.enemies)) │ - for _, enemy in ipairs(info.enemies) do │ - damage_enemy(state, enemy, 200) │ - end │ - if attack_state.hammers_consumable then │ - table.insert(hammers_to_remove, hammer_idx) │ - end │ + if input_state.thrust_left and input_state.thrust_right then │ + -- pass │ + elseif input_state.thrust_left then │ + thrust_vec_x = 1 │ + elseif input_state.thrust_right then │ + thrust_vec_x = -1 │ end │ - end │ - │ - for _, idx in ipairs(hammers_to_remove) do │ - attack_state.particles[idx] = nil │ - end │ - │ -end │ - │ -function core.get_hammer_particle_positions(state, player_state, attack_state) │ - local positions = {} │ - for _, particle in pairs(attack_state.particles) do │ - table.insert(positions, { │ - y = player_state.y + particle.hammer_radius * math.cos(particle.angle), │ - x = player_state.x + particle.hammer_radius * math.sin(particle.angle), │ - }) │ - end │ - │ - return positions │ -end │ - │ - │ - │ -local function update_entity_map(entity_map, old_pos, item_state) │ - --print_entity_map(entity_map) │ - local old_entity_map_pos = get_entity_map_pos(old_pos) │ - local new_entity_map_pos = get_entity_map_pos(item_state) │ - --[[ │ - print(string.format("Moving entity from {y=%d,x=%d} to {y=%d,x=%d}", │ - old_entity_map_pos.y, │ - old_entity_map_pos.x, │ - new_entity_map_pos.y, │ - new_entity_map_pos.x)) │ - --]] │ - │ - if old_entity_map_pos.y == new_entity_map_pos.y and │ - old_entity_map_pos.x == new_entity_map_pos.x then │ - return │ - end │ │ - local old_map_cell = get_entity_map_cell(entity_map, old_entity_map_pos.y, old_entity_map_pos.x) │ - local old_map_idx │ - local old_val │ - for idx, val in ipairs(old_map_cell) do │ - if val.state == item_state then │ - old_map_idx = idx │ - old_val = val │ + if input_state.thrust_up and input_state.thrust_down then │ + -- pass │ + elseif input_state.thrust_up then │ + thrust_vec_y = 1 │ + elseif input_state.thrust_down then │ + thrust_vec_y = -1 │ end │ - end │ │ - if old_map_idx == nil then │ - print(string.format("old_map_cell has len %d", #old_map_cell)) │ - for idx, val in ipairs(old_map_cell) do │ - print(string.format("old_map_cell[%d] = %s", idx, val.state)) │ + if thrust_vec_y ~= 0 or thrust_vec_x ~= 0 then │ + player_state.angle_degrees = math.atan(thrust_vec_y, thrust_vec_x) * 180 / math.pi - 90 │ + player_state.thrust_on = true │ + else │ + player_state.thrust_on = false │ end │ - error(string.format("Could not find item %s in old entity_map cell", item_state)) │ + return true │ end │ - │ - local new_map_cell = get_entity_map_cell_or_create(entity_map, new_entity_map_pos.y, new_entity_map_pos.x) │ - table.remove(old_map_cell, idx) │ - table.insert(new_map_cell, old_val) │ end │ │ -function core.new_state(num_players) │ - local state = { │ - entity_map = {}, │ - players = {}, │ - enemies = {}, │ - --enemies_to_spawn_per_period = 50, │ - enemies_to_spawn_per_period = 1, │ - enemy_spawn_time_ms = 400, │ - --enemy_spawn_time_ms = 400, │ - time_to_next_enemy_spawn_ms = 0, │ - } │ - │ - for i=1,num_players do │ +return input │ │ - table.insert(state.players, { │ - y = 0, │ - x = 0, │ +local draw = {} │ +local alexgames = require("alexgames") │ +local touchpad = require("libs/ui/touchpad") │ +local core = require("games/thrust/thrust_core") │ │ - move_vec = { │ - y = 0, │ - x = 0, │ - }, │ +draw.ACTION_PLAYER_VEC_CHANGED = 1 │ │ - level = 1, │ - attack_states = { │ - [core.ATTACK_TYPE_BROCCOLI] = { │ - enabled = true, │ - update = update_broccoli_state, │ - get_positions = core.get_broccoli_particle_positions, │ - consumed_on_dmg = false, │ - level = 1, │ - time_to_next_spawn_ms = 500, │ - --entities_per_spawn = 1, │ - entities_per_spawn = 4, │ - spawn_period_ms = 1000, │ - next_spawn_dir = 1, │ - particles = {}, │ - }, │ │ - [core.ATTACK_TYPE_HAMMER] = { │ - enabled = true, │ - update = update_hammer_state, │ - get_positions = core.get_hammer_particle_positions, │ - max_particles = 3, │ - level = 1, │ - time_to_next_spawn_ms = 500, │ - spawn_period_ms = 1000, │ - next_spawn_dir = 1, │ - hammers_consumable = false, │ - particles = {}, │ - }, │ │ - }, │ - }) │ - add_to_entity_map(state.entity_map, core.ENTITY_TYPE_PLAYER, state.players[i]) │ - end │ +local BG_COLOUR = '#000000' │ +local THRUST_COLOUR = '#ff8800' │ +local THRUST_COLOUR_OUTLINE = '#ffff00' │ +local STAR_COLOUR = '#ffffff' │ +local WALL_COLOUR = '#ff0000' │ +local height = 480 │ +local width = 480 │ │ - return state │ -end │ +local WALL_THICKNESS = 5 │ +local CHECKPOINT_WALL_COLOUR_UNMET = '#00ff0077' │ +local CHECKPOINT_WALL_COLOUR_MET = '#00880077' │ +local CHECKPOINT_THICKNESS_MET = 1 │ +local CHECKPOINT_THICKNESS_UNMET = 2 │ │ -local function get_random_dist_from_player(player_state, dist_from_player) │ - local angle = math.random()*2*math.pi │ - local pos = { │ - y = player_state.y + dist_from_player*math.cos(angle), │ - x = player_state.x + dist_from_player*math.sin(angle), │ - } │ - return pos │ -end │ +local TEXT_COLOUR = '#aaaaaa' │ +local TEXT_SIZE = 24 │ +local TEXT_PADDING = 3 │ │ -local function spawn_enemy(state, pos) │ - local enemy_state = { │ - y = pos.y, │ - x = pos.x, │ - health = 10, │ - move_speed = ENEMY_MOVE_SPEED, │ - } │ - table.insert(state.enemies, enemy_state) │ - add_to_entity_map(state.entity_map, core.ENTITY_TYPE_ENEMY, enemy_state) │ -end │ +local padding = 5 │ +local TOUCHPAD_RADIUS = 85 │ +local TOUCHPAD_POS = { │ + y = height - TOUCHPAD_RADIUS - padding, │ + x = width - TOUCHPAD_RADIUS - padding, │ +} │ │ -local function collides_with_new_pos(state, entity, tentative_pos) │ - local old_entity_pos = get_entity_map_pos(entity) │ - local new_entity_pos = get_entity_map_pos(tentative_pos) │ +local SHIP1 = "ship1" │ │ - if old_entity_pos.y == new_entity_pos.y and │ - old_entity_pos.x == new_entity_pos.x then │ - return false │ - else │ - return #get_entity_map_cell_or_create(state.entity_map, new_entity_pos.y, new_entity_pos.x) > 0 │ - end │ +local ship_graphics = { │ + [SHIP1] = { img_id = "space_ship1", height = 150, width = 150 }, │ +} │ │ - │ +local function game_pt_to_screen_pt(state, player_state, pt) │ + return { │ + y = math.floor(state.zoom * (pt.y - player_state.y) + height/2), │ + x = math.floor(state.zoom * (pt.x - player_state.x) + width/2), │ + } │ end │ │ -local function move_enemies_toward_player(state, dt_ms) │ - local player_state = state.players[1] │ - for _, enemy in ipairs(state.enemies) do │ - local dy = player_state.y - enemy.y │ - local dx = player_state.x - enemy.x │ - │ - local angle = math.atan(dy, dx) │ - local dist_squared = dy*dy + dx*dx │ - │ - local old_pos = { │ - y = enemy.y, │ - x = enemy.x, │ - } │ - │ - if dist_squared > squared(ENEMY_DIST_TO_PLAYER) then │ - local tentative_pos = { │ - y = enemy.y + enemy.move_speed * math.sin(angle) * dt_ms/1000.0, │ - x = enemy.x + enemy.move_speed * math.cos(angle) * dt_ms/1000.0, │ - } │ - │ - local map_pos = get_entity_map_pos(tentative_pos) │ - local map_cell = get_entity_map_cell_or_create(state.entity_map, map_pos.y, map_pos.x) │ - if not collides_with_new_pos(state, enemy, tentative_pos) then │ - enemy.y = tentative_pos.y │ - enemy.x = tentative_pos.x │ - else │ - -- otherwise, collision. Do not move │ - end │ - --print(string.format("enemy is at pos y=%s, x=%s", enemy.y, enemy.x)) │ - end │ - │ - update_entity_map(state.entity_map, old_pos, enemy) │ +local function draw_walls(state, player_state) │ + for _, wall_info in ipairs(state.walls) do │ + --[[ │ + alexgames.draw_rect(WALL_COLOUR, │ + wall_info.y_start - state.y, wall_info.x_start - state.x, │ + wall_info.y_end - state.y, wall_info.x_end - state.x) │ + --]] │ + local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ + local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ + alexgames.draw_line(WALL_COLOUR, WALL_THICKNESS, │ + pt1.y, pt1.x, │ + pt2.y, pt2.x) │ + │ end │ -end │ │ -function core.update_state(state, dt_ms) │ - if state.time_to_next_enemy_spawn_ms < 0 then │ - for i=1,state.enemies_to_spawn_per_period do │ - local new_enemy_pos = get_random_dist_from_player(state.players[1], ENEMY_SPAWN_DIST_FROM_PLAYER) │ - spawn_enemy(state, new_enemy_pos) │ + for checkpoint_idx, wall_info in ipairs(state.checkpoints) do │ + local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ + local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ + local colour │ + local thickness │ + if player_state.met_checkpoints[checkpoint_idx] then │ + colour = CHECKPOINT_WALL_COLOUR_MET │ + thickness = CHECKPOINT_THICKNESS_MET │ + else │ + colour = CHECKPOINT_WALL_COLOUR_UNMET │ + thickness = CHECKPOINT_THICKNESS_UNMET │ end │ - state.time_to_next_enemy_spawn_ms = state.enemy_spawn_time_ms │ + alexgames.draw_line(colour, thickness, │ + pt1.y, pt1.x, │ + pt2.y, pt2.x) │ end │ │ - state.time_to_next_enemy_spawn_ms = state.time_to_next_enemy_spawn_ms - dt_ms │ - │ - for _, player_state in ipairs(state.players) do │ - if player_state.move_vec.y ~= 0 or │ - player_state.move_vec.x ~= 0 then │ - local dy = PLAYER_MOVE_SPEED * player_state.move_vec.y * dt_ms/1000.0 │ - local dx = PLAYER_MOVE_SPEED * player_state.move_vec.x * dt_ms/1000.0 │ - │ - player_state.y = player_state.y + dy │ - player_state.x = player_state.x + dx │ - end │ - update_attack_states(state, player_state, dt_ms) │ + local wall_info = state.finish_line │ + local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ + local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ + if not core.met_all_checkpoints(player_state) then │ + colour = CHECKPOINT_WALL_COLOUR_MET │ + thickness = CHECKPOINT_THICKNESS_MET │ + else │ + colour = CHECKPOINT_WALL_COLOUR_UNMET │ + thickness = CHECKPOINT_THICKNESS_UNMET │ end │ + alexgames.draw_line(colour, thickness, │ + pt1.y, pt1.x, │ + pt2.y, pt2.x) │ │ - move_enemies_toward_player(state, dt_ms) │ end │ │ -function core.set_player_move_vec(state, player_idx, move_vec) │ - state.players[player_idx].move_vec.y = move_vec.y │ - state.players[player_idx].move_vec.x = move_vec.x │ -end │ +local function draw_ship(ship_type, state, player_state) │ + --print(string.format("ship_type=%s, y=%s, x=%s, angle=%s", ship_type, y, x, angle)) │ + local ship_img_info = ship_graphics[ship_type] │ │ -return core │ ---[[ │ --- │ --- TODO better AoE damage: │ --- hard to do much AoE damage when the attacks are consumed as soon as they hit the edge of a mob of enemies, especially the hammer. │ --- should mark them as "remove in 300 ms" or something, so they get some time to do more damage. │ --- maybe also only let them do a certain amount of damage │ --- │ --- TODO: │ --- * add touch dirpad, refactor into common library for use with other games like thrust and hospital/bound │ --- │ ---]] │ -local core = require("games/swarm/swarm_core") │ -local draw = require("games/swarm/swarm_draw") │ -local keyboard_input = require("games/swarm/swarm_keyboard_input") │ -local alexgames = require("alexgames") │ + local thrust_offset = 20 │ + local thrust_len = 20 │ + local thrust_width = 5 │ + local thrust_angle = player_state.angle_degrees/180*math.pi │ │ -local FPS = 60 │ ---local FPS = 2 │ -local MS_PER_FRAME = math.floor(1000/FPS) │ -local player_idx = 1 │ + local thrust_radius = 10 │ │ -local is_paused = false │ + local y_pos = height/2 │ + local x_pos = width/2 │ │ -local height = 480 │ -local width = 480 │ │ -local g_state = { │ - ui = draw.init(height, width), │ - game = core.new_state(1), │ - key_state = keyboard_input.new_key_state(), │ -} │ │ -function update() │ - draw.draw_state(g_state.game, g_state.ui, player_idx) │ - if not is_paused then │ - core.update_state(g_state.game, MS_PER_FRAME) │ + if player_state.thrust_on then │ + alexgames.draw_circle(THRUST_COLOUR, │ + THRUST_COLOUR_OUTLINE, │ + math.floor(y_pos + thrust_offset*math.cos(thrust_angle)), │ + math.floor(x_pos - thrust_offset*math.sin(thrust_angle)), │ + math.floor(state.zoom*thrust_radius)) │ + --[[ │ + local thrust_angle = player_state.angle_degrees/180*math.pi │ + alexgames.draw_rect(THRUST_COLOUR, │ + math.floor(player_state.y + thrust_offset*math.cos(thrust_angle)), │ + math.floor(player_state.x - thrust_width*math.sin(thrust_angle)), │ + math.floor(player_state.y + (thrust_offset+thrust_len)*math.cos(thrust_angle)), │ + math.floor(player_state.x + thrust_width*math.sin(thrust_angle))) │ + --]] │ end │ -end │ │ -function handle_key_evt(evt, code) │ - local handled = false │ - if code == "KeyP" and evt == "keydown" then │ - is_paused = not is_paused │ - local pause_str │ - if is_paused then │ - pause_str = "paused" │ - else │ - pause_str = "unpaused" │ - end │ - alexgames.set_status_msg(string.format("Game %s. (Press \"P\" to toggle)", pause_str)) │ - handled = true │ - end │ - local info = keyboard_input.get_move_vec_from_key_evt(g_state.key_state, evt, code) │ - handled = handled or info.handled │ - core.set_player_move_vec(g_state.game, player_idx, info.vec) │ - return handled │ + alexgames.draw_graphic(ship_img_info.img_id, │ + math.floor(y_pos), │ + math.floor(x_pos), │ + math.floor(state.zoom*ship_img_info.height), │ + math.floor(state.zoom*ship_img_info.width), { │ + -- anchor_centre = true, -- TODO this should be the default, I think... │ + angle_degrees = math.floor(player_state.angle_degrees), │ + }) │ + --[[ │ + alexgames.draw_rect('#ffffff', y - ship_img_info.height/2, │ + x - ship_img_info.width/2, │ + y - ship_img_info.height/2 + ship_img_info.height, │ + x - ship_img_info.width/2 + ship_img_info.width) │ + --]] │ + │ end │ │ -function handle_touch_evt(evt, touches) │ - local actions = draw.handle_touch_evts(g_state.ui, evt, touches) │ - for _, action in ipairs(actions) do │ - if action.action_type == draw.ACTION_PLAYER_VEC_CHANGE then │ - core.set_player_move_vec(g_state.game, player_idx, action.new_player_vec) │ - end │ +local function draw_stars_bg(state, player_state, star_move_fact) │ + star_move_fact = star_move_fact / state.zoom │ + for _, star in ipairs(state.stars) do │ + alexgames.draw_circle(STAR_COLOUR, STAR_COLOUR, │ + math.floor(star.y - player_state.y/star_move_fact), math.floor(star.x - player_state.x/star_move_fact), │ + 1) │ end │ end │ │ -alexgames.set_timer_update_ms(MS_PER_FRAME) │ -alexgames.enable_evt("key") │ -alexgames.enable_evt("touch") │ -local draw = {} │ - │ -local core = require("games/swarm/swarm_core") │ -local touchpad = require("libs/ui/touchpad") │ -local alexgames = require("alexgames") │ - │ -draw.ACTION_PLAYER_VEC_CHANGE = 1 │ - │ -local height = 480 │ -local width = 480 │ - │ -local padding = 5 │ - │ -local TOUCHPAD_RADIUS = 85 │ -local TOUCHPAD_POS = { │ - y = height - TOUCHPAD_RADIUS - padding, │ - x = width - TOUCHPAD_RADIUS - padding, │ -} │ - │ -local BACKGROUND_COLOUR = '#0f7901' │ +local function format_time(time_ms) │ + local milliseconds = (time_ms % 1000) │ + local seconds = math.floor(time_ms/1000) │ + local minutes = math.floor(seconds/60) │ + seconds = seconds % 60 │ │ -local function get_attack_img(attack_type) │ - local MAP = { │ - [core.ATTACK_TYPE_BROCCOLI] = "swarm_broccoli", │ - [core.ATTACK_TYPE_HAMMER] = "swarm_hammer", │ - } │ - return MAP[attack_type] │ + return string.format("%2d:%02d.%03d", minutes, seconds, milliseconds) │ end │ │ -local function get_screen_pos(state, game_pos) │ +function draw.init() │ return { │ - y = math.floor(height/2 - state.players[1].y + game_pos.y), │ - x = math.floor(width/2 - state.players[1].x + game_pos.x), │ + touchpad = touchpad.new_state(TOUCHPAD_POS, TOUCHPAD_RADIUS), │ } │ end │ │ -local function draw_bg(state, player_idx) │ - --alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, height, width) │ - │ - for _, bg_y_idx in ipairs({0, 1}) do │ - for _, bg_x_idx in ipairs({0, 1}) do │ - local bg = get_screen_pos(state, { │ - y = (math.floor(state.players[player_idx].y/height) + bg_y_idx)*height, │ - x = (math.floor(state.players[player_idx].x/width) + bg_x_idx)*width, │ - }) │ - alexgames.draw_graphic("swarm_grass_bg1", bg.y, bg.x, height, width) │ - end │ - end │ -end │ - │ -local function draw_attacks_state(state, player_idx) │ - local player_state = state.players[player_idx] │ - for attack_type, attack_state in pairs(player_state.attack_states) do │ - local img_id = get_attack_img(attack_type) │ - local positions = attack_state.get_positions(state, player_state, attack_state) │ - --local broccoli_positions = core.get_broccoli_particle_positions(state, state.players[player_idx], state.players[player_idx].attack_states[core.ATTACK_TYPE_BROCCOLI]) │ - for _, pos in ipairs(positions) do │ - local screen_pos = get_screen_pos(state, pos) │ - local attack_info = core.ATTACK_INFO[attack_type] │ - alexgames.draw_graphic(img_id, screen_pos.y, screen_pos.x, │ - attack_info.size_y, attack_info.size_x) │ - end │ - end │ - │ -end │ - │ -function draw.draw_state(state, ui_state, player_idx) │ +function draw.draw_state(state, ui_state) │ alexgames.draw_clear() │ + alexgames.draw_rect(BG_COLOUR, 0, 0, height, width) │ + draw_stars_bg(state, state.players[1], 3) │ + draw_walls(state, state.players[1]) │ + draw_ship(SHIP1, state, state.players[1]) │ │ - draw_bg(state, player_idx) │ - │ - alexgames.draw_text("player", '#000000', height/2, width/2, 12, 0) │ - draw_attacks_state(state, player_idx) │ - --alexgames.draw_graphic("swarm_broccoli", height/4, width/4, 80, 80) │ - --alexgames.draw_graphic("swarm_hammer", height/4, width/4, 50, 50) │ + alexgames.draw_text(format_time(state.players[1].lap_time_ms), TEXT_COLOUR, │ + TEXT_SIZE + TEXT_PADDING, TEXT_PADDING, TEXT_SIZE, 1) │ │ - for enemy_idx, enemy in ipairs(state.enemies) do │ - local screen_pos = get_screen_pos(state, enemy) │ - alexgames.draw_text(string.format("%d", enemy_idx), '#000000', screen_pos.y, screen_pos.x, 12, 0) │ + for lap_idx, lap_time in ipairs(state.players[1].lap_times) do │ + local text = string.format('%d:%s', lap_idx, format_time(lap_time)) │ + alexgames.draw_text(text, TEXT_COLOUR, │ + lap_idx*(TEXT_SIZE + TEXT_PADDING), │ + width - TEXT_PADDING, │ + TEXT_SIZE, -1) │ end │ │ - alexgames.draw_graphic('hospital_ui_dirpad', │ + alexgames.draw_graphic("hospital_ui_dirpad", │ ui_state.touchpad.pos.y, │ ui_state.touchpad.pos.x, │ 2*ui_state.touchpad.radius, │ 2*ui_state.touchpad.radius) │ - │ │ + alexgames.draw_refresh() │ end │ │ -function draw.handle_touch_evts(state, evt_id, touches) │ +function draw.handle_touch_evts(ui_state, evt_id, touches) │ local actions = {} │ │ - local new_player_vec = touchpad.handle_touch_evts(state.touchpad, evt_id, touches) │ - if new_player_vec ~= nil then │ + local player_vec = touchpad.handle_touch_evts(ui_state.touchpad, evt_id, touches) │ + if player_vec ~= nil then │ table.insert(actions, { │ - action_type = draw.ACTION_PLAYER_VEC_CHANGE, │ - new_player_vec = new_player_vec, │ + action = draw.ACTION_PLAYER_VEC_CHANGED, │ + player_vec = player_vec, │ }) │ end │ - │ + │ return actions │ end │ │ -function draw.init(height, width) │ - local state = { │ - touchpad = touchpad.new_state(TOUCHPAD_POS, TOUCHPAD_RADIUS), │ - } │ - return state │ -end │ - │ return draw │ +--[[ │ │ -local alexgames = require("alexgames") │ +TODO: │ +* add a button to do a speed boost, or to increase the "max allowed speed" │ +* implement touch support with a joystick like the hospital game │ +* maybe implement mouse support? │ │ -local touch_count = 0 │ -local touches = {} │ +* bug with checkpoints: I've missed a few sometimes. Need to draw them as lines on the screen, │ + higlight the next one, and make it change colour once passed through │ │ -local colours = { │ - '#ff0000', │ - '#0000ff', │ - '#00ff00', │ - '#00ffff', │ - '#ffff00', │ - '#ff00ff', │ - '#000000', │ -} │ +--]] │ +local core = require("games/thrust/thrust_core") │ +local draw = require("games/thrust/thrust_draw") │ +local key_input = require("games/thrust/thrust_keyboard_input") │ │ -local board_height = 480 │ -local board_width = 480 │ +local alexgames = require("alexgames") │ │ -local touch_line_width = 2 │ -local circle_radius = 20 │ │ -local text_size = 12 │ -local padding = 5 │ +--local FPS = 60 │ +local FPS = 50 │ +local TIME_PER_FRAME_MS = math.floor(1000/FPS) │ │ -local last_touch_str = nil │ +local g_state = { │ + ui = draw.init(), │ + game = core.new_game_state(1), │ + keyboard = key_input.new_input_state(), │ +} │ │ -function update() │ - alexgames.draw_clear() │ │ - if touch_count == 0 then │ - local text_size = 18 │ - local line1 = 'Touch (and optionally drag) the screen' │ - local line2 = 'to see info about touches' │ - alexgames.draw_text(line1, │ - text_colour, │ - board_height/2 - text_size - padding/2, board_width/2, │ - text_size, 0) │ - alexgames.draw_text(line2, │ - text_colour, │ - board_height/2 + text_size + padding/2, board_width/2, │ - text_size, 0) │ - end │ - local touch_idx = 1 │ - for i, touch in pairs(touches) do │ +function update(dt_ms) │ + --core.update_state(g_state.game, TIME_PER_FRAME_MS/1000.0) │ + core.update_state(g_state.game, dt_ms/1000.0) │ + draw.draw_state(g_state.game, g_state.ui) │ +end │ │ - local text = string.format('%2d: id=%d [%3d] ', touch_idx, i, #touch) │ - for _, pos in ipairs(touch) do │ - text = text .. string.format('{y=%d,x=%d}, ', pos.y, pos.x) │ - end │ - alexgames.draw_text(text, '#000000', touch_idx*(text_size+padding), padding, text_size, 1) │ - last_touch_str = text │ +function handle_mousemove(y_pos, x_pos) │ + --g_state.angle_degrees = math.floor(math.atan(480/2 - y_pos, 480/2 - x_pos)*180/3.14159 - 90) │ + --print("handle_mousemove:", y_pos, x_pos, g_state.angle_degrees) │ + --draw.draw_state(g_state.ui, g_state) │ +end │ │ - local colour = colours[ (i-1) % #colours + 1] │ - print('draw: ', touch[1].y, touch[1].x) │ - alexgames.draw_circle(colour, colour, touch[1].y, touch[1].x, circle_radius) │ - for i=2,#touch do │ - local pt1 = touch[i-1] │ - local pt2 = touch[i] │ - alexgames.draw_line(colour, touch_line_width, pt1.y, pt1.x, pt2.y, pt2.x) │ - end │ - touch_idx = touch_idx + 1 │ - end │ │ - if last_touch_str ~= nil then │ - alexgames.draw_text('last: ' .. last_touch_str, '#000000', board_height - text_size - padding, padding, text_size, 1) │ +function handle_key_evt(evt_id, code) │ + local player_state = g_state.game.players[1] │ + local handled = key_input.handle_key_evt(g_state.keyboard, player_state, evt_id, code) │ + if handled then │ + draw.draw_state(g_state.game, g_state.ui) │ end │ + return handled │ end │ │ -function handle_touch_evt(evt_id, changed_touches) │ - for _, touch in ipairs(changed_touches) do │ - if evt_id == 'touchstart' then │ - touch_count = touch_count + 1 │ - touches[touch.id] = {} │ - end │ - if evt_id == 'touchstart' or │ - evt_id == 'touchmove' then │ - print(evt_id, touch.y, touch.x) │ - table.insert(touches[touch.id], { y = math.floor(touch.y), x = math.floor(touch.x) }) │ - end │ +function handle_touch_evt(evt_id, touches) │ + local player_state = g_state.game.players[1] │ │ - if evt_id == 'touchend' or │ - evt_id == 'touchcancel' then │ - touch_count = touch_count - 1 │ - touches[touch.id] = nil │ + local actions = draw.handle_touch_evts(g_state.ui, evt_id, touches) │ + │ + for _, action in ipairs(actions) do │ + if action.action == draw.ACTION_PLAYER_VEC_CHANGED then │ + local vec = action.player_vec │ + player_state.angle_degrees = math.atan(-vec.y, -vec.x) * 180 / math.pi - 90 │ + player_state.thrust_on = (vec.y ~= 0 and vec.x ~= 0) │ end │ end │ - update() │ end │ │ -alexgames.enable_evt('touch') │ +-- In this game, it doesn't really make sense to save the state. │ +-- Well, ideally I'd implement some way to share your best times... maybe in │ +-- a future update. │ +function get_state() │ + return nil │ +end │ + │ +function start_game() │ + alexgames.enable_evt("mouse_move") │ + alexgames.enable_evt("key") │ + alexgames.enable_evt("touch") │ + alexgames.set_timer_update_ms(TIME_PER_FRAME_MS) │ +end │ local core = {} │ │ local NUM_STARS = 5*5*50 │ local NUM_WALLS = 50 │ local MIN_WALL_Y = 0 │ local MAX_WALL_Y = 480 │ local WALL_Y_SIZE = 170 │ @@ -2528,1761 +1645,1363 @@ │ -- print(string.format("update_state{y=%s, x=%s, angle=%s, vel_y=%s, vel_x=%s}", │ -- state.y, state.x, state.angle_degrees, state.vel_y, state.vel_x)) │ end │ │ │ │ return core │ -local input = {} │ +local draw = {} │ +local alexgames = require("alexgames") │ +local draw_shapes = require("libs/draw/draw_shapes") │ │ -local need_to_rotate_enabled = true │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ │ -function input.new_input_state() │ - return { │ - rot_left = false, │ - rot_right = false, │ +local OUTLINE_COLOUR = '#000000' │ +local OUTLINE_WIDTH = 3 │ +local HIGHLIGHT_OUTLINE_WIDTH = 5 │ +local HIGHLIGHT_COLOUR = '#ffff0066' │ +local HIGHLIGHT_OUTLINE_COLOUR = '#ffff00' │ +local COLOUR_MAP = { │ + '#ff0000', │ + '#00ff00', │ + '#0000ff', │ + '#ffff00', │ + '#00ffff', │ + '#ff00ff', │ + '#ffffff', │ + '#ff8800', │ + '#ff0088', │ + '#ff8888', │ + '#00ff88', │ + '#88ff00', │ + '#88ff88', │ + '#0088ff', │ + '#8800ff', │ + '#8888ff', │ + '#888888', │ +} │ │ - thrust_left = false, │ - thrust_right = false, │ - thrust_up = false, │ - thrust_down = false, │ - } │ -end │ +local board_width = 480 │ +local board_height = 480 │ │ -function input.handle_key_evt(input_state, player_state, evt_id, code) │ - --print(string.format("handle_key_evt, code=%s, evt=%s", code, evt_id)) │ - if need_to_rotate_enabled then │ - if code == "ArrowLeft" then │ - player_state.rot_left = (evt_id == "keydown") │ - elseif code == "ArrowRight" then │ - player_state.rot_right = (evt_id == "keydown") │ - elseif code == "ArrowUp" then │ - player_state.thrust_on = (evt_id == "keydown") │ - elseif code == "ArrowDown" then │ - player_state.brake_on = (evt_id == "keydown") │ - else │ - return false │ - end │ - return true │ - else │ - if code == "ArrowLeft" then │ - input_state.thrust_left = (evt_id == "keydown") │ - elseif code == "ArrowRight" then │ - input_state.thrust_right = (evt_id == "keydown") │ - elseif code == "ArrowUp" then │ - input_state.thrust_up = (evt_id == "keydown") │ - elseif code == "ArrowDown" then │ - input_state.thrust_down = (evt_id == "keydown") │ - else │ - return false │ - end │ +local vial_padding = 15 │ │ - local thrust_vec_y = 0 │ - local thrust_vec_x = 0 │ +draw.BTN_ID_UNDO = "btn_undo" │ +draw.BTN_ID_REDO = "btn_redo" │ │ - if input_state.thrust_left and input_state.thrust_right then │ - -- pass │ - elseif input_state.thrust_left then │ - thrust_vec_x = 1 │ - elseif input_state.thrust_right then │ - thrust_vec_x = -1 │ - end │ +local anim_state = draw_celebration_anim.new_state({ │ +}) │ +-- TODO this probably should be included in the anim state? │ +-- Perhaps as an option, for games that don't otherwise require a timer │ +local g_victory_anim_timer = nil │ │ - if input_state.thrust_up and input_state.thrust_down then │ - -- pass │ - elseif input_state.thrust_up then │ - thrust_vec_y = 1 │ - elseif input_state.thrust_down then │ - thrust_vec_y = -1 │ - end │ │ - if thrust_vec_y ~= 0 or thrust_vec_x ~= 0 then │ - player_state.angle_degrees = math.atan(thrust_vec_y, thrust_vec_x) * 180 / math.pi - 90 │ - player_state.thrust_on = true │ - else │ - player_state.thrust_on = false │ - end │ - return true │ - end │ +function draw.init() │ + alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ + alexgames.create_btn(draw.BTN_ID_REDO, "Redo", 1) │ end │ │ -return input │ ---[[ │ +function draw.new_state() │ + return { │ + selected = nil │ + } │ +end │ │ -TODO: │ -* add a button to do a speed boost, or to increase the "max allowed speed" │ -* implement touch support with a joystick like the hospital game │ -* maybe implement mouse support? │ +local function get_size_params(state, num_rows) │ + local vials_per_row = math.ceil(#state.vials/num_rows) │ + local vial_width = math.floor((board_width - (vials_per_row+1) * vial_padding)/vials_per_row) │ + local vial_height = math.floor(board_height/num_rows) - 2*vial_padding │ │ -* bug with checkpoints: I've missed a few sometimes. Need to draw them as lines on the screen, │ - higlight the next one, and make it change colour once passed through │ + print(string.format("width: %s, height: %s", vial_width, vial_height)) │ │ ---]] │ -local core = require("games/thrust/thrust_core") │ -local draw = require("games/thrust/thrust_draw") │ -local key_input = require("games/thrust/thrust_keyboard_input") │ + return { │ + vials_per_row = vials_per_row, │ + width = vial_width, │ + height = vial_height, │ + } │ +end │ │ -local alexgames = require("alexgames") │ +local function get_vial_params(params, i) │ + local vial_y_idx = math.floor((i-1)/params.vials_per_row) │ + local vial_x_idx = (i-1) % params.vials_per_row │ │ + return { │ + y_start = (params.height + vial_padding) * vial_y_idx + vial_padding, │ + x_start = (params.width + vial_padding) * vial_x_idx + vial_padding, │ + y_end = (params.height + vial_padding) * (vial_y_idx+1), │ + x_end = (params.width + vial_padding) * (vial_x_idx+1), │ + } │ +end │ │ ---local FPS = 60 │ -local FPS = 50 │ -local TIME_PER_FRAME_MS = math.floor(1000/FPS) │ +local function get_num_rows(vial_count) │ + return 2 │ +end │ │ -local g_state = { │ - ui = draw.init(), │ - game = core.new_game_state(1), │ - keyboard = key_input.new_input_state(), │ -} │ +function draw.update_state(draw_state, dt_ms) │ + draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ +end │ │ +function draw.draw_state(session_id, state, draw_state) │ + alexgames.draw_clear() │ │ -function update(dt_ms) │ - --core.update_state(g_state.game, TIME_PER_FRAME_MS/1000.0) │ - core.update_state(g_state.game, dt_ms/1000.0) │ - draw.draw_state(g_state.game, g_state.ui) │ -end │ + local num_rows = get_num_rows(#state.vials) │ + local params = get_size_params(state, num_rows) │ │ -function handle_mousemove(y_pos, x_pos) │ - --g_state.angle_degrees = math.floor(math.atan(480/2 - y_pos, 480/2 - x_pos)*180/3.14159 - 90) │ - --print("handle_mousemove:", y_pos, x_pos, g_state.angle_degrees) │ - --draw.draw_state(g_state.ui, g_state) │ -end │ + for vial_idx, vial in ipairs(state.vials) do │ + local vial_params = get_vial_params(params, vial_idx) │ │ + draw_shapes.draw_rect_outline(OUTLINE_COLOUR, OUTLINE_WIDTH, │ + vial_params.y_start, vial_params.x_start, │ + vial_params.y_end, vial_params.x_end) │ │ -function handle_key_evt(evt_id, code) │ - local player_state = g_state.game.players[1] │ - local handled = key_input.handle_key_evt(g_state.keyboard, player_state, evt_id, code) │ - if handled then │ - draw.draw_state(g_state.game, g_state.ui) │ + for seg_idx, colour_idx in ipairs(vial) do │ + if colour_idx == 0 then │ + goto draw_highlight │ + end │ + local colour = COLOUR_MAP[colour_idx] │ + if colour == nil then │ + error(string.format("could not resolve colour idx %s", colour_idx)) │ + end │ + seg_idx = state.num_segments - seg_idx + 1 │ + alexgames.draw_rect(colour, │ + vial_params.y_start + (seg_idx-1)*params.height/state.num_segments, vial_params.x_start, │ + vial_params.y_start + (seg_idx)*params.height/state.num_segments, vial_params.x_end) │ + alexgames.draw_text(string.format("%d", colour_idx), OUTLINE_COLOUR, │ + vial_params.y_start + params.height/2/state.num_segments + (seg_idx-1)*params.height/state.num_segments, │ + vial_params.x_start + params.width/2, │ + 12, alexgames.TEXT_ALIGN_CENTRE) │ + end │ + ::draw_highlight:: │ + if vial_idx == draw_state.selected then │ + alexgames.draw_rect(HIGHLIGHT_COLOUR, │ + vial_params.y_start, vial_params.x_start, │ + vial_params.y_end, vial_params.x_end) │ + draw_shapes.draw_rect_outline(HIGHLIGHT_OUTLINE_COLOUR, HIGHLIGHT_OUTLINE_WIDTH, │ + vial_params.y_start, vial_params.x_start, │ + vial_params.y_end, vial_params.x_end) │ + end │ end │ - return handled │ -end │ + │ + draw_celebration_anim.draw(anim_state) │ + alexgames.draw_refresh() │ │ -function handle_touch_evt(evt_id, touches) │ - local player_state = g_state.game.players[1] │ + alexgames.set_btn_enabled(draw.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ + alexgames.set_btn_enabled(draw.BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ +end │ │ - local actions = draw.handle_touch_evts(g_state.ui, evt_id, touches) │ +function draw.coords_to_vial_idx(state, pos_y, pos_x) │ + local num_rows = get_num_rows(#state.vials) │ + local params = get_size_params(state, num_rows) │ │ - for _, action in ipairs(actions) do │ - if action.action == draw.ACTION_PLAYER_VEC_CHANGED then │ - local vec = action.player_vec │ - player_state.angle_degrees = math.atan(-vec.y, -vec.x) * 180 / math.pi - 90 │ - player_state.thrust_on = (vec.y ~= 0 and vec.x ~= 0) │ + for vial_idx, _ in ipairs(state.vials) do │ + local vial_params = get_vial_params(params, vial_idx) │ + if vial_params.y_start <= pos_y and pos_y <= vial_params.y_end and │ + vial_params.x_start <= pos_x and pos_x <= vial_params.x_end then │ + return vial_idx │ end │ end │ end │ │ --- In this game, it doesn't really make sense to save the state. │ --- Well, ideally I'd implement some way to share your best times... maybe in │ --- a future update. │ -function get_state() │ - return nil │ +function draw.handle_user_clicked(state, draw_state, pos_y, pos_x) │ + local vial_idx = draw.coords_to_vial_idx(state, pos_y, pos_x) │ + if vial_idx == nil then return end │ + if draw_state.selected == nil then │ + draw_state.selected = vial_idx │ + else │ + local to_return = { │ + src = draw_state.selected, │ + dst = vial_idx, │ + } │ + draw_state.selected = nil │ + return to_return │ + end │ end │ │ -function start_game() │ - alexgames.enable_evt("mouse_move") │ - alexgames.enable_evt("key") │ - alexgames.enable_evt("touch") │ - alexgames.set_timer_update_ms(TIME_PER_FRAME_MS) │ +function draw.trigger_win_anim(draw_state, fps) │ + print("setting timer") │ + if g_victory_anim_timer ~= nil then │ + error(string.format("victory_animation: anim_timer is not nil")) │ + end │ + g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ + draw_celebration_anim.fireworks_display(anim_state, { │ + colour_pref = "light", │ + on_finish = function () │ + if g_victory_anim_timer == nil then │ + alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ + else │ + alexgames.delete_timer(g_victory_anim_timer) │ + g_victory_anim_timer = nil │ + end │ + --print("animation finished! Resuming timer") │ + --alexgames.set_timer_update_ms(0) │ + --alexgames.set_timer_update_ms(1000/60) │ + end, │ + }) │ end │ │ -local draw = {} │ -local alexgames = require("alexgames") │ -local touchpad = require("libs/ui/touchpad") │ -local core = require("games/thrust/thrust_core") │ - │ -draw.ACTION_PLAYER_VEC_CHANGED = 1 │ - │ - │ - │ -local BG_COLOUR = '#000000' │ -local THRUST_COLOUR = '#ff8800' │ -local THRUST_COLOUR_OUTLINE = '#ffff00' │ -local STAR_COLOUR = '#ffffff' │ -local WALL_COLOUR = '#ff0000' │ -local height = 480 │ -local width = 480 │ +return draw │ +local core = {} │ │ -local WALL_THICKNESS = 5 │ -local CHECKPOINT_WALL_COLOUR_UNMET = '#00ff0077' │ -local CHECKPOINT_WALL_COLOUR_MET = '#00880077' │ -local CHECKPOINT_THICKNESS_MET = 1 │ -local CHECKPOINT_THICKNESS_UNMET = 2 │ +local shuffle = require("libs/shuffle") │ │ -local TEXT_COLOUR = '#aaaaaa' │ -local TEXT_SIZE = 24 │ -local TEXT_PADDING = 3 │ +core.RC_SUCCESS = 0 │ +core.RC_INVALID_MOVE = 1 │ │ -local padding = 5 │ -local TOUCHPAD_RADIUS = 85 │ -local TOUCHPAD_POS = { │ - y = height - TOUCHPAD_RADIUS - padding, │ - x = width - TOUCHPAD_RADIUS - padding, │ -} │ +function core.new_state(num_colours, num_extra_vials, num_segments, params) │ + local seed_x, seed_y │ + if params and params.seed_x and params.seed_y then │ + seed_x, seed_y = math.randomseed(params.seed_x, params.seed_y) │ + else │ + seed_x, seed_y = math.randomseed() │ + end │ │ -local SHIP1 = "ship1" │ + local vials_and_segments_flat = {} │ + for color_idx=1,num_colours do │ + for seg=1,num_segments do │ + table.insert(vials_and_segments_flat, color_idx) │ + end │ + end │ │ -local ship_graphics = { │ - [SHIP1] = { img_id = "space_ship1", height = 150, width = 150 }, │ -} │ + shuffle.shuffle(vials_and_segments_flat) │ │ -local function game_pt_to_screen_pt(state, player_state, pt) │ - return { │ - y = math.floor(state.zoom * (pt.y - player_state.y) + height/2), │ - x = math.floor(state.zoom * (pt.x - player_state.x) + width/2), │ + local state = { │ + num_segments = num_segments, │ + vials = {}, │ + seed_x = seed_x, │ + seed_y = seed_y, │ } │ + local num_vials = num_colours + num_extra_vials │ + local i = 1 │ + for _=1,num_vials do │ + local vial = {} │ + for _=1,num_segments do │ + local val = 0 │ + if i <= #vials_and_segments_flat then │ + val = vials_and_segments_flat[i] │ + i = i + 1 │ + table.insert(vial, val) │ + end │ + end │ + table.insert(state.vials, vial) │ + end │ + │ + return state │ end │ │ -local function draw_walls(state, player_state) │ - for _, wall_info in ipairs(state.walls) do │ - --[[ │ - alexgames.draw_rect(WALL_COLOUR, │ - wall_info.y_start - state.y, wall_info.x_start - state.x, │ - wall_info.y_end - state.y, wall_info.x_end - state.x) │ - --]] │ - local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ - local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ - alexgames.draw_line(WALL_COLOUR, WALL_THICKNESS, │ - pt1.y, pt1.x, │ - pt2.y, pt2.x) │ - │ - end │ +function core.game_won(state) │ + for _, vial in ipairs(state.vials) do │ + if #vial == 0 then │ + goto next_vial │ + end │ │ - for checkpoint_idx, wall_info in ipairs(state.checkpoints) do │ - local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ - local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ - local colour │ - local thickness │ - if player_state.met_checkpoints[checkpoint_idx] then │ - colour = CHECKPOINT_WALL_COLOUR_MET │ - thickness = CHECKPOINT_THICKNESS_MET │ - else │ - colour = CHECKPOINT_WALL_COLOUR_UNMET │ - thickness = CHECKPOINT_THICKNESS_UNMET │ + if #vial ~= state.num_segments then │ + return false │ end │ - alexgames.draw_line(colour, thickness, │ - pt1.y, pt1.x, │ - pt2.y, pt2.x) │ - end │ │ - local wall_info = state.finish_line │ - local pt1 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_start, x = wall_info.x_start}) │ - local pt2 = game_pt_to_screen_pt(state, player_state, { y = wall_info.y_end, x = wall_info.x_end}) │ - if not core.met_all_checkpoints(player_state) then │ - colour = CHECKPOINT_WALL_COLOUR_MET │ - thickness = CHECKPOINT_THICKNESS_MET │ - else │ - colour = CHECKPOINT_WALL_COLOUR_UNMET │ - thickness = CHECKPOINT_THICKNESS_UNMET │ + for _, seg in ipairs(vial) do │ + if seg ~= vial[1] then │ + return false │ + end │ + end │ + │ + ::next_vial:: │ end │ - alexgames.draw_line(colour, thickness, │ - pt1.y, pt1.x, │ - pt2.y, pt2.x) │ │ + return true │ end │ │ -local function draw_ship(ship_type, state, player_state) │ - --print(string.format("ship_type=%s, y=%s, x=%s, angle=%s", ship_type, y, x, angle)) │ - local ship_img_info = ship_graphics[ship_type] │ - │ - local thrust_offset = 20 │ - local thrust_len = 20 │ - local thrust_width = 5 │ - local thrust_angle = player_state.angle_degrees/180*math.pi │ +local function get_same_segs_count(state, idx) │ + local vial = state.vials[idx] │ │ - local thrust_radius = 10 │ + if #vial == 0 then return 0 end │ │ - local y_pos = height/2 │ - local x_pos = width/2 │ + local colour = vial[#vial] │ + local seg_idx = 1 │ + while vial[#vial-seg_idx+1] == colour do │ + if seg_idx == #vial then │ + return #vial │ + end │ + seg_idx = seg_idx + 1 │ + end │ │ + return seg_idx - 1 │ +end │ │ +function core.move(state, src, dst) │ + local src_vial = state.vials[src] │ + local dst_vial = state.vials[dst] │ │ - if player_state.thrust_on then │ - alexgames.draw_circle(THRUST_COLOUR, │ - THRUST_COLOUR_OUTLINE, │ - math.floor(y_pos + thrust_offset*math.cos(thrust_angle)), │ - math.floor(x_pos - thrust_offset*math.sin(thrust_angle)), │ - math.floor(state.zoom*thrust_radius)) │ - --[[ │ - local thrust_angle = player_state.angle_degrees/180*math.pi │ - alexgames.draw_rect(THRUST_COLOUR, │ - math.floor(player_state.y + thrust_offset*math.cos(thrust_angle)), │ - math.floor(player_state.x - thrust_width*math.sin(thrust_angle)), │ - math.floor(player_state.y + (thrust_offset+thrust_len)*math.cos(thrust_angle)), │ - math.floor(player_state.x + thrust_width*math.sin(thrust_angle))) │ - --]] │ + if #src_vial == 0 then │ + return core.RC_INVALID_MOVE │ end │ │ - alexgames.draw_graphic(ship_img_info.img_id, │ - math.floor(y_pos), │ - math.floor(x_pos), │ - math.floor(state.zoom*ship_img_info.height), │ - math.floor(state.zoom*ship_img_info.width), { │ - -- anchor_centre = true, -- TODO this should be the default, I think... │ - angle_degrees = math.floor(player_state.angle_degrees), │ - }) │ - --[[ │ - alexgames.draw_rect('#ffffff', y - ship_img_info.height/2, │ - x - ship_img_info.width/2, │ - y - ship_img_info.height/2 + ship_img_info.height, │ - x - ship_img_info.width/2 + ship_img_info.width) │ - --]] │ - │ -end │ │ -local function draw_stars_bg(state, player_state, star_move_fact) │ - star_move_fact = star_move_fact / state.zoom │ - for _, star in ipairs(state.stars) do │ - alexgames.draw_circle(STAR_COLOUR, STAR_COLOUR, │ - math.floor(star.y - player_state.y/star_move_fact), math.floor(star.x - player_state.x/star_move_fact), │ - 1) │ + if state.num_segments - #dst_vial < get_same_segs_count(state, src) then │ + return core.RC_INVALID_MOVE │ end │ -end │ │ -local function format_time(time_ms) │ - local milliseconds = (time_ms % 1000) │ - local seconds = math.floor(time_ms/1000) │ - local minutes = math.floor(seconds/60) │ - seconds = seconds % 60 │ + if #dst_vial > 0 and dst_vial[#dst_vial] ~= src_vial[#src_vial] then │ + return core.RC_INVALID_MOVE │ + end │ │ - return string.format("%2d:%02d.%03d", minutes, seconds, milliseconds) │ -end │ + if src == dst then │ + return core.RC_INVALID_MOVE │ + end │ │ -function draw.init() │ - return { │ - touchpad = touchpad.new_state(TOUCHPAD_POS, TOUCHPAD_RADIUS), │ - } │ + local colour = src_vial[#src_vial] │ + while src_vial[#src_vial] == colour do │ + local val = table.remove(src_vial, #src_vial) │ + table.insert(dst_vial, val) │ + end │ end │ │ -function draw.draw_state(state, ui_state) │ - alexgames.draw_clear() │ - alexgames.draw_rect(BG_COLOUR, 0, 0, height, width) │ - draw_stars_bg(state, state.players[1], 3) │ - draw_walls(state, state.players[1]) │ - draw_ship(SHIP1, state, state.players[1]) │ +return core │ +local serialize = {} │ │ - alexgames.draw_text(format_time(state.players[1].lap_time_ms), TEXT_COLOUR, │ - TEXT_SIZE + TEXT_PADDING, TEXT_PADDING, TEXT_SIZE, 1) │ +local serialize_lib = require("libs/serialize/serialize") │ │ - for lap_idx, lap_time in ipairs(state.players[1].lap_times) do │ - local text = string.format('%d:%s', lap_idx, format_time(lap_time)) │ - alexgames.draw_text(text, TEXT_COLOUR, │ - lap_idx*(TEXT_SIZE + TEXT_PADDING), │ - width - TEXT_PADDING, │ - TEXT_SIZE, -1) │ - end │ +serialize.VERSION = 2 │ │ - alexgames.draw_graphic("hospital_ui_dirpad", │ - ui_state.touchpad.pos.y, │ - ui_state.touchpad.pos.x, │ - 2*ui_state.touchpad.radius, │ - 2*ui_state.touchpad.radius) │ +function serialize.serialize(state) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ + output = output .. serialize_lib.serialize_byte(state.num_segments) │ + output = output .. serialize_lib.serialize_byte(#state.vials) │ + for _, vial in ipairs(state.vials) do │ + output = output .. serialize_lib.serialize_byte(#vial) │ + for _, seg_val in ipairs(vial) do │ + output = output .. serialize_lib.serialize_byte(seg_val) │ + end │ + end │ + output = output .. serialize_lib.serialize_u64(state.seed_x) │ + output = output .. serialize_lib.serialize_u64(state.seed_y) │ │ - alexgames.draw_refresh() │ + return output │ end │ │ -function draw.handle_touch_evts(ui_state, evt_id, touches) │ - local actions = {} │ +function serialize.deserialize(bytes) │ + local state = {} │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + local version │ + -- version 1, I didn't have a version number for this one, │ + -- and had 14 vials with... 4 segments each and 3 empty ones │ + -- TODO remove this, there is probably some combination of parameters │ + -- where versions > 1 can have the same number of bytes │ + if #bytes == 2 + 14 + (14-3)*4 + 4*2 then │ + version = 1 │ + else │ + version = serialize_lib.deserialize_byte(bytes) │ + if version ~= serialize.VERSION then │ + error(string.format("Unhandled fluid_mix serialized state version %d", version)) │ + end │ + end │ + state.num_segments = serialize_lib.deserialize_byte(bytes) │ + state.vials = {} │ + local vial_count = serialize_lib.deserialize_byte(bytes) │ + for _=1,vial_count do │ + local segs_in_vial = serialize_lib.deserialize_byte(bytes) │ + local vial = {} │ + for _=1,segs_in_vial do │ + table.insert(vial, serialize_lib.deserialize_byte(bytes)) │ + end │ + table.insert(state.vials, vial) │ + end │ │ - local player_vec = touchpad.handle_touch_evts(ui_state.touchpad, evt_id, touches) │ - if player_vec ~= nil then │ - table.insert(actions, { │ - action = draw.ACTION_PLAYER_VEC_CHANGED, │ - player_vec = player_vec, │ - }) │ + if version == 1 then │ + -- This is what I did before, but it's wrong-- on wxWidgets at least, │ + -- the seed can be greater than 32 bits │ + state.seed_x = serialize_lib.deserialize_s32(bytes) │ + state.seed_y = serialize_lib.deserialize_s32(bytes) │ + elseif version == serialize.VERSION then │ + state.seed_x = serialize_lib.deserialize_u64(bytes) │ + state.seed_y = serialize_lib.deserialize_u64(bytes) │ end │ - │ - return actions │ -end │ │ -return draw │ --- Game: Chess │ --- Author: Alex Barry (github.com/alexbarry) │ + assert(#bytes == 0) │ │ -local draw = {} │ + return state │ +end │ │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ -local draw_shapes = require("libs/draw/draw_shapes") │ -local draw_colours = require("libs/draw/draw_colours") │ +return serialize │ │ -local core = require("games/chess/chess_core") │ +local core = require("games/fluid_mix/fluid_mix_core") │ +local draw = require("games/fluid_mix/fluid_mix_draw") │ +local serialize = require("games/fluid_mix/fluid_mix_serialize") │ │ +local alexgames = require("alexgames") │ │ -local board_height = nil │ -local board_width = nil │ -local show_labels = nil │ │ -local OUTLINE_WIDTH = 4 │ -local cell_size = nil │ -local piece_padding = 0 │ -local border_padding = 20 │ +local g_session_id = nil │ +local g_state = nil │ +local draw_state = draw.new_state() │ +local vial_selected = nil │ +local g_win_anim_shown = nil │ │ -local LABEL_COLOUR = '#000000' │ -local LABEL_FONT_SIZE = 12 │ --- the number of pixels taken up by the parts of a letter that are drawn below the line, like the "tail" of the letter "g" │ -local text_y_buffer = 4 │ +local BTN_ID_NEW_GAME = "btn_new_game" │ +draw.init() │ │ ---local CELL_COLOUR_WHITE = '#ffffff' │ ---local CELL_COLOUR_WHITE = '#dc802f' │ ---local CELL_COLOUR_BLACK = '#000000' │ -local CELL_COLOUR_WHITE = '#ffce9e' │ -local CELL_COLOUR_BLACK = '#d18b47' │ -local PIECE_SEL_HIGHLIGHT_OUTLINE = draw_colours.ALT_HIGHLIGHT_OUTLINE │ -local PIECE_SEL_HIGHLIGHT_COLOUR = draw_colours.ALT_HIGHLIGHT_FILL │ +alexgames.add_game_option(BTN_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ │ -local PIECE_SEL_HIGHLIGHT_OUTLINE_REMOTE = draw_colours.ALT_HIGHLIGHT_OUTLINE_REMOTE │ -local PIECE_SEL_HIGHLIGHT_COLOUR_REMOTE = draw_colours.ALT_HIGHLIGHT_FILL_REMOTE │ │ -local function get_cell_colour_white() │ - if alexgames.get_user_colour_pref() == "very_dark" then │ - return '#352215cc' │ - elseif alexgames.get_user_colour_pref() == "dark" then │ - return '#453225' │ - else │ - return CELL_COLOUR_WHITE │ +function update(dt_ms) │ + if g_state == nil then return end │ + if dt_ms ~= nil then │ + draw.update_state(draw_state, dt_ms) │ end │ + draw.draw_state(g_session_id, g_state, draw_state) │ end │ │ -local function get_cell_colour_black() │ - if alexgames.get_user_colour_pref() == "very_dark" then │ - return '#201000cc' │ - elseif alexgames.get_user_colour_pref() == "dark" then │ - return '#302005' │ - else │ - return CELL_COLOUR_BLACK │ - end │ +local function save_state() │ + local state_serialized = serialize.serialize(g_state) │ + alexgames.save_state(g_session_id, state_serialized) │ end │ -local DST_HIGHLIGHT_OUTLINE = draw_colours.HIGHLIGHT_OUTLINE │ -local DST_HIGHLIGHT_COLOUR = draw_colours.HIGHLIGHT_FILL │ -local DST_HIGHLIGHT_OUTLINE_REMOTE = draw_colours.HIGHLIGHT_OUTLINE_REMOTE │ -local DST_HIGHLIGHT_COLOUR_REMOTE = draw_colours.HIGHLIGHT_FILL_REMOTE │ - │ -function draw.init(height, width, show_labels_arg) │ - board_height = height │ - board_width = width │ │ - show_labels = show_labels_arg │ - if not show_labels then │ - border_padding = 0 │ +function handle_user_clicked(pos_y, pos_x) │ + local move = draw.handle_user_clicked(g_state, draw_state, pos_y, pos_x) │ + if move ~= nil then │ + local rc = core.move(g_state, move.src, move.dst) │ + save_state() │ end │ - │ - cell_size = math.floor((math.min(board_height, board_width) - 2*border_padding) / core.BOARD_SIZE) │ + if core.game_won(g_state) and not g_win_anim_shown then │ + alexgames.set_status_msg("Congratulations, you win!") │ + g_win_anim_shown = true │ + draw.trigger_win_anim(draw_state, 60) │ + end │ + draw.draw_state(g_session_id, g_state, draw_state) │ end │ │ -local function is_cell_white(y, x) │ - return (y*(core.BOARD_SIZE+1) + x) % 2 ~= 0 │ +function load_state_offset(move_offset) │ + local state_serialized = alexgames.adjust_saved_state_offset(g_session_id, move_offset) │ + g_state = serialize.deserialize(state_serialized) │ + g_win_anim_shown = false │ + update() │ end │ │ -local function get_piece_graphic_id(player, piece_type, params) │ - if params == nil then params = {} end │ - │ - if player == core.PLAYER_BLACK then │ - if params.is_dark then │ - if piece_type == core.PIECE_ROOK then return 'chess_rook_black_dark' │ - elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_black_dark' │ - elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_black_dark' │ - elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_black_dark' │ - elseif piece_type == core.PIECE_KING then return 'chess_king_black_dark' │ - elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_black_dark' │ - else │ - error(string.format("Unexpected piece_type: %s", piece_type)) │ - end │ - else │ - if piece_type == core.PIECE_ROOK then return 'chess_rook_black' │ - elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_black' │ - elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_black' │ - elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_black' │ - elseif piece_type == core.PIECE_KING then return 'chess_king_black' │ - elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_black' │ - else │ - error(string.format("Unexpected piece_type: %s", piece_type)) │ - end │ - end │ - elseif player == core.PLAYER_WHITE then │ - if piece_type == core.PIECE_ROOK then return 'chess_rook_white' │ - elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_white' │ - elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_white' │ - elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_white' │ - elseif piece_type == core.PIECE_KING then return 'chess_king_white' │ - elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_white' │ - else │ - error(string.format("Unexpected piece_type: %s", piece_type)) │ - end │ +function handle_btn_clicked(btn_id) │ + if btn_id == draw.BTN_ID_UNDO then │ + load_state_offset(-1) │ + elseif btn_id == draw.BTN_ID_REDO then │ + load_state_offset(1) │ else │ - error(string.format("Unexpected player: %s", player)) │ + error(string.format("Unhandled btn_id %s", btn_id)) │ end │ end │ │ -function draw.draw_coords_to_cell(y, x) │ - y = y - border_padding │ - x = x - border_padding │ - local y_idx = math.floor(y/cell_size)+1 │ - local x_idx = math.floor(x/cell_size)+1 │ - │ - if 1 <= x_idx and x_idx <= core.BOARD_SIZE and │ - 1 <= y_idx and y_idx <= core.BOARD_SIZE then │ - return { y=y_idx, x=x_idx } │ +function handle_game_option_evt(option_id) │ + if option_id == BTN_ID_NEW_GAME then │ + g_session_id = alexgames.get_new_session_id() │ + g_state = core.new_state(11, 3, 4) │ + g_win_anim_shown = false │ + save_state() │ + update() │ else │ - return nil │ + error(string.format("Unhandled game option evt id=%s", option_id)) │ end │ end │ │ -function draw_rect_at_pos(colour, outline_colour, y, x) │ - cell_start_y = border_padding + (y-1)*cell_size │ - cell_start_x = border_padding + (x-1)*cell_size │ - │ - cell_end_y = border_padding + (y )*cell_size │ - cell_end_x = border_padding + (x )*cell_size │ - alexgames.draw_rect(colour, │ - cell_start_y, cell_start_x, │ - cell_end_y , cell_end_x) │ - if outline_colour then │ - draw_shapes.draw_rect_outline(outline_colour, OUTLINE_WIDTH, │ - cell_start_y, cell_start_x, │ - cell_end_y , cell_end_x) │ +function start_game(session_id, state_serialized) │ + g_win_anim_shown = false │ + if state_serialized ~= nil then │ + g_session_id = session_id │ + g_state = serialize.deserialize(state_serialized) │ + update() │ + else │ + local prev_session_id = alexgames.get_last_session_id() │ + print(string.format("Read previous session ID %s", prev_session_id)) │ + if prev_session_id ~= nil then │ + g_session_id = prev_session_id │ + state_serialized = alexgames.adjust_saved_state_offset(g_session_id, 0) │ + g_state = serialize.deserialize(state_serialized) │ + alexgames.set_status_msg(string.format("Loaded saved state from session %d", g_session_id)) │ + else │ + g_session_id = alexgames.get_new_session_id() │ + g_state = core.new_state(11, 3, 4) │ + end │ end │ end │ │ -local function get_col_label(col) │ - return string.char(string.byte('a') + col-1) │ +function get_state() │ + return serialize.serialize(g_state) │ end │ │ -local function get_row_label(row) │ - return string.format('%d', row) │ +function get_init_state() │ + local init_state = core.new_state(11, 3, 4, { seed_x = g_state.seed_x, g_state.seed_y }) │ + return serialize.serialize(init_state) │ end │ +local draw = {} │ +local core = require("games/checkers/checkers_core") │ +local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ │ -local function get_piece_brightness(player) │ - if alexgames.get_user_colour_pref() == "very_dark" then │ - return 35 │ - elseif alexgames.get_user_colour_pref() == "dark" then │ - return 50 │ - else │ - return 100 │ - end │ -end │ +local height = nil │ +local width = nil │ +local square_size = nil │ +local piece_radius = nil │ +local square_padding = 1 │ +local square_size_w_padding = nil │ +local offset_y = nil │ +local offset_x = nil │ │ -local function draw_piece_graphic(player, piece_type, pos_y, pos_x, size_y, size_x) │ - local img_id = get_piece_graphic_id(player, piece_type) │ - local brightness = get_piece_brightness(player) │ - local invert = false │ - │ - local brightness = get_piece_brightness(player) │ - local user_colour_pref = alexgames.get_user_colour_pref() │ - if user_colour_pref == "very_dark" or user_colour_pref == "dark" then │ - if player == core.PLAYER_BLACK then │ - img_id = get_piece_graphic_id(core.PLAYER_BLACK, piece_type, {is_dark = true}) │ - --img_id = get_piece_graphic_id(core.PLAYER_WHITE, piece_type) │ - -- invert = true -- originally I just inverted the white piece, but safari doesn't support that │ - brightness = 50 │ - end │ - end │ - draw_more.draw_graphic_ul(img_id, │ - pos_y, pos_x, │ - size_y, size_x, │ - { invert = invert, brightness_percent = brightness } ) │ -end │ │ +local SQUARE_BORDERS = '#aaaa55' │ +local SQUARE_BLACK = '#000000' │ +local SQUARE_RED = '#882222' │ +local SQUARE_BLACK_HIGHLIGHTED = '#555555' │ +local SQUARE_RED_HIGHLIGHTED = '#aa4444' │ │ -function draw.draw_state(state, params) │ - alexgames.draw_clear() │ - alexgames.draw_rect('#000000', 0, 0, board_height, board_width) │ - -- Draw checkerboard │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - local cell_colour │ - if is_cell_white(y,x) then │ - cell_colour = get_cell_colour_white() │ - else │ - cell_colour = get_cell_colour_black() │ - end │ - draw_rect_at_pos(cell_colour, nil, y, x) │ - end │ - end │ +local PIECE_BLACK = '#444444' │ +local PIECE_RED = '#aa2222' │ +-- local PIECE_OUTLINE = '#333333' │ +local PIECE_RED_OUTLINE = '#770000' │ +local PIECE_BLACK_OUTLINE = '#777777' │ │ - -- Add labels to rows and columns │ - if show_labels then │ - for _, y_pos in ipairs({border_padding-text_y_buffer, border_padding + core.BOARD_SIZE*cell_size+LABEL_FONT_SIZE}) do │ - for x=1,core.BOARD_SIZE do │ - local label = get_col_label(x) │ - alexgames.draw_text(label, LABEL_COLOUR, │ - y_pos, border_padding + math.floor(cell_size*(x-0.5)), │ - LABEL_FONT_SIZE, 0) │ - end │ - end │ +if alexgames.get_user_colour_pref() == "dark" then │ + SQUARE_BORDERS = '#666600' │ + SQUARE_BLACK = '#000000' │ + SQUARE_RED = '#220000' │ + SQUARE_BLACK_HIGHLIGHTED = '#555555' │ + SQUARE_RED_HIGHLIGHTED = '#aa4444' │ │ - for _, x_pos_info in ipairs({{pos = border_padding, align=-1}, {pos = board_width-border_padding, align=1}}) do │ - for y=1,core.BOARD_SIZE do │ - local label = get_row_label(y) │ - alexgames.draw_text(label, LABEL_COLOUR, │ - border_padding + math.floor(cell_size*(y-0.5)), x_pos_info.pos, │ - LABEL_FONT_SIZE, x_pos_info.align) │ - end │ - end │ - end │ + PIECE_BLACK = '#333333' │ + PIECE_RED = '#660000' │ + PIECE_RED_OUTLINE = '#770000' │ + PIECE_BLACK_OUTLINE = '#777777' │ +end │ │ - local highlight_colour = PIECE_SEL_HIGHLIGHT_COLOUR │ - local highlight_outline = PIECE_SEL_HIGHLIGHT_OUTLINE │ - local dst_highlight = DST_HIGHLIGHT_COLOUR │ - local dst_outline = DST_HIGHLIGHT_OUTLINE │ +function draw.init(height_arg, width_arg) │ + height = height_arg │ + width = width_arg │ + local board_square_count = math.min(core.BOARD_HEIGHT, core.BOARD_WIDTH) │ + square_size = math.floor((math.min(height,width) - (board_square_count+1)*square_padding)*1.0 / board_square_count) │ + square_size_w_padding = square_size + square_padding │ + piece_radius = math.floor(square_size*0.8/2) │ │ - if not params.local_multiplayer and params.player ~= state.player_turn then │ - highlight_colour = PIECE_SEL_HIGHLIGHT_COLOUR_REMOTE │ - highlight_outline = PIECE_SEL_HIGHLIGHT_OUTLINE_REMOTE │ - dst_highlight = DST_HIGHLIGHT_COLOUR_REMOTE │ - dst_outline = DST_HIGHLIGHT_OUTLINE_REMOTE │ - end │ + offset_y = math.floor((height - (core.BOARD_HEIGHT+1)*square_padding - core.BOARD_HEIGHT*square_size)/2) │ + offset_x = math.floor((width - (core.BOARD_WIDTH +1)*square_padding - core.BOARD_WIDTH *square_size)/2) │ +end │ │ - -- If a cell is selected, highlight it │ - if state.selected ~= nil then │ - draw_rect_at_pos(highlight_colour, highlight_outline, state.selected.y, state.selected.x) │ - │ - -- Also highlight the possible moves that could be made by the selected piece │ - local possib_dsts = core.get_possib_dsts(state, state.selected) │ - for _, possib_dst in ipairs(possib_dsts) do │ - draw_rect_at_pos(dst_highlight, dst_outline, possib_dst.y, possib_dst.x) │ +local function get_colour_of_square(state, y, x) │ + local is_red = core.get_square_colour(y,x) │ + if state.selected_y == y and state.selected_x == x then │ + if is_red then │ + return SQUARE_RED_HIGHLIGHTED │ + else │ + return SQUARE_BLACK_HIGHLIGHTED │ end │ end │ + if is_red then │ + return SQUARE_RED │ + else │ + return SQUARE_BLACK │ + end │ +end │ │ - -- Finally, draw the pieces (on top of the highlights) │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - local piece_id = state.board[y][x] │ - local player = core.get_player(piece_id) │ - if piece_id ~= core.EMPTY_PIECE_ID then │ - local piece_type = core.get_piece_type(piece_id) │ +function draw.update(state) │ + --alexgames.draw_rect('#000000', 0, 0, height, width) │ + alexgames.draw_clear() │ + -- Why do I need to add another 2 pixels here?? Otherwise the gold edge is cutoff │ + alexgames.draw_rect(SQUARE_BORDERS, offset_y, offset_x, │ + math.ceil(core.BOARD_HEIGHT*square_size + (core.BOARD_HEIGHT+2)*square_padding) + 2, │ + math.ceil(core.BOARD_WIDTH*square_size + (core.BOARD_WIDTH +2)*square_padding) + 2) │ + for y=1,core.BOARD_HEIGHT do │ + for x=1,core.BOARD_WIDTH do │ + local colour = get_colour_of_square(state, y, x) │ + alexgames.draw_rect(colour, │ + offset_y + square_padding + (y-1)*square_size_w_padding, │ + offset_x + square_padding + (x-1)*square_size_w_padding, │ + offset_y + (y )*square_size_w_padding, │ + offset_x + (x )*square_size_w_padding) │ │ - local piece_pos_y = border_padding + (y-1)*cell_size + piece_padding │ - local piece_pos_x = border_padding + (x-1)*cell_size + piece_padding │ - local piece_size_y = cell_size - 2*piece_padding │ - local piece_size_x = cell_size - 2*piece_padding │ + local piece = state.board[y][x] │ + local piece_colour = nil │ + local piece_outline_colour = nil │ + if core.piece_to_player(piece) == core.PLAYER1 then │ + piece_colour = PIECE_RED │ + piece_outline_colour = PIECE_RED_OUTLINE │ + elseif core.piece_to_player(piece) == core.PLAYER2 then │ + piece_colour = PIECE_BLACK │ + piece_outline_colour = PIECE_BLACK_OUTLINE │ + end │ │ - draw_piece_graphic(player, piece_type, │ - piece_pos_y, piece_pos_x, │ - piece_size_y, piece_size_x) │ + if piece_colour ~= nil then │ + local coord_y = offset_y + math.floor((y-1+0.5)*square_size_w_padding) │ + local coord_x = offset_x + math.floor((x-1+0.5)*square_size_w_padding) │ + alexgames.draw_circle(piece_colour, piece_outline_colour, │ + coord_y, │ + coord_x, │ + piece_radius) │ + if core.piece_is_king(piece) then │ + draw_more.draw_graphic_ul("piece_king_icon", │ + coord_y - piece_radius, │ + coord_x - piece_radius, │ + 2*piece_radius, │ + 2*piece_radius) │ + end │ end │ end │ end │ - │ alexgames.draw_refresh() │ end │ │ -return draw │ --- Game: Chess │ --- Author: Alex Barry (github.com/alexbarry) │ - │ -local core = {} │ - │ -core.BOARD_SIZE = 8 │ - │ -core.PLAYER_WHITE = 1 │ -core.PLAYER_BLACK = 2 │ -core.PIECE_COUNT = 2 │ - │ -core.PIECE_PAWN = 1 │ -core.PIECE_ROOK = 2 │ -core.PIECE_KNIGHT = 3 │ -core.PIECE_BISHOP = 4 │ -core.PIECE_QUEEN = 5 │ -core.PIECE_KING = 6 │ -core.PIECE_TYPE_COUNT = core.PIECE_KING │ - │ -core.EMPTY_PIECE_ID = 0 │ - │ -core.GAME_STATUS_NORMAL = 1 │ -core.GAME_STATUS_CHECK = 2 │ -core.GAME_STATUS_CHECKMATE = 3 │ - │ -core.SUCCESS = 0 │ -core.NOT_YOUR_PIECE = 1 │ -core.NOT_YOUR_TURN = 2 │ -core.RC_CANT_MOVE_INTO_CHECK = 3 │ -core.RC_MUST_RESOLVE_CHECK = 4 │ -core.RC_GAME_OVER = 5 │ ---core.INVALID_MOVE = 2 │ - │ -local ERROR_CODE_MAP = { │ - [core.SUCCESS] = "Success", │ - [core.NOT_YOUR_PIECE] = "Not your piece", │ - [core.NOT_YOUR_TURN] = "Not your turn", │ - [core.RC_CANT_MOVE_INTO_CHECK] = "Can not move into check", │ - [core.RC_MUST_RESOLVE_CHECK] = "Must move out of check", │ - [core.RC_GAME_OVER] = "Game over!", │ -} │ - │ -function core.get_err_msg(rc) │ - return ERROR_CODE_MAP[rc] │ +function draw.coords_to_piece_idx(coord_y, coord_x) │ + local idx_y = math.floor((coord_y - offset_y - square_padding) / square_size_w_padding) + 1 │ + local idx_x = math.floor((coord_x - offset_x - square_padding) / square_size_w_padding) + 1 │ + return { y = idx_y, x = idx_x } │ end │ │ -function core.get_piece_id(player, piece_type) │ - return ((player - 1) * core.PIECE_TYPE_COUNT + (piece_type - 1)) + 1 │ -end │ +return draw │ +core = {} │ │ +core.BOARD_HEIGHT = 8 │ +core.BOARD_WIDTH = 8 │ │ +core.ROWS_OF_PIECES = 3 │ │ -function core.get_player(piece_id) │ - if piece_id == nil then error(string.format("core.get_player called with nil arg"), 2) end │ +core.EMPTY = 0 │ +core.PLAYER1 = 1 │ +core.PLAYER2 = 2 │ +core.PLAYER1_KING = 3 │ +core.PLAYER2_KING = 4 │ │ - if piece_id == core.EMPTY_PIECE_ID then return nil end │ - return math.floor((piece_id-1)/core.PIECE_TYPE_COUNT) + 1 │ -end │ +core.RC_SUCCESS = 0 │ +core.RC_NOT_YOUR_TURN = -1 │ +-- Can not move to this position │ +core.RC_INVALID_MOVE = -2 │ +core.RC_OCCUPIED = -3 │ +core.RC_NOT_YOUR_PIECE = -4 │ +core.RC_NO_PIECE_TO_SELECT = -5 │ +core.RC_MUST_JUMP_SELECTED = -6 │ +core.RC_MUST_JUMP = -7 │ +-- core.RC_UNSELECTED = -6 │ │ -local function get_other_player(player) │ - if player == core.PLAYER_BLACK then return core.PLAYER_WHITE │ - elseif player == core.PLAYER_WHITE then return core.PLAYER_BLACK │ +function core.player_id_to_name(id) │ + if id == nil then return nil │ + elseif id == core.PLAYER1 then return "red" │ + elseif id == core.PLAYER2 then return "black" │ else │ - error(string.format("unexpected player %s", player)) │ + error(string.format("Unexpected player id %q", id)) │ end │ end │ │ -local function coords_eq(a, b) │ - return a.y == b.y and a.x == b.x │ -end │ - │ +local dirs = { │ + { y = 1, x = 1}, │ + { y =-1, x = 1}, │ + { y =-1, x =-1}, │ + { y = 1, x =-1}, │ +} │ │ -function core.get_piece_type(piece_id) │ - return ((piece_id-1) % core.PIECE_TYPE_COUNT) + 1 │ +function core.rc_to_string(rc) │ + local rc_to_str_map = { │ + [core.RC_SUCCESS] = "Success", │ + [core.RC_NOT_YOUR_TURN] = "Not your turn", │ + [core.RC_INVALID_MOVE] = "Can not move to this position", │ + [core.RC_OCCUPIED] = "This position is occupied", │ + [core.RC_NOT_YOUR_PIECE] = "This piece is not controlled by you", │ + [core.RC_NO_PIECE_TO_SELECT] = "Must select a piece to move", │ + [core.RC_MUST_JUMP_SELECTED] = "Must jump with currently selected piece", │ + [core.RC_MUST_JUMP] = "You have at least one jump available, so you must jump", │ + } │ + return rc_to_str_map[rc] │ end │ │ -local function get_player_pawn_row(player) │ - if player == core.PLAYER_WHITE then return 7 │ - elseif player == core.PLAYER_BLACK then return 2 end │ +local function new_2d_array(height, width, default_val) │ + local ary = {} │ + for y=1,height do │ + ary[y] = {} │ + for x=1,width do │ + ary[y][x] = default_val │ + end │ + end │ + return ary │ end │ │ -function core.new_game() │ - local state = { │ - player_turn = core.PLAYER_WHITE, │ - board = {}, │ - selected = nil │ +function core.default_game_settings() │ + return { │ + must_jump_when_able = true, │ } │ +end │ │ - for y=1,core.BOARD_SIZE do │ - state.board[y] = {} │ - for x=1,core.BOARD_SIZE do │ - state.board[y][x] = core.EMPTY_PIECE_ID │ - end │ +function core.new_state(game_settings) │ + if game_settings == nil then │ + game_settings = core.default_game_settings() │ end │ - │ - for x=1,core.BOARD_SIZE do │ - state.board[7][x] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_PAWN) │ + local board = new_2d_array(core.BOARD_HEIGHT, core.BOARD_WIDTH, 0) │ + for y=1,core.ROWS_OF_PIECES do │ + local x_start │ + if y % 2 == 1 then │ + x_start = 1 │ + else │ + x_start = 2 │ + end │ + for x=x_start,8,2 do │ + board[y][x] = core.PLAYER1 │ + end │ end │ - state.board[8][1] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_ROOK) │ - state.board[8][2] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KNIGHT) │ - state.board[8][3] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_BISHOP) │ - state.board[8][4] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_QUEEN) │ - state.board[8][5] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KING) │ - state.board[8][6] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_BISHOP) │ - state.board[8][7] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KNIGHT) │ - state.board[8][8] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_ROOK) │ │ - for x=1,core.BOARD_SIZE do │ - state.board[2][x] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_PAWN) │ + for y=core.BOARD_HEIGHT-core.ROWS_OF_PIECES+1,core.BOARD_HEIGHT do │ + local x_start │ + if y % 2 == 1 then │ + x_start = 1 │ + else │ + x_start = 2 │ + end │ + for x=x_start,8,2 do │ + board[y][x] = core.PLAYER2 │ + end │ end │ - state.board[1][1] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_ROOK) │ - state.board[1][2] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KNIGHT) │ - state.board[1][3] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_BISHOP) │ - state.board[1][4] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_QUEEN) │ - state.board[1][5] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KING) │ - state.board[1][6] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_BISHOP) │ - state.board[1][7] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KNIGHT) │ - state.board[1][8] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_ROOK) │ │ - return state │ + return { │ + game_settings = game_settings, │ + player_turn = core.PLAYER1, │ + board = board, │ + selected_y = nil, │ + selected_x = nil, │ + -- for the case where you are partway through a double jump │ + must_jump_selected = false, │ + } │ end │ │ -local function copy_coords(pos) │ - if pos == nil then return nil end │ - return { y = pos.y, x = pos.x } │ +function core.print_state(state) │ + io.write("state = {\n") │ + io.write(string.format(" player_turn = %s\n", state.player_turn)) │ + io.write(string.format(" selected_y = %s\n", state.selected_y)) │ + io.write(string.format(" selected_x = %s\n", state.selected_x)) │ + io.write(string.format(" must_jump_selected = %s\n", state.must_jump_selected)) │ + io.write(string.format(" board = {\n", state.selected_x)) │ + for _,row in ipairs(state.board) do │ + io.write(" {") │ + for _,cell in ipairs(row) do │ + io.write(string.format("%d ", cell)) │ + end │ + io.write("}\n") │ + end │ + io.write(" }\n") │ + io.write("}\n") │ end │ │ -local function copy_state(state) │ - local new_state = { │ - player_turn = state.player_turn, │ - board = {}, │ - selected = copy_coords(state.selected), │ - game_status = nil, │ - } │ +local val_to_char_map = { │ + [core.EMPTY] = ' ', │ + [core.PLAYER1] = 'x', │ + [core.PLAYER1] = 'o', │ +} │ │ - for y=1,core.BOARD_SIZE do │ - new_state.board[y] = {} │ - for x=1,core.BOARD_SIZE do │ - new_state.board[y][x] = state.board[y][x] │ +function core.print_board(board) │ + io.write("+") │ + for x=1,#board do │ + io.write(string.format("-+")) │ + end │ + io.write("\n") │ + for y=1,#board do │ + io.write("|") │ + for x=1,#board do │ + io.write(string.format("%s|", val_to_char_map[board[y][x]])) │ + end │ + io.write("\n") │ + io.write("+") │ + for x=1,#board do │ + io.write(string.format("-+")) │ end │ + io.write("\n") │ end │ - │ - return new_state │ end │ │ -function core.get_player_name(player) │ - if player == core.PLAYER_BLACK then return "Black" │ - elseif player == core.PLAYER_WHITE then return "White" end │ +local function in_range(y,x) │ + return (1 <= y and y <= core.BOARD_HEIGHT and │ + 1 <= x and x <= core.BOARD_WIDTH) │ end │ │ -function core.get_status_msg(state) │ - local player_name = core.get_player_name(state.player_turn) │ - local game_status_str = "" │ - if state.game_status == nil then │ - state.game_status = core.get_game_status(state) │ - end │ - if state.game_status == core.GAME_STATUS_NORMAL then │ - -- do nothing │ - elseif state.game_status == core.GAME_STATUS_CHECK then │ - game_status_str = string.format("%s is in check!", player_name) │ - elseif state.game_status == core.GAME_STATUS_CHECKMATE then │ - return string.format("%s is in checkmate! Game over, %s wins.", player_name, core.get_player_name(get_other_player(state.player_turn))) │ +local function is_player(state, y, x, player) │ + local piece = state.board[y][x] │ + if player == core.PLAYER1 then │ + return piece == core.PLAYER1 or piece == core.PLAYER1_KING │ + elseif player == core.PLAYER2 then │ + return piece == core.PLAYER2 or piece == core.PLAYER2_KING │ else │ - error(string.format("Unhandled game_status %s", state.game_status)) │ - end │ - if #game_status_str > 0 then │ - game_status_str = game_status_str .. ' ' │ + error(string.format("Unexpected player %s", player)) │ + return false │ end │ +end │ │ - local action │ - if state.selected == nil then │ - action = "select a piece to move" │ +function core.piece_to_player(piece) │ + if piece == core.EMPTY then │ + return core.EMPTY │ + elseif piece == core.PLAYER1 or piece == core.PLAYER1_KING then │ + return core.PLAYER1 │ + elseif piece == core.PLAYER2 or piece == core.PLAYER2_KING then │ + return core.PLAYER2 │ else │ - action = "select a destination" │ + error(string.format("Unexpected piece %s", piece)) │ + return nil │ end │ - return string.format("%s%s, %s", game_status_str, player_name, action) │ end │ │ -local function get_player_letter(player) │ - if player == core.PLAYER_BLACK then return 'B' │ - elseif player == core.PLAYER_WHITE then return 'W' │ - else │ - error(string.format("Unhandled player %s", player)) │ - end │ +function core.piece_is_king(piece) │ + return piece == core.PLAYER1_KING or piece == core.PLAYER2_KING │ end │ │ -local function get_piece_letter(piece_type) │ - if piece_type == core.PIECE_KING then return "K" │ - elseif piece_type == core.PIECE_QUEEN then return "Q" │ - elseif piece_type == core.PIECE_BISHOP then return "B" │ - elseif piece_type == core.PIECE_KNIGHT then return "N" │ - elseif piece_type == core.PIECE_ROOK then return "R" │ - elseif piece_type == core.PIECE_PAWN then return "P" │ - else │ - error(string.format("Unhandled piece type %s", piece_type)) │ - end │ +local function other_player(player) │ + if player == core.PLAYER1 then return core.PLAYER2 │ + elseif player == core.PLAYER2 then return core.PLAYER1 │ + else error(string.format("Unexpected player %s", player)) end │ end │ │ -local function piece_id_to_hr_str(piece_id) │ - local player = core.get_player(piece_id) │ - local piece_type = core.get_piece_type(piece_id) │ - return get_player_letter(player) .. get_piece_letter(piece_type) │ +local function sign(val) │ + if val > 0 then return 1 │ + elseif val == 0 then return 0 │ + else return -1 end │ end │ │ -function core.print_state(state) │ - -- 1 2 3 4 5 6 7 8 │ - row_sep = '+--+--+--+--+--+--+--+--+' │ - io.write(row_sep .. '\n') │ - for y=1,core.BOARD_SIZE do │ - io.write('|') │ - for x=1,core.BOARD_SIZE do │ - local piece_id = state.board[y][x] │ - if piece_id == core.EMPTY_PIECE_ID then │ - io.write(' ') │ - else │ - io.write(piece_id_to_hr_str(piece_id)) │ - end │ - io.write('|') │ - end │ - io.write('\n' .. row_sep .. '\n') │ - end │ -end │ - │ -local function get_piece_move_cells(piece_type, dy, dx) │ - if piece_type == core.PIECE_KNIGHT then │ - return ((math.abs(dy) == 2 and math.abs(dx) == 1) or │ - (math.abs(dy) == 1 and math.abs(dx) == 2)) │ - elseif piece_type == core.PIECE_KING then │ - return math.abs(dx) <= 1 and math.abs(dy) <= 1 and │ - (math.abs(dy) > 0 or math.abs(dx) > 0) │ - end │ -end │ - │ -local function get_piece_move_vecs(piece_type) │ - if piece_type == core.PIECE_ROOK then │ - return { { y=1, x=0 }, {y=-1, x=0}, {y=0, x=1}, {y=0, x=-1} } │ - elseif piece_type == core.PIECE_BISHOP then │ - return { { y=1, x=1 }, {y=-1, x=1}, {y=1, x=-1}, {y=-1, x=-1} } │ - elseif piece_type == core.PIECE_QUEEN then │ - return { { y=1, x=0 }, {y=-1, x=0}, {y=0, x=1}, {y= 0, x=-1}, │ - { y=1, x=1 }, {y=-1, x=1}, {y=1, x=-1}, {y=-1, x=-1} } │ - else │ - return {} │ - end │ -end │ - │ - │ -local function out_of_range(pos) │ - return not (1 <= pos.x and pos.x <= core.BOARD_SIZE and │ - 1 <= pos.y and pos.y <= core.BOARD_SIZE) │ -end │ - │ -local function get_player_move_dir(player) │ - if player == core.PLAYER_WHITE then return -1 │ - elseif player == core.PLAYER_BLACK then return 1 end │ -end │ - │ -local function get_player_rel_delta_pos(player, src, dst) │ - local dy = dst.y - src.y │ - local dx = dst.x - src.x │ - │ - dy = get_player_move_dir(player) * dy │ - │ - return { dy = dy, dx = dx } │ +local function king(player) │ + if player == core.PLAYER1 then return core.PLAYER1_KING │ + elseif player == core.PLAYER2 then return core.PLAYER2_KING │ + else error(string.format("Unexpected player %s", player)) end │ end │ │ --- Checks if a move can be made by that kind of piece, and that │ --- no pieces are in the way. │ --- Does not check if the move results in check or checkmate. (i.e. │ --- this can return true for moves that would put your own king in check) │ --- Also doesn't check for castling or en passant │ -local function is_valid_move_pos(state, src, dst) │ - local src_piece_id = state.board[src.y][src.x] │ - local dst_piece_id = state.board[dst.y][dst.x] │ - │ - local src_player = core.get_player(src_piece_id) │ - local src_piece_type = core.get_piece_type(src_piece_id) │ +-- NOTE: does not check if destination is occupied │ +function core.valid_move(state, src_y, src_x, dst_y, dst_x, jumped_pieces) │ + local dy = dst_y - src_y │ + local dx = dst_x - src_x │ │ - local dst_player = core.get_player(dst_piece_id) │ + local piece = state.board[src_y][src_x] │ + local player = core.piece_to_player(piece) │ │ - local delta_pos = get_player_rel_delta_pos(src_player, src, dst) │ - local dy = delta_pos.dy │ - local dx = delta_pos.dx │ + print(string.format("valid_move, player = %s, dy=%s, dx=%s", player, dy, dx)) │ │ - if src_piece_type == core.PIECE_PAWN then │ - if dx == 0 then │ - if dy == 1 and dst_piece_id == core.EMPTY_PIECE_ID then │ - return true │ - elseif dy == 2 and src.y == get_player_pawn_row(src_player) then │ - return (state.board[src.y+1*get_player_move_dir(src_player)][src.x] == core.EMPTY_PIECE_ID and │ - state.board[src.y+2*get_player_move_dir(src_player)][src.x] == core.EMPTY_PIECE_ID) │ + if (core.piece_is_king(piece) and math.abs(dy) == 1) or │ + (player == core.PLAYER1 and dy == 1) or │ + (player == core.PLAYER2 and dy == -1) then │ + print("hit dy == 1 case") │ + return dx == 1 or dx == -1 │ + elseif (core.piece_is_king(piece) and math.abs(dy) == 2) or │ + (player == core.PLAYER1 and dy == 2) or │ + (player == core.PLAYER2 and dy == -2) then │ + print("hit dy == 2 case") │ + if math.abs(dx) ~= 2 then │ + print("dx ~= 2") │ + return false │ + end │ + local jumped_y = src_y + sign(dy) │ + local jumped_x = src_x + sign(dx) │ + if is_player(state, jumped_y, jumped_x, other_player(player)) then │ + print("should be jumped") │ + if jumped_pieces ~= nil then │ + table.insert(jumped_pieces, {y= jumped_y, x= jumped_x }) │ end │ - elseif math.abs(dx) == 1 and dy == 1 then │ - return core.get_player(dst_piece_id) == get_other_player(src_player) │ + return core.RC_SUCCESS │ else │ + print("jumped player is not other player") │ return false │ end │ - elseif get_piece_move_cells(src_piece_type, dy, dx) then │ - return dst_piece_id == core.EMPTY_PIECE_ID or dst_player ~= src_player │ else │ - for _, move_vec in ipairs(get_piece_move_vecs(src_piece_type)) do │ - for i=1,core.BOARD_SIZE do │ - local dst2 = { y = src.y + move_vec.y*i, │ - x = src.x + move_vec.x*i} │ - if out_of_range(dst2) then │ - goto next_move_vec │ - end │ - local dst2_piece_id = state.board[dst2.y][dst2.x] │ - if core.get_player(dst2_piece_id) == src_player then │ - goto next_move_vec │ - elseif core.get_player(dst2_piece_id) == get_other_player(src_player) then │ - if coords_eq(dst, dst2) then │ - return true │ - end │ - goto next_move_vec │ - else │ - if coords_eq(dst, dst2) then │ - return true │ - end │ - end │ - end │ - ::next_move_vec:: │ - end │ + print("hit other case") │ + return false │ end │ + │ end │ │ -function core.get_possib_dsts(state, src) │ - local piece_id = state.board[src.y][src.x] │ - if piece_id == core.EMPTY_PIECE_ID then return {} end │ - local piece_type = core.get_piece_type(piece_id) │ - local player = core.get_player(piece_id) │ +local function move_piece(state, y, x) │ + local piece = state.board[state.selected_y][state.selected_x] │ + state.board[state.selected_y][state.selected_x] = core.EMPTY │ + state.board[y][x] = piece │ +end │ │ - local possib_dsts = {} │ +local function can_jump(state, y, x) │ + for _,dir in ipairs(dirs) do │ + local y2 = y + 2*dir.y │ + local x2 = x + 2*dir.x │ │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - local dst_piece_id = state.board[y][x] │ + if not in_range(y2, x2) then │ + print(string.format("Checking y2=%s, x2=%s, out of range", y2, x2)) │ + goto next_dir │ + end │ │ - if is_valid_move_pos(state, src, {y=y, x=x}) then │ - table.insert(possib_dsts, {y=y, x=x}) │ - end │ + if state.board[y2][x2] ~= core.EMPTY then │ + print(string.format("Checking y2=%s, x2=%s, occupied", y2, x2)) │ + goto next_dir │ + end │ │ - ::next_dst:: │ + local dir_valid_move = core.valid_move(state, y, x, y2, x2) │ + print(string.format("Checking y2=%s, x2=%s, valid_move=%q", y2, x2, dir_valid_move)) │ + if dir_valid_move then │ + return true │ end │ + ::next_dir:: │ end │ + return false │ +end │ │ - return possib_dsts │ +function move_is_jump(state, y, x) │ + local dy = state.selected_y - y │ + local dx = state.selected_x - x │ + │ + return math.abs(dy) == 2 and math.abs(dx) == 2 │ end │ │ -function core.in_check(state, player) │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - local src = { y = y, x = x } │ - local src_piece_id = state.board[y][x] │ - -- Only check other player's pieces │ - if src_piece_id == core.EMPTY_PIECE_ID or │ - core.get_player(src_piece_id) == player then │ - goto next_square │ +function jumps_available_for_player(state, player) │ + for y=1,core.BOARD_HEIGHT do │ + for x=1,core.BOARD_WIDTH do │ + if core.piece_to_player(state.board[y][x]) ~= player then │ + goto next_cell │ end │ - │ - local dsts = core.get_possib_dsts(state, src) │ - for _, dst in ipairs(dsts) do │ - local dst_piece_id = state.board[dst.y][dst.x] │ - -- See if any of them could capture the king on their next move │ - if core.get_piece_type(dst_piece_id) == core.PIECE_KING and │ - core.get_player(dst_piece_id) == player then │ - return true │ - end │ - │ + if can_jump(state, y, x) then │ + return true │ end │ - │ - ::next_square:: │ + ::next_cell:: │ end │ end │ + │ return false │ end │ │ -local function move_piece(state, src, dst) │ - local piece_id = state.board[src.y][src.x] │ - local this_player = core.get_player(piece_id) │ - if piece_id == core.EMPTY_PIECE_ID then │ - return core.SUCCESS │ +-- Used for both selecting a piece, and choosing where to move it. │ +-- (Called twice for a single move) │ +function core.player_move(state, player, y, x) │ + if player ~= state.player_turn then │ + return core.RC_NOT_YOUR_TURN │ end │ │ - local state_copy = copy_state(state) │ - state_copy.board[src.y][src.x] = core.EMPTY_PIECE_ID │ - state_copy.board[dst.y][dst.x] = piece_id │ - state_copy.selected = nil │ - state_copy.player_turn = get_other_player(state.player_turn) │ - if core.in_check(state_copy, this_player) then │ - return core.RC_CANT_MOVE_INTO_CHECK │ + if not in_range(y,x) then │ + return core.RC_INVALID_MOVE │ end │ │ - state.board[src.y][src.x] = core.EMPTY_PIECE_ID │ - state.board[dst.y][dst.x] = piece_id │ - state.selected = nil │ - state.player_turn = get_other_player(state.player_turn) │ - state.game_status = core.get_game_status(state) │ - if state.game_status == core.GAME_STATUS_CHECKMATE then │ - return core.RC_GAME_OVER │ - end │ - return core.SUCCESS │ -end │ + if state.selected_y == nil or state.selected_x == nil then │ + if state.board[y][x] == core.EMPTY then │ + return core.RC_NO_PIECE_TO_SELECT │ + elseif not is_player(state, y, x, player) then │ + return core.RC_NOT_YOUR_PIECE │ + else │ + state.selected_y = y │ + state.selected_x = x │ + return core.RC_SUCCESS │ + end │ + else │ + if y == state.selected_y and x == state.selected_x then │ + if state.must_jump_selected then │ + return core.RC_MUST_JUMP_SELECTED │ + end │ + state.selected_y = nil │ + state.selected_x = nil │ + -- return core.RC_UNSELECTED │ + return core.RC_SUCCESS │ + end │ │ -local function get_player_pieces(state, player) │ - local pieces_pos = {} │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - local piece_id = state.board[y][x] │ - if piece_id ~= core.EMPTY_PIECE_ID and │ - core.get_player(piece_id) == player then │ - table.insert(pieces_pos, {y=y, x=x}) │ + if state.game_settings.must_jump_when_able then │ + if jumps_available_for_player(state, player) and not move_is_jump(state, y, x) then │ + return core.RC_MUST_JUMP │ end │ end │ - end │ - return pieces_pos │ -end │ │ -function core.get_game_status(state) │ - local in_check = core.in_check(state, state.player_turn) │ + -- change selection if selected own pieces │ + if is_player(state, y, x, player) then │ + state.selected_y = y │ + state.selected_x = x │ + return core.RC_SUCCESS │ + end │ │ - if not in_check then │ - return core.GAME_STATUS_NORMAL │ - else │ - for _, src_pos in ipairs(get_player_pieces(state, state.player_turn)) do │ - for _, dst_pos in ipairs(core.get_possib_dsts(state, src_pos)) do │ - local state_copy = copy_state(state) │ - local rc = move_piece(state_copy, src_pos, dst_pos) │ - if rc == core.SUCCESS then │ - return core.GAME_STATUS_CHECK │ - end │ + if state.board[y][x] ~= core.EMPTY then │ + return core.RC_OCCUPIED │ + end │ + │ + │ + if state.must_jump_selected then │ + if math.abs(state.selected_y - y) ~= 2 and │ + math.abs(state.selected_x - x) ~= 2 then │ + return core.RC_MUST_JUMP_SELECTED │ end │ end │ - return core.GAME_STATUS_CHECKMATE │ - end │ -end │ │ -function core.player_touch(state, player, coords) │ - if player ~= state.player_turn then │ - return core.NOT_YOUR_TURN │ - end │ │ - if state.selected == nil then │ - if coords == nil then return core.SUCCESS end │ - local dst_piece_id = state.board[coords.y][coords.x] │ - if core.get_player(dst_piece_id) ~= player then │ - return core.NOT_YOUR_PIECE │ + local jumped_pieces = {} │ + if core.valid_move(state, state.selected_y, state.selected_x, y, x, jumped_pieces) then │ + for _,piece in ipairs(jumped_pieces) do │ + state.board[piece.y][piece.x] = core.EMPTY │ + end │ + move_piece(state, y, x) │ else │ - state.selected = coords │ - return core.SUCCESS │ + return core.RC_INVALID_MOVE │ end │ - else │ - if coords == nil or coords_eq(coords, state.selected) then │ - state.selected = nil │ - return core.SUCCESS │ + │ + if (player == core.PLAYER1 and y == core.BOARD_HEIGHT) or │ + (player == core.PLAYER2 and y == 1) then │ + state.board[y][x] = king(player) │ + end │ + │ + if #jumped_pieces > 0 and can_jump(state, y, x) then │ + state.must_jump_selected = true │ + -- updated selected indicators to point to this cell │ + -- now that the piece moved here │ + state.selected_y = y │ + state.selected_x = x │ else │ - if not is_valid_move_pos(state, state.selected, coords) then │ - local dst_piece_id = state.board[coords.y][coords.x] │ - -- If the player clicks on one of their own pieces, select that one instead │ - if core.get_player(dst_piece_id) == player then │ - print("player selected a different piece") │ - state.selected = coords │ - -- If the player clicks on an empty piece or enemy piece that can't be captured, │ - -- unselect │ - else │ - print("player selected an empty or other player piece") │ - state.selected = nil │ - end │ - return core.SUCCESS │ - else │ - local rc = move_piece(state, state.selected, coords) │ - if rc == core.RC_CANT_MOVE_INTO_CHECK then │ - if core.in_check(state, state.player_turn) then │ - return core.RC_MUST_RESOLVE_CHECK │ - end │ - end │ - return rc │ - end │ + state.must_jump_selected = false │ + state.selected_y = nil │ + state.selected_x = nil │ + state.player_turn = (((state.player_turn-1) + 1 ) % 2) + 1 │ end │ + │ + return core.RC_SUCCESS │ end │ end │ │ +function core.get_square_colour(y, x) │ + return (y%2 == 1) ~= (x%2 == 1) │ +end │ + │ + │ +--local state = core.new_state() │ +--core.print_board(state.board) │ + │ return core │ --- Game: Chess │ --- Author: Alex Barry (github.com/alexbarry) │ ---[[ │ -TODO: │ -* implement logic for check and checkmate │ -* prevent player from moving into check │ -* implement serializing state so state can be saved or network games can be played │ -* implement castling │ -* implement pawn en-passant capturing?? (I didn't even know about this rule) │ -* implement history (undo/redo) │ ---]] │ +local two_player = require("libs/multiplayer/two_player") │ +local utils = require("libs/utils") │ + │ +local core = require("games/checkers/checkers_core") │ +local draw = require("games/checkers/checkers_draw") │ +local serialize = require("games/checkers/checkers_serialize") │ + │ local alexgames = require("alexgames") │ │ -local core = require("games/chess/chess_core") │ -local draw = require("games/chess/chess_draw") │ -local serialize = require("games/chess/chess_serialize") │ +local height = 480 │ +local width = 480 │ │ -local utils = require("libs/utils") │ -local two_player = require("libs/multiplayer/two_player") │ +draw.init(height, width) │ │ -local g_session_id = alexgames.get_new_session_id() │ -local g_state = core.new_game() │ ---local player = core.PLAYER_WHITE │ -local player = nil │ local local_multiplayer = nil │ local player_name_to_id = {} │ +local player = nil │ local g_other_player = nil │ local session_id = alexgames.get_new_session_id() │ +local state = core.new_state() │ │ -local SELECT_PLAYER_POPUP_ID = "select_player" │ -local PLAYER_CHOICE_BTNS = { │ - "White", │ - "Black", │ -} │ -local BTN_MAP = { │ - [0] = core.PLAYER_WHITE, │ - [1] = core.PLAYER_BLACK, │ -} │ - │ +local GAME_OPTION_NEW_GAME = "game_option_new_game" │ │ local BTN_ID_UNDO = "btn_undo" │ local BTN_ID_REDO = "btn_redo" │ │ -local POPUP_ID_NEW_GAME = "game_over" │ -local POPUP_ITEM_ID_NEW_GAME_BTN = 1 │ +-- Testing double jump logic and with a king │ +--[[ │ +state.board = { │ + {1,0,1,0,1,0,1,0,}, │ + {0,1,0,1,0,1,0,1,}, │ + {1,0,0,0,0,0,1,0,}, │ + {0,0,0,0,0,1,0,0,}, │ + {2,0,2,0,0,0,0,0,}, │ + {0,2,0,0,0,2,0,2,}, │ + {2,0,2,0,2,0,2,0,}, │ + {0,3,0,0,0,2,0,2,}, │ +} │ +]] │ │ -local OPTION_ID_NEW_GAME = "new_game" │ +function update() │ + draw.update(state) │ + alexgames.set_btn_enabled(BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ + alexgames.set_btn_enabled(BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ +end │ │ -function get_player() │ +local function get_player() │ if local_multiplayer then │ - return g_state.player_turn │ + return state.player_turn │ else │ return player │ end │ end │ │ -function get_other_player(player) │ - if player == core.PLAYER_WHITE then │ - return core.PLAYER_BLACK │ - elseif player == core.PLAYER_BLACK then │ - return core.PLAYER_WHITE │ +function handle_user_clicked(coord_y, coord_x) │ + local piece = draw.coords_to_piece_idx(coord_y, coord_x) │ + local rc = core.player_move(state, get_player(), piece.y, piece.x) │ + │ + if rc ~= core.RC_SUCCESS then │ + alexgames.set_status_err(core.rc_to_string(rc)) │ else │ - error(string.format("unexpected player: %s", player), 2) │ - end │ -end │ - │ -local function get_draw_state_params() │ - return { │ - local_multiplayer = local_multiplayer, │ - player = player, │ - } │ -end │ - │ -draw.init(480,480, false) │ -local function draw_board_internal() │ - --core.print_state(g_state) │ - draw.draw_state(g_state, get_draw_state_params()) │ - alexgames.set_btn_enabled(BTN_ID_UNDO, alexgames.has_saved_state_offset(g_session_id, -1)) │ - alexgames.set_btn_enabled(BTN_ID_REDO, alexgames.has_saved_state_offset(g_session_id, 1)) │ -end │ - │ -function update() │ - draw_board_internal() │ -end │ - │ -function handle_rc(rc, is_other_player) │ - if rc == core.SUCCESS then │ - -- TODO need to come up with a way to only save real moves │ + -- TODO this saves even when the player just selects something... that │ + -- shouldn't count as a move. │ save_state() │ - alexgames.set_status_msg(core.get_status_msg(g_state)) │ - local state_serialized = serialize.serialize_state(g_state) │ - print(string.format("State is now: %s", utils.binstr_to_hr_str(state_serialized))) │ - elseif rc == core.RC_GAME_OVER then │ - local msg = core.get_status_msg(g_state) │ - alexgames.set_status_msg(msg) │ - alexgames.show_popup(POPUP_ID_NEW_GAME, { title = "Game Over", items = { │ - { item_type = alexgames.POPUP_ITEM_TYPE_MSG, msg = msg }, │ - { id = POPUP_ITEM_ID_NEW_GAME_BTN, item_type = alexgames.POPUP_ITEM_TYPE_BTN, text = "New Game" }, │ - } }) │ - else │ - local msg = core.get_err_msg(rc) │ - if is_other_player then │ - msg = "Other player invalid move: " .. msg │ + alexgames.set_status_msg("Waiting for other player to move") │ + if not local_multiplayer then │ + alexgames.send_message("all", string.format("move:%d,%d,%d", player, piece.y, piece.x)) │ end │ - alexgames.set_status_err(msg) │ end │ -end │ │ -function handle_user_clicked(pos_y, pos_x) │ - local coords = draw.draw_coords_to_cell(pos_y, pos_x) │ - local rc = core.player_touch(g_state, get_player(), coords) │ - if not local_multiplayer and rc == core.SUCCESS then │ - alexgames.send_message("all", string.format("move:%d,%d,%d", get_player(), coords.y, coords.x)) │ - end │ - handle_rc(rc) │ - --core.print_state(g_state) │ - draw_board_internal() │ + core.print_state(state) │ + print(string.format("serialized state is: %s", utils.binstr_to_hr_str(serialize.serialize_state(state)))) │ + update() │ end │ │ -function handle_popup_btn_clicked(popup_id, btn_id, popup_state) │ - if two_player.handle_popup_btn_clicked(popup_id, btn_id) then │ - -- handled │ - elseif popup_id == POPUP_ID_NEW_GAME then │ - if btn_id == POPUP_ITEM_ID_NEW_GAME_BTN then │ - start_game() │ - alexgames.hide_popup() │ - else │ - error(string.format("Unhandled btn_id=\"%s\"", btn_id)) │ - end │ + │ +local SELECT_PLAYER_POPUP_ID = "select_player" │ +local PLAYER_CHOICE_BTNS = { │ + "Red", │ + "Black", │ +} │ +local BTN_MAP = { │ + [0] = core.PLAYER1, │ + [1] = core.PLAYER2, │ +} │ + │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ + -- handled │ else │ - error(string.format("Unhandled popup_id=\"%s\"", popup_id)) │ + error(string.format("Unhandled popup_id=%s, btn_idx=%s", popup_id, btn_idx)) │ end │ end │ │ local function broadcast_state(dst) │ - alexgames.send_message(dst, "state:" .. serialize.serialize_state(g_state)) │ + alexgames.send_message(dst, "state:" .. serialize.serialize_state(state)) │ end │ │ function handle_msg_received(src, msg) │ - print("Recvd msg " .. msg) │ - │ - if two_player.handle_msg_received(src, msg) then │ - return │ - end │ + print("Recvd msg " .. msg) │ │ - local m = msg:gmatch("([^:]+):(.*)") │ - if m == nil then │ - print("Unable to parse header from msg " .. msg) │ - return │ - end │ - local header, payload = m() │ + if two_player.handle_msg_received(src, msg) then │ + return │ + end │ │ - if header == "move" then │ - local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ - if m2 == nil then │ - error("Invalid \"move\" msg from " .. src) │ - return │ - end │ - local player_idx, y, x = m2() │ - player_idx = tonumber(player_idx) │ - y = tonumber(y) │ - x = tonumber(x) │ - local coords = { y = y, x = x } │ - local rc = core.player_touch(g_state, player_idx, coords) │ - handle_rc(rc, --[[is_other_player=]] true) │ + local m = msg:gmatch("([^:]+):(.*)") │ + if m == nil then │ + print("Unable to parse header from msg " .. msg) │ + return │ + end │ + local header, payload = m() │ │ - if rc ~= core.SUCCESS then │ - alexgames.set_status_err("Other player made an invalid move") │ - else │ - alexgames.set_status_msg("Your move") │ - draw_board_internal() │ - save_state() │ - end │ + if header == "move" then │ + local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ + if m2 == nil then │ + error("Invalid \"move\" msg from " .. src) │ + return │ + end │ + local player_idx, y, x = m2() │ + player_idx = tonumber(player_idx) │ + y = tonumber(y) │ + x = tonumber(x) │ + local rc = core.player_move(state, player_idx, y, x) │ + if rc ~= core.RC_SUCCESS then │ + alexgames.set_status_err("Other player made an invalid move") │ + else │ + alexgames.set_status_msg("Your move") │ + update() │ + save_state() │ + end │ │ - elseif header == "get_state" then │ + elseif header == "get_state" then │ broadcast_state(src) │ - elseif header == "state" then │ - local recvd_state = serialize.deserialize_state(payload) │ - print("Recieved state:") │ - --core.print_state(recvd_state) │ - g_state = recvd_state │ - draw_board_internal() │ - save_state() │ - elseif header == "player_left" and src == "ctrl" then │ - elseif header == "player_joined" then │ - else │ - error("Unhandled message: " .. header ) │ - end │ + elseif header == "state" then │ + local recvd_state = serialize.deserialize_state(payload) │ + print("Recieved state:") │ + core.print_state(recvd_state) │ + state = recvd_state │ + update() │ + save_state() │ + elseif header == "player_left" and src == "ctrl" then │ + elseif header == "player_joined" then │ + else │ + error("Unhandled message: " .. header ) │ + end │ end │ │ function two_player_init() │ - local args = { │ - supports_local_multiplayer = true, │ - title = "Choose piece colour", │ - player_choices = PLAYER_CHOICE_BTNS, │ - handle_multiplayer_type_choice = function (multiplayer_type) │ - if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ - local_multiplayer = true │ - player = g_state.player_turn │ - elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ - local_multiplayer = false │ - end │ - end, │ - choice_id_to_player_id = function (btn_id) │ - return BTN_MAP[btn_id] │ - end, │ - player_name_to_id = player_name_to_id, │ - player_id_to_nice_name = function (player_id) │ - local player_colour = core.get_player_name(player_id) │ - return utils.make_first_char_uppercase(player_colour) │ - end, │ - get_msg = function () │ - local msg = "White moves first." │ - if utils.table_len(player_name_to_id) == 0 then │ - msg = msg .. "\nThe other player has not yet chosen." │ - else │ - --msg = msg .. string.format("The other player has chosen %s", │ - -- core.player_id_to_name(other_player)) │ - for player_name, player_id in pairs(player_name_to_id) do │ - local player_colour = core.get_player_name(player_id) │ - msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ - end │ - end │ - return msg │ - end, │ - handle_player_choice = function (player_name, player_id) │ - local choice_str = core.get_player_name(player_id) │ - print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ - if player_name == two_player.LOCAL_PLAYER then │ - player = player_id │ - else │ - g_other_player = player_id │ - end │ - end, │ + local args = { │ + supports_local_multiplayer = true, │ + title = "Choose piece colour", │ + player_choices = PLAYER_CHOICE_BTNS, │ + handle_multiplayer_type_choice = function (multiplayer_type) │ + if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ + local_multiplayer = true │ + elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ + local_multiplayer = false │ + end │ + end, │ + choice_id_to_player_id = function (btn_id) │ + return BTN_MAP[btn_id] │ + end, │ + player_name_to_id = player_name_to_id, │ + player_id_to_nice_name = function (player_id) │ + local player_colour = core.player_id_to_name(player_id) │ + return utils.make_first_char_uppercase(player_colour) │ + end, │ + get_msg = function () │ + local msg = "Red moves first." │ + if utils.table_len(player_name_to_id) == 0 then │ + msg = msg .. "\nThe other player has not yet chosen." │ + else │ + --msg = msg .. string.format("The other player has chosen %s", │ + -- core.player_id_to_name(other_player)) │ + for player_name, player_id in pairs(player_name_to_id) do │ + local player_colour = core.player_id_to_name(player_id) │ + msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ + end │ + end │ + return msg │ + end, │ + handle_player_choice = function (player_name, player_id) │ + local choice_str = core.player_id_to_name(player_id) │ + print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ + if player_name == two_player.LOCAL_PLAYER then │ + player = player_id │ + else │ + g_other_player = player_id │ + end │ + end, │ │ - need_reselect = function () │ - local this_player = player │ - local other_player = g_other_player │ + need_reselect = function () │ + local this_player = player │ + local other_player = g_other_player │ │ - return this_player == nil or this_player == other_player │ - end, │ + return this_player == nil or this_player == other_player │ + end, │ │ - get_local_player_choice = function () │ - return player │ - end │ - } │ + get_local_player_choice = function () │ + return player │ + end │ + } │ │ two_player.init(args) │ end │ │ -local function load_state(session_id_arg, state_serialized) │ - g_session_id = session_id_arg │ - g_state = serialize.deserialize_state(state_serialized) │ -end │ - │ -local function load_state_offset(session_id_arg, move_offset) │ - local state_serialized = alexgames.adjust_saved_state_offset(session_id_arg, move_offset) │ - if state_serialized == nil then │ - error(string.format("state_serialized is nil")) │ - end │ - load_state(session_id_arg, state_serialized) │ +local function load_state_move_offset(move_id_offset) │ + local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ + state = serialize.deserialize_state(serialized_state) │ + update() │ broadcast_state("all") │ end │ │ -function save_state() │ - local serialized_state = serialize.serialize_state(g_state) │ - alexgames.save_state(g_session_id, serialized_state) │ -end │ - │ function handle_btn_clicked(btn_id) │ if btn_id == BTN_ID_UNDO then │ - load_state_offset(g_session_id, -1) │ - draw_board_internal() │ + load_state_move_offset(-1) │ elseif btn_id == BTN_ID_REDO then │ - load_state_offset(g_session_id, 1) │ - draw_board_internal() │ - else │ - error(string.format("Unhandled btn_id %s", btn_id)) │ - end │ -end │ - │ -function handle_game_option_evt(option_id) │ - if option_id == OPTION_ID_NEW_GAME then │ - g_session_id = alexgames.get_new_session_id() │ - g_state = core.new_game() │ - save_state() │ - draw_board_internal() │ + load_state_move_offset(1) │ end │ end │ │ -function get_state() │ - return serialize.serialize_state(g_state) │ -end │ - │ -function start_game(session_id_arg, state_serialized) │ - local state_loaded = false │ - if state_serialized ~= nil then │ - load_state(session_id_arg, state_serialized) │ - state_loaded = true │ - else │ - local saved_session_id = alexgames.get_last_session_id() │ - if saved_session_id ~= nil and alexgames.has_saved_state_offset(saved_session_id, 0) then │ - alexgames.set_status_msg(string.format("Loading saved state session %d", saved_session_id)) │ - load_state_offset(saved_session_id, 0) │ - state_loaded = true │ - end │ +function start_game(session_id_arg, serialized_state) │ + local last_sess_id = alexgames.get_last_session_id() │ + if serialized_state then │ + session_id = session_id_arg │ + state = serialize.deserialize_state(serialized_state) │ + elseif last_sess_id ~= nil then │ + serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ + session_id = last_sess_id │ + state = serialize.deserialize_state(serialized_state) │ end │ - │ two_player_init() │ │ + --alexgames.send_message("all", "player_joined:") │ alexgames.send_message("all", "get_state:") │ │ - alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game" }) │ + alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New Game", type = alexgames.OPTION_TYPE_BTN }) │ │ alexgames.create_btn(BTN_ID_UNDO, "Undo", 1) │ alexgames.create_btn(BTN_ID_REDO, "Redo", 1) │ - --[[ │ - g_session_id = alexgames.get_new_session_id() │ - g_state = core.new_game() │ - player = core.PLAYER_WHITE │ - local_multiplayer = true │ - update() │ - --]] │ end │ -local serialize = {} │ - │ -local core = require("games/chess/chess_core") │ -local serialize_lib = require("libs/serialize/serialize") │ - │ -function serialize.deserialize_state(byte_str) │ - local bytes = serialize_lib.bytestr_to_byteary(byte_str) │ - local state = {} │ - state.player_turn = serialize_lib.deserialize_byte(bytes) │ - state.board = {} │ - state.selected = nil │ - for y=1,core.BOARD_SIZE do │ - state.board[y] = {} │ - for x=1,core.BOARD_SIZE do │ - state.board[y][x] = serialize_lib.deserialize_byte(bytes) │ - end │ - end │ │ - if #bytes ~= 0 then │ - error(string.format("%d bytes remaining after deserializing", #bytes)) │ +function handle_game_option_evt(option_id) │ + if option_id == GAME_OPTION_NEW_GAME then │ + session_id = alexgames.get_new_session_id() │ + state = core.new_state() │ + save_state() │ + update() │ + broadcast_state("all") │ end │ - │ - return state │ end │ │ -function serialize.serialize_state(state) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(state.player_turn) │ - for y=1,core.BOARD_SIZE do │ - for x=1,core.BOARD_SIZE do │ - output = output .. serialize_lib.serialize_byte(state.board[y][x]) │ - end │ - end │ - │ - return output │ +function save_state() │ + local serialized_state = serialize.serialize_state(state) │ + alexgames.save_state(session_id, serialized_state) │ end │ │ -return serialize │ -local core = {} │ - │ -local shuffle = require("libs/shuffle") │ - │ -core.PIECE_EMPTY = 0 │ - │ -core.PIECES = { │ - ["white" ] = 1, │ - ["black" ] = 2, │ - ["red" ] = 3, │ - ["yellow"] = 4, │ - ["blue" ] = 5, │ -} │ - │ -core.PIECE_COLOUR_COUNT = 5 │ -core.PIECE_PER_COLOUR_COUNT = 20 │ -core.PIECES_PER_PILE = 4 │ - │ --- Passed as an argument to core.place_piece to indicate │ --- that the player is selecting from the discard pile │ -core.PILE_DISCARD = -1 │ +function get_state() │ + local serialized_state = serialize.serialize_state(state) │ + print(string.format("lua: returning %d bytes of state", #serialized_state)) │ + return serialized_state │ +end │ │ -core.RC_SUCCESS = 0 │ -core.RC_ROW_OCCUPIED = 1 │ +local serialize = {} │ │ -function core.rc_to_string(rc) │ - local MAP = { │ - [core.RC_SUCCESS] = "Success", │ - [core.RC_ROW_OCCUPIED] = "This row already contains a different colour piece", │ - } │ - return MAP[rc] │ +function serialize_byte(val) │ + if val == nil then val = 128 end │ + return string.char(val) │ end │ │ -function core.get_card_piece_type(y, x) │ - return 1 + ((y-1 + -x ) % core.PIECE_COLOUR_COUNT) │ +function deserialize_byte(bytes) │ + local val = string.byte(table.remove(bytes,1)) │ + if val == 128 then val = nil end │ + return val │ end │ │ -local function get_num_piles(num_players) │ - local MAP = { │ - [2] = 5, │ - [3] = 7, │ - [4] = 9, │ - } │ - return MAP[num_players] │ +function bool_to_byte(val) │ + if val then return 1 │ + else return 0 end │ end │ │ -function core.new_game(num_players) │ - local state = { │ - pieces = {}, │ - piles = {}, │ - discard_penalty = true, │ - discard_pile = {}, │ - player_states = {}, │ - } │ - │ - for _, piece_colour in pairs(core.PIECES) do │ - for _=1,core.PIECE_PER_COLOUR_COUNT do │ - table.insert(state.pieces, piece_colour) │ - end │ - end │ - shuffle.shuffle(state.pieces) │ - │ - for pile_idx=1,get_num_piles(num_players) do │ - state.piles[pile_idx] = {} │ - for i=1,core.PIECES_PER_PILE do │ - local piece = table.remove(state.pieces) │ - table.insert(state.piles[pile_idx], piece) │ - end │ - end │ - │ - for i=1,num_players do │ - state.player_states[i] = { │ - score = 0, │ - staging = {}, │ - card = {}, │ - } │ - │ - for y=1,core.PIECE_COLOUR_COUNT do │ - state.player_states[i].staging[y] = { colour = nil, count = 0 } │ - state.player_states[i].card[y] = {} │ - for x=1,core.PIECE_COLOUR_COUNT do │ - state.player_states[i].card[y][x] = core.PIECE_EMPTY │ - end │ - end │ - │ - │ - end │ - │ - return state │ +function byte_to_bool(val) │ + if val == 1 then return true │ + elseif val == 0 then return false │ + else error(string.format("Expected 1 or 0 for bool, recvd %s", val)) end │ end │ │ -function core.can_place_piece(state, player, selected_pile, selected_piece_colour, dst_row) │ - local staging_row = state.player_states[player].staging[dst_row] │ - return staging_row.count == 0 or │ - (staging_row.colour == selected_piece_colour and staging_row.count < dst_row) │ +function serialize_bool(val) │ + return serialize_byte(bool_to_byte(val)) │ end │ │ -function core.place_piece(state, player, selected_pile, selected_piece_colour, dst_row) │ - print(string.format("place_piece(player=%s, selected_pile=%s, selected_colour=%s, dst_row=%s)", │ - player, selected_pile, selected_piece_colour, dst_row)) │ - if not core.can_place_piece(state, player, selected_pile, selected_piece_colour, dst_row) then │ - return core.RC_ROW_OCCUPIED │ - end │ +function deserialize_bool(bytes) │ + return byte_to_bool(deserialize_byte(bytes)) │ +end │ │ - local penalty = 0 │ - local pile │ - if selected_pile == core.PILE_DISCARD then │ - pile = state.discard_pile │ - if state.discard_penalty then │ - -- TODO handle discard penalty │ - penalty = -1 │ - state.discard_penalty = false │ - end │ - else │ - pile = state.piles[selected_pile] │ - state.piles[selected_pile] = nil │ - end │ - local pieces_to_move = {} │ - local pieces_to_discard = {} │ - for _, piece in ipairs(pile) do │ - if piece == selected_piece_colour then │ - table.insert(pieces_to_move, piece) │ - else │ - table.insert(pieces_to_discard, piece) │ +function serialize.serialize_state(state) │ + local output = "" │ + output = output .. serialize_bool(state.game_settings.must_jump_when_able) │ + output = output .. serialize_byte(state.player_turn) │ + output = output .. serialize_byte(state.selected_y) │ + output = output .. serialize_byte(state.selected_x) │ + output = output .. serialize_bool(state.must_jump_selected) │ + local board_height = #state.board │ + local board_width = #state.board[1] │ + output = output .. serialize_byte(board_height) │ + output = output .. serialize_byte(board_width) │ + for y=1,board_height do │ + for x=1,board_width do │ + output = output .. serialize_byte(state.board[y][x]) │ end │ end │ │ - if pile == state.discard_pile then │ - state.discard_pile = {} │ - end │ - │ - for _, piece in ipairs(pieces_to_discard) do │ - table.insert(state.discard_pile, piece) │ - end │ - │ - local staging = state.player_states[player].staging │ - -- TODO handle putting too many in staging area │ - staging[dst_row].colour = pieces_to_move[1] │ - staging[dst_row].count = staging[dst_row].count + #pieces_to_move │ - │ - return core.RC_SUCCESS │ -end │ - │ -return core │ - │ ---[[ │ --- TODO: │ --- * draw player names (or just "Player 1" for now) by each game card │ --- * change player turn │ --- * on end of turn, commit pieces from staging area to card if possible, calculate points │ --- * implement state serialization for network multiplayer │ --- * use save state API │ ---]] │ - │ - │ -local ui = require("games/blue/blue_ui") │ -local core = require("games/blue/blue_core") │ -local draw = require("games/blue/blue_draw") │ - │ -local g_game_state = core.new_game(4) │ -local g_ui_state = ui.new_state(g_game_state) │ - │ -local function get_player() │ - return 1 -- TODO │ -end │ - │ -function update() │ - draw.draw_state(g_ui_state, get_player()) │ + return output │ end │ │ -function handle_user_clicked(y_pos, x_pos) │ - local click_info = draw.pos_to_action(g_ui_state, y_pos, x_pos) │ - if click_info ~= nil then │ - print(string.format("User clicked { action=%s, arg=%s }", click_info.action, click_info.action_arg_idx)) │ - local rc = ui.handle_action(g_ui_state, get_player(), click_info.action, click_info.action_arg_idx) │ - update() │ +function serialize.deserialize_state(byte_str) │ + local bytes = {} │ + for i=1,#byte_str do │ + bytes[i] = byte_str:sub(i,i) │ end │ -end │ - │ -local ui = {} │ - │ -local core = require("games/blue/blue_core") │ - │ -local alexgames = require("alexgames") │ - │ -ui.UI_STATE_VIEW_OTHER_PLAYERS = 1 │ -ui.UI_STATE_SELECT_PILE = 2 │ -ui.UI_STATE_SELECT_PIECES = 3 │ -ui.UI_STATE_SELECT_DISCARDED_PIECES = 4 │ ---ui.UI_STATE_PLACE_PIECES = 4 │ │ -ui.ACTION_CHANGE_UI_STATE = 1 │ -ui.ACTION_SELECT_PILE = 2 │ -ui.ACTION_SELECT_PIECE = 3 │ -ui.ACTION_PLACE_PIECE = 4 │ -ui.ACTION_SELECT_DISCARD_PILE = 5 │ -ui.ACTION_SELECT_DISCARD_PIECE_COLOUR = 6 │ + if #bytes ~= 7 + 64 then │ + error(string.format("Expected to recieve %d bytes, recvd %d", 7 + 64, #bytes)) │ + end │ │ -function ui.new_state(game_state) │ - return { │ - game_state = game_state, │ - ui_state = ui.UI_STATE_VIEW_OTHER_PLAYERS, │ - selected_pile = nil, │ - selected_piece_colour = nil, │ - } │ -end │ + local state = {} │ + state.game_settings = {} │ │ -local function get_status_msg(state) │ - if state.ui_state == ui.UI_STATE_VIEW_OTHER_PLAYERS then │ - return "Select the piles when ready" │ - elseif state.ui_state == ui.UI_STATE_SELECT_PILE then │ - return "Select a pile" │ - elseif state.ui_state == ui.UI_STATE_SELECT_PIECES then │ - if state.selected_piece_colour == nil then │ - return "Select a piece colour" │ - else │ - return "Select a destination row" │ - end │ - else │ - return nil │ - end │ -end │ + state.game_settings.must_jump_when_able = deserialize_bool(bytes) │ + state.player_turn = deserialize_byte(bytes) │ + state.selected_y = deserialize_byte(bytes) │ + state.selected_x = deserialize_byte(bytes) │ + state.must_jump_selected = deserialize_bool(bytes) │ │ -function ui.handle_action(ui_state, player, action, action_arg_idx) │ - -- TODO consider clearing "selected_pile" and "selected_piece_colour" when back button is pressed │ - if action == ui.ACTION_CHANGE_UI_STATE then │ - ui_state.ui_state = action_arg_idx │ - ui_state.selected_pile = nil │ - ui_state.selected_piece_colour = nil │ - elseif action == ui.ACTION_SELECT_PILE then │ - ui_state.ui_state = ui.UI_STATE_SELECT_PIECES │ - ui_state.selected_pile = action_arg_idx │ - elseif action == ui.ACTION_SELECT_DISCARD_PILE then │ - ui_state.ui_state = ui.UI_STATE_SELECT_DISCARDED_PIECES │ - ui_state.selected_pile = nil │ - elseif action == ui.ACTION_SELECT_PIECE then │ - --ui_state.ui_state = ui.UI_STATE_PLACE_PIECES │ - ui_state.selected_piece_colour = action_arg_idx │ - elseif action == ui.ACTION_PLACE_PIECE then │ - local selected_pile │ - if ui_state.ui_state == ui.UI_STATE_SELECT_PIECES then │ - selected_pile = ui_state.selected_pile │ - elseif ui_state.ui_state == ui.UI_STATE_SELECT_DISCARDED_PIECES then │ - selected_pile = core.PILE_DISCARD │ - end │ - local rc = core.place_piece(ui_state.game_state, player, │ - selected_pile, ui_state.selected_piece_colour, action_arg_idx) │ - if rc == core.RC_SUCCESS then │ - ui_state.ui_state = ui.UI_STATE_VIEW_OTHER_PLAYERS │ - ui_state.selected_pile = nil │ - ui_state.selected_piece_colour = nil │ - else │ - alexgames.set_status_err(core.rc_to_string(rc)) │ - return │ + local board_height = deserialize_byte(bytes) │ + local board_width = deserialize_byte(bytes) │ + state.board = {} │ + for y=1,board_height do │ + state.board[y] = {} │ + for x=1,board_width do │ + state.board[y][x] = deserialize_byte(bytes) │ end │ - elseif action == ui.ACTION_SELECT_DISCARD_PIECE_COLOUR then │ - ui_state.selected_piece_colour = action_arg_idx │ - print(string.format("set selected piece colour to %s", ui_state.selected_piece_colour)) │ - else │ - error(string.format("unhandled action %s", action)) │ end │ - │ - alexgames.set_status_msg(get_status_msg(ui_state)) │ - │ + return state │ end │ │ -return ui │ +return serialize │ local draw = {} │ │ local ui = require("games/blue/blue_ui") │ local core = require("games/blue/blue_core") │ local draw_shapes = require("libs/draw/draw_shapes") │ local alexgames = require("alexgames") │ │ @@ -5047,2062 +3766,1340 @@ │ else │ error(string.format("Unhandled ui state %s", state.ui_state)) │ end │ alexgames.draw_refresh() │ end │ │ return draw │ -local alexgames = require("alexgames") │ - │ -local core = require("games/crossword_builder/crossword_builder_core") │ -local draw = require("games/crossword_builder/crossword_builder_draw") │ - │ -local touch_to_mouse_evts = require("libs/touch_to_mouse_evts") │ - │ -local words_lib = require("libs/words") │ - │ - │ -local state = { │ - game = core.new_state(1), │ - touch_to_mouse_evts = nil, │ - draw = nil, │ -} │ - │ -local player_idx = 1 │ - │ - │ -state.draw = draw.init(state.game) │ │ --[[ │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 5, x_idx = 6 }, letter = "T" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 6, x_idx = 6 }, letter = "R" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 7, x_idx = 6 }, letter = "A" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 8, x_idx = 6 }, letter = "I" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 9, x_idx = 6 }, letter = "N" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx =10, x_idx = 6 }, letter = "E" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx =11, x_idx = 6 }, letter = "E" } ) │ - │ -local placed_tiles = draw.get_placed_tiles(state.draw) │ -local submit_info = core.submit(state.game, placed_tiles) │ -draw.update_state(state.draw, state.game) │ - │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 3, x_idx = 7 }, letter = "T" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 4, x_idx = 7 }, letter = "O" } ) │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 5, x_idx = 7 }, letter = "E" } ) │ - │ -local placed_tiles = draw.get_placed_tiles(state.draw) │ -local submit_info = core.submit(state.game, placed_tiles) │ -draw.update_state(state.draw, state.game) │ - │ -table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 6, x_idx = 7 }, letter = "S" } ) │ +-- TODO: │ +-- * draw player names (or just "Player 1" for now) by each game card │ +-- * change player turn │ +-- * on end of turn, commit pieces from staging area to card if possible, calculate points │ +-- * implement state serialization for network multiplayer │ +-- * use save state API │ --]] │ │ -function update() │ - draw.draw(state.draw) │ -end │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x, params) │ - --print(string.format("handle_mouse_evt(evt_id=%s, pos_y=%d, pos_x=%d)", evt_id, pos_y, pos_x)) │ - draw.handle_mouse_evt(state.draw, evt_id, pos_y, pos_x, params) │ - update() │ -end │ +local ui = require("games/blue/blue_ui") │ +local core = require("games/blue/blue_core") │ +local draw = require("games/blue/blue_draw") │ │ -function handle_mousemove(pos_y, pos_x, params) │ - --print(string.format("handle_mousemove(pos_y=%d, pos_x=%d)", pos_y, pos_x)) │ - draw.handle_mousemove(state.draw, pos_y, pos_x, params) │ - update() │ -end │ +local g_game_state = core.new_game(4) │ +local g_ui_state = ui.new_state(g_game_state) │ │ -function handle_touch_evt(evt_id, changed_touches) │ - touch_to_mouse_evts.handle_touch_evt(state.touch_to_mouse_evts, evt_id, changed_touches) │ +local function get_player() │ + return 1 -- TODO │ end │ │ -function handle_btn_clicked(btn_id) │ - print(string.format("handle_btn_clicked(id=%s)", btn_id)) │ - local action = draw.handle_btn_clicked(state.draw, btn_id) │ +function update() │ + draw.draw_state(g_ui_state, get_player()) │ +end │ │ - if action == draw.ACTION_SUBMIT then │ - local placed_tiles = draw.get_placed_tiles(state.draw) │ - local submit_info = core.submit(state.game, player_idx, placed_tiles) │ - print(string.format("submit returned: %s, %d", submit_info, submit_info.rc)) │ - if submit_info.rc == core.RC_SUCCESS then │ - alexgames.set_status_msg(string.format("Successfully formed words: %s", submit_info.word)) │ - draw.update_state(state.draw, state.game) │ - draw.draw(state.draw) │ - else │ - local msg = core.submit_info_to_msg(submit_info) │ - print("rc is not success... " .. msg) │ - alexgames.set_status_err(msg) │ - end │ +function handle_user_clicked(y_pos, x_pos) │ + local click_info = draw.pos_to_action(g_ui_state, y_pos, x_pos) │ + if click_info ~= nil then │ + print(string.format("User clicked { action=%s, arg=%s }", click_info.action, click_info.action_arg_idx)) │ + local rc = ui.handle_action(g_ui_state, get_player(), click_info.action, click_info.action_arg_idx) │ + update() │ end │ end │ + │ +local ui = {} │ │ -function start_game() │ - alexgames.enable_evt("mouse_updown") │ - alexgames.enable_evt("mouse_move") │ - state.touch_to_mouse_evts = touch_to_mouse_evts.init({ │ - handle_mouse_evt = handle_mouse_evt, │ - handle_mousemove = handle_mousemove, │ - }) │ -end │ -local draw = {} │ +local core = require("games/blue/blue_core") │ │ local alexgames = require("alexgames") │ │ -local core = require("games/crossword_builder/crossword_builder_core") │ - │ -local letter_tiles = require("libs/letter_tiles") │ - │ -draw.ACTION_SUBMIT = 1 │ - │ -local BTN_ID_SUBMIT = "submit" │ - │ -local board_height = 480 │ -local board_width = 480 │ - │ -local GRID_BG_COLOUR = '#000000' │ -local GRID_LINE_COLOUR = '#888888' │ -local KEY_BACKGROUND_COLOUR = '#333388' │ -local COLOUR = '#888888' │ -local TEXT_SIZE = 18 │ -local TEXT_SIZE_SCORE = 8 │ - │ -if false then │ - GRID_BG_COLOUR = '#bb6644' │ - GRID_LINE_COLOUR = '#000000' │ - KEY_BACKGROUND_COLOUR = '#ee8800' │ - COLOUR = '#000000' │ -else │ - GRID_BG_COLOUR = '#bb6644' │ - GRID_LINE_COLOUR = '#000000' │ - KEY_BACKGROUND_COLOUR = '#ff8800' │ - COLOUR = '#000000' │ -end │ - │ - │ -local padding = 5 │ - │ - │ -local function get_large_piece_params() │ - return { │ - size = 45, │ - main_text_size = 20, │ - │ - text_colour = COLOUR, │ - outline_colour = COLOUR, │ - background_colour = KEY_BACKGROUND_COLOUR, │ - line_width = 1, │ - │ - score_text_size = 8, │ - padding_small = 2, │ - padding = 5, │ +ui.UI_STATE_VIEW_OTHER_PLAYERS = 1 │ +ui.UI_STATE_SELECT_PILE = 2 │ +ui.UI_STATE_SELECT_PIECES = 3 │ +ui.UI_STATE_SELECT_DISCARDED_PIECES = 4 │ +--ui.UI_STATE_PLACE_PIECES = 4 │ │ - show_score = true, │ - get_letter_points = core.get_letter_points, │ - } │ -end │ +ui.ACTION_CHANGE_UI_STATE = 1 │ +ui.ACTION_SELECT_PILE = 2 │ +ui.ACTION_SELECT_PIECE = 3 │ +ui.ACTION_PLACE_PIECE = 4 │ +ui.ACTION_SELECT_DISCARD_PILE = 5 │ +ui.ACTION_SELECT_DISCARD_PIECE_COLOUR = 6 │ │ -local function get_board_piece_params() │ +function ui.new_state(game_state) │ return { │ - size = 23, │ - main_text_size = 18, │ - │ - outline_colour = COLOUR, │ - text_colour = COLOUR, │ - background_colour = KEY_BACKGROUND_COLOUR, │ - │ - highlight_colour = '#ffff00', │ - highlight_width = 2, │ - │ - score_text_size = 8, │ - padding_small = 2, │ - padding = 5, │ - │ - line_width = 2, │ - │ - show_score = false, │ - --get_letter_points = core.get_letter_points, │ - } │ -end │ - │ - │ -local KEY_WIDTH = 50 │ -local KEY_HEIGHT = KEY_WIDTH │ - │ -local KEY_POS_Y = board_height - get_large_piece_params().size + padding │ - │ -function draw.init(game_state) │ - local draw_state = { │ - tiles = nil, │ + game_state = game_state, │ + ui_state = ui.UI_STATE_VIEW_OTHER_PLAYERS, │ + selected_pile = nil, │ + selected_piece_colour = nil, │ } │ - │ - draw_state.tiles = letter_tiles.new_state({ │ - --touch_cursor_offset_y = -50, │ - --touch_cursor_offset_x = 50, │ - touch_cursor_offset_y = -65, │ - --touch_cursor_offset_y = -45, │ - touch_cursor_offset_x = 0, │ - }) │ - letter_tiles.add_letter_row(draw_state.tiles, game_state.players[1].letters, { y = KEY_POS_Y, x = 480/2 }, get_large_piece_params()) │ - local y_count = game_state.grid_size_y │ - local x_count = game_state.grid_size_x │ - letter_tiles.add_grid(draw_state.tiles, { │ - y_pos = padding, │ - x_pos = math.floor(board_width - letter_tiles.get_grid_y_size(y_count, get_board_piece_params()))/2, │ - y_count = y_count, │ - x_count = x_count, │ - bg_colour = GRID_BG_COLOUR, │ - line_colour = GRID_LINE_COLOUR, │ - tile_params = get_board_piece_params(), │ - }) │ - │ - alexgames.create_btn(BTN_ID_SUBMIT, "Submit", 1) │ - print("hello world") │ - alexgames.set_btn_enabled(BTN_ID_SUBMIT, false) │ - │ - --draw_state.tiles.grids[1].tiles[2][1] = "F" │ - --draw_state.tiles.grids[1].tiles[2][2] = "A" │ - --draw_state.tiles.grids[1].tiles[2][3] = "C" │ - --draw_state.tiles.grids[1].tiles[2][4] = "E" │ - --draw_state.tiles.grids[1].tiles[2][5] = "D" │ - return draw_state │ end │ │ - │ -function draw.draw(draw_state) │ - alexgames.draw_clear() │ - │ - local params = get_large_piece_params() │ - │ - letter_tiles.draw(draw_state.tiles) │ - │ ---[[ │ - local words = words_lib.get_words_made_from_letters(LANGUAGE, letters, 3, -1) │ - │ - for _, word in ipairs(words) do │ - local freq = words_lib.get_word_freq(LANGUAGE, word) │ - print(string.format("%-8s, %e", word, freq)) │ +local function get_status_msg(state) │ + if state.ui_state == ui.UI_STATE_VIEW_OTHER_PLAYERS then │ + return "Select the piles when ready" │ + elseif state.ui_state == ui.UI_STATE_SELECT_PILE then │ + return "Select a pile" │ + elseif state.ui_state == ui.UI_STATE_SELECT_PIECES then │ + if state.selected_piece_colour == nil then │ + return "Select a piece colour" │ + else │ + return "Select a destination row" │ + end │ + else │ + return nil │ end │ ---]] │ - │ - │ - alexgames.set_btn_enabled(BTN_ID_SUBMIT, #draw_state.tiles.placed_tiles > 0) │ - alexgames.draw_refresh() │ - │ -end │ - │ -function draw.handle_mouse_evt(draw_state, evt_id, pos_y, pos_x, params) │ - letter_tiles.handle_mouse_evt(draw_state.tiles, evt_id, pos_y, pos_x, params) │ -end │ - │ -function draw.handle_mousemove(draw_state, pos_y, pos_x, params) │ - letter_tiles.handle_mousemove(draw_state.tiles, pos_y, pos_x, params) │ -end │ - │ -function draw.handle_touch_evt(draw_state, evt_id, changed_touches) │ - touch_to_mouse_evts.handle_touch_evt(draw_state.touch_to_mouse_evts, evt_id, changed_touches) │ end │ │ -function draw.handle_btn_clicked(draw_state, btn_id) │ - if btn_id == BTN_ID_SUBMIT then │ - return draw.ACTION_SUBMIT │ +function ui.handle_action(ui_state, player, action, action_arg_idx) │ + -- TODO consider clearing "selected_pile" and "selected_piece_colour" when back button is pressed │ + if action == ui.ACTION_CHANGE_UI_STATE then │ + ui_state.ui_state = action_arg_idx │ + ui_state.selected_pile = nil │ + ui_state.selected_piece_colour = nil │ + elseif action == ui.ACTION_SELECT_PILE then │ + ui_state.ui_state = ui.UI_STATE_SELECT_PIECES │ + ui_state.selected_pile = action_arg_idx │ + elseif action == ui.ACTION_SELECT_DISCARD_PILE then │ + ui_state.ui_state = ui.UI_STATE_SELECT_DISCARDED_PIECES │ + ui_state.selected_pile = nil │ + elseif action == ui.ACTION_SELECT_PIECE then │ + --ui_state.ui_state = ui.UI_STATE_PLACE_PIECES │ + ui_state.selected_piece_colour = action_arg_idx │ + elseif action == ui.ACTION_PLACE_PIECE then │ + local selected_pile │ + if ui_state.ui_state == ui.UI_STATE_SELECT_PIECES then │ + selected_pile = ui_state.selected_pile │ + elseif ui_state.ui_state == ui.UI_STATE_SELECT_DISCARDED_PIECES then │ + selected_pile = core.PILE_DISCARD │ + end │ + local rc = core.place_piece(ui_state.game_state, player, │ + selected_pile, ui_state.selected_piece_colour, action_arg_idx) │ + if rc == core.RC_SUCCESS then │ + ui_state.ui_state = ui.UI_STATE_VIEW_OTHER_PLAYERS │ + ui_state.selected_pile = nil │ + ui_state.selected_piece_colour = nil │ + else │ + alexgames.set_status_err(core.rc_to_string(rc)) │ + return │ + end │ + elseif action == ui.ACTION_SELECT_DISCARD_PIECE_COLOUR then │ + ui_state.selected_piece_colour = action_arg_idx │ + print(string.format("set selected piece colour to %s", ui_state.selected_piece_colour)) │ + else │ + error(string.format("unhandled action %s", action)) │ end │ -end │ │ -function draw.get_placed_tiles(draw_state) │ - return letter_tiles.get_placed_tiles(draw_state.tiles) │ -end │ - │ - │ -function draw.update_state(draw_state, game_state) │ - letter_tiles.clear_placed_tiles(draw_state.tiles) │ - letter_tiles.set_grid(draw_state.tiles, 1, game_state.grid) │ - letter_tiles.set_row(draw_state.tiles, 1, game_state.players[1].letters) │ + alexgames.set_status_msg(get_status_msg(ui_state)) │ + │ end │ │ -return draw │ +return ui │ local core = {} │ │ -local words_lib = require("libs/words") │ -local shuffle = require("libs/shuffle") │ - │ -local letter_tiles = require("libs/letter_tiles") │ - │ -local LANGUAGE = "en" │ - │ -core.LETTER_EMPTY = letter_tiles.LETTER_EMPTY │ +local shuffle = require("libs/shuffle") │ │ -core.RC_SUCCESS = 0 │ -core.RC_LETTERS_NOT_IN_A_LINE = -1 │ -core.RC_LETTERS_NOT_CONTINUOUS = -2 │ -core.RC_WORD_NOT_IN_DICTIONARY = -3 │ +core.PIECE_EMPTY = 0 │ │ -local RC_TO_STR_MAP = { │ - [core.RC_LETTERS_NOT_IN_A_LINE] = "Letters not in a horizontal or vertical line", │ - [core.RC_LETTERS_NOT_CONTINUOUS] = "Letters not continuous", │ - [core.RC_WORD_NOT_IN_DICTIONARY] = "Word not in dictionary", │ +core.PIECES = { │ + ["white" ] = 1, │ + ["black" ] = 2, │ + ["red" ] = 3, │ + ["yellow"] = 4, │ + ["blue" ] = 5, │ } │ │ +core.PIECE_COLOUR_COUNT = 5 │ +core.PIECE_PER_COLOUR_COUNT = 20 │ +core.PIECES_PER_PILE = 4 │ │ -local LETTERS_PER_PLAYER = 8 │ - │ -local LETTER_AMOUNTS = { │ - { letter = "E", count = 14, points = 1 }, │ - { letter = "A", count = 10, points = 1 }, │ - { letter = "I", count = 8, points = 1 }, │ - { letter = "O", count = 7, points = 1 }, │ - { letter = "N", count = 8, points = 1 }, │ - { letter = "R", count = 8, points = 1 }, │ - { letter = "T", count = 6, points = 1 }, │ - { letter = "L", count = 5, points = 1 }, │ - { letter = "S", count = 4, points = 1 }, │ - { letter = "U", count = 4, points = 1 }, │ - │ - { letter = "D", count = 4, points = 2 }, │ - { letter = "G", count = 3, points = 2 }, │ - │ - { letter = "B", count = 2, points = 2 }, │ - { letter = "C", count = 2, points = 2 }, │ - { letter = "M", count = 2, points = 3 }, │ - { letter = "P", count = 2, points = 3 }, │ - │ - { letter = "F", count = 2, points = 5 }, │ - { letter = "H", count = 2, points = 5 }, │ - { letter = "V", count = 2, points = 5 }, │ - { letter = "W", count = 2, points = 5 }, │ - { letter = "Y", count = 2, points = 5 }, │ - │ - { letter = "K", count = 1, points = 6 }, │ - │ - { letter = "J", count = 1, points = 8 }, │ - { letter = "X", count = 1, points = 9 }, │ - │ - { letter = "Q", count = 1, points = 10 }, │ - { letter = "Z", count = 1, points = 10 }, │ -} │ - │ -local LETTERS_TO_POINTS = {} │ +-- Passed as an argument to core.place_piece to indicate │ +-- that the player is selecting from the discard pile │ +core.PILE_DISCARD = -1 │ │ -for _, info in ipairs(LETTER_AMOUNTS) do │ - LETTERS_TO_POINTS[info.letter] = info.points │ -end │ +core.RC_SUCCESS = 0 │ +core.RC_ROW_OCCUPIED = 1 │ │ -function core.get_letter_points(letter) │ - return LETTERS_TO_POINTS[letter] │ +function core.rc_to_string(rc) │ + local MAP = { │ + [core.RC_SUCCESS] = "Success", │ + [core.RC_ROW_OCCUPIED] = "This row already contains a different colour piece", │ + } │ + return MAP[rc] │ end │ │ -function core.rc_to_str(rc) │ - local s = RC_TO_STR_MAP[rc] │ - │ - if s == nil then │ - error(string.format("Could not convert rc %s to string", rc)) │ - end │ - │ - return s │ +function core.get_card_piece_type(y, x) │ + return 1 + ((y-1 + -x ) % core.PIECE_COLOUR_COUNT) │ end │ │ -function core.submit_info_to_msg(submit_info) │ - if submit_info.rc == core.RC_WORD_NOT_IN_DICTIONARY then │ - return string.format("Word '%s' (pos y=%d,x=%d) not in dictionary", submit_info.word, submit_info.pos.y, submit_info.pos.x) │ - else │ - return core.rc_to_str(submit_info.rc) │ - end │ +local function get_num_piles(num_players) │ + local MAP = { │ + [2] = 5, │ + [3] = 7, │ + [4] = 9, │ + } │ + return MAP[num_players] │ end │ │ -function core.new_state(player_count) │ - words_lib.init(LANGUAGE) │ +function core.new_game(num_players) │ local state = { │ - letters = {}, │ - players = {}, │ - grid_size_y = 12, │ - grid_size_x = 12, │ - │ - grid = {}, │ + pieces = {}, │ + piles = {}, │ + discard_penalty = true, │ + discard_pile = {}, │ + player_states = {}, │ } │ │ - for _, info in ipairs(LETTER_AMOUNTS) do │ - for _=1,info.count do │ - table.insert(state.letters, info.letter) │ - end │ - end │ - │ - shuffle.shuffle(state.letters) │ - │ - for _=1,player_count do │ - local player_letters = {} │ - for _=1,LETTERS_PER_PLAYER do │ - local letter = table.remove(state.letters) │ - table.insert(player_letters, letter) │ + for _, piece_colour in pairs(core.PIECES) do │ + for _=1,core.PIECE_PER_COLOUR_COUNT do │ + table.insert(state.pieces, piece_colour) │ end │ - table.insert(state.players, { │ - letters = player_letters │ - }) │ end │ + shuffle.shuffle(state.pieces) │ │ - for y=1,state.grid_size_y do │ - local row = {} │ - for x = 1,state.grid_size_y do │ - table.insert(row, core.LETTER_EMPTY) │ + for pile_idx=1,get_num_piles(num_players) do │ + state.piles[pile_idx] = {} │ + for i=1,core.PIECES_PER_PILE do │ + local piece = table.remove(state.pieces) │ + table.insert(state.piles[pile_idx], piece) │ end │ - table.insert(state.grid, row) │ end │ │ - return state │ -end │ - │ -local function sign(x) │ - if x == 0 then return 0 │ - elseif x < 0 then return -1 │ - else return 1 end │ -end │ - │ -local function letters_in_a_line(placed_letters) │ - local dy = nil │ - local dx = nil │ - │ - local prev_tile_info = nil │ - for _, tile_info in ipairs(placed_letters) do │ - if prev_tile_info ~= nil then │ - local dy2 = prev_tile_info.y - tile_info.y │ - local dx2 = prev_tile_info.x - tile_info.x │ + for i=1,num_players do │ + state.player_states[i] = { │ + score = 0, │ + staging = {}, │ + card = {}, │ + } │ │ - if dy ~= nil then │ - print(string.format("{y=%d, x=%d}, dy=%s, dx=%s, dy2=%s, dx2=%s", tile_info.y, tile_info.x, dy, dx, dy2, dx2)) │ - if dy == 0 and dy2 ~= 0 then return false end │ - if dx == 0 and dx2 ~= 0 then return false end │ - │ - if dy == 0 and dx ~= 0 then │ - --if sign(dx) ~= sign(dx2) then return false end │ - elseif dx == 0 and dy ~= 0 then │ - --if sign(dy) ~= sign(dy2) then return false end │ - else │ - return false │ - end │ - else │ - dy = dy2 │ - dx = dx2 │ + for y=1,core.PIECE_COLOUR_COUNT do │ + state.player_states[i].staging[y] = { colour = nil, count = 0 } │ + state.player_states[i].card[y] = {} │ + for x=1,core.PIECE_COLOUR_COUNT do │ + state.player_states[i].card[y][x] = core.PIECE_EMPTY │ end │ - │ - │ - end │ - prev_tile_info = tile_info │ - end │ - return true │ -end │ - │ -local function get_letters_bounds(state, placed_letters) │ - if #placed_letters == 0 then error("get_letters_bounds called with no placed_letters", 2) end │ - local letters_start = nil │ - local letters_end = nil │ - │ - for _, letter_info in ipairs(placed_letters) do │ - if letters_start == nil or │ - (letter_info.y <= letters_start.y and │ - letter_info.x <= letters_start.x) then │ - letters_start = letter_info │ end │ │ - if letters_end == nil or │ - (letter_info.y >= letters_end.y and │ - letter_info.x >= letters_end.x) then │ - letters_end = letter_info │ - end │ + │ end │ │ - -- TODO check if there are already letters before or after start/end? │ - │ - if letters_start == nil or letters_end == nil then │ - error("could not find start or end of letters?") │ - end │ - return { start_pos = letters_start, end_pos = letters_end } │ + return state │ end │ │ -local function get_placed_letters_map(state, placed_letters) │ - local placed_letters_map = {} │ - for y=1,state.grid_size_y do │ - placed_letters_map[y] = {} │ - end │ - for _, placed_letter_info in ipairs(placed_letters) do │ - if placed_letters_map[placed_letter_info.y][placed_letter_info.x] ~= nil then │ - error(string.format("already found letter at pos %d %d", placed_letter_info.y, placed_letter_info.x)) │ - end │ - placed_letters_map[placed_letter_info.y][placed_letter_info.x] = placed_letter_info.letter │ - end │ - return placed_letters_map │ +function core.can_place_piece(state, player, selected_pile, selected_piece_colour, dst_row) │ + local staging_row = state.player_states[player].staging[dst_row] │ + return staging_row.count == 0 or │ + (staging_row.colour == selected_piece_colour and staging_row.count < dst_row) │ end │ │ -local function get_letter(state, placed_letters, pt) │ - local placed_letters_map = get_placed_letters_map(state, placed_letters) │ - if placed_letters_map[pt.y][pt.x] then │ - return placed_letters_map[pt.y][pt.x] │ - else │ - return state.grid[pt.y][pt.x] │ +function core.place_piece(state, player, selected_pile, selected_piece_colour, dst_row) │ + print(string.format("place_piece(player=%s, selected_pile=%s, selected_colour=%s, dst_row=%s)", │ + player, selected_pile, selected_piece_colour, dst_row)) │ + if not core.can_place_piece(state, player, selected_pile, selected_piece_colour, dst_row) then │ + return core.RC_ROW_OCCUPIED │ end │ -end │ │ - │ -local function get_points_between_letters(state, bounds) │ - local dy = sign(bounds.end_pos.y - bounds.start_pos.y) │ - local dx = sign(bounds.end_pos.x - bounds.start_pos.x) │ - print(string.format('get_points_between_letters, dy=%d, dx=%d', dy, dx)) │ - │ - local pts = {} │ - if dy ~= 0 then │ - local x = bounds.start_pos.x │ - for y=bounds.start_pos.y,bounds.end_pos.y,dy do │ - table.insert(pts, { y = y, x = x }) │ - end │ - elseif dx ~= 0 then │ - local y = bounds.start_pos.y │ - for x=bounds.start_pos.x,bounds.end_pos.x,dx do │ - table.insert(pts, { y = y, x = x }) │ + local penalty = 0 │ + local pile │ + if selected_pile == core.PILE_DISCARD then │ + pile = state.discard_pile │ + if state.discard_penalty then │ + -- TODO handle discard penalty │ + penalty = -1 │ + state.discard_penalty = false │ end │ else │ - table.insert(pts, { y = bounds.start_pos.y, x = bounds.start_pos.x }) │ - end │ - return pts │ -end │ - │ -local function letters_continuous(state, placed_letters) │ - local bounds = get_letters_bounds(state, placed_letters) │ - │ - local placed_letters_map = get_placed_letters_map(state, placed_letters) │ - │ - for _, pos in ipairs(get_points_between_letters(state, bounds)) do │ - if placed_letters_map[pos.y][pos.x] == nil and │ - state.grid[pos.y][pos.x] == core.LETTER_EMPTY then │ - return false │ - end │ + pile = state.piles[selected_pile] │ + state.piles[selected_pile] = nil │ end │ - │ - return true │ -end │ - │ -local function get_word_formed(state, placed_letters) │ - -- TODO need to get letters before and after if present │ - local word = "" │ - │ - local bounds = get_letters_bounds(state, placed_letters) │ - local placed_letters_map = get_placed_letters_map(state, placed_letters) │ - for _, pt in ipairs(get_points_between_letters(state, bounds)) do │ - local letter = nil │ - if placed_letters_map[pt.y][pt.x] then │ - letter = placed_letters_map[pt.y][pt.x] │ - elseif state.grid[pt.y][pt.x] then │ - letter = state.grid[pt.y][pt.x] │ + local pieces_to_move = {} │ + local pieces_to_discard = {} │ + for _, piece in ipairs(pile) do │ + if piece == selected_piece_colour then │ + table.insert(pieces_to_move, piece) │ else │ - error(string.format("no letter at pos %d %d", pt.y, pt.x)) │ + table.insert(pieces_to_discard, piece) │ end │ - │ - print(string.format("getting letter from pt %d %d: %s", pt.y, pt.x, letter)) │ - word = word .. letter │ end │ │ - return word │ -end │ - │ -local function in_range(state, y, x) │ - return (1 <= y and y <= state.grid_size_y and │ - 1 <= x and x <= state.grid_size_x) │ -end │ - │ -local function find_end_pt(state, placed_letters, start_pt, dy, dx) │ - print(string.format("find_end_pt called with pt %d %d, dy=%d, dx=%d", start_pt.y, start_pt.x, dy, dx)) │ - if dy == 0 and dx == 0 then return { y = start_pt.y, x = start_pt.x } end │ - local y = start_pt.y │ - local x = start_pt.x │ + if pile == state.discard_pile then │ + state.discard_pile = {} │ + end │ │ - while true do │ - if not in_range(state, y - dy, x - dx) then │ - break │ - end │ - local letter = get_letter(state, placed_letters, { y = y - dy, x = x - dx }) │ - print(string.format("checking pt %d %d, %s", y, x, letter)) │ - if letter == core.LETTER_EMPTY then │ - break │ - end │ - y = y - dy │ - x = x - dx │ + for _, piece in ipairs(pieces_to_discard) do │ + table.insert(state.discard_pile, piece) │ end │ │ - print(string.format("find_end_pt returning with %d %d", y, x)) │ - return { y = y, x = x } │ + local staging = state.player_states[player].staging │ + -- TODO handle putting too many in staging area │ + staging[dst_row].colour = pieces_to_move[1] │ + staging[dst_row].count = staging[dst_row].count + #pieces_to_move │ + │ + return core.RC_SUCCESS │ end │ │ -local function get_parallel_word_info(state, placed_letters, dy, dx) │ - print(string.format("get_parallel_word_info")) │ - local bounds = get_letters_bounds(state, placed_letters) │ - local placed_letters_map = get_placed_letters_map(state, placed_letters) │ +return core │ +local core = {} │ │ - if dy ~= 0 and dx ~= 0 then │ - error(string.format("expected horizontal or vertical line, received diagonal")) │ - elseif dy == 0 and dx == 0 then │ - -- for the case of a single letter (resulting in dy = 0 and dx = 0), just │ - -- arbitrarily pick one to be 1, and the other to be 0. │ - -- then this function (get_parallel_word_info) and the perpendicular one │ - -- will work, even for this special case. │ - error("expected non zero dy or dx.") │ - end │ +local PLAYER_MOVE_SPEED = 3.0/1000 │ │ - local start_pt = find_end_pt(state, placed_letters, bounds.start_pos, dy, dx) │ - local end_pt = find_end_pt(state, placed_letters, bounds.start_pos, -dy, -dx) │ +core.ITEM_ID_PLAYER = 1 │ +core.ITEM_ID_PATIENT_IN_BED = 2 │ +core.ITEM_ID_PATIENT_IN_BED_FLIPPED = 3 │ +core.ITEM_ID_BED = 4 │ +core.ITEM_ID_BED_FLIPPED = 5 │ +core.ITEM_ID_BED_SEGMENT_2 = 6 │ +core.ITEM_ID_IV_BAG = 7 │ +core.ITEM_ID_DEFIB = 8 │ +core.ITEM_ID_VENTILATOR = 9 │ +core.ITEM_ID_XRAY_SHEET = 10 │ +core.ITEM_ID_XRAY_SOURCE = 11 │ │ - local word = "" │ - │ - print(string.format("parallel word start %d %d, end %d %d", start_pt.y, start_pt.x, end_pt.y, end_pt.x)) │ - for offset=0,math.max(end_pt.y - start_pt.y, end_pt.x - start_pt.x) do │ - local pt = { │ - y = start_pt.y + offset*dy, │ - x = start_pt.x + offset*dx │ - } │ - print(string.format("parallel word checking %d %d", pt.y, pt.x)) │ +core.NEEDS_LOW_FLUIDS = 1 │ +core.NEEDS_LOW_OXYGEN = 2 │ +core.NEEDS_NO_HEARTBEAT = 3 │ +core.NEEDS_BROKEN_BONE = 4 │ │ - local letter │ - if placed_letters_map[pt.y][pt.x] then │ - letter = placed_letters_map[pt.y][pt.x] │ - elseif state.grid[pt.y][pt.x] then │ - letter = state.grid[pt.y][pt.x] │ - else │ - error(string.format("could not find letter at %d %d", pt.y, pt.x)) │ - end │ │ - word = word .. letter │ - end │ +core.ACTION_DIR_PAD_POS_CHANGE = 1 │ +core.ACTION_USE_BTN_DOWN = 2 │ +core.ACTION_USE_BTN_RELEASE = 3 │ +core.ACTION_DROP_BTN_DOWN = 4 │ +core.ACTION_DROP_BTN_RELEASE = 5 │ │ - return { │ - start_pt = start_pt, │ - end_pt = end_pt, │ - word = word, │ - } │ -end │ +core.USING_ACTION_REVEAL_NEEDS = 1 │ +core.USING_ACTION_LOW_FLUIDS = 2 │ +core.USING_ACTION_DEFIB = 3 │ +core.USING_ACTION_VENTILATOR = 4 │ +core.USING_ACTION_PICK_UP_PATIENT = 5 │ +core.USING_ACTION_PUT_PATIENT_IN_BED = 6 │ │ -local function between_pts(start_pt, end_pt) │ - local dy = sign(end_pt.y - start_pt.y) │ - local dx = sign(end_pt.x - start_pt.x) │ +core.EVT_PATIENT_NEED_EXPIRED = 1 │ +core.EVT_PATIENT_CURED = 2 │ │ - local pts = {} │ - local y = start_pt.y │ - local x = start_pt.x │ - while y <= end_pt.y and x <= end_pt.x do │ - table.insert(pts, { y = y, x = x }) │ - y = y + dy │ - x = x + dx │ - end │ +core.USE_PROGRESS_MAX = 100 │ │ - return pts │ -end │ +local TIME_TO_REVEAL_NEEDS = 1.0 │ +local TIME_TO_PICK_UP_PATIENT = 0.7 │ │ -local function find_perpendicular_word(state, placed_letters, pt, dy_arg, dx_arg) │ - -- swap dy and dx: we're looking for perpendicular words │ - local dy = dx_arg │ - local dx = dy_arg │ +local NEED_LIST = { │ + core.NEEDS_LOW_FLUIDS, │ + core.NEEDS_NO_HEARTBEAT, │ + core.NEEDS_LOW_OXYGEN, │ + core.NEEDS_BROKEN_BONE, │ +} │ │ - local start_pt = find_end_pt(state, placed_letters, pt, dy, dx) │ - local end_pt = find_end_pt(state, placed_letters, pt, -dy, -dx) │ +local NEEDS_TO_USE_TIME_MAP = { │ + [core.NEEDS_LOW_FLUIDS] = 2.5, │ + [core.NEEDS_NO_HEARTBEAT] = 1.5, │ + [core.NEEDS_LOW_OXYGEN] = 2.5, │ +} │ │ - if start_pt.y == end_pt.y and │ - start_pt.x == end_pt.x then │ - return nil │ - else │ - local word = "" │ - for _, pt in ipairs(between_pts(start_pt, end_pt)) do │ - local letter = get_letter(state, placed_letters, pt) │ - word = word .. letter │ - end │ - return { │ - start_pt = start_pt, │ - end_pt = end_pt, │ - word = word, │ - } │ - end │ -end │ +local NEED_TO_BED_FIX_TIME_MS = { │ + [core.NEEDS_BROKEN_BONE] = 20*1000, │ +} │ │ -local function get_all_new_words_formed(state, placed_letters) │ - local word_infos = {} │ - local bounds = get_letters_bounds(state, placed_letters) │ │ - local dy = sign(bounds.end_pos.y - bounds.start_pos.y) │ - local dx = sign(bounds.end_pos.x - bounds.start_pos.x) │ +local NEEDS_TO_ITEMS_MAP = { │ + [core.NEEDS_LOW_FLUIDS] = { core.ITEM_ID_IV_BAG }, │ + [core.NEEDS_NO_HEARTBEAT] = { core.ITEM_ID_DEFIB }, │ + [core.NEEDS_LOW_OXYGEN] = { core.ITEM_ID_VENTILATOR }, │ + [core.NEEDS_BROKEN_BONE] = { }, │ +} │ │ - local skip_parallel = false │ - local skip_parallel = false │ - if #placed_letters == 1 then │ - assert(dy == 0) │ - assert(dx == 0) │ +local ITEMS_DROPPED_ON_USE_MAP = { │ + [core.ITEM_ID_IV_BAG] = true, │ + [core.ITEM_ID_VENTILATOR] = true, │ +} │ │ - -- Arbitrarily choosing horizontal as the "parallel" direction with one letter │ - dx = 1 │ +-- These seem good for one player... │ +-- rough ideas, should be sum of: │ +-- * time to reveal max-ish number of patients that could reasonably need to have │ +-- their needs revealed at any given time, plus │ +-- * time to walk halfway across the map, plus │ +-- * time to fix patient with equipment │ +local NEED_TYPE_TO_TIME_LEFT = { │ + [core.NEEDS_LOW_FLUIDS] = 60, │ + [core.NEEDS_NO_HEARTBEAT] = 25, │ + [core.NEEDS_LOW_OXYGEN] = 40, │ + [core.NEEDS_BROKEN_BONE] = 90, │ +} │ │ - -- Since I chose horizontal as "parallel", check if we need to actually │ - -- look for "perpendicular" letters ( y-1 and y+1) │ - local pt1 = { y = bounds.start_pos.y, x = bounds.start_pos.x - 1 } │ - local pt2 = { y = bounds.start_pos.y, x = bounds.start_pos.x + 1 } │ │ - local l1 = get_letter(state, placed_letters, pt1) │ - local l2 = get_letter(state, placed_letters, pt2) │ - print(string.format("l1=%s, l2=%s", l1, l2)) │ - if get_letter(state, placed_letters, pt1) == core.LETTER_EMPTY and │ - get_letter(state, placed_letters, pt2) == core.LETTER_EMPTY then │ - skip_parallel = true │ - end │ - end │ - │ - if not skip_parallel then │ - local parallel_word_info = get_parallel_word_info(state, placed_letters, dy, dx) │ - print(string.format("Found parallel word: %s", parallel_word_info.word)) │ - table.insert(word_infos, parallel_word_info) │ - end │ +local DIRS = { │ + { y = 1, x = 0 }, │ + { y = 1, x = -1 }, │ + { y = 0, x = -1 }, │ + { y = -1, x = -1 }, │ + { y = -1, x = 0 }, │ + { y = -1, x = 1 }, │ + { y = 0, x = 1 }, │ + { y = 1, x = 1 }, │ +} │ │ - for _, pt in ipairs(get_points_between_letters(state, bounds)) do │ - local perp_info = find_perpendicular_word(state, placed_letters, pt, dy, dx) │ - if perp_info then │ - print(string.format("Found perpendicular word: %s", perp_info.word)) │ - table.insert(word_infos, perp_info) │ - end │ - end │ +local PICK_UP_ITEMS = { │ + [core.ITEM_ID_IV_BAG] = true, │ + [core.ITEM_ID_DEFIB] = true, │ + [core.ITEM_ID_VENTILATOR] = true, │ +} │ │ - return word_infos │ │ -end │ +local function get_player_starting_pos(i) │ + --[[ │ + local map = { │ + [1] = { y = 2.5, x = 2.5 }, │ + [2] = { y = 7.5, x = 7.5 }, │ + [3] = { y = 7.5, x = 2.5 }, │ + [4] = { y = 2.5, x = 7.5 }, │ + } │ + ]] │ │ -local function get_idx_of_letter(letter_list, letter_val) │ - for idx, val in ipairs(letter_list) do │ - if letter_val == val then │ - return idx │ - end │ - end │ + local map = { │ + --[1] = { y = 2.5, x = 5.0 }, │ + --[2] = { y = 7.5, x = 5.0 }, │ + --[3] = { y = 5.0, x = 2.5 }, │ + --[4] = { y = 5.0, x = 7.5 }, │ + [1] = { y = 13, x = 1 }, │ + [2] = { y = 13, x = 3 }, │ + [3] = { y = 13, x = 5 }, │ + [4] = { y = 13, x = 7 }, │ + } │ + return map[i] │ end │ │ -local function commit_placed_letters(state, player_idx, placed_letters) │ - for _, placed_letter_info in ipairs(placed_letters) do │ - state.grid[placed_letter_info.y][placed_letter_info.x] = placed_letter_info.letter │ - end │ - │ - for _, placed_letter_info in ipairs(placed_letters) do │ - local player_letters = state.players[player_idx].letters │ - table.remove(player_letters, get_idx_of_letter(player_letters, placed_letter_info.letter)) │ - end │ +local function new_item(id) │ + return { │ + id = id, │ + } │ end │ │ -local function deal_more_tiles(state, player_idx) │ - local player = state.players[player_idx] │ - while #player.letters < LETTERS_PER_PLAYER do │ - print("dealing player a new tile") │ - local letter = table.remove(state.letters) │ - table.insert(player.letters, letter) │ +local function new_bed(id, fixes_needs) │ + local item = new_item(id) │ + if not core.is_bed(item) then │ + error(string.format("Item id %s is not bed", id), 2) │ end │ + item.fixes_needs = fixes_needs │ + return item │ end │ - │ - │ -function core.submit(state, player_idx, placed_letters) │ - print(string.format("core.submit... placed_letters len: %d", #placed_letters)) │ - │ - print("checking if letters are in a line...") │ - if not letters_in_a_line(placed_letters) then │ - print("letters not in a line!") │ - return { rc = core.RC_LETTERS_NOT_IN_A_LINE } │ - end │ │ - print("checking if letters are continuous...") │ - if not letters_continuous(state, placed_letters) then │ - print("letters not continuous!") │ - return { rc = core.RC_LETTERS_NOT_CONTINUOUS } │ - end │ +local needs_type_debug = 0 │ │ - local word_infos = get_all_new_words_formed(state, placed_letters) │ - print(string.format("found %d words", #word_infos)) │ - for i, info in ipairs(word_infos) do │ - print(string.format("%2d: %3d %3d %s", i, info.start_pt.y, info.start_pt.x, info.word)) │ │ - if not words_lib.is_valid_word(LANGUAGE, info.word) then │ - return { rc = core.RC_WORD_NOT_IN_DICTIONARY, word = info.word, pos=info.start_pt } │ - end │ - │ +function core.is_patient(item_info) │ + if item_info == nil then │ + error("arg is nil", 2) │ end │ - │ - commit_placed_letters(state, player_idx, placed_letters) │ - │ - deal_more_tiles(state, player_idx) │ - │ - print(string.format("player tile count %d", #state.players[player_idx].letters)) │ - │ - return { rc = core.RC_SUCCESS, word_infos = word_infos } │ + return item_info.id == core.ITEM_ID_PATIENT_IN_BED or │ + item_info.id == core.ITEM_ID_PATIENT_IN_BED_FLIPPED │ end │ │ --- words_lib.get_words_made_from_letters │ - │ -return core │ --- Game: Spider Swing │ --- Author: Alex Barry (github.com/alexbarry) │ --- │ ---[[ │ --- TODO: │ --- * add different stages, including moving swing spots such as: │ --- - butterflies (moving eratically, perhaps? Or any direction) │ --- - leaves (could just fall down, or blow up, or blow side to side steadily) │ ---]] │ - │ -local core = require("games/spider_swing/spider_swing_core") │ -local draw = require("games/spider_swing/spider_swing_draw") │ - │ -local alexgames = require("alexgames") │ - │ -local state = {} │ -state.game = core.new_state() │ -local player_idx = 1 │ - │ -local player_won = false │ - │ -local FPS = 60 │ -local TIME_PER_FRAME_MS = 1000/FPS │ - │ -local GAME_OPTION_NEW_GAME = "option_new_game" │ - │ -function update(dt_ms) │ - if state.game.game_over then │ - state.game.game_over = false │ - core.reset_player_state(state.game, player_idx) │ - player_won = false │ - end │ - --print(string.format("Pos is now {y=%.1f, x=%.1f}", state.game.players[1].y, state.game.players[1].x)) │ - if not player_won then │ - player_won = core.player_won(state.game, player_idx) │ - if player_won then │ - draw.player_finished() │ - end │ - end │ - core.update_state(state.game, dt_ms) │ - draw.draw_state(state.game, player_idx, dt_ms) │ +function core.is_player(item_info) │ + return item_info.id == core.ITEM_ID_PLAYER │ end │ │ -local function user_press(pos_y, pos_x) │ - local pos = draw.get_mouse_pos_in_game(state.game, player_idx, pos_y, pos_x) │ - local node_idx = core.get_closest_swing_spot(state.game, pos) │ - core.player_attach_swing(state.game, player_idx, node_idx) │ +function core.is_bed(item_info) │ + return item_info.id == core.ITEM_ID_BED or │ + item_info.id == core.ITEM_ID_BED_FLIPPED │ end │ │ -local function user_release() │ - core.player_release_swing(state.game, player_idx) │ -end │ +local function new_patient(y, x) │ + needs_type_debug = needs_type_debug + 1 │ + return { │ + id = core.ITEM_ID_PATIENT_IN_BED, │ + y = y, │ + x = x, │ │ + requires_help = false, │ + needs_revealed = false, │ + needs_type = needs_type_debug, │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - -- print("handle_mouse_evt" .. evt_id) │ - if evt_id == 2 then │ - user_press(pos_y, pos_x) │ - elseif evt_id == 1 then │ - user_release() │ - end │ -end │ + time_left = nil, │ + orig_time_left = nil, │ │ -function handle_touch_evt(evt_id, changed_touches) │ - -- print("handle_touch_evt: " .. evt_id) │ - if evt_id == "touchstart" then │ - user_press(changed_touches[1].y, changed_touches[1].x) │ - elseif evt_id == "touchend" then │ - user_release() │ - end │ + held_by = nil, │ + } │ end │ │ -function handle_game_option_evt(option_id) │ - if option_id == GAME_OPTION_NEW_GAME then │ - state.game = core.new_state() │ - player_won = false │ - end │ +local function set_patient_need(patient, need_type) │ + patient.requires_help = true │ + patient.needs_revealed = false │ + patient.needs_type = need_type │ + patient.time_left = NEED_TYPE_TO_TIME_LEFT[need_type] │ + patient.orig_time_left = NEED_TYPE_TO_TIME_LEFT[need_type] │ end │ │ --- Since this game is fast, it doesn't really make sense to share the state. │ --- Well, it sort of does, since it's randomly generated, maybe you really want to │ --- try again on a different device. │ --- But since I didn't implement saving state yet, I didn't implement serialization, │ --- so for now I am just going to return nil here to suppress the warning. │ -function get_state() │ - return nil │ +local function bad_row(row) │ + return function (y, x) │ + if row == y then return 2 │ + else return 1 end │ + end │ end │ │ -function start_game() │ - alexgames.set_timer_update_ms(TIME_PER_FRAME_MS) │ - alexgames.enable_evt("mouse_updown") │ - alexgames.enable_evt("touch") │ - │ - alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New game", type = alexgames.OPTION_TYPE_BTN }) │ +local function combine(func1, func2) │ + return function (y, x) │ + if func1(y,x) > func2(y,x) then return func1(y,x) │ + else return func2(y,x) end │ + end │ end │ -local draw = {} │ -local core = require("games/spider_swing/spider_swing_core") │ - │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ - │ -local alexgames = require("alexgames") │ │ -local PLAYER_COLOURS = { │ - [1] = { fill = '#cc8888', outline = '#ff0000', }, │ +--[[ │ +pattern = { │ + combine( bad_row(9), bad_row(8) ), │ + combine( bad_row(7), bad_row(6) ), │ + combine( bad_row(5), bad_row(4) ), │ + combine( bad_row(3), bad_row(2) ), │ + combine( bad_row(1), bad_row(0) ), │ } │ -local PLAYER_RADIUS = 20 │ -local PLAYER_WIDTH = 70 │ -local PLAYER_HEIGHT = 50 │ -local WEB_OFFSET = 10 │ │ -local SWING_SPOT_RADIUS = 5 │ -local SWING_SPOT_COLOUR = { fill = '#00ffff', outline = '#0000ff', } │ - │ -local ROPE_THICKNESS = 4 │ - │ -local anim_state = draw_celebration_anim.new_state({ │ - on_finish = function () │ - end, │ -}) │ +]] │ │ +local function reset_step(state) │ + state.time_to_step = state.step_time │ + state.step = 0 │ +end │ │ -local function get_camera_pos(game_state, player_idx) │ - --local camera = { y = 240, x = 240 } │ - --local camera = { y = 0, x = 0 } │ - local player = game_state.players[player_idx] │ - local camera = { │ - --y = player.y - 480/2, │ - y = 0, │ - x = math.max(player.x - 480/3, -480/3), │ - } │ - return camera │ +local function between(lower, val, upper) │ + return lower <= val and val < upper │ end │ │ +local function load_level1(state) │ │ --- translate mouse position to game position │ -function draw.get_mouse_pos_in_game(game_state, player_idx, pos_y, pos_x) │ - local player = game_state.players[player_idx] │ - local camera = get_camera_pos(game_state, player_idx) │ - local pos = { │ - y = camera.y + pos_y, │ - x = camera.x + pos_x, │ - } │ - return pos │ -end │ + state.tile_bad_levels = { │ + function (y,x, step) │ + step = (10 - step - 1) % 12 │ + return y == step │ + end, │ │ -local function draw_finish_line(screen_x_pos, bg_height) │ + function (y,x,step) │ + local val = (4 <= y and y <= 5) or │ + (4 <= x and x <= 5) │ + step = step % 12 │ + if step < 3 then │ + return false │ + elseif step < 6 then │ + return val │ + elseif step < 9 then │ + return false │ + else │ + return not val │ + end │ + end, │ │ - local checker_count_y = 20 │ - local checker_count_x = 3 │ - local checker_size = bg_height / checker_count_y │ + function (y,x,step) │ + step = step % 12 │ + return x == step │ + end, │ │ - local FINISH_LINE_OUTLINE_COLOUR = '#888888' │ + -- 0 1 2 3 4 5 6 7 8 9 │ + -- 0 a a . . . . . . . . │ + -- 1 a a . . . . . . . . │ + -- 2 . . b b . . . . . . │ + -- 3 . . b b . . . . . . │ + -- 4 . . . . c c . . . . │ + -- 5 . . . . c c . . . . │ + -- 6 . . . . . . b b . . │ + -- 7 . . . . . . b b . . │ + -- 8 . . . . . . . . a a │ + -- 9 . . . . . . . . a a │ │ - alexgames.draw_line(FINISH_LINE_OUTLINE_COLOUR, 1, │ - 0, screen_x_pos, │ - bg_height, screen_x_pos) │ - alexgames.draw_line(FINISH_LINE_OUTLINE_COLOUR, 1, │ - 0, screen_x_pos + checker_size * checker_count_x, │ - bg_height, screen_x_pos + checker_size * checker_count_x) │ + function (y,x,step) │ + step = math.floor((step % 6)/2) │ + if step == 0 then │ + return (0 <= y and y <= 1 or 8 <= y and y <= 9) and │ + (0 <= x and x <= 1 or 8 <= x and x <= 9) │ + elseif step == 1 then │ + return (2 <= y and y <= 3 or 6 <= y and y <= 7) and │ + (2 <= x and x <= 3 or 6 <= x and x <= 7) │ + elseif step == 2 then │ + return (4 <= y and y <= 5 and │ + 4 <= x and x <= 5) │ + else │ + return false │ + end │ + end, │ │ - for i=0,checker_count_y-1 do │ - for j=0,checker_count_x-1 do │ - local checker_colour │ - if (i*checker_count_x + j) % 2 == 0 then │ - checker_colour = '#000000' │ + function (y,x,step) │ + step = step % 8 │ + if step < 1 then │ + return between(0,y,2) or between(8,y,10) │ + elseif step < 2 then │ + return between(2,y,4) or between(6,y,8) │ + elseif step < 4 then │ + return false │ + elseif step < 6 then │ + return between(4,y,6) │ else │ - checker_colour = '#ffffff' │ + return false │ end │ + end, │ │ - alexgames.draw_rect(checker_colour, │ - (i )*checker_size, screen_x_pos + (j )*checker_size, │ - (i+1)*checker_size, screen_x_pos + (j+1)*checker_size) │ + function (y,x,step) │ + step = step % 14 │ + if step < 5 then return between(2*step,y,2*step+2) and between(2*step, x, 2*step+2) │ + elseif step < 10 then │ + step = step - 5 │ + return between(2*step, y,2*step+2) and between(2*step, 10 - x-1, 2*step+2) │ + elseif step < 12 then │ + return between(2,y,4) and between(2,x,9) or │ + between(7,y,9) and between(2,x,9) or │ + between(2,x,4) and between(2,y,9) or │ + between(7,x,9) and between(2,y,9) │ + end │ end │ - end │ -end │ - │ -function draw.draw_state(game_state, player_idx, dt_ms) │ - local camera = get_camera_pos(game_state, player_idx) │ - alexgames.draw_clear() │ - │ - --alexgames.draw_rect('#aaaaaa', 0, 0, 480, 480) │ - local bg_height = 480 │ - local bg_width = 480 │ - local screen_bg_pos = { │ - y = math.floor(-(camera.y-math.floor(camera.y/bg_height)*bg_height)), │ - x = math.floor(-(camera.x-math.floor(camera.x/bg_width)*bg_width)), │ } │ │ - -- Draw two tiles of the background, that's the most that are ever visible at a time. │ - for i=0,1 do │ - local offset = 3 -- WTF why is this needed? Why doesn't my image tile nicely with this "offset" set to 0?? │ - -- ah, I shouldn't have the brick outline on both sides. TODO remove outline on right │ - │ - -- TODO I couldn't figure out how to make the bg image stop tiling at a certain position │ - --if i == 1 then print(string.format("camera_real_pos_x = %8.1f", camera.x + i*bg_width)) end │ - --if camera.x + (i+1)*bg_width > game_state.max_x then │ - -- goto draw_bg_continue │ - --end │ - alexgames.draw_rect('#aaaaaa', math.floor(screen_bg_pos.y), math.floor(screen_bg_pos.x + i * bg_width-offset), │ - math.floor(screen_bg_pos.y) + bg_height, math.floor(screen_bg_pos.x + i * bg_width-offset) + bg_width) │ - alexgames.draw_graphic('brick_wall', │ - screen_bg_pos.y + bg_height/2, i*(bg_width-offset) + math.floor(screen_bg_pos.x) + bg_width/2, bg_width, bg_height) │ - ::draw_bg_continue:: │ - end │ - │ - draw_finish_line(game_state.finish_line_x - camera.x, bg_height) │ + local level_map = { │ + --0 1 2 3 4 5 6 7 8 9 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 0 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 1 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 2 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 3 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 4 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 5 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 6 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 7 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 8 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 9 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 10 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 11 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 13 │ + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 14 │ + --{ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -- 0 │ + --{ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -- 1 │ + --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 2 │ + --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 3 │ + --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 4 │ + --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 5 │ + } │ │ - for player_idx, player in ipairs(game_state.players) do │ - --alexgames.draw_circle(PLAYER_COLOURS[player_idx].fill, PLAYER_COLOURS[player_idx].outline, │ - -- math.floor(player.y - camera.y), math.floor(player.x - camera.x), PLAYER_RADIUS) │ - local angle = 0 │ - if player.angle then │ - angle = -math.floor(player.angle*180/math.pi) │ - end │ - alexgames.draw_graphic("spider", │ - math.floor(player.y - camera.y), math.floor(player.x - camera.x), PLAYER_WIDTH, PLAYER_HEIGHT, { angle_degrees = angle }) │ - if player.swinging_on ~= nil then │ - --local y2 = player.y + 30 * math.sin(player.swing_angle + math.pi/2) │ - --local x2 = player.x + 30 * math.cos(player.swing_angle + math.pi/2) │ - local node = game_state.swing_spots[player.swinging_on] │ - local y1 = player.y - WEB_OFFSET * math.cos(player.angle) │ - local x1 = player.x - WEB_OFFSET * math.sin(player.angle) │ - local y2 = node.y │ - local x2 = node.x │ - alexgames.draw_line('#dddddd', ROPE_THICKNESS, math.floor(y1 - camera.y), math.floor(x1 - camera.x), math.floor(y2 - camera.y), math.floor(x2 - camera.x)) │ + state.y_size = #level_map │ + state.x_size = #level_map[1] │ │ - --[[ │ - local dy = player.y - node.y │ - local dx = player.x - node.x │ - local angle = math.atan(dy,dx) - math.pi/2 │ - local y3 = player.y + 30 * math.sin(angle) │ - local x3 = player.x + 30 * math.cos(angle) │ - alexgames.draw_line('#00ff00', 2, math.floor(player.y - camera.y), math.floor(player.x - camera.x), math.floor(y3 - camera.y), math.floor(x3 - camera.x)) │ - --]] │ + for row_idx, row in ipairs(level_map) do │ + local y = row_idx-1 │ + state.cells[y] = {} │ + for col_idx, cell in ipairs(row) do │ + local x = col_idx-1 │ + if level_map[row_idx][col_idx] == 1 then │ + state.cells[y][x] = {} │ + end │ end │ - alexgames.draw_text(string.format("E: %5.0f", math.floor(core.get_energy(game_state, player_idx)/100)), '#ff0000', 24, 5, 24, 1) │ - alexgames.draw_text(string.format("pos: %5.0f", math.floor(player.x/10)), '#ff0000', 24, 480-150, 24, 1) │ end │ │ - for _, node in ipairs(game_state.swing_spots) do │ - alexgames.draw_circle(SWING_SPOT_COLOUR.fill, SWING_SPOT_COLOUR.outline, │ - math.floor(node.y - camera.y), math.floor(node.x - camera.x), SWING_SPOT_RADIUS) │ + state.step_time = 300 │ + reset_step(state) │ + state.tile_bad_level_idx = 1 │ + state.tile_bad = function(y,x) │ + local step = state.step │ + if y >= 12 or y < 2 then return false │ + else │ + y = y - 2 │ + return state.tile_bad_levels[state.tile_bad_level_idx](y,x,step) │ + end │ end │ │ - if dt_ms ~= 0 then │ - draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ + state.tile_win = function (y,x) │ + return y <= 1 │ end │ - draw_celebration_anim.draw(anim_state) │ - alexgames.draw_refresh() │ -end │ - │ -function draw.player_finished() │ - draw_celebration_anim.fireworks_display(anim_state, { │ - -- I didn't implement dark mode in this game, so │ - -- when showing the fireworks display, the dark background │ - -- needs to be drawn so that the fireworks are more visible. │ - colour_pref = "light", │ - }) │ -end │ - │ -return draw │ -local core = {} │ │ -local PLAYER_MASS = 1 │ + local level_items = { │ + } │ │ -local function generate_spots(spots, x_pos) │ - for i=1,10 do │ - table.insert(spots, { │ - y = 40 + math.random()*400, │ - x = x_pos + math.random()*480, │ - }) │ + for _, item_info in ipairs(level_items) do │ + if core.is_patient(item_info.item) then │ + local patient_info = new_patient(item_info.y, item_info.x) │ + table.insert(state.patients, patient_info) │ + table.insert(state.cells[item_info.y][item_info.x], patient_info) │ + else │ + table.insert(state.cells[item_info.y][item_info.x], item_info.item) │ + end │ end │ -end │ │ -function core.reset_player_state(state, player_idx) │ - local player = state.players[player_idx] │ - player.y = 250 │ - player.x = 0 │ - player.dy = 0 │ - player.dx = 0 │ - core.player_attach_swing(state, 1, 1) │ -end │ - │ -local function squared(x) │ - return x*x │ -end │ - │ -local function get_speed(player) │ - if player.swinging_on == nil then │ - return math.sqrt(squared(player.dx) + squared(player.dy)) │ - else │ - return math.abs(player.angleV * player.swing_len) │ - end │ + --set_patient_need(state.patients[1], core.NEEDS_BROKEN_BONE) │ + --set_patient_need(state.patients[2], core.NEEDS_LOW_FLUIDS) │ end │ │ -function core.get_energy(state, player_idx) │ - local player = state.players[player_idx] │ - │ - local player_height = (state.max_y - player.y) │ - return PLAYER_MASS * (0.5*squared(get_speed(player)) + state.gravity_y * player_height) │ +local function add_player(state, player_idx, pos_y, pos_x) │ + local player_item = new_item(core.ITEM_ID_PLAYER) │ + player_item.player_idx = player_idx │ + table.insert(state.cells[math.floor(pos_y)][math.floor(pos_x)], player_item) │ + state.players[player_idx] = { │ + y = pos_y, │ + x = pos_x, │ + vel_y = 0, │ + vel_x = 0, │ + use_btn_down = false, │ + drop_btn_down = false, │ + holding = nil, │ + is_using = false, │ + use_progress = 0, │ + use_time = nil, │ + } │ end │ │ -function core.new_state() │ +function core.init(game_params) │ local state = { │ - players = { │ - { │ - y = 250, │ - x = 0, │ - --dy = -250, │ - --dx = 150, │ - dy = 0, │ - dx = 0, │ - swinging_on = nil, │ - swing_len = nil, │ - }, │ - }, │ - swing_spots = { │ - -- { y = 225, x = 250, }, │ - │ - { y = 150, x = 0, }, │ + y_size = game_params.y_size, │ + x_size = game_params.x_size, │ + cells = {}, │ + patients = {}, │ + players = {}, │ │ - --[[ │ - { y = 25, x = 250, }, │ - { y = 25, x = 500, }, │ - { y = 25, x = 750, }, │ - { y = 150, x = 1000, }, │ - --]] │ + -- 15 seconds was a bit too hard for just one player │ + new_sickness_period = 18*1000, │ + time_to_new_sickness = nil, │ + new_sickness_count = 2, │ + } │ + state.time_to_new_sickness = state.new_sickness_period │ │ - --[[ │ - { y = 480 - 25, x = 1150, }, │ - { y = 480 - 25, x = 1150 + 1*75, }, │ - { y = 480 - 25, x = 1150 + 2*75, }, │ - { y = 480 - 25, x = 1150 + 3*75, }, │ - { y = 480 - 25, x = 1150 + 4*75, }, │ - { y = 480 - 25, x = 1150 + 5*75, }, │ - --]] │ - }, │ + -- print("loading level 1...") │ + load_level1(state) │ │ - gravity_y = 312, │ - gravity_x = 0, │ │ - max_y = 480, │ - game_over = false, │ + for i=1,game_params.num_players do │ + local pos = get_player_starting_pos(i) │ + add_player(state, i, pos.y, pos.x) │ + end │ │ - finish_line_x = 5125, │ - } │ │ - for i=0,10 do │ - generate_spots(state.swing_spots, 0 + 480*i) │ - end │ - core.player_attach_swing(state, 1, 1) │ return state │ end │ │ -local function update_position(state, entity, dt_ms) │ - entity.dy = entity.dy + state.gravity_y * dt_ms/1000 │ - entity.dx = entity.dx + state.gravity_x * dt_ms/1000 │ - entity.y = entity.y + entity.dy * dt_ms/1000 │ - entity.x = entity.x + entity.dx * dt_ms/1000 │ -end │ - │ -local function update_swinging_position(state, player, dt_ms) │ - local node = state.swing_spots[player.swinging_on] │ - local swing_dy = player.y - node.y │ - local swing_dx = player.x - node.x │ - player.swing_angle = math.atan(swing_dy,swing_dx) │ - player.swing_len = math.sqrt(swing_dy*swing_dy + swing_dx*swing_dx) │ - │ - local gravity_force_perp_to_swing = state.gravity_y * math.sin(player.angle) │ - local angleA = -gravity_force_perp_to_swing / player.swing_len │ - player.angleV = player.angleV + angleA * dt_ms/1000 │ - player.angle = player.angle + player.angleV * dt_ms/1000 │ - │ - player.x = node.x + player.swing_len * math.sin(player.angle) │ - player.y = node.y + player.swing_len * math.cos(player.angle) │ - │ - --[[ │ - │ - local x2 = swing_dx │ - local y2 = swing_dy │ - │ - local accel = -state.gravity_y * (x2/swing_len) * (swing_len - y2)/swing_len │ - player.x = player.x + (player.dx + (accel/2 * dt_ms/1000)) * dt_ms/1000 │ - player.y = node.y + math.sqrt(swing_len*swing_len - x2*x2) - swing_len │ - │ - player.dx = player.dx + accel * dt_ms/1000 │ - --]] │ - │ - --[[ │ - player.swing_angle = math.atan(swing_dy,swing_dx) │ - │ - local swinging_gravity_y = state.gravity_y * math.sin(player.swing_angle + math.pi/2) │ - local swinging_gravity_x = state.gravity_y * math.cos(player.swing_angle + math.pi/2) │ - │ - player.dy = player.dy + swinging_gravity_y * dt_ms/1000 │ - player.dx = player.dx + swinging_gravity_x * dt_ms/1000 │ - │ - player.y = player.y + player.dy * dt_ms/1000 │ - player.x = player.x + player.dx * dt_ms/1000 │ - --]] │ +function core.handle_player_dirpad_update(state, player, vec_y, vec_x) │ │ - │ + if vec_y ~= 0 or vec_x ~= 0 then │ + -- TODO could probably simplify this with a trig identity? │ + local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ + local angle = math.atan(vec_y, vec_x) │ + angle = angle - math.pi/4 │ + │ + vec_y = mag * math.sin(angle) │ + vec_x = mag * math.cos(angle) │ + end │ │ - │ + state.players[player].vel_y = vec_y * PLAYER_MOVE_SPEED │ + state.players[player].vel_x = vec_x * PLAYER_MOVE_SPEED │ end │ │ -function core.update_state(state, dt_ms) │ - if state.game_over then return end │ - for _, player in ipairs(state.players) do │ - if player.swinging_on == nil then │ - update_position(state, player, dt_ms) │ - else │ - update_swinging_position(state, player, dt_ms) │ - end │ - │ - if player.y > state.max_y then │ - state.game_over = true │ - end │ +function core.handle_player_use_btn(state, player, btn_down) │ + local player_state = state.players[player] │ + player_state.use_btn_down = btn_down │ + if btn_down then │ + return core.use_start(state, player) │ + else │ + return core.use_stop(state, player) │ end │ end │ │ -function core.get_closest_swing_spot(state, pos) │ - local min_dist = nil │ - local closest_node = nil │ - │ - -- TODO store these nodes in groups of screen size or something, │ - -- to avoid looking through all of them │ - for node_idx, node in ipairs(state.swing_spots) do │ - local dy = pos.y - node.y │ - local dx = pos.x - node.x │ - local dist = math.sqrt(dy*dy + dx*dx) │ - if min_dist == nil or dist < min_dist then │ - closest_node = node_idx │ - min_dist = dist │ +function core.handle_player_drop_btn(state, player, btn_down) │ + local player_state = state.players[player] │ + player_state.drop_btn_down = btn_down │ + if btn_down then │ + if player_state.holding ~= nil and │ + not core.is_patient(player_state.holding) then │ + core.drop_item(state, player) │ end │ end │ - │ - return closest_node │ -end │ - │ -function core.player_attach_swing(state, player_idx, node_idx) │ - local player = state.players[player_idx] │ - local node = state.swing_spots[node_idx] │ - │ - player.swinging_on = node_idx │ - local dy = node.y - player.y │ - local dx = node.x - player.x │ - │ - player.swing_len = math.sqrt(dy*dy + dx*dx) │ - --player.swing_angle = math.atan(dy, dx) + math.pi │ - │ - player.angle = math.atan(-dy, dx) - math.pi/2 │ - local angle2 = math.atan(dy, -dx) + math.pi │ - player.angleV = (player.dx * math.sin(angle2) + player.dy * math.cos(angle2)) / player.swing_len │ - player.dy = 0 -- TODO │ - player.dx = 0 -- TODO │ -end │ -function core.player_release_swing(state, player_idx) │ - local player = state.players[player_idx] │ - if player.swinging_on == nil then return end │ - local node = state.swing_spots[player.swinging_on] │ - player.swinging_on = nil │ - local angle2 = math.atan(player.y - node.y, -player.x + node.x) │ - player.dy = math.cos(angle2) * player.swing_len * player.angleV │ - player.dx = math.sin(angle2) * player.swing_len * player.angleV │ - player.angleV = 0 │ end │ │ -function core.player_won(state, player_idx) │ - return state.players[player_idx].x >= state.finish_line_x │ +local function clip_min_max(min_val, max_val, val) │ + if val < min_val then return min_val │ + elseif val > max_val then return max_val │ + else return val end │ end │ │ +local function is_collision(state, player_idx, tentative_y, tentative_x) │ + local tentative_y_idx = math.floor(tentative_y) │ + local tentative_x_idx = math.floor(tentative_x) │ │ -return core │ -local core = {} │ - │ -local shuffle = require("libs/shuffle") │ - │ -core.RC_SUCCESS = 0 │ -core.RC_INVALID_MOVE = 1 │ - │ -function core.new_state(num_colours, num_extra_vials, num_segments, params) │ - local seed_x, seed_y │ - if params and params.seed_x and params.seed_y then │ - seed_x, seed_y = math.randomseed(params.seed_x, params.seed_y) │ - else │ - seed_x, seed_y = math.randomseed() │ + -- If we'are already in this cell-- let the player walk through it to escape. │ + -- Otherwise they would be completely trapped │ + if tentative_y_idx == math.floor(state.players[player_idx].y) and │ + tentative_x_idx == math.floor(state.players[player_idx].x) then │ + return false │ end │ │ - local vials_and_segments_flat = {} │ - for color_idx=1,num_colours do │ - for seg=1,num_segments do │ - table.insert(vials_and_segments_flat, color_idx) │ - end │ + if state.cells[tentative_y_idx] == nil or │ + state.cells[tentative_y_idx][tentative_x_idx] == nil then │ + return true │ + elseif #state.cells[tentative_y_idx][tentative_x_idx] == 0 then │ + return false │ + elseif #state.cells[tentative_y_idx][tentative_x_idx] == 1 then │ + local item_info = state.cells[tentative_y_idx][tentative_x_idx][1] │ + return not (item_info.id == core.ITEM_ID_PLAYER and item_info.player_idx == player_idx) │ + else │ + -- more than one item in dst, so must be collision │ + return true │ end │ + │ +end │ │ - shuffle.shuffle(vials_and_segments_flat) │ +local function move_player(state, player_idx, pos_y, pos_x) │ + local player_state = state.players[player_idx] │ + local old_y_idx = math.floor(player_state.y) │ + local old_x_idx = math.floor(player_state.x) │ + local new_y_idx = math.floor(pos_y) │ + local new_x_idx = math.floor(pos_x) │ + player_state.y = pos_y │ + player_state.x = pos_x │ │ - local state = { │ - num_segments = num_segments, │ - vials = {}, │ - seed_x = seed_x, │ - seed_y = seed_y, │ - } │ - local num_vials = num_colours + num_extra_vials │ - local i = 1 │ - for _=1,num_vials do │ - local vial = {} │ - for _=1,num_segments do │ - local val = 0 │ - if i <= #vials_and_segments_flat then │ - val = vials_and_segments_flat[i] │ - i = i + 1 │ - table.insert(vial, val) │ + if old_y_idx ~= new_y_idx or │ + old_x_idx ~= new_x_idx then │ + local old_cell = state.cells[old_y_idx][old_x_idx] │ + local player_tbl_idx = nil │ + for idx, item_info in ipairs(old_cell) do │ + if item_info.id == core.ITEM_ID_PLAYER and item_info.player_idx == player_idx then │ + player_tbl_idx = idx │ + goto found_elem │ end │ end │ - table.insert(state.vials, vial) │ + ::found_elem:: │ + │ + local item_info = table.remove(old_cell, player_tbl_idx) │ + table.insert(state.cells[new_y_idx][new_x_idx], item_info) │ end │ +end │ │ - return state │ +local function player_can_move(player_state) │ + return not player_state.is_using │ end │ │ -function core.game_won(state) │ - for _, vial in ipairs(state.vials) do │ - if #vial == 0 then │ - goto next_vial │ - end │ +local function player_died(state, player_idx) │ + local pos = get_player_starting_pos(player_idx) │ + move_player(state, player_idx, pos.y, pos.x) │ +end │ │ - if #vial ~= state.num_segments then │ - return false │ - end │ +function core.update_state(state, dt) │ + local events = {} │ + for player_idx, player_state in ipairs(state.players) do │ │ - for _, seg in ipairs(vial) do │ - if seg ~= vial[1] then │ - return false │ + if player_can_move(player_state) then │ + local tentative_y = player_state.y + player_state.vel_y * dt │ + local tentative_x = player_state.x + player_state.vel_x * dt │ + │ + -- Try to move to the new position. │ + -- If it is blocked, try moving in just the y direction, or just the x direction │ + if not is_collision(state, player_idx, tentative_y, tentative_x) then │ + move_player(state, player_idx, tentative_y, tentative_x) │ + player_state.y = tentative_y │ + player_state.x = tentative_x │ + elseif not is_collision(state, player_idx, tentative_y, player_state.x) then │ + move_player(state, player_idx, tentative_y, player_state.x) │ + player_state.y = tentative_y │ + elseif not is_collision(state, player_idx, player_state.y, tentative_x) then │ + move_player(state, player_idx, player_state.y, tentative_x) │ + player_state.x = tentative_x │ end │ end │ │ - ::next_vial:: │ + if player_state.is_using then │ + player_state.use_progress = player_state.use_progress + (dt/1000.0/player_state.use_time)*core.USE_PROGRESS_MAX │ + if player_state.use_progress >= core.USE_PROGRESS_MAX then │ + player_state.use_progress = core.USE_PROGRESS_MAX │ + core.on_use_complete_func(state, player_idx, events) │ + end │ + end │ end │ │ - return true │ -end │ - │ -local function get_same_segs_count(state, idx) │ - local vial = state.vials[idx] │ - │ - if #vial == 0 then return 0 end │ - │ - local colour = vial[#vial] │ - local seg_idx = 1 │ - while vial[#vial-seg_idx+1] == colour do │ - if seg_idx == #vial then │ - return #vial │ + for _, patient in ipairs(state.patients) do │ + if patient.requires_help then │ + if patient.fix_time ~= nil then │ + patient.fix_time = patient.fix_time - dt │ + if patient.fix_time <= 0 then │ + table.insert(events, { │ + event = core.EVT_PATIENT_CURED, │ + patient = patient, │ + }) │ + patient.requires_help = false │ + patient.needs_revealed = false │ + patient.needs_type = nil │ + patient.time_left = nil │ + patient.orig_time_left = nil │ + patient.fix_time = nil │ + patient.orig_fix_time = nil │ + goto next_patient │ + end │ + │ + end │ + patient.time_left = patient.time_left - dt / 1000.0 │ + if patient.time_left <= 0 then │ + patient.time_left = 0 │ + table.insert(events, { │ + event = core.EVT_PATIENT_NEED_EXPIRED, │ + patient = patient, │ + }) │ + patient.requires_help = false │ + patient.needs_revealed = false │ + patient.needs_type = nil │ + patient.time_left = nil │ + patient.orig_time_left = nil │ + patient.fix_time = nil │ + patient.orig_fix_time = nil │ + end │ end │ - seg_idx = seg_idx + 1 │ + ::next_patient:: │ end │ │ - return seg_idx - 1 │ -end │ - │ -function core.move(state, src, dst) │ - local src_vial = state.vials[src] │ - local dst_vial = state.vials[dst] │ - │ - if #src_vial == 0 then │ - return core.RC_INVALID_MOVE │ + state.time_to_new_sickness = state.time_to_new_sickness - dt │ + if state.time_to_new_sickness <= 0 then │ + state.time_to_new_sickness = state.new_sickness_period │ + local healthy_patients = {} │ + for _, patient in ipairs(state.patients) do │ + if not patient.requires_help then │ + table.insert(healthy_patients, patient) │ + end │ + end │ + for _=1,state.new_sickness_count do │ + if #healthy_patients > 0 then │ + local idx = math.random(#healthy_patients) │ + set_patient_need(healthy_patients[idx], NEED_LIST[math.random(#NEED_LIST)]) │ + table.remove(healthy_patients, idx) │ + end │ + end │ end │ │ │ - if state.num_segments - #dst_vial < get_same_segs_count(state, src) then │ - return core.RC_INVALID_MOVE │ + state.time_to_step = state.time_to_step - dt │ + if state.time_to_step <= 0 then │ + state.time_to_step = state.step_time │ + state.step = state.step + 1 │ end │ │ - if #dst_vial > 0 and dst_vial[#dst_vial] ~= src_vial[#src_vial] then │ - return core.RC_INVALID_MOVE │ + for player_idx, player in ipairs(state.players) do │ + if state.tile_bad(math.floor(player.y), math.floor(player.x)) then │ + player_died(state, player_idx) │ + end │ end │ │ - if src == dst then │ - return core.RC_INVALID_MOVE │ + local advance_to_next_level = true │ + for player_idx, player in ipairs(state.players) do │ + if not state.tile_win(player.y, player.x) then │ + advance_to_next_level = false │ + end │ end │ │ - local colour = src_vial[#src_vial] │ - while src_vial[#src_vial] == colour do │ - local val = table.remove(src_vial, #src_vial) │ - table.insert(dst_vial, val) │ + if advance_to_next_level then │ + state.tile_bad_level_idx = 1 + ((state.tile_bad_level_idx) % #state.tile_bad_levels) │ + reset_step(state) │ + for player_idx, player in ipairs(state.players) do │ + local pos = get_player_starting_pos(player_idx) │ + move_player(state, player_idx, pos.y, pos.x) │ + end │ end │ -end │ - │ -return core │ - │ -local core = require("games/fluid_mix/fluid_mix_core") │ -local draw = require("games/fluid_mix/fluid_mix_draw") │ -local serialize = require("games/fluid_mix/fluid_mix_serialize") │ - │ -local alexgames = require("alexgames") │ - │ - │ -local g_session_id = nil │ -local g_state = nil │ -local draw_state = draw.new_state() │ -local vial_selected = nil │ -local g_win_anim_shown = nil │ - │ -local BTN_ID_NEW_GAME = "btn_new_game" │ -draw.init() │ - │ -alexgames.add_game_option(BTN_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ - │ │ -function update(dt_ms) │ - if g_state == nil then return end │ - if dt_ms ~= nil then │ - draw.update_state(draw_state, dt_ms) │ - end │ - draw.draw_state(g_session_id, g_state, draw_state) │ + return events │ end │ │ -local function save_state() │ - local state_serialized = serialize.serialize(g_state) │ - alexgames.save_state(g_session_id, state_serialized) │ -end │ +function core.get_item_needs_type(item_id) │ + local map = { │ + [core.ITEM_ID_IV_BAG] = core.NEEDS_LOW_FLUIDS, │ + [core.ITEM_ID_DEFIB] = core.NEEDS_NO_HEARTBEAT, │ + [core.ITEM_ID_VENTILATOR] = core.NEEDS_LOW_OXYGEN, │ │ -function handle_user_clicked(pos_y, pos_x) │ - local move = draw.handle_user_clicked(g_state, draw_state, pos_y, pos_x) │ - if move ~= nil then │ - local rc = core.move(g_state, move.src, move.dst) │ - save_state() │ - end │ - if core.game_won(g_state) and not g_win_anim_shown then │ - alexgames.set_status_msg("Congratulations, you win!") │ - g_win_anim_shown = true │ - draw.trigger_win_anim(draw_state, 60) │ - end │ - draw.draw_state(g_session_id, g_state, draw_state) │ + } │ + return map[item_id] │ end │ │ -function load_state_offset(move_offset) │ - local state_serialized = alexgames.adjust_saved_state_offset(g_session_id, move_offset) │ - g_state = serialize.deserialize(state_serialized) │ - g_win_anim_shown = false │ - update() │ +local function in_range_coords(state, y, x) │ + return state.cells[y] ~= nil and state.cells[y][x] ~= nil │ end │ │ -function handle_btn_clicked(btn_id) │ - if btn_id == draw.BTN_ID_UNDO then │ - load_state_offset(-1) │ - elseif btn_id == draw.BTN_ID_REDO then │ - load_state_offset(1) │ - else │ - error(string.format("Unhandled btn_id %s", btn_id)) │ - end │ +local function item_id_can_be_picked_up(item_id) │ + return PICK_UP_ITEMS[item_id] == true │ end │ │ -function handle_game_option_evt(option_id) │ - if option_id == BTN_ID_NEW_GAME then │ - g_session_id = alexgames.get_new_session_id() │ - g_state = core.new_state(11, 3, 4) │ - g_win_anim_shown = false │ - save_state() │ - update() │ - else │ - error(string.format("Unhandled game option evt id=%s", option_id)) │ + │ +local function ary_contains(ary, elem) │ + for _, val in ipairs(ary) do │ + if val == elem then return true end │ end │ + return false │ end │ │ -function start_game(session_id, state_serialized) │ - g_win_anim_shown = false │ - if state_serialized ~= nil then │ - g_session_id = session_id │ - g_state = serialize.deserialize(state_serialized) │ - update() │ - else │ - local prev_session_id = alexgames.get_last_session_id() │ - print(string.format("Read previous session ID %s", prev_session_id)) │ - if prev_session_id ~= nil then │ - g_session_id = prev_session_id │ - state_serialized = alexgames.adjust_saved_state_offset(g_session_id, 0) │ - g_state = serialize.deserialize(state_serialized) │ - alexgames.set_status_msg(string.format("Loaded saved state from session %d", g_session_id)) │ +local function patient_can_be_interacted(player_state, patient_info) │ + if patient_info.requires_help then │ + if not patient_info.needs_revealed then │ + return true │ else │ - g_session_id = alexgames.get_new_session_id() │ - g_state = core.new_state(11, 3, 4) │ + if player_state.holding ~= nil and │ + ary_contains(NEEDS_TO_ITEMS_MAP[patient_info.needs_type], player_state.holding.id) then │ + return true │ + elseif patient_info.needs_type == core.NEEDS_BROKEN_BONE and │ + -- don't let the player pick up a patient if they are already holding one... │ + -- unless the patients should be swapped? That might be an option in the future │ + (player_state.holding == nil or not core.is_patient(player_state.holding)) then │ + return true │ + end │ end │ end │ -end │ - │ -function get_state() │ - return serialize.serialize(g_state) │ -end │ + if player_state.holding == nil then │ + -- can always pick up patients to move them around │ + return true │ + end │ │ -function get_init_state() │ - local init_state = core.new_state(11, 3, 4, { seed_x = g_state.seed_x, g_state.seed_y }) │ - return serialize.serialize(init_state) │ + return false │ end │ -local draw = {} │ -local alexgames = require("alexgames") │ -local draw_shapes = require("libs/draw/draw_shapes") │ - │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ - │ -local OUTLINE_COLOUR = '#000000' │ -local OUTLINE_WIDTH = 3 │ -local HIGHLIGHT_OUTLINE_WIDTH = 5 │ -local HIGHLIGHT_COLOUR = '#ffff0066' │ -local HIGHLIGHT_OUTLINE_COLOUR = '#ffff00' │ -local COLOUR_MAP = { │ - '#ff0000', │ - '#00ff00', │ - '#0000ff', │ - '#ffff00', │ - '#00ffff', │ - '#ff00ff', │ - '#ffffff', │ - '#ff8800', │ - '#ff0088', │ - '#ff8888', │ - '#00ff88', │ - '#88ff00', │ - '#88ff88', │ - '#0088ff', │ - '#8800ff', │ - '#8888ff', │ - '#888888', │ -} │ - │ -local board_width = 480 │ -local board_height = 480 │ │ -local vial_padding = 15 │ +local function item_id_can_be_interacted(player_state, item_info) │ + if item_id_can_be_picked_up(item_info.id) then │ + return true │ + end │ │ -draw.BTN_ID_UNDO = "btn_undo" │ -draw.BTN_ID_REDO = "btn_redo" │ + if core.is_patient(item_info) then │ + return patient_can_be_interacted(player_state, item_info) │ + end │ │ -local anim_state = draw_celebration_anim.new_state({ │ -}) │ --- TODO this probably should be included in the anim state? │ --- Perhaps as an option, for games that don't otherwise require a timer │ -local g_victory_anim_timer = nil │ + if core.is_bed(item_info) and │ + player_state.holding ~= nil and │ + core.is_patient(player_state.holding) then │ + return true │ + end │ │ + return false │ +end │ │ -function draw.init() │ - alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ - alexgames.create_btn(draw.BTN_ID_REDO, "Redo", 1) │ +local function get_interact_in_cell_idx(state, player_idx, y, x) │ + for idx, item in ipairs(state.cells[y][x]) do │ + if item_id_can_be_interacted(state.players[player_idx], item) then │ + return idx │ + end │ + end │ + return nil │ end │ │ -function draw.new_state() │ - return { │ - selected = nil │ - } │ +local function calc_dist(player_state, y, x) │ + local dy = player_state.y - y │ + local dx = player_state.x - x │ + return math.sqrt( dy*dy + dx*dx ) │ end │ │ -local function get_size_params(state, num_rows) │ - local vials_per_row = math.ceil(#state.vials/num_rows) │ - local vial_width = math.floor((board_width - (vials_per_row+1) * vial_padding)/vials_per_row) │ - local vial_height = math.floor(board_height/num_rows) - 2*vial_padding │ +function core.get_closest_item_cell(state, player_idx) │ + local player_state = state.players[player_idx] │ + local y, x = math.floor(player_state.y), math.floor(player_state.x) │ │ - print(string.format("width: %s, height: %s", vial_width, vial_height)) │ + if in_range_coords(state, y, x) then │ + local item_idx = get_interact_in_cell_idx(state, player_idx, y, x) │ │ - return { │ - vials_per_row = vials_per_row, │ - width = vial_width, │ - height = vial_height, │ - } │ -end │ + if item_idx ~= nil then │ + return { y = y, x = x } │ + end │ + end │ │ -local function get_vial_params(params, i) │ - local vial_y_idx = math.floor((i-1)/params.vials_per_row) │ - local vial_x_idx = (i-1) % params.vials_per_row │ + local min_dist = nil │ + local closest_cell = nil │ + for _, dir in ipairs(DIRS) do │ + local y2 = y + dir.y │ + local x2 = x + dir.x │ + if not in_range_coords(state, y2, x2) then │ + goto next_dir │ + end │ + local item_idx = get_interact_in_cell_idx(state, player_idx, y2, x2) │ │ - return { │ - y_start = (params.height + vial_padding) * vial_y_idx + vial_padding, │ - x_start = (params.width + vial_padding) * vial_x_idx + vial_padding, │ - y_end = (params.height + vial_padding) * (vial_y_idx+1), │ - x_end = (params.width + vial_padding) * (vial_x_idx+1), │ - } │ -end │ + if item_idx ~= nil then │ + local dist = calc_dist(player_state, y2, x2) │ + if min_dist == nil or dist < min_dist then │ + min_dist = dist │ + closest_cell = { y = y2, x = x2 } │ + end │ + end │ + ::next_dir:: │ + end │ │ -local function get_num_rows(vial_count) │ - return 2 │ + return closest_cell │ end │ │ -function draw.update_state(draw_state, dt_ms) │ - draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ +function core.get_patient_pos(patient_info) │ + if patient_info.held_by == nil then │ + return { y = patient_info.y, x = patient_info.x } │ + else │ + return { y = patient_info.held_by.y, │ + x = patient_info.held_by.x } │ + end │ end │ │ -function draw.draw_state(session_id, state, draw_state) │ - alexgames.draw_clear() │ - │ - local num_rows = get_num_rows(#state.vials) │ - local params = get_size_params(state, num_rows) │ - │ - for vial_idx, vial in ipairs(state.vials) do │ - local vial_params = get_vial_params(params, vial_idx) │ +function core.get_cells_to_highlight(state) │ + local cells_to_highlight = {} │ │ - draw_shapes.draw_rect_outline(OUTLINE_COLOUR, OUTLINE_WIDTH, │ - vial_params.y_start, vial_params.x_start, │ - vial_params.y_end, vial_params.x_end) │ + local items_to_highlight = {} │ │ - for seg_idx, colour_idx in ipairs(vial) do │ - if colour_idx == 0 then │ - goto draw_highlight │ - end │ - local colour = COLOUR_MAP[colour_idx] │ - if colour == nil then │ - error(string.format("could not resolve colour idx %s", colour_idx)) │ + for _, patient_info in ipairs(state.patients) do │ + if patient_info.requires_help and patient_info.held_by == nil then │ + if not patient_info.needs_revealed or │ + patient_info.needs_type == core.NEEDS_BROKEN_BONE then │ + │ + local pt = core.get_patient_pos(patient_info) │ + if pt.y == nil or pt.x == nil then │ + error(string.format("received nil coords, %s", patient_info.held_by) ) │ + end │ + table.insert(cells_to_highlight, pt) │ + else │ + for _, item in ipairs(NEEDS_TO_ITEMS_MAP[patient_info.needs_type]) do │ + items_to_highlight[item] = true │ + end │ end │ - seg_idx = state.num_segments - seg_idx + 1 │ - alexgames.draw_rect(colour, │ - vial_params.y_start + (seg_idx-1)*params.height/state.num_segments, vial_params.x_start, │ - vial_params.y_start + (seg_idx)*params.height/state.num_segments, vial_params.x_end) │ - alexgames.draw_text(string.format("%d", colour_idx), OUTLINE_COLOUR, │ - vial_params.y_start + params.height/2/state.num_segments + (seg_idx-1)*params.height/state.num_segments, │ - vial_params.x_start + params.width/2, │ - 12, alexgames.TEXT_ALIGN_CENTRE) │ end │ - ::draw_highlight:: │ - if vial_idx == draw_state.selected then │ - alexgames.draw_rect(HIGHLIGHT_COLOUR, │ - vial_params.y_start, vial_params.x_start, │ - vial_params.y_end, vial_params.x_end) │ - draw_shapes.draw_rect_outline(HIGHLIGHT_OUTLINE_COLOUR, HIGHLIGHT_OUTLINE_WIDTH, │ - vial_params.y_start, vial_params.x_start, │ - vial_params.y_end, vial_params.x_end) │ + end │ + │ + for y, row in pairs(state.cells) do │ + for x, cell in pairs(row) do │ + for _, item in ipairs(cell) do │ + if items_to_highlight[item.id] then │ + table.insert(cells_to_highlight, { y = y, x = x }) │ + goto next_cell │ + end │ + end │ + ::next_cell:: │ end │ end │ - │ - draw_celebration_anim.draw(anim_state) │ - alexgames.draw_refresh() │ │ - alexgames.set_btn_enabled(draw.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ - alexgames.set_btn_enabled(draw.BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ + return cells_to_highlight │ end │ │ -function draw.coords_to_vial_idx(state, pos_y, pos_x) │ - local num_rows = get_num_rows(#state.vials) │ - local params = get_size_params(state, num_rows) │ - │ - for vial_idx, _ in ipairs(state.vials) do │ - local vial_params = get_vial_params(params, vial_idx) │ - if vial_params.y_start <= pos_y and pos_y <= vial_params.y_end and │ - vial_params.x_start <= pos_x and pos_x <= vial_params.x_end then │ - return vial_idx │ +local function get_item_idx_can_be_picked_up(state, cell) │ + for cell_item_idx, item_info in ipairs(state.cells[cell.y][cell.x]) do │ + if item_id_can_be_picked_up(item_info.id) then │ + return cell_item_idx │ end │ end │ + return nil │ end │ │ -function draw.handle_user_clicked(state, draw_state, pos_y, pos_x) │ - local vial_idx = draw.coords_to_vial_idx(state, pos_y, pos_x) │ - if vial_idx == nil then return end │ - if draw_state.selected == nil then │ - draw_state.selected = vial_idx │ +function core.pick_up_item(state, player_idx) │ + local cell = core.get_closest_item_cell(state, player_idx) │ + if cell == nil then │ + return false │ else │ - local to_return = { │ - src = draw_state.selected, │ - dst = vial_idx, │ - } │ - draw_state.selected = nil │ - return to_return │ + local cell_pick_up_item_idx = get_item_idx_can_be_picked_up(state, cell) │ + state.players[player_idx].holding = table.remove(state.cells[cell.y][cell.x], cell_pick_up_item_idx) │ + │ end │ end │ │ -function draw.trigger_win_anim(draw_state, fps) │ - print("setting timer") │ - if g_victory_anim_timer ~= nil then │ - error(string.format("victory_animation: anim_timer is not nil")) │ +function core.drop_item(state, player_idx, drop_pt) │ + local player_state = state.players[player_idx] │ + if drop_pt == nil then │ + drop_pt = { │ + y = math.floor(player_state.y), │ + x = math.floor(player_state.x), │ + } │ end │ - g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ - draw_celebration_anim.fireworks_display(anim_state, { │ - colour_pref = "light", │ - on_finish = function () │ - if g_victory_anim_timer == nil then │ - alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ - else │ - alexgames.delete_timer(g_victory_anim_timer) │ - g_victory_anim_timer = nil │ - end │ - --print("animation finished! Resuming timer") │ - --alexgames.set_timer_update_ms(0) │ - --alexgames.set_timer_update_ms(1000/60) │ - end, │ - }) │ + local cell = state.cells[drop_pt.y][drop_pt.x] │ + table.insert(cell, player_state.holding) │ + player_state.holding = nil │ end │ │ -return draw │ -local serialize = {} │ - │ -local serialize_lib = require("libs/serialize/serialize") │ - │ -serialize.VERSION = 2 │ +local function id_is_patient(info_id) │ + return info_id == core.ITEM_ID_PATIENT_IN_BED or │ + info_id == core.ITEM_ID_PATIENT_IN_BED_FLIPPED │ +end │ │ -function serialize.serialize(state) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ - output = output .. serialize_lib.serialize_byte(state.num_segments) │ - output = output .. serialize_lib.serialize_byte(#state.vials) │ - for _, vial in ipairs(state.vials) do │ - output = output .. serialize_lib.serialize_byte(#vial) │ - for _, seg_val in ipairs(vial) do │ - output = output .. serialize_lib.serialize_byte(seg_val) │ +local function get_patient_in_cell(state, cell) │ + for _, info in ipairs(state.cells[cell.y][cell.x]) do │ + if id_is_patient(info.id) then │ + return info │ end │ end │ - output = output .. serialize_lib.serialize_u64(state.seed_x) │ - output = output .. serialize_lib.serialize_u64(state.seed_y) │ + return nil │ +end │ │ - return output │ +local function needs_type_to_using_action(needs_type) │ + local map = { │ + [core.NEEDS_LOW_FLUIDS] = core.USING_ACTION_LOW_FLUIDS, │ + [core.NEEDS_LOW_OXYGEN] = core.USING_ACTION_DEFIB, │ + [core.NEEDS_NO_HEARTBEAT] = core.USING_ACTION_VENTILATOR, │ + } │ + return map[needs_type] │ end │ │ -function serialize.deserialize(bytes) │ - local state = {} │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - local version │ - -- version 1, I didn't have a version number for this one, │ - -- and had 14 vials with... 4 segments each and 3 empty ones │ - -- TODO remove this, there is probably some combination of parameters │ - -- where versions > 1 can have the same number of bytes │ - if #bytes == 2 + 14 + (14-3)*4 + 4*2 then │ - version = 1 │ - else │ - version = serialize_lib.deserialize_byte(bytes) │ - if version ~= serialize.VERSION then │ - error(string.format("Unhandled fluid_mix serialized state version %d", version)) │ - end │ - end │ - state.num_segments = serialize_lib.deserialize_byte(bytes) │ - state.vials = {} │ - local vial_count = serialize_lib.deserialize_byte(bytes) │ - for _=1,vial_count do │ - local segs_in_vial = serialize_lib.deserialize_byte(bytes) │ - local vial = {} │ - for _=1,segs_in_vial do │ - table.insert(vial, serialize_lib.deserialize_byte(bytes)) │ +function empty_bed_in_cell(state, cell_pos) │ + local cell = state.cells[cell_pos.y][cell_pos.x] │ + local bed_present = false │ + local patient_present = false │ + for _, item_info in ipairs(cell) do │ + if core.is_bed(item_info) then │ + bed_present = true │ + elseif core.is_patient(item_info) then │ + patient_present = true │ end │ - table.insert(state.vials, vial) │ - end │ - │ - if version == 1 then │ - -- This is what I did before, but it's wrong-- on wxWidgets at least, │ - -- the seed can be greater than 32 bits │ - state.seed_x = serialize_lib.deserialize_s32(bytes) │ - state.seed_y = serialize_lib.deserialize_s32(bytes) │ - elseif version == serialize.VERSION then │ - state.seed_x = serialize_lib.deserialize_u64(bytes) │ - state.seed_y = serialize_lib.deserialize_u64(bytes) │ end │ - │ - assert(#bytes == 0) │ - │ - return state │ + return bed_present and not patient_present │ end │ │ -return serialize │ -local serialize = {} │ - │ -local core = require("games/bound/bound_core") │ -local utils = require("libs/utils") │ -local serialize_lib = require("libs/serialize/serialize") │ +function core.use_start(state, player_idx) │ + local player_state = state.players[player_idx] │ + local nearest_item_cell = core.get_closest_item_cell(state, player_idx) │ │ -local function get_patient_info_idx(state, item_info) │ - for idx, patient_info in ipairs(state.patients) do │ - if patient_info == item_info then │ - return idx │ - end │ + if player_state.holding == nil and │ + nearest_item_cell ~= nil and │ + get_item_idx_can_be_picked_up(state, nearest_item_cell) then │ + return core.pick_up_item(state, player_idx) │ end │ - return nil │ -end │ │ -local function deserialize_patient_info(state, bytes) │ - local info = {} │ - info.id = serialize_lib.deserialize_byte(bytes) │ - info.y = serialize_lib.deserialize_byte(bytes) │ - info.x = serialize_lib.deserialize_byte(bytes) │ - info.requires_help = serialize_lib.deserialize_bool(bytes) │ - info.needs_revealed = serialize_lib.deserialize_bool(bytes) │ - info.needs_type = serialize_lib.deserialize_byte(bytes) │ - local time_left_s32 = serialize_lib.deserialize_s32(bytes) │ - if time_left_s32 == 0x7fffffff then │ - info.time_left = nil │ - else │ - info.time_left = time_left_s32 │ - end │ - local orig_time_left_s32 = serialize_lib.deserialize_s32(bytes) │ - if orig_time_left_s32 ~= 0x7fffffff then │ - info.orig_time_left = orig_time_left_s32 │ - else │ - info.orig_time_left = nil │ - end │ - local held_by_player_idx = serialize_lib.deserialize_byte(bytes) │ - if held_by_player_idx == nil then │ - info.held_by = nil │ - else │ - info.held_by = state.players[held_by_player_idx] │ + local patient_info = nil │ + │ + if nearest_item_cell ~= nil then │ + patient_info = get_patient_in_cell(state, nearest_item_cell) │ end │ │ - return info │ -end │ + │ + local can_help = false │ + local use_time = nil │ │ -local function get_player_idx(state, player_state) │ - if player_state == nil then │ - return nil │ - end │ - for idx, player in ipairs(state.players) do │ - if player == player_state then │ - return idx │ + -- if the player is holding a patient and near a bed │ + if player_state.holding ~= nil and │ + core.is_patient(player_state.holding) and │ + nearest_item_cell ~= nil and │ + empty_bed_in_cell(state, nearest_item_cell) then │ + can_help = true │ + player_state.using_action = core.USING_ACTION_PUT_PATIENT_IN_BED │ + player_state.patient_drop_pos = { y = nearest_item_cell.y, x = nearest_item_cell.x } │ + use_time = TIME_TO_PICK_UP_PATIENT │ + -- if the player is near a patient who requires aid │ + elseif patient_info ~= nil and patient_info.requires_help then │ + if not patient_info.needs_revealed then │ + can_help = true │ + player_state.helping_patient = patient_info │ + player_state.using_action = core.USING_ACTION_REVEAL_NEEDS │ + use_time = TIME_TO_REVEAL_NEEDS │ + else │ + if patient_info.needs_type ~= core.NEEDS_BROKEN_BONE and │ + player_state.holding ~= nil and │ + ary_contains(NEEDS_TO_ITEMS_MAP[patient_info.needs_type], player_state.holding.id) then │ + can_help = true │ + player_state.helping_patient = patient_info │ + player_state.using_action = needs_type_to_using_action(patient_info.needs_type) │ + use_time = NEEDS_TO_USE_TIME_MAP[patient_info.needs_type] │ + end │ end │ end │ - error("could not find player in states") │ -end │ │ -local function serialize_patient_info(state, patient_info) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(patient_info.id) │ - output = output .. serialize_lib.serialize_byte(patient_info.y) │ - output = output .. serialize_lib.serialize_byte(patient_info.x) │ - output = output .. serialize_lib.serialize_bool(patient_info.requires_help) │ - output = output .. serialize_lib.serialize_bool(patient_info.needs_revealed) │ - output = output .. serialize_lib.serialize_byte(patient_info.needs_type) │ - if patient_info.time_left ~= nil then │ - output = output .. serialize_lib.serialize_s32( math.floor(patient_info.time_left)) │ - else │ - output = output .. serialize_lib.serialize_s32( 0x7fffffff ) │ - end │ - if patient_info.orig_time_left ~= nil then │ - output = output .. serialize_lib.serialize_s32( patient_info.orig_time_left) │ - else │ - output = output .. serialize_lib.serialize_s32( 0x7fffffff ) │ + if not can_help and patient_info ~= nil and │ + (player_state.holding == nil or not core.is_patient(player_state.holding)) then │ + -- can move any patient, whether they need help or not │ + can_help = true │ + player_state.helping_patient = patient_info │ + player_state.using_action = core.USING_ACTION_PICK_UP_PATIENT │ + use_time = TIME_TO_PICK_UP_PATIENT │ end │ │ - output = output .. serialize_lib.serialize_byte(get_player_idx(state, patient_info.held_by)) │ - │ - return output │ -end │ │ -local function deserialize_player_info(bytes) │ - local info = {} │ - info.id = core.ITEM_ID_PLAYER │ - info.y = serialize_lib.deserialize_s32(bytes)*1.0/1000 │ - info.x = serialize_lib.deserialize_s32(bytes)*1.0/1000 │ - info.vel_y = serialize_lib.deserialize_s32(bytes)*1.0/1000/1000 │ - info.vel_x = serialize_lib.deserialize_s32(bytes)*1.0/1000/1000 │ - info.use_btn_down = serialize_lib.deserialize_bool(bytes) │ - info.drop_btn_down = serialize_lib.deserialize_bool(bytes) │ - local holding_id = serialize_lib.deserialize_byte(bytes) │ - if holding_id == nil then │ - info.holding = nil │ - else │ - info.holding = { id = holding_id } │ - end │ - info.is_using = serialize_lib.deserialize_bool(bytes) │ - info.use_progress = serialize_lib.deserialize_byte(bytes) │ - local use_time_byte = serialize_lib.deserialize_byte(bytes) │ - if use_time_byte == 0xff then │ - info.use_time = nil │ + │ + if can_help then │ + player_state.is_using = true │ + player_state.use_progress = 0 │ + player_state.use_time = use_time │ + return true │ else │ - info.use_time = use_time_byte │ + return false │ end │ - return info │ end │ │ -local function serialize_player_info(player_info) │ - local output = "" │ - output = output .. serialize_lib.serialize_s32( math.floor(player_info.y*1000)) │ - output = output .. serialize_lib.serialize_s32( math.floor(player_info.x*1000)) │ - output = output .. serialize_lib.serialize_s32( math.floor(player_info.vel_y*1000*1000)) │ - output = output .. serialize_lib.serialize_s32( math.floor(player_info.vel_x*1000*1000)) │ - output = output .. serialize_lib.serialize_bool(player_info.use_btn_down) │ - output = output .. serialize_lib.serialize_bool(player_info.drop_btn_down) │ - local holding_id = nil │ - if player_info.holding ~= nil then │ - holding_id = player_info.holding.id │ - end │ - output = output .. serialize_lib.serialize_byte(holding_id) │ - output = output .. serialize_lib.serialize_bool(player_info.is_using) │ - output = output .. serialize_lib.serialize_byte(math.floor(player_info.use_progress)) │ - if player_info.use_time ~= nil then │ - output = output .. serialize_lib.serialize_byte(math.floor(player_info.use_time)) │ - else │ - output = output .. serialize_lib.serialize_byte(0xff) │ - end │ - return output │ +function core.use_stop(state, player_idx) │ + local player_state = state.players[player_idx] │ + player_state.is_using = false │ + player_state.use_progress = 0 │ + player_state.helping_patient = nil │ + player_state.using_action = nil │ end │ │ -local function serialize_cell(state, cell) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(#cell) │ - local debug_type = nil │ - for _, item_info in ipairs(cell) do │ - output = output .. serialize_lib.serialize_byte(item_info.id) │ - if core.is_patient(item_info) then │ - local patient_idx = get_patient_info_idx(state, item_info) │ - output = output .. serialize_lib.serialize_byte(patient_idx) │ - debug_type = "patient" │ - elseif core.is_player(item_info) then │ - local player_idx = item_info.player_idx │ - output = output .. serialize_lib.serialize_byte(player_idx) │ - debug_type = "player" │ - else │ - debug_type = "none" │ - end │ - end │ - local s = "" │ - for _, item_info in ipairs(cell) do │ - s = s .. string.format("%d, ", item_info.id) │ - end │ - --print(string.format("serialized cell into %d bytes, had %d items (%s) (%s) (%s)", #output, #cell, debug_type, s, utils.binstr_to_hr_str(output))) │ - return output │ +local function get_patient_item_pos(patient_info) │ + return { │ + y = patient_info.y - 1, │ + x = patient_info.x + 1, │ + } │ end │ │ -local function deserialize_cell(state, bytes) │ - local start_byte_count = #bytes │ - local cell = {} │ - local item_count = serialize_lib.deserialize_byte(bytes) │ - local debug_type = "nil" │ - for i=1,item_count do │ - local item_id = serialize_lib.deserialize_byte(bytes) │ - local item_info = { │ - id = item_id, │ - } │ - if core.is_patient(item_info) then │ - local patient_idx = serialize_lib.deserialize_byte(bytes) │ - if not(1 <= patient_idx and patient_idx <= #state.patients) then │ - error(string.format("expected patient idx, received %s, have " .. │ - " only %d patient states", patient_idx, #state.patients)) │ - end │ - debug_type = "patient" │ - item_info = state.patients[patient_idx] │ - elseif core.is_player(item_info) then │ - local player_idx = serialize_lib.deserialize_byte(bytes) │ - if not(1 <= player_idx and player_idx <= #state.players) then │ - error(string.format("expected player idx, received %s, have " .. │ - " only %d player states", player_idx, #state.players)) │ - end │ - debug_type = "player" │ - item_info = state.players[player_idx] │ - item_info.id = item_id │ - item_info.player_idx = player_idx │ - else │ - debug_type = "none" │ +local function get_patient_cell_idx(state, patient_info) │ + local cell = state.cells[patient_info.y][patient_info.x] │ + for idx, item_in_cell in ipairs(cell) do │ + if item_in_cell == patient_info then │ + return idx │ end │ - table.insert(cell, item_info) │ end │ - --print(string.format("deserialized cell from %d bytes, contained %d items (%s)", start_byte_count - #bytes, item_count, debug_type)) │ - return cell │ + return nil │ end │ │ -local function serialize_bad_tiles(state) │ - local y_size = state.y_size │ - local x_size = state.x_size │ - │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(y_size) │ - output = output .. serialize_lib.serialize_byte(x_size) │ - for y=0,y_size-1 do │ - for x=0,x_size-1 do │ - local val = state.tile_bad(y,x) │ - output = output .. serialize_lib.serialize_bool(val) │ +local function bed_fixes_needs(bed, needs_type) │ + if bed.fixes_needs == nil then │ + return false │ + end │ + for _, bed_fixes in ipairs(bed.fixes_needs) do │ + if bed_fixes == needs_type then │ + return true │ end │ end │ - return output │ + return false │ end │ │ -local function deserialize_bad_tiles(bytes) │ - local y_size = serialize_lib.deserialize_byte(bytes) │ - local x_size = serialize_lib.deserialize_byte(bytes) │ - local map = {} │ - for y=0,y_size-1 do │ - map[y] = {} │ - for x=0,x_size-1 do │ - map[y][x] = serialize_lib.deserialize_bool(bytes) │ +local function patient_put_in_bed(state, patient_info) │ + local cell = state.cells[patient_info.y][patient_info.x] │ + local bed = nil │ + for _, item_info in ipairs(cell) do │ + if core.is_bed(item_info) then │ + bed = item_info │ + break │ end │ end │ │ - return function (y,x) │ - return map[y][x] │ + patient_info.in_bed = bed │ + if bed_fixes_needs(bed, patient_info.needs_type) then │ + local fix_time = NEED_TO_BED_FIX_TIME_MS[patient_info.needs_type] │ + patient_info.orig_fix_time = fix_time │ + patient_info.fix_time = fix_time │ end │ end │ │ -function serialize.serialize_state(state) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(state.tile_bad_level_idx) │ - output = output .. serialize_lib.serialize_byte(state.y_size) │ - output = output .. serialize_lib.serialize_byte(state.x_size) │ - │ - output = output .. serialize_lib.serialize_s32(state.new_sickness_period) │ - output = output .. serialize_lib.serialize_s32_nilable(state.time_to_new_sickness) │ - output = output .. serialize_lib.serialize_byte(state.new_sickness_count) │ - │ - output = output .. serialize_lib.serialize_byte(#state.players) │ - for _, player in ipairs(state.players) do │ - output = output .. serialize_player_info(player) │ - end │ - │ - output = output .. serialize_bad_tiles(state) │ - │ - output = output .. serialize_lib.serialize_byte(#state.patients) │ +function core.on_use_complete_func(state, player_idx, events) │ + local player_state = state.players[player_idx] │ + local patient_info = player_state.helping_patient │ + local using_action = player_state.using_action │ + core.use_stop(state, player_idx) │ │ - for _, patient in ipairs(state.patients) do │ - output = output .. serialize_patient_info(state, patient) │ - end │ - local cells_serialized = "" │ - local non_empty_cell_count = 0 │ - for y, row in pairs(state.cells) do │ - for x, cell in pairs(row) do │ - if state.cells[y][x] ~= nil then │ - cells_serialized = cells_serialized .. serialize_lib.serialize_byte(y) │ - cells_serialized = cells_serialized .. serialize_lib.serialize_byte(x) │ - cells_serialized = cells_serialized .. serialize_cell(state, state.cells[y][x]) │ - non_empty_cell_count = non_empty_cell_count + 1 │ - end │ + if using_action == core.USING_ACTION_PUT_PATIENT_IN_BED then │ + local patient = player_state.holding │ + core.drop_item(state, player_idx, player_state.patient_drop_pos) │ + patient.y = player_state.patient_drop_pos.y │ + patient.x = player_state.patient_drop_pos.x │ + patient.held_by = nil │ + player_state.patient_drop_pos = nil │ + patient_put_in_bed(state, patient) │ + elseif using_action == core.USING_ACTION_PICK_UP_PATIENT then │ + if player_state.holding ~= nil then │ + core.drop_item(state, player_idx) │ end │ - end │ - output = output .. serialize_lib.serialize_16bit(non_empty_cell_count) │ - output = output .. cells_serialized │ - --print(string.format("serialized %d non empty cells into %d bytes", non_empty_cell_count, #cells_serialized)) │ - --print(string.format("serialized into %d bytes", #output)) │ - return output │ -end │ - │ - │ -function serialize.deserialize_state(byte_str) │ - local bytes = serialize_lib.bytestr_to_byteary(byte_str) │ - --print(string.format("deserializing %d bytes", #bytes)) │ - local state = {} │ - state.tile_bad_level_idx = serialize_lib.deserialize_byte(bytes) │ - state.y_size = serialize_lib.deserialize_byte(bytes) │ - state.x_size = serialize_lib.deserialize_byte(bytes) │ - │ - state.new_sickness_period = serialize_lib.deserialize_s32(bytes) │ - state.time_to_new_sickness = serialize_lib.deserialize_s32_nilable(bytes) │ - state.new_sickness_count = serialize_lib.deserialize_byte(bytes) │ - │ - local player_count = serialize_lib.deserialize_byte(bytes) │ - state.players = {} │ - for i=1,player_count do │ - state.players[i] = deserialize_player_info(bytes) │ - end │ - │ - state.tile_bad = deserialize_bad_tiles(bytes) │ - │ - local patient_count = serialize_lib.deserialize_byte(bytes) │ - state.patients = {} │ - for i=1,patient_count do │ - --print("deserializing patient " .. i) │ - state.patients[i] = deserialize_patient_info(state, bytes) │ - end │ + local patient_cell_idx = get_patient_cell_idx(state, patient_info) │ + table.remove(state.cells[patient_info.y][patient_info.x], patient_cell_idx) │ + player_state.holding = patient_info │ + patient_info.held_by = player_state │ + patient_info.y = nil │ + patient_info.x = nil │ + patient_info.fix_time = nil │ + elseif patient_info.requires_help then │ + if not patient_info.needs_revealed then │ + if using_action == core.USING_ACTION_REVEAL_NEEDS then │ + patient_info.needs_revealed = true │ + end │ + else │ + if needs_type_to_using_action(patient_info.needs_type) == using_action then │ + patient_info.requires_help = false │ + patient_info.needs_revealed = false │ + if ITEMS_DROPPED_ON_USE_MAP[player_state.holding.id] then │ + core.drop_item(state, player_idx, get_patient_item_pos(patient_info)) │ + end │ │ - state.cells = {} │ + table.insert(events, { │ + event = core.EVT_PATIENT_CURED, │ + patient = patient_info, │ + }) │ │ - local non_empty_cell_count = serialize_lib.deserialize_16bit(bytes) │ - --print("deserializing " .. non_empty_cell_count .. " cells from " .. #bytes .. " remaining bytes" ) │ - for i=1,non_empty_cell_count do │ - --print("i=" .. i ..", remaining bytes: " .. utils.binary_to_hr_str(bytes)) │ - local y = serialize_lib.deserialize_byte(bytes) │ - local x = serialize_lib.deserialize_byte(bytes) │ - if state.cells[y] == nil then │ - state.cells[y] = {} │ + end │ end │ - state.cells[y][x] = deserialize_cell(state, bytes) │ - end │ - │ - if #bytes > 0 then │ - error(string.format("received %d leftover bytes when deserializing", #bytes)) │ end │ - │ - return state │ end │ │ -return serialize │ +return core │ local draw = {} │ │ local core = require("games/bound/bound_core") │ local alexgames = require("alexgames") │ local draw_more = require("libs/draw/draw_more") │ │ draw.INPUT_TYPE_KEYBOARD = 1 │ @@ -8235,1653 +6232,2791 @@ │ │ │ alexgames.enable_evt('touch') │ alexgames.enable_evt('key') │ alexgames.set_timer_update_ms(math.floor(dt)) │ │ wait_for_players.init(players, player, start_host_game, start_client_game) │ -local core = {} │ - │ -local PLAYER_MOVE_SPEED = 3.0/1000 │ - │ -core.ITEM_ID_PLAYER = 1 │ -core.ITEM_ID_PATIENT_IN_BED = 2 │ -core.ITEM_ID_PATIENT_IN_BED_FLIPPED = 3 │ -core.ITEM_ID_BED = 4 │ -core.ITEM_ID_BED_FLIPPED = 5 │ -core.ITEM_ID_BED_SEGMENT_2 = 6 │ -core.ITEM_ID_IV_BAG = 7 │ -core.ITEM_ID_DEFIB = 8 │ -core.ITEM_ID_VENTILATOR = 9 │ -core.ITEM_ID_XRAY_SHEET = 10 │ -core.ITEM_ID_XRAY_SOURCE = 11 │ - │ -core.NEEDS_LOW_FLUIDS = 1 │ -core.NEEDS_LOW_OXYGEN = 2 │ -core.NEEDS_NO_HEARTBEAT = 3 │ -core.NEEDS_BROKEN_BONE = 4 │ - │ - │ -core.ACTION_DIR_PAD_POS_CHANGE = 1 │ -core.ACTION_USE_BTN_DOWN = 2 │ -core.ACTION_USE_BTN_RELEASE = 3 │ -core.ACTION_DROP_BTN_DOWN = 4 │ -core.ACTION_DROP_BTN_RELEASE = 5 │ - │ -core.USING_ACTION_REVEAL_NEEDS = 1 │ -core.USING_ACTION_LOW_FLUIDS = 2 │ -core.USING_ACTION_DEFIB = 3 │ -core.USING_ACTION_VENTILATOR = 4 │ -core.USING_ACTION_PICK_UP_PATIENT = 5 │ -core.USING_ACTION_PUT_PATIENT_IN_BED = 6 │ - │ -core.EVT_PATIENT_NEED_EXPIRED = 1 │ -core.EVT_PATIENT_CURED = 2 │ - │ -core.USE_PROGRESS_MAX = 100 │ - │ -local TIME_TO_REVEAL_NEEDS = 1.0 │ -local TIME_TO_PICK_UP_PATIENT = 0.7 │ - │ -local NEED_LIST = { │ - core.NEEDS_LOW_FLUIDS, │ - core.NEEDS_NO_HEARTBEAT, │ - core.NEEDS_LOW_OXYGEN, │ - core.NEEDS_BROKEN_BONE, │ -} │ - │ -local NEEDS_TO_USE_TIME_MAP = { │ - [core.NEEDS_LOW_FLUIDS] = 2.5, │ - [core.NEEDS_NO_HEARTBEAT] = 1.5, │ - [core.NEEDS_LOW_OXYGEN] = 2.5, │ -} │ - │ -local NEED_TO_BED_FIX_TIME_MS = { │ - [core.NEEDS_BROKEN_BONE] = 20*1000, │ -} │ - │ - │ -local NEEDS_TO_ITEMS_MAP = { │ - [core.NEEDS_LOW_FLUIDS] = { core.ITEM_ID_IV_BAG }, │ - [core.NEEDS_NO_HEARTBEAT] = { core.ITEM_ID_DEFIB }, │ - [core.NEEDS_LOW_OXYGEN] = { core.ITEM_ID_VENTILATOR }, │ - [core.NEEDS_BROKEN_BONE] = { }, │ -} │ - │ -local ITEMS_DROPPED_ON_USE_MAP = { │ - [core.ITEM_ID_IV_BAG] = true, │ - [core.ITEM_ID_VENTILATOR] = true, │ -} │ - │ --- These seem good for one player... │ --- rough ideas, should be sum of: │ --- * time to reveal max-ish number of patients that could reasonably need to have │ --- their needs revealed at any given time, plus │ --- * time to walk halfway across the map, plus │ --- * time to fix patient with equipment │ -local NEED_TYPE_TO_TIME_LEFT = { │ - [core.NEEDS_LOW_FLUIDS] = 60, │ - [core.NEEDS_NO_HEARTBEAT] = 25, │ - [core.NEEDS_LOW_OXYGEN] = 40, │ - [core.NEEDS_BROKEN_BONE] = 90, │ -} │ - │ - │ -local DIRS = { │ - { y = 1, x = 0 }, │ - { y = 1, x = -1 }, │ - { y = 0, x = -1 }, │ - { y = -1, x = -1 }, │ - { y = -1, x = 0 }, │ - { y = -1, x = 1 }, │ - { y = 0, x = 1 }, │ - { y = 1, x = 1 }, │ -} │ - │ -local PICK_UP_ITEMS = { │ - [core.ITEM_ID_IV_BAG] = true, │ - [core.ITEM_ID_DEFIB] = true, │ - [core.ITEM_ID_VENTILATOR] = true, │ -} │ - │ - │ -local function get_player_starting_pos(i) │ - --[[ │ - local map = { │ - [1] = { y = 2.5, x = 2.5 }, │ - [2] = { y = 7.5, x = 7.5 }, │ - [3] = { y = 7.5, x = 2.5 }, │ - [4] = { y = 2.5, x = 7.5 }, │ - } │ - ]] │ - │ - local map = { │ - --[1] = { y = 2.5, x = 5.0 }, │ - --[2] = { y = 7.5, x = 5.0 }, │ - --[3] = { y = 5.0, x = 2.5 }, │ - --[4] = { y = 5.0, x = 7.5 }, │ - [1] = { y = 13, x = 1 }, │ - [2] = { y = 13, x = 3 }, │ - [3] = { y = 13, x = 5 }, │ - [4] = { y = 13, x = 7 }, │ - } │ - return map[i] │ -end │ +local serialize = {} │ │ -local function new_item(id) │ - return { │ - id = id, │ - } │ -end │ +local core = require("games/bound/bound_core") │ +local utils = require("libs/utils") │ +local serialize_lib = require("libs/serialize/serialize") │ │ -local function new_bed(id, fixes_needs) │ - local item = new_item(id) │ - if not core.is_bed(item) then │ - error(string.format("Item id %s is not bed", id), 2) │ +local function get_patient_info_idx(state, item_info) │ + for idx, patient_info in ipairs(state.patients) do │ + if patient_info == item_info then │ + return idx │ + end │ end │ - item.fixes_needs = fixes_needs │ - return item │ + return nil │ end │ │ -local needs_type_debug = 0 │ +local function deserialize_patient_info(state, bytes) │ + local info = {} │ + info.id = serialize_lib.deserialize_byte(bytes) │ + info.y = serialize_lib.deserialize_byte(bytes) │ + info.x = serialize_lib.deserialize_byte(bytes) │ + info.requires_help = serialize_lib.deserialize_bool(bytes) │ + info.needs_revealed = serialize_lib.deserialize_bool(bytes) │ + info.needs_type = serialize_lib.deserialize_byte(bytes) │ + local time_left_s32 = serialize_lib.deserialize_s32(bytes) │ + if time_left_s32 == 0x7fffffff then │ + info.time_left = nil │ + else │ + info.time_left = time_left_s32 │ + end │ + local orig_time_left_s32 = serialize_lib.deserialize_s32(bytes) │ + if orig_time_left_s32 ~= 0x7fffffff then │ + info.orig_time_left = orig_time_left_s32 │ + else │ + info.orig_time_left = nil │ + end │ + local held_by_player_idx = serialize_lib.deserialize_byte(bytes) │ + if held_by_player_idx == nil then │ + info.held_by = nil │ + else │ + info.held_by = state.players[held_by_player_idx] │ + end │ │ + return info │ +end │ │ -function core.is_patient(item_info) │ - if item_info == nil then │ - error("arg is nil", 2) │ +local function get_player_idx(state, player_state) │ + if player_state == nil then │ + return nil │ end │ - return item_info.id == core.ITEM_ID_PATIENT_IN_BED or │ - item_info.id == core.ITEM_ID_PATIENT_IN_BED_FLIPPED │ + for idx, player in ipairs(state.players) do │ + if player == player_state then │ + return idx │ + end │ + end │ + error("could not find player in states") │ end │ │ -function core.is_player(item_info) │ - return item_info.id == core.ITEM_ID_PLAYER │ -end │ +local function serialize_patient_info(state, patient_info) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(patient_info.id) │ + output = output .. serialize_lib.serialize_byte(patient_info.y) │ + output = output .. serialize_lib.serialize_byte(patient_info.x) │ + output = output .. serialize_lib.serialize_bool(patient_info.requires_help) │ + output = output .. serialize_lib.serialize_bool(patient_info.needs_revealed) │ + output = output .. serialize_lib.serialize_byte(patient_info.needs_type) │ + if patient_info.time_left ~= nil then │ + output = output .. serialize_lib.serialize_s32( math.floor(patient_info.time_left)) │ + else │ + output = output .. serialize_lib.serialize_s32( 0x7fffffff ) │ + end │ + if patient_info.orig_time_left ~= nil then │ + output = output .. serialize_lib.serialize_s32( patient_info.orig_time_left) │ + else │ + output = output .. serialize_lib.serialize_s32( 0x7fffffff ) │ + end │ │ -function core.is_bed(item_info) │ - return item_info.id == core.ITEM_ID_BED or │ - item_info.id == core.ITEM_ID_BED_FLIPPED │ + output = output .. serialize_lib.serialize_byte(get_player_idx(state, patient_info.held_by)) │ + │ + return output │ end │ │ -local function new_patient(y, x) │ - needs_type_debug = needs_type_debug + 1 │ - return { │ - id = core.ITEM_ID_PATIENT_IN_BED, │ - y = y, │ - x = x, │ - │ - requires_help = false, │ - needs_revealed = false, │ - needs_type = needs_type_debug, │ - │ - time_left = nil, │ - orig_time_left = nil, │ - │ - held_by = nil, │ - } │ +local function deserialize_player_info(bytes) │ + local info = {} │ + info.id = core.ITEM_ID_PLAYER │ + info.y = serialize_lib.deserialize_s32(bytes)*1.0/1000 │ + info.x = serialize_lib.deserialize_s32(bytes)*1.0/1000 │ + info.vel_y = serialize_lib.deserialize_s32(bytes)*1.0/1000/1000 │ + info.vel_x = serialize_lib.deserialize_s32(bytes)*1.0/1000/1000 │ + info.use_btn_down = serialize_lib.deserialize_bool(bytes) │ + info.drop_btn_down = serialize_lib.deserialize_bool(bytes) │ + local holding_id = serialize_lib.deserialize_byte(bytes) │ + if holding_id == nil then │ + info.holding = nil │ + else │ + info.holding = { id = holding_id } │ + end │ + info.is_using = serialize_lib.deserialize_bool(bytes) │ + info.use_progress = serialize_lib.deserialize_byte(bytes) │ + local use_time_byte = serialize_lib.deserialize_byte(bytes) │ + if use_time_byte == 0xff then │ + info.use_time = nil │ + else │ + info.use_time = use_time_byte │ + end │ + return info │ end │ │ -local function set_patient_need(patient, need_type) │ - patient.requires_help = true │ - patient.needs_revealed = false │ - patient.needs_type = need_type │ - patient.time_left = NEED_TYPE_TO_TIME_LEFT[need_type] │ - patient.orig_time_left = NEED_TYPE_TO_TIME_LEFT[need_type] │ +local function serialize_player_info(player_info) │ + local output = "" │ + output = output .. serialize_lib.serialize_s32( math.floor(player_info.y*1000)) │ + output = output .. serialize_lib.serialize_s32( math.floor(player_info.x*1000)) │ + output = output .. serialize_lib.serialize_s32( math.floor(player_info.vel_y*1000*1000)) │ + output = output .. serialize_lib.serialize_s32( math.floor(player_info.vel_x*1000*1000)) │ + output = output .. serialize_lib.serialize_bool(player_info.use_btn_down) │ + output = output .. serialize_lib.serialize_bool(player_info.drop_btn_down) │ + local holding_id = nil │ + if player_info.holding ~= nil then │ + holding_id = player_info.holding.id │ + end │ + output = output .. serialize_lib.serialize_byte(holding_id) │ + output = output .. serialize_lib.serialize_bool(player_info.is_using) │ + output = output .. serialize_lib.serialize_byte(math.floor(player_info.use_progress)) │ + if player_info.use_time ~= nil then │ + output = output .. serialize_lib.serialize_byte(math.floor(player_info.use_time)) │ + else │ + output = output .. serialize_lib.serialize_byte(0xff) │ + end │ + return output │ end │ │ -local function bad_row(row) │ - return function (y, x) │ - if row == y then return 2 │ - else return 1 end │ +local function serialize_cell(state, cell) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(#cell) │ + local debug_type = nil │ + for _, item_info in ipairs(cell) do │ + output = output .. serialize_lib.serialize_byte(item_info.id) │ + if core.is_patient(item_info) then │ + local patient_idx = get_patient_info_idx(state, item_info) │ + output = output .. serialize_lib.serialize_byte(patient_idx) │ + debug_type = "patient" │ + elseif core.is_player(item_info) then │ + local player_idx = item_info.player_idx │ + output = output .. serialize_lib.serialize_byte(player_idx) │ + debug_type = "player" │ + else │ + debug_type = "none" │ + end │ + end │ + local s = "" │ + for _, item_info in ipairs(cell) do │ + s = s .. string.format("%d, ", item_info.id) │ end │ + --print(string.format("serialized cell into %d bytes, had %d items (%s) (%s) (%s)", #output, #cell, debug_type, s, utils.binstr_to_hr_str(output))) │ + return output │ end │ │ -local function combine(func1, func2) │ - return function (y, x) │ - if func1(y,x) > func2(y,x) then return func1(y,x) │ - else return func2(y,x) end │ +local function deserialize_cell(state, bytes) │ + local start_byte_count = #bytes │ + local cell = {} │ + local item_count = serialize_lib.deserialize_byte(bytes) │ + local debug_type = "nil" │ + for i=1,item_count do │ + local item_id = serialize_lib.deserialize_byte(bytes) │ + local item_info = { │ + id = item_id, │ + } │ + if core.is_patient(item_info) then │ + local patient_idx = serialize_lib.deserialize_byte(bytes) │ + if not(1 <= patient_idx and patient_idx <= #state.patients) then │ + error(string.format("expected patient idx, received %s, have " .. │ + " only %d patient states", patient_idx, #state.patients)) │ + end │ + debug_type = "patient" │ + item_info = state.patients[patient_idx] │ + elseif core.is_player(item_info) then │ + local player_idx = serialize_lib.deserialize_byte(bytes) │ + if not(1 <= player_idx and player_idx <= #state.players) then │ + error(string.format("expected player idx, received %s, have " .. │ + " only %d player states", player_idx, #state.players)) │ + end │ + debug_type = "player" │ + item_info = state.players[player_idx] │ + item_info.id = item_id │ + item_info.player_idx = player_idx │ + else │ + debug_type = "none" │ + end │ + table.insert(cell, item_info) │ end │ + --print(string.format("deserialized cell from %d bytes, contained %d items (%s)", start_byte_count - #bytes, item_count, debug_type)) │ + return cell │ end │ │ ---[[ │ -pattern = { │ - combine( bad_row(9), bad_row(8) ), │ - combine( bad_row(7), bad_row(6) ), │ - combine( bad_row(5), bad_row(4) ), │ - combine( bad_row(3), bad_row(2) ), │ - combine( bad_row(1), bad_row(0) ), │ -} │ - │ -]] │ +local function serialize_bad_tiles(state) │ + local y_size = state.y_size │ + local x_size = state.x_size │ │ -local function reset_step(state) │ - state.time_to_step = state.step_time │ - state.step = 0 │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(y_size) │ + output = output .. serialize_lib.serialize_byte(x_size) │ + for y=0,y_size-1 do │ + for x=0,x_size-1 do │ + local val = state.tile_bad(y,x) │ + output = output .. serialize_lib.serialize_bool(val) │ + end │ + end │ + return output │ end │ │ -local function between(lower, val, upper) │ - return lower <= val and val < upper │ +local function deserialize_bad_tiles(bytes) │ + local y_size = serialize_lib.deserialize_byte(bytes) │ + local x_size = serialize_lib.deserialize_byte(bytes) │ + local map = {} │ + for y=0,y_size-1 do │ + map[y] = {} │ + for x=0,x_size-1 do │ + map[y][x] = serialize_lib.deserialize_bool(bytes) │ + end │ + end │ + │ + return function (y,x) │ + return map[y][x] │ + end │ end │ │ -local function load_level1(state) │ +function serialize.serialize_state(state) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(state.tile_bad_level_idx) │ + output = output .. serialize_lib.serialize_byte(state.y_size) │ + output = output .. serialize_lib.serialize_byte(state.x_size) │ │ - state.tile_bad_levels = { │ - function (y,x, step) │ - step = (10 - step - 1) % 12 │ - return y == step │ - end, │ + output = output .. serialize_lib.serialize_s32(state.new_sickness_period) │ + output = output .. serialize_lib.serialize_s32_nilable(state.time_to_new_sickness) │ + output = output .. serialize_lib.serialize_byte(state.new_sickness_count) │ │ - function (y,x,step) │ - local val = (4 <= y and y <= 5) or │ - (4 <= x and x <= 5) │ - step = step % 12 │ - if step < 3 then │ - return false │ - elseif step < 6 then │ - return val │ - elseif step < 9 then │ - return false │ - else │ - return not val │ - end │ - end, │ + output = output .. serialize_lib.serialize_byte(#state.players) │ + for _, player in ipairs(state.players) do │ + output = output .. serialize_player_info(player) │ + end │ │ - function (y,x,step) │ - step = step % 12 │ - return x == step │ - end, │ + output = output .. serialize_bad_tiles(state) │ │ - -- 0 1 2 3 4 5 6 7 8 9 │ - -- 0 a a . . . . . . . . │ - -- 1 a a . . . . . . . . │ - -- 2 . . b b . . . . . . │ - -- 3 . . b b . . . . . . │ - -- 4 . . . . c c . . . . │ - -- 5 . . . . c c . . . . │ - -- 6 . . . . . . b b . . │ - -- 7 . . . . . . b b . . │ - -- 8 . . . . . . . . a a │ - -- 9 . . . . . . . . a a │ + output = output .. serialize_lib.serialize_byte(#state.patients) │ │ - function (y,x,step) │ - step = math.floor((step % 6)/2) │ - if step == 0 then │ - return (0 <= y and y <= 1 or 8 <= y and y <= 9) and │ - (0 <= x and x <= 1 or 8 <= x and x <= 9) │ - elseif step == 1 then │ - return (2 <= y and y <= 3 or 6 <= y and y <= 7) and │ - (2 <= x and x <= 3 or 6 <= x and x <= 7) │ - elseif step == 2 then │ - return (4 <= y and y <= 5 and │ - 4 <= x and x <= 5) │ - else │ - return false │ + for _, patient in ipairs(state.patients) do │ + output = output .. serialize_patient_info(state, patient) │ + end │ + local cells_serialized = "" │ + local non_empty_cell_count = 0 │ + for y, row in pairs(state.cells) do │ + for x, cell in pairs(row) do │ + if state.cells[y][x] ~= nil then │ + cells_serialized = cells_serialized .. serialize_lib.serialize_byte(y) │ + cells_serialized = cells_serialized .. serialize_lib.serialize_byte(x) │ + cells_serialized = cells_serialized .. serialize_cell(state, state.cells[y][x]) │ + non_empty_cell_count = non_empty_cell_count + 1 │ end │ - end, │ + end │ + end │ + output = output .. serialize_lib.serialize_16bit(non_empty_cell_count) │ + output = output .. cells_serialized │ + --print(string.format("serialized %d non empty cells into %d bytes", non_empty_cell_count, #cells_serialized)) │ + --print(string.format("serialized into %d bytes", #output)) │ + return output │ +end │ │ - function (y,x,step) │ - step = step % 8 │ - if step < 1 then │ - return between(0,y,2) or between(8,y,10) │ - elseif step < 2 then │ - return between(2,y,4) or between(6,y,8) │ - elseif step < 4 then │ - return false │ - elseif step < 6 then │ - return between(4,y,6) │ - else │ - return false │ - end │ - end, │ │ - function (y,x,step) │ - step = step % 14 │ - if step < 5 then return between(2*step,y,2*step+2) and between(2*step, x, 2*step+2) │ - elseif step < 10 then │ - step = step - 5 │ - return between(2*step, y,2*step+2) and between(2*step, 10 - x-1, 2*step+2) │ - elseif step < 12 then │ - return between(2,y,4) and between(2,x,9) or │ - between(7,y,9) and between(2,x,9) or │ - between(2,x,4) and between(2,y,9) or │ - between(7,x,9) and between(2,y,9) │ - end │ - end │ - } │ +function serialize.deserialize_state(byte_str) │ + local bytes = serialize_lib.bytestr_to_byteary(byte_str) │ + --print(string.format("deserializing %d bytes", #bytes)) │ + local state = {} │ + state.tile_bad_level_idx = serialize_lib.deserialize_byte(bytes) │ + state.y_size = serialize_lib.deserialize_byte(bytes) │ + state.x_size = serialize_lib.deserialize_byte(bytes) │ │ - local level_map = { │ - --0 1 2 3 4 5 6 7 8 9 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 0 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 1 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 2 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 3 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 4 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 5 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 6 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 7 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 8 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 9 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 10 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 11 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 13 │ - { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, -- 14 │ - --{ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -- 0 │ - --{ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, -- 1 │ - --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 2 │ - --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 3 │ - --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 4 │ - --{ 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, -- 5 │ - } │ + state.new_sickness_period = serialize_lib.deserialize_s32(bytes) │ + state.time_to_new_sickness = serialize_lib.deserialize_s32_nilable(bytes) │ + state.new_sickness_count = serialize_lib.deserialize_byte(bytes) │ │ - state.y_size = #level_map │ - state.x_size = #level_map[1] │ + local player_count = serialize_lib.deserialize_byte(bytes) │ + state.players = {} │ + for i=1,player_count do │ + state.players[i] = deserialize_player_info(bytes) │ + end │ │ - for row_idx, row in ipairs(level_map) do │ - local y = row_idx-1 │ - state.cells[y] = {} │ - for col_idx, cell in ipairs(row) do │ - local x = col_idx-1 │ - if level_map[row_idx][col_idx] == 1 then │ - state.cells[y][x] = {} │ - end │ - end │ + state.tile_bad = deserialize_bad_tiles(bytes) │ + │ + local patient_count = serialize_lib.deserialize_byte(bytes) │ + state.patients = {} │ + for i=1,patient_count do │ + --print("deserializing patient " .. i) │ + state.patients[i] = deserialize_patient_info(state, bytes) │ end │ │ - state.step_time = 300 │ - reset_step(state) │ - state.tile_bad_level_idx = 1 │ - state.tile_bad = function(y,x) │ - local step = state.step │ - if y >= 12 or y < 2 then return false │ - else │ - y = y - 2 │ - return state.tile_bad_levels[state.tile_bad_level_idx](y,x,step) │ + state.cells = {} │ + │ + local non_empty_cell_count = serialize_lib.deserialize_16bit(bytes) │ + --print("deserializing " .. non_empty_cell_count .. " cells from " .. #bytes .. " remaining bytes" ) │ + for i=1,non_empty_cell_count do │ + --print("i=" .. i ..", remaining bytes: " .. utils.binary_to_hr_str(bytes)) │ + local y = serialize_lib.deserialize_byte(bytes) │ + local x = serialize_lib.deserialize_byte(bytes) │ + if state.cells[y] == nil then │ + state.cells[y] = {} │ end │ + state.cells[y][x] = deserialize_cell(state, bytes) │ end │ │ - state.tile_win = function (y,x) │ - return y <= 1 │ + if #bytes > 0 then │ + error(string.format("received %d leftover bytes when deserializing", #bytes)) │ end │ + │ + return state │ +end │ │ - local level_items = { │ - } │ +return serialize │ +local alexgames = require("alexgames") │ │ - for _, item_info in ipairs(level_items) do │ - if core.is_patient(item_info.item) then │ - local patient_info = new_patient(item_info.y, item_info.x) │ - table.insert(state.patients, patient_info) │ - table.insert(state.cells[item_info.y][item_info.x], patient_info) │ - else │ - table.insert(state.cells[item_info.y][item_info.x], item_info.item) │ +local y = 200 │ +local x = 100 │ + │ +local width = 75 │ +local height = 75 │ + │ +local i = 0 │ +local prop = 0 │ + │ +function update() │ + alexgames.draw_clear() │ + │ + if prop % 2 == 0 then │ + flip_y_vals = { false, true } │ + flip_x_vals = { false, true } │ + │ + local flip_y_used = nil │ + local flip_x_used = nil │ + │ + local j = 0 │ + │ + for _, flip_x in ipairs(flip_x_vals) do │ + for _, flip_y in ipairs(flip_y_vals) do │ + if j ~= i % 4 then │ + goto next_iter │ + end │ + │ + alexgames.draw_graphic('hospital_ventilator', y, x, │ + width, height, │ + { flip_y = flip_y, flip_x = flip_x }) │ + flip_y_used = flip_y │ + flip_x_used = flip_x │ + ::next_iter:: │ + j = j + 1 │ + end │ + │ end │ + │ + local text1 = string.format("flip_y: %s", flip_y_used) │ + local text2 = string.format("flip_x: %s", flip_x_used) │ + alexgames.draw_text(text1, '#000000', 300, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ + alexgames.draw_text(text2, '#000000', 330, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ + │ + │ + else │ + local angle_degrees = i * 15 │ + alexgames.draw_graphic('hospital_ventilator', y, x, │ + width, height, │ + { angle_degrees = angle_degrees }) │ + │ + local text1 = string.format("angle: %s", angle_degrees) │ + alexgames.draw_text(text1, '#000000', 300, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ + │ end │ + alexgames.draw_circle('#ff0000', '#ff0000', y, x, 5) │ │ - --set_patient_need(state.patients[1], core.NEEDS_BROKEN_BONE) │ - --set_patient_need(state.patients[2], core.NEEDS_LOW_FLUIDS) │ + alexgames.draw_refresh() │ end │ │ -local function add_player(state, player_idx, pos_y, pos_x) │ - local player_item = new_item(core.ITEM_ID_PLAYER) │ - player_item.player_idx = player_idx │ - table.insert(state.cells[math.floor(pos_y)][math.floor(pos_x)], player_item) │ - state.players[player_idx] = { │ - y = pos_y, │ - x = pos_x, │ - vel_y = 0, │ - vel_x = 0, │ - use_btn_down = false, │ - drop_btn_down = false, │ - holding = nil, │ - is_using = false, │ - use_progress = 0, │ - use_time = nil, │ - } │ +local BTN_ID_NEXT_FRAME = "btn_next_frame" │ +local BTN_ID_NEXT_PROP = "btn_next_prop" │ + │ +function handle_btn_clicked(btn_id) │ + if btn_id == BTN_ID_NEXT_FRAME then │ + i = i + 1 │ + update() │ + elseif btn_id == BTN_ID_NEXT_PROP then │ + prop = prop + 1 │ + update() │ + else │ + error(string.format("Unhandled btn id %s", btn_id)) │ + end │ end │ │ -function core.init(game_params) │ - local state = { │ - y_size = game_params.y_size, │ - x_size = game_params.x_size, │ - cells = {}, │ - patients = {}, │ - players = {}, │ +function start_game() │ + alexgames.create_btn(BTN_ID_NEXT_FRAME, "Next Frame", 1) │ + alexgames.create_btn(BTN_ID_NEXT_PROP, "Next Property", 1) │ +end │ │ - -- 15 seconds was a bit too hard for just one player │ - new_sickness_period = 18*1000, │ - time_to_new_sickness = nil, │ - new_sickness_count = 2, │ - } │ - state.time_to_new_sickness = state.new_sickness_period │ +local alexgames = require("alexgames") │ │ - -- print("loading level 1...") │ - load_level1(state) │ +local TEXT_SIZE = 12 │ +local PADDING = 5 │ +local TEXT_COLOUR = "#ff0000" │ │ +local BTN_ID_TIMER1_TOGGLE = "timer1_toggle" │ +local BTN_ID_TIMER2_TOGGLE = "timer2_toggle" │ │ - for i=1,game_params.num_players do │ - local pos = get_player_starting_pos(i) │ - add_player(state, i, pos.y, pos.x) │ - end │ +local TIMER1_PERIOD_MS = 1000 │ +local TIMER2_PERIOD_MS = 1500 │ │ +local timer1 = nil │ +local timer2 = nil │ │ - return state │ -end │ +local program_start_time = 0 │ │ -function core.handle_player_dirpad_update(state, player, vec_y, vec_x) │ +local total_updates = 0 │ +local recent_updates = {} │ │ - if vec_y ~= 0 or vec_x ~= 0 then │ - -- TODO could probably simplify this with a trig identity? │ - local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ - local angle = math.atan(vec_y, vec_x) │ - angle = angle - math.pi/4 │ - │ - vec_y = mag * math.sin(angle) │ - vec_x = mag * math.cos(angle) │ +local function internal_draw_board() │ + alexgames.draw_clear() │ + │ + for i, info in ipairs(recent_updates) do │ + local y = (TEXT_SIZE + PADDING) * (i) │ + local msg = string.format("%3.3f: update fired, dt_ms: %d", info.time_ms/1000, info.dt_ms) │ + alexgames.draw_text(msg, TEXT_COLOUR, y, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ end │ │ - state.players[player].vel_y = vec_y * PLAYER_MOVE_SPEED │ - state.players[player].vel_x = vec_x * PLAYER_MOVE_SPEED │ + alexgames.draw_text(string.format("Timer 1 (1 s) handle: %s", timer1), TEXT_COLOUR, │ + 400, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ + alexgames.draw_text(string.format("Timer 2 (1.5 s) handle: %s", timer2), TEXT_COLOUR, │ + 400 + TEXT_SIZE + PADDING, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ + alexgames.draw_refresh() │ end │ │ -function core.handle_player_use_btn(state, player, btn_down) │ - local player_state = state.players[player] │ - player_state.use_btn_down = btn_down │ - if btn_down then │ - return core.use_start(state, player) │ - else │ - return core.use_stop(state, player) │ +function update(dt_ms) │ + local time_ms = alexgames.get_time_ms() - program_start_time │ + total_updates = total_updates + 1 │ + table.insert(recent_updates, { dt_ms = dt_ms, time_ms = time_ms }) │ + while #recent_updates > 15 do │ + table.remove(recent_updates, 1) │ end │ + │ + internal_draw_board() │ end │ │ -function core.handle_player_drop_btn(state, player, btn_down) │ - local player_state = state.players[player] │ - player_state.drop_btn_down = btn_down │ - if btn_down then │ - if player_state.holding ~= nil and │ - not core.is_patient(player_state.holding) then │ - core.drop_item(state, player) │ +function handle_btn_clicked(btn_id) │ + if btn_id == BTN_ID_TIMER1_TOGGLE then │ + if timer1 == nil then │ + timer1 = alexgames.set_timer_update_ms(TIMER1_PERIOD_MS) │ + else │ + alexgames.delete_timer(timer1) │ + timer1 = nil │ + end │ + else │ + if timer2 == nil then │ + timer2 = alexgames.set_timer_update_ms(TIMER2_PERIOD_MS) │ + else │ + alexgames.delete_timer(timer2) │ + timer2 = nil │ end │ end │ + │ + internal_draw_board() │ end │ │ -local function clip_min_max(min_val, max_val, val) │ - if val < min_val then return min_val │ - elseif val > max_val then return max_val │ - else return val end │ + │ +function start_game() │ + program_start_time = alexgames.get_time_ms() │ + timer1 = alexgames.set_timer_update_ms(TIMER1_PERIOD_MS) │ + timer2 = alexgames.set_timer_update_ms(TIMER2_PERIOD_MS) │ + │ + -- TODO remove │ + --alexgames.delete_timer(timer1) │ + --timer1 = nil │ + │ + alexgames.create_btn(BTN_ID_TIMER1_TOGGLE, "Toggle timer 1", 1) │ + alexgames.create_btn(BTN_ID_TIMER2_TOGGLE, "Toggle timer 2", 1) │ end │ │ -local function is_collision(state, player_idx, tentative_y, tentative_x) │ - local tentative_y_idx = math.floor(tentative_y) │ - local tentative_x_idx = math.floor(tentative_x) │ +local cards = require("libs/cards/cards") │ +local cards_draw = require("libs/cards/cards_draw") │ +local draw_more = require("libs/draw/draw_more") │ +local alexgames = require("alexgames") │ │ - -- If we'are already in this cell-- let the player walk through it to escape. │ - -- Otherwise they would be completely trapped │ - if tentative_y_idx == math.floor(state.players[player_idx].y) and │ - tentative_x_idx == math.floor(state.players[player_idx].x) then │ - return false │ - end │ +local padding = 50 │ +local card_height = 100 │ +local card_width = 70 │ +--local card_height = 60 │ +--local card_width = 40 │ +local card_font_size = 24 │ │ - if state.cells[tentative_y_idx] == nil or │ - state.cells[tentative_y_idx][tentative_x_idx] == nil then │ - return true │ - elseif #state.cells[tentative_y_idx][tentative_x_idx] == 0 then │ - return false │ - elseif #state.cells[tentative_y_idx][tentative_x_idx] == 1 then │ - local item_info = state.cells[tentative_y_idx][tentative_x_idx][1] │ - return not (item_info.id == core.ITEM_ID_PLAYER and item_info.player_idx == player_idx) │ +local BTN_ID_INC_ANGLE = "inc_angle" │ +local BTN_ID_DEC_ANGLE = "dec_angle" │ +local BTN_ID_TOGGLE_FACE_DN_UP = "toggle_face_dn_up" │ + │ +local pos_y = 240 │ +local pos_x = 240 │ + │ +local deck = cards.new_deck() │ +cards.shuffle(deck) │ + │ +local angle_offset = 0 │ +local cards_face_down = true │ + │ +function update() │ + alexgames.set_status_msg(string.format("Drawing cards with angle offset = %d", angle_offset)) │ + alexgames.draw_clear() │ + │ + if not cards_face_down then │ + cards_draw.draw_card(deck[1], pos_y + padding, pos_x, │ + card_width, card_height, │ + card_font_size, false, 0 + angle_offset) │ + │ + cards_draw.draw_card(deck[2], pos_y, pos_x - padding, │ + card_width, card_height, │ + card_font_size, false, 90 + angle_offset) │ + │ + cards_draw.draw_card(deck[3], pos_y - padding, pos_x, │ + card_width, card_height, │ + card_font_size, false, 180 + angle_offset) │ + │ + cards_draw.draw_card(deck[4], pos_y, pos_x + padding, │ + card_width, card_height, │ + card_font_size, false, 270 + angle_offset) │ + alexgames.draw_refresh() │ else │ - -- more than one item in dst, so must be collision │ - return true │ + │ + draw_more.draw_graphic_ul("card_facedown", 0, 0, card_width, card_height, { angle_degrees = 0 + angle_offset }) │ + │ + draw_more.draw_graphic_ul("card_facedown", pos_y + padding, pos_x + padding, card_width, card_height, { angle_degrees = 0 + angle_offset }) │ + draw_more.draw_graphic_ul("card_facedown", pos_y + padding, pos_x - padding, card_width, card_height, { angle_degrees = 90 + angle_offset }) │ + draw_more.draw_graphic_ul("card_facedown", pos_y - padding, pos_x - padding, card_width, card_height, { angle_degrees = 180 + angle_offset }) │ + draw_more.draw_graphic_ul("card_facedown", pos_y - padding, pos_x + padding, card_width, card_height, { angle_degrees = 270 + angle_offset }) │ + │ + alexgames.draw_circle('#ff0000', '#ff000055', pos_y + padding, pos_x + padding, 5) │ + alexgames.draw_text('1', '#000000', pos_y + padding, pos_x + padding, 12, 0) │ + alexgames.draw_circle('#ff0000', '#ff000055', pos_y + padding, pos_x - padding, 5) │ + alexgames.draw_text('2', '#000000', pos_y + padding, pos_x - padding, 12, 0) │ + alexgames.draw_circle('#ff0000', '#ff000055', pos_y - padding, pos_x - padding, 5) │ + alexgames.draw_text('3', '#000000', pos_y - padding, pos_x - padding, 12, 0) │ + alexgames.draw_circle('#ff0000', '#ff000055', pos_y - padding, pos_x + padding, 5) │ + alexgames.draw_text('4', '#000000', pos_y - padding, pos_x + padding, 12, 0) │ end │ - │ end │ │ -local function move_player(state, player_idx, pos_y, pos_x) │ - local player_state = state.players[player_idx] │ - local old_y_idx = math.floor(player_state.y) │ - local old_x_idx = math.floor(player_state.x) │ - local new_y_idx = math.floor(pos_y) │ - local new_x_idx = math.floor(pos_x) │ - player_state.y = pos_y │ - player_state.x = pos_x │ +function handle_btn_clicked(btn_id) │ + if btn_id == BTN_ID_INC_ANGLE then │ + angle_offset = angle_offset + 15 │ + elseif btn_id == BTN_ID_DEC_ANGLE then │ + angle_offset = angle_offset - 15 │ + elseif btn_id == BTN_ID_TOGGLE_FACE_DN_UP then │ + cards_face_down = not cards_face_down │ + end │ + update() │ +end │ │ - if old_y_idx ~= new_y_idx or │ - old_x_idx ~= new_x_idx then │ - local old_cell = state.cells[old_y_idx][old_x_idx] │ - local player_tbl_idx = nil │ - for idx, item_info in ipairs(old_cell) do │ - if item_info.id == core.ITEM_ID_PLAYER and item_info.player_idx == player_idx then │ - player_tbl_idx = idx │ - goto found_elem │ - end │ +alexgames.create_btn(BTN_ID_INC_ANGLE, "Increment Angle", 1) │ +alexgames.create_btn(BTN_ID_DEC_ANGLE, "Decrement Angle", 1) │ +alexgames.create_btn(BTN_ID_TOGGLE_FACE_DN_UP, "Toggle face dn/up", 1) │ +-- Run this script by the standalone lua interpeter, from either repo root or src/lua_scripts │ +package.path = 'src/lua_scripts/?.lua;?.lua' │ + │ +local core = require("games/crib/crib_core") │ +local cards = require("libs/cards/cards") │ + │ +local print_test_passes = false │ + │ +local test_passes = 0 │ +local test_failures = 0 │ +local error_on_failure = false │ + │ +-- TODO extract all this boilerplate test stuff into a generic module that accepts │ +-- running a function or something │ +local function test_hand(msg, hand, extra_card, expected_points) │ + local actual_points = core.check_points_sequence(hand, extra_card).points │ + if expected_points ~= actual_points then │ + test_failures = test_failures + 1 │ + local msg_to_print = string.format("Expected hand=%s, extra_card=%s to be worth " .. │ + "%d points, was worth %d. Msg=%s", │ + cards.card_array_to_string(hand), │ + cards.card_to_string(extra_card), │ + expected_points, actual_points, msg) │ + if error_on_failure then │ + error(msg_to_print) │ + else │ + print(msg_to_print) │ end │ - ::found_elem:: │ + else │ + test_passes = test_passes + 1 │ + if print_test_passes then │ + print(string.format("Hand=%s, extra_card=%s was correctly worth %d points. Msg=%s", │ + cards.card_array_to_string(hand), cards.card_to_string(extra_card), actual_points, msg)) │ + end │ + end │ +end │ │ - local item_info = table.remove(old_cell, player_tbl_idx) │ - table.insert(state.cells[new_y_idx][new_x_idx], item_info) │ +test_hand("nothing", { │ + { suit = cards.DIAMONDS, val = 2 }, │ + { suit = cards.CLUBS, val = 4 }, │ + { suit = cards.DIAMONDS, val = 6 }, │ + { suit = cards.DIAMONDS, val = 8 }, │ + }, │ + { suit = cards.CLUBS, val = cards.KING}, │ + 0 │ +) │ + │ +test_hand("4 of suit", { │ + { suit = cards.DIAMONDS, val = 2 }, │ + { suit = cards.DIAMONDS, val = 4 }, │ + { suit = cards.DIAMONDS, val = 6 }, │ + { suit = cards.DIAMONDS, val = 8 }, │ + }, │ + { suit = cards.CLUBS, val = cards.KING}, │ +4) │ + │ +test_hand("run of 4 + one 15", { │ + { suit = cards.DIAMONDS, val = 7 }, │ + { suit = cards.CLUBS, val = 8 }, │ + { suit = cards.DIAMONDS, val = 9 }, │ + { suit = cards.DIAMONDS, val = 10 }, │ + }, │ + { suit = cards.CLUBS, val = 2}, │ + 4 + 2 │ +) │ + │ +test_hand("two runs of 4 + pair + fifteen", { │ + { suit = cards.DIAMONDS, val = 7 }, │ + { suit = cards.CLUBS, val = 8 }, │ + { suit = cards.DIAMONDS, val = 9 }, │ + { suit = cards.DIAMONDS, val = 10 }, │ + }, │ + { suit = cards.CLUBS, val = 10}, │ + 2*4 + 2 + 2 │ +) │ + │ +test_hand("run of 5 + two fifteen (6+9, 8+7)", { │ + { suit = cards.DIAMONDS, val = 6 }, │ + { suit = cards.CLUBS, val = 7 }, │ + { suit = cards.DIAMONDS, val = 8 }, │ + { suit = cards.DIAMONDS, val = 9 }, │ + }, │ + { suit = cards.CLUBS, val = 10}, │ + 5 + 2*2 │ +) │ + │ +test_hand("run of 5 + two fifteen (6+9, 8+7) + flush", { │ + { suit = cards.DIAMONDS, val = 6 }, │ + { suit = cards.DIAMONDS, val = 7 }, │ + { suit = cards.DIAMONDS, val = 8 }, │ + { suit = cards.DIAMONDS, val = 9 }, │ + }, │ + { suit = cards.CLUBS, val = 10}, │ + 5 + 2*2 + 4 │ +) │ + │ +-- TODO why is this one failing? │ +test_hand("three 10s + two 5s = 6 fifteens + 1 pair of two + 1 pair of three", { │ + { suit = cards.DIAMONDS, val = 10 }, │ + { suit = cards.CLUBS, val = cards.KING }, │ + { suit = cards.DIAMONDS, val = 5 }, │ + { suit = cards.HEARTS, val = 5 }, │ + }, │ + { suit = cards.SPADES, val = 10}, │ + 6*2 + 2 + 6 │ +) │ + │ +test_hand("pair of three", { │ + { suit = cards.DIAMONDS, val = 10 }, │ + { suit = cards.CLUBS, val = 10 }, │ + { suit = cards.SPADES, val = 10 }, │ + { suit = cards.HEARTS, val = 9 }, │ + }, │ + { suit = cards.SPADES, val = 2}, │ + 6 │ +) │ + │ +test_hand("pair of four", { │ + { suit = cards.DIAMONDS, val = 10 }, │ + { suit = cards.CLUBS, val = 10 }, │ + { suit = cards.SPADES, val = 10 }, │ + { suit = cards.HEARTS, val = 10 }, │ + }, │ + { suit = cards.SPADES, val = 2}, │ + 12 │ +) │ + │ +print(string.format("Tests passed: %d", test_passes)) │ +print(string.format("Tests failed: %d", test_failures)) │ + │ +if test_failures > 0 or test_passes == 0 then │ + return -1 │ +end │ +local serialize = {} │ +local core = require("games/crib/crib_core") │ + │ +local cards = require("libs/cards/cards") │ + │ +local function serialize_byte(val) │ + if val == nil then error("nil arg", 2) end │ + return string.char(val) │ +end │ + │ +local function deserialize_byte(bytes) │ + return string.byte(table.remove(bytes, 1)) │ +end │ + │ +local function bool_to_int(bool) │ + if bool then return 1 │ + else return 0 end │ +end │ + │ +local function int_to_bool(val) │ + if val == 0 then return false │ + elseif val == 1 then return true │ + else error(string.format("Unexpected value for bool: %s", val)) end │ +end │ + │ +local function serialize_255bool_ary(ary) │ + local chars = {} │ + chars[#chars+1] = string.char(#ary) │ + for i=1,#ary do │ + chars[#chars+1] = string.char(bool_to_int(ary[i])) │ end │ + return table.concat(chars, "") │ end │ │ -local function player_can_move(player_state) │ - return not player_state.is_using │ +local function deserialize_255bool_ary(bytes) │ + local ary = {} │ + local ary_len = string.byte(table.remove(bytes,1)) │ + if ary_len > #bytes then │ + error(string.format("Read ary_len %d, only %d bytes left", ary_len, #bytes)) │ + end │ + for i=1,ary_len do │ + ary[i] = int_to_bool(string.byte(table.remove(bytes,1))) │ + end │ + return ary │ end │ │ -local function player_died(state, player_idx) │ - local pos = get_player_starting_pos(player_idx) │ - move_player(state, player_idx, pos.y, pos.x) │ +function serialize.serialize_state(state) │ + return serialize.serialize_client_state(state, nil) │ end │ │ -function core.update_state(state, dt) │ - local events = {} │ - for player_idx, player_state in ipairs(state.players) do │ +-- If player is nil, then store all players' hands │ +-- Otherwise, only serialize the hand for `player`. │ +function serialize.serialize_client_state(state, player) │ + if state == nil then return nil end │ + local output = "" │ + output = output .. serialize_byte(state.state) │ + output = output .. serialize_byte(state.player_turn) │ + output = output .. serialize_byte(state.player_crib) │ + output = output .. serialize_byte(state.player_count) │ + output = output .. serialize_byte(state.playing_sum) │ + output = output .. serialize_byte(state.first_player_cant_move) │ + output = output .. cards.serialize_card(state.cut_deck_card) │ + output = output .. cards.serialize_card_array(state.playing_sequence) │ │ - if player_can_move(player_state) then │ - local tentative_y = player_state.y + player_state.vel_y * dt │ - local tentative_x = player_state.x + player_state.vel_x * dt │ + local show_all_players = (player == nil) │ │ - -- Try to move to the new position. │ - -- If it is blocked, try moving in just the y direction, or just the x direction │ - if not is_collision(state, player_idx, tentative_y, tentative_x) then │ - move_player(state, player_idx, tentative_y, tentative_x) │ - player_state.y = tentative_y │ - player_state.x = tentative_x │ - elseif not is_collision(state, player_idx, tentative_y, player_state.x) then │ - move_player(state, player_idx, tentative_y, player_state.x) │ - player_state.y = tentative_y │ - elseif not is_collision(state, player_idx, player_state.y, tentative_x) then │ - move_player(state, player_idx, player_state.y, tentative_x) │ - player_state.x = tentative_x │ + for player_idx, hand in ipairs(state.hands) do │ + if show_all_players or player == player_idx then │ + output = output .. serialize_byte(player_idx) │ + output = output .. serialize_byte(1) │ + for _, card in ipairs(state.hands[player_idx]) do │ + assert(card ~= cards.UNREVEALED_CARD and type(card) == 'table') │ end │ + output = output .. cards.serialize_card_array(state.hands[player_idx]) │ + else │ + output = output .. serialize_byte(player_idx) │ + output = output .. serialize_byte(0) │ + output = output .. serialize_byte(#hand) │ end │ + end │ │ - if player_state.is_using then │ - player_state.use_progress = player_state.use_progress + (dt/1000.0/player_state.use_time)*core.USE_PROGRESS_MAX │ - if player_state.use_progress >= core.USE_PROGRESS_MAX then │ - player_state.use_progress = core.USE_PROGRESS_MAX │ - core.on_use_complete_func(state, player_idx, events) │ - end │ - end │ + for player_idx,playing in ipairs(state.playing) do │ + output = output .. cards.serialize_card_array(playing) │ + end │ + for player_idx,played in ipairs(state.played) do │ + output = output .. cards.serialize_card_array(played) │ end │ │ - for _, patient in ipairs(state.patients) do │ - if patient.requires_help then │ - if patient.fix_time ~= nil then │ - patient.fix_time = patient.fix_time - dt │ - if patient.fix_time <= 0 then │ - table.insert(events, { │ - event = core.EVT_PATIENT_CURED, │ - patient = patient, │ - }) │ - patient.requires_help = false │ - patient.needs_revealed = false │ - patient.needs_type = nil │ - patient.time_left = nil │ - patient.orig_time_left = nil │ - patient.fix_time = nil │ - patient.orig_fix_time = nil │ - goto next_patient │ - end │ - │ - end │ - patient.time_left = patient.time_left - dt / 1000.0 │ - if patient.time_left <= 0 then │ - patient.time_left = 0 │ - table.insert(events, { │ - event = core.EVT_PATIENT_NEED_EXPIRED, │ - patient = patient, │ - }) │ - patient.requires_help = false │ - patient.needs_revealed = false │ - patient.needs_type = nil │ - patient.time_left = nil │ - patient.orig_time_left = nil │ - patient.fix_time = nil │ - patient.orig_fix_time = nil │ - end │ - end │ - ::next_patient:: │ + for player_idx,_ in ipairs(state.tentative_discards) do │ + output = output .. serialize_255bool_ary(state.tentative_discards[player_idx]) │ end │ │ - state.time_to_new_sickness = state.time_to_new_sickness - dt │ - if state.time_to_new_sickness <= 0 then │ - state.time_to_new_sickness = state.new_sickness_period │ - local healthy_patients = {} │ - for _, patient in ipairs(state.patients) do │ - if not patient.requires_help then │ - table.insert(healthy_patients, patient) │ + for player_idx=1,state.player_count do │ + output = output .. serialize_byte(state.score[player_idx]) │ + end │ + │ + if show_all_players or state.state == core.states.ACKNOWLEDGE_CRIB then │ + output = output .. cards.serialize_card_array(state.crib) │ + else │ + output = output .. cards.serialize_card_array({}) │ + end │ + output = output .. serialize_255bool_ary(state.acknowledged_points) │ + return output │ +end │ + │ +local function bytestr_to_byteary(bytestr) │ + local byteary = {} │ + for i=1,#bytestr do │ + byteary[i] = bytestr:sub(i,i) │ + end │ + return byteary │ +end │ + │ +-- TODO remove this │ +function serialize.deserialize_client_state(bytes) │ + return serialize.deserialize_state(bytes) │ +end │ + │ +function serialize.deserialize_state(bytes, is_host) │ + if bytes == nil then error("deserialize_state arg is nil", 2) end │ + bytes = bytestr_to_byteary(bytes) │ + local state = {} │ + state.state = deserialize_byte(bytes) │ + state.player_turn = deserialize_byte(bytes) │ + state.player_crib = deserialize_byte(bytes) │ + state.player_count = deserialize_byte(bytes) │ + state.playing_sum = deserialize_byte(bytes) │ + state.first_player_cant_move = deserialize_byte(bytes) │ + state.cut_deck_card = cards.deserialize_card(bytes) │ + state.playing_sequence = cards.deserialize_card_array(bytes) │ + │ + state.playing = {} │ + state.played = {} │ + state.hands = {} │ + │ + for _=1,state.player_count do │ + local other_player_idx = deserialize_byte(bytes) │ + local cards_visible = deserialize_byte(bytes) │ + if is_host then │ + if cards_visible ~= 1 then │ + error(string.format("as host, deserialized state with cards_visible = %s", cards_visible)) │ end │ end │ - for _=1,state.new_sickness_count do │ - if #healthy_patients > 0 then │ - local idx = math.random(#healthy_patients) │ - set_patient_need(healthy_patients[idx], NEED_LIST[math.random(#NEED_LIST)]) │ - table.remove(healthy_patients, idx) │ + if cards_visible == 0 then │ + local count = deserialize_byte(bytes) │ + state.hands[other_player_idx] = {} │ + for _=1,count do │ + table.insert(state.hands[other_player_idx], cards.UNREVEALED_CARD) │ + end │ + elseif cards_visible == 1 then │ + state.hands[other_player_idx] = cards.deserialize_card_array(bytes) │ + for _, card in ipairs(state.hands[other_player_idx]) do │ + if card == cards.UNREVEALED_CARD then │ + error(string.format("Unexpected card value: %d", card)) │ + end │ + if type(card) ~= 'table' then │ + error(string.format("Unexpected card value: %s", type(card))) │ + end │ end │ + else │ + -- TODO unhandled │ + error(string.format("unhandled cards_visible val=%d", cards_visible)) │ end │ end │ │ - │ - state.time_to_step = state.time_to_step - dt │ - if state.time_to_step <= 0 then │ - state.time_to_step = state.step_time │ - state.step = state.step + 1 │ + for other_player_idx=1,state.player_count do │ + state.playing[other_player_idx] = cards.deserialize_card_array(bytes) │ + end │ + for other_player_idx=1,state.player_count do │ + state.played[other_player_idx] = cards.deserialize_card_array(bytes) │ end │ │ - for player_idx, player in ipairs(state.players) do │ - if state.tile_bad(math.floor(player.y), math.floor(player.x)) then │ - player_died(state, player_idx) │ - end │ + state.tentative_discards = {} │ + for player_idx=1,state.player_count do │ + state.tentative_discards[player_idx] = deserialize_255bool_ary(bytes) │ end │ │ - local advance_to_next_level = true │ - for player_idx, player in ipairs(state.players) do │ - if not state.tile_win(player.y, player.x) then │ - advance_to_next_level = false │ - end │ + state.score = {} │ + for player_idx=1,state.player_count do │ + state.score[player_idx] = deserialize_byte(bytes) │ end │ │ - if advance_to_next_level then │ - state.tile_bad_level_idx = 1 + ((state.tile_bad_level_idx) % #state.tile_bad_levels) │ - reset_step(state) │ - for player_idx, player in ipairs(state.players) do │ - local pos = get_player_starting_pos(player_idx) │ - move_player(state, player_idx, pos.y, pos.x) │ - end │ + state.crib = cards.deserialize_card_array(bytes) │ + │ + state.acknowledged_points = deserialize_255bool_ary(bytes) │ + │ + │ + if #bytes ~= 0 then │ + error(string.format("%d bytes remaining after deserializing", #bytes)) │ end │ │ - return events │ + return state │ end │ │ -function core.get_item_needs_type(item_id) │ - local map = { │ - [core.ITEM_ID_IV_BAG] = core.NEEDS_LOW_FLUIDS, │ - [core.ITEM_ID_DEFIB] = core.NEEDS_NO_HEARTBEAT, │ - [core.ITEM_ID_VENTILATOR] = core.NEEDS_LOW_OXYGEN, │ +return serialize │ +local core = require("games/crib/crib_core") │ +local draw = require("games/crib/crib_draw") │ +local crib_serialize = require("games/crib/crib_serialize") │ +local alexgames = require("alexgames") │ │ - } │ - return map[item_id] │ -end │ +local wait_for_players = require("libs/multiplayer/wait_for_players") │ │ -local function in_range_coords(state, y, x) │ - return state.cells[y] ~= nil and state.cells[y][x] ~= nil │ -end │ │ -local function item_id_can_be_picked_up(item_id) │ - return PICK_UP_ITEMS[item_id] == true │ -end │ +-- TODO next steps: │ +-- end game when first player reaches 121? │ +-- │ +-- │ +-- bug fixes: │ +-- * award a point for last card? │ +-- * jack of suit? See what other points are missing │ +-- * check wikipedia page for any behaviour that I missed │ +-- * for hand {K K 5 5} with {J} as cut_deck_card, there are 8 matches (6 fifteens and 2 pairs). │ +-- Need to add a separate page or something. 5 can be displayed comfortably │ │ │ -local function ary_contains(ary, elem) │ - for _, val in ipairs(ary) do │ - if val == elem then return true end │ - end │ - return false │ -end │ +local g_session_id = nil │ +local state = nil │ +local players = { │ + [1] = "You", │ +} │ +local player = 1 │ +local is_client = false │ +local player_name_to_idx = {} │ │ -local function patient_can_be_interacted(player_state, patient_info) │ - if patient_info.requires_help then │ - if not patient_info.needs_revealed then │ - return true │ - else │ - if player_state.holding ~= nil and │ - ary_contains(NEEDS_TO_ITEMS_MAP[patient_info.needs_type], player_state.holding.id) then │ - return true │ - elseif patient_info.needs_type == core.NEEDS_BROKEN_BONE and │ - -- don't let the player pick up a patient if they are already holding one... │ - -- unless the patients should be swapped? That might be an option in the future │ - (player_state.holding == nil or not core.is_patient(player_state.holding)) then │ - return true │ - end │ - end │ - end │ - if player_state.holding == nil then │ - -- can always pick up patients to move them around │ - return true │ - end │ +core.print_state(state) │ │ - return false │ +local ui_state = draw.init(480, 480) │ + │ +function new_game(player_count) │ + g_session_id = alexgames.get_new_session_id() │ + state = core.new_game(player_count) │ end │ │ -local function item_id_can_be_interacted(player_state, item_info) │ - if item_id_can_be_picked_up(item_info.id) then │ - return true │ +function send_state_updates_if_host() │ + if is_client then │ + return │ end │ │ - if core.is_patient(item_info) then │ - return patient_can_be_interacted(player_state, item_info) │ + if state == nil then │ + return │ end │ │ - if core.is_bed(item_info) and │ - player_state.holding ~= nil and │ - core.is_patient(player_state.holding) then │ - return true │ + print("sending state to other players") │ + │ + for dst_player, player_name in pairs(players) do │ + if dst_player == player then │ + goto next_player │ + end │ + local state_msg = "state:" .. crib_serialize.serialize_client_state(state, dst_player) │ + alexgames.send_message(player_name, state_msg) │ + ::next_player:: │ end │ +end │ │ - return false │ +function update() │ + if state == nil then │ + return │ + end │ + if state.state == core.states.PICK_DISCARD and #state.hands[player] ~= core.CARDS_PER_HAND then │ + local msg = core.get_discard_status_str(state, player) │ + alexgames.set_status_msg(msg) │ + else │ + -- TODO why is this here? │ + print(string.format("Unhandled state %s", state.state)) │ + end │ + draw.draw(state, ui_state, player) │ end │ │ -local function get_interact_in_cell_idx(state, player_idx, y, x) │ - for idx, item in ipairs(state.cells[y][x]) do │ - if item_id_can_be_interacted(state.players[player_idx], item) then │ - return idx │ +function handle_move(action) │ + if not is_client then │ + local rc = core.handle_move(state, player, action) │ + if rc ~= core.RC_SUCCESS then │ + alexgames.set_status_err(core.rc_to_str(rc)) │ end │ + else │ + send_move_msg(action) │ end │ - return nil │ end │ │ -local function calc_dist(player_state, y, x) │ - local dy = player_state.y - y │ - local dx = player_state.x - x │ - return math.sqrt( dy*dy + dx*dx ) │ +function send_move_msg(action) │ + local msg = "move:"..string.format("%d",action.action) │ + if action.action == core.actions.HAND then │ + msg = msg .. string.format(",%d", action.idx) │ + end │ + print("Sending message: " .. msg) │ + alexgames.send_message("all", msg) -- TODO maybe only message the host │ end │ │ -function core.get_closest_item_cell(state, player_idx) │ - local player_state = state.players[player_idx] │ - local y, x = math.floor(player_state.y), math.floor(player_state.x) │ +function handle_recv_move(src, payload) │ + local src_player = player_name_to_idx[src] │ │ - if in_range_coords(state, y, x) then │ - local item_idx = get_interact_in_cell_idx(state, player_idx, y, x) │ + if src_player == nil then │ + error(string.format("Unexpected move from non player %s", src_player)) │ + end │ │ - if item_idx ~= nil then │ - return { y = y, x = x } │ - end │ + local m = payload:gmatch("(%d+)(.*)") │ + if m == nil then │ + error("Expected move message to start with ascii base 10 int") │ end │ + local action = {} │ + local action_type, data = m() │ + action_type = tonumber(action_type) │ │ - local min_dist = nil │ - local closest_cell = nil │ - for _, dir in ipairs(DIRS) do │ - local y2 = y + dir.y │ - local x2 = x + dir.x │ - if not in_range_coords(state, y2, x2) then │ - goto next_dir │ - end │ - local item_idx = get_interact_in_cell_idx(state, player_idx, y2, x2) │ + action.action = action_type │ │ - if item_idx ~= nil then │ - local dist = calc_dist(player_state, y2, x2) │ - if min_dist == nil or dist < min_dist then │ - min_dist = dist │ - closest_cell = { y = y2, x = x2 } │ - end │ + if action_type == core.actions.HAND then │ + m = data:gmatch(",(%d+)") │ + if m == nil then │ + error("invalid data" .. data) │ end │ - ::next_dir:: │ + local idx = m() │ + action.idx = tonumber(idx) │ + elseif action_type == core.actions.DISCARD_CONFIRM then │ + -- pass │ + elseif action_type == core.actions.CANT_MOVE_ACCEPT then │ + -- pass │ + elseif action_type == core.actions.NEXT then │ + -- pass │ + else │ + error(string.format("Unhandled action_type %s", action_type)) │ end │ - │ - return closest_cell │ + core.handle_move(state, src_player, action) │ end │ │ -function core.get_patient_pos(patient_info) │ - if patient_info.held_by == nil then │ - return { y = patient_info.y, x = patient_info.x } │ +function handle_btn_clicked(btn_id) │ + local rc = nil │ + if btn_id == draw.BTN_ID_DISCARD then │ + handle_move({ action = core.actions.DISCARD_CONFIRM }) │ + alexgames.set_status_msg("Waiting for other players to discard") │ + elseif btn_id == draw.BTN_ID_PASS then │ + handle_move({ action = core.actions.CANT_MOVE_ACCEPT}) │ + elseif btn_id == draw.BTN_ID_NEXT then │ + handle_move({ action = core.actions.NEXT}) │ else │ - return { y = patient_info.held_by.y, │ - x = patient_info.held_by.x } │ + error(string.format("Unhandled btn_id %s", btn_id)) │ + end │ + update() │ + save_state() │ + core.print_state(state) │ + send_state_updates_if_host() │ +end │ + │ +function handle_user_clicked(coord_y, coord_x) │ + if state == nil then │ + return │ + end │ + local action = draw.coords_to_action(state, ui_state, player, coord_y, coord_x) │ + local rc = nil │ + if action.action_type == draw.ACTION_TYPE_GAME then │ + if action.action == nil then │ + print("No action") │ + -- do nothing │ + else │ + handle_move(action) │ + end │ + elseif action.action_type == draw.ACTION_TYPE_UI then │ + draw.handle_ui_action(ui_state, action) │ end │ + update() │ + save_state() │ + core.print_state(state) │ + send_state_updates_if_host() │ end │ │ -function core.get_cells_to_highlight(state) │ - local cells_to_highlight = {} │ +local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as host") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = false │ + if state == nil then │ + new_game(#players) │ + end │ + send_state_updates_if_host() │ + update() │ + core.print_state(state) │ +end │ │ - local items_to_highlight = {} │ +local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as client") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = true │ + -- no need to draw board here, a state update should soon follow │ +end │ │ - for _, patient_info in ipairs(state.patients) do │ - if patient_info.requires_help and patient_info.held_by == nil then │ - if not patient_info.needs_revealed or │ - patient_info.needs_type == core.NEEDS_BROKEN_BONE then │ - │ - local pt = core.get_patient_pos(patient_info) │ - if pt.y == nil or pt.x == nil then │ - error(string.format("received nil coords, %s", patient_info.held_by) ) │ - end │ - table.insert(cells_to_highlight, pt) │ - else │ - for _, item in ipairs(NEEDS_TO_ITEMS_MAP[patient_info.needs_type]) do │ - items_to_highlight[item] = true │ - end │ - end │ - end │ +function handle_msg_received(src, msg) │ + print("handle_msg_received (from src:" .. src .. "): " .. msg); │ + │ + local handled = wait_for_players.handle_msg_received(src, msg) │ + if handled then │ + return │ end │ │ - for y, row in pairs(state.cells) do │ - for x, cell in pairs(row) do │ - for _, item in ipairs(cell) do │ - if items_to_highlight[item.id] then │ - table.insert(cells_to_highlight, { y = y, x = x }) │ - goto next_cell │ - end │ - end │ - ::next_cell:: │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ + │ + if header == "state" then │ + if not is_client then │ + error("Received state as host") │ end │ + print("Received state") │ + state = crib_serialize.deserialize_client_state(payload) │ + core.print_state(state) │ + elseif header == "player_joined" or │ + header == "player_left" then │ + -- ignore I guess? │ + elseif header == "move" then │ + handle_recv_move(src, payload) │ + else │ + error(string.format("Unhandled message %s", header)) │ end │ │ - return cells_to_highlight │ -end │ + send_state_updates_if_host() │ + update() │ + core.print_state(state) │ + save_state() │ +end │ │ -local function get_item_idx_can_be_picked_up(state, cell) │ - for cell_item_idx, item_info in ipairs(state.cells[cell.y][cell.x]) do │ - if item_id_can_be_picked_up(item_info.id) then │ - return cell_item_idx │ - end │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ + if handled then │ + return │ end │ - return nil │ end │ │ -function core.pick_up_item(state, player_idx) │ - local cell = core.get_closest_item_cell(state, player_idx) │ - if cell == nil then │ - return false │ - else │ - local cell_pick_up_item_idx = get_item_idx_can_be_picked_up(state, cell) │ - state.players[player_idx].holding = table.remove(state.cells[cell.y][cell.x], cell_pick_up_item_idx) │ - │ +function save_state() │ + if state == nil then return end │ + -- Only the host can save the state │ + if not is_client then │ + local serialized_state = crib_serialize.serialize_state(state) │ + alexgames.save_state(g_session_id, serialized_state) │ end │ end │ │ -function core.drop_item(state, player_idx, drop_pt) │ - local player_state = state.players[player_idx] │ - if drop_pt == nil then │ - drop_pt = { │ - y = math.floor(player_state.y), │ - x = math.floor(player_state.x), │ - } │ + │ +function start_game(session_id, serialized_state) │ + -- TODO need to implement load state │ + -- which needs proper state serialization for all players (not one client) │ + if serialized_state then │ + g_session_id = session_id │ + state = crib_serialize.deserialize_state(serialized_state, true) │ end │ - local cell = state.cells[drop_pt.y][drop_pt.x] │ - table.insert(cell, player_state.holding) │ - player_state.holding = nil │ + wait_for_players.init(players, player, start_host_game, start_client_game) │ end │ +local core = {} │ +-- Notes from what I remember Sabrina telling me: │ +-- state.PICK_DISCARD │ +-- players are given enough cards that they can discard 0 to 2 and end up with 4 cards in their hand, │ +-- and total of 4 discarded cards that form the "crib" of one player. │ +-- state.PLAY │ +-- A card might be drawn from the deck at this point │ +-- Players then take turns playing one of the cards from their hand. │ +-- They are awarded points if the running total is 15, 31, there is a run (cards in order (or reverse order?)), │ +-- or four of a suit(?), and last card │ +-- At the end, the player whose crib it is gets awarded points for the cards in their crib. │ │ -local function id_is_patient(info_id) │ - return info_id == core.ITEM_ID_PATIENT_IN_BED or │ - info_id == core.ITEM_ID_PATIENT_IN_BED_FLIPPED │ -end │ +local cards = require("libs/cards/cards") │ │ -local function get_patient_in_cell(state, cell) │ - for _, info in ipairs(state.cells[cell.y][cell.x]) do │ - if id_is_patient(info.id) then │ - return info │ - end │ - end │ - return nil │ +-- TODO implement last card: │ +-- * still need to award a point for last card once all cards are played │ +-- (should add an acknowledgemepoint phase for that where all players must press "next" │ +-- * use this stage once 31 is reached normally │ +-- maybe just add a boolean like "wait_for_next_btn" which is set to true │ +-- only when a sum of 31 is reached, or when all players' hands are empty? │ +-- Need to figure out how to make this co-exist with the "can't move" button. │ +-- Maybe rename that one to "next" │ + │ +-- TODO should implement winner, make sure points are awarded in the right order │ + │ +-- TODO if a card is played resulting in a sum of 31 , clear the play thing? │ + │ +-- TODO the last card played in PLAY state isn't visible to the other player(s), it │ +-- immediately jumps to showing your old hand. Should add a "next" button to let people acknowledge, │ +-- then transition to this state │ + │ +-- TODO on a new hand, make sure its the player's turn who is to the left of the crib │ + │ +-- TODO add an array of "last_points_reasons" in state, send to other players? │ +-- indicating player, points reason, and amount? │ +-- set it to true only for events like jack of suit on cut deck card, playing points, last card? │ +-- use this to show status messages, so players notice when points are added │ + │ +core.states = { │ + -- Players start with some number of cards and must discard to the "crib" until they have 4 left │ + -- Can only exit this state once all players have discarded. │ + PICK_DISCARD = 1, │ + -- Players play a card, and are awarded points if they get 15/run/4 of the same suit/31 │ + PLAY = 2, │ + │ + -- After the above "PLAY" state, players also get awarded points based on the 4 cards they played, plus │ + -- a card from the deck that is shared by everyone. │ + -- Reveal the cards to the player in this state, and proceed back to PICK_DISCARD once all players │ + -- have acknowledged │ + ACKNOWLEDGE_POINTS = 3, │ + │ + -- Similar to the above state, but only the player whose crib it is gets points │ + ACKNOWLEDGE_CRIB = 4, │ +} │ + │ +core.actions = { │ + HAND = 1, │ + DISCARD_CONFIRM = 2, │ + CANT_MOVE_ACCEPT = 3, │ + NEXT = 4, │ +} │ + │ +core.point_types = { │ + FIFTEEN = 1, │ + RUN = 2, │ + PAIR = 3, │ + THIRTY_ONE = 4, │ + FLUSH = 5, │ + JACK_OF_SUIT = 6, │ +} │ + │ +core.CARDS_PER_HAND = 4 │ +core.MAX_PLAYING_SUM = 31 │ + │ +core.RC_SUCCESS = 0 │ +core.RC_ERROR = -1 │ +core.RC_WAIT_FOR_OTHERS_TO_DISCARD = -2 │ +core.RC_NOT_YOUR_TURN = -3 │ +core.RC_INVALID_PARAM = -4 │ +core.RC_PLAY_HIGHER_THAN_31 = -5 │ +core.RC_MUST_MOVE = -6 │ + │ +local rc_to_str_map = { │ + [core.RC_SUCCESS] = "Success", │ + [core.RC_ERROR] = "Error", │ + [core.RC_WAIT_FOR_OTHERS_TO_DISCARD] = "Wait for other players to discard", │ + [core.RC_NOT_YOUR_TURN] = "Not your turn", │ + -- I don't think the user should be able to hit this unless there's a UI error or state mismatch │ + [core.RC_INVALID_PARAM] = "Invalid parameters", │ + [core.RC_PLAY_HIGHER_THAN_31] = "Must play a card which results in a sum less than 31", │ + [core.RC_MUST_MOVE] = "Can only skip turn if no cards can be played", │ +} │ + │ +local JACK_OF_SUIT_CUT_DECK_POINTS = 2 │ +local JACK_OF_SUIT_HAND_CRIB_POINTS = 1 │ +local LAST_CARD_POINTS = 1 │ + │ +function core.rc_to_str(rc) │ + return rc_to_str_map[rc] │ end │ │ -local function needs_type_to_using_action(needs_type) │ +function core.point_type_to_str(reason) │ local map = { │ - [core.NEEDS_LOW_FLUIDS] = core.USING_ACTION_LOW_FLUIDS, │ - [core.NEEDS_LOW_OXYGEN] = core.USING_ACTION_DEFIB, │ - [core.NEEDS_NO_HEARTBEAT] = core.USING_ACTION_VENTILATOR, │ + [core.point_types.FIFTEEN] = 'Fifteen', │ + [core.point_types.RUN] = 'Run', │ + [core.point_types.PAIR] = 'Pair', │ + [core.point_types.THIRTY_ONE] = 'Thirty-one', │ + [core.point_types.FLUSH] = 'Flush', │ + [core.point_types.JACK_OF_SUIT] = 'Jack of suit', │ } │ - return map[needs_type] │ + return map[reason] │ end │ │ -function empty_bed_in_cell(state, cell_pos) │ - local cell = state.cells[cell_pos.y][cell_pos.x] │ - local bed_present = false │ - local patient_present = false │ - for _, item_info in ipairs(cell) do │ - if core.is_bed(item_info) then │ - bed_present = true │ - elseif core.is_patient(item_info) then │ - patient_present = true │ +local function deal_new_hand(state, do_shuffle) │ + state.cut_deck_card = nil │ + state.crib = {} │ + state.playing_sequence = {} │ + state.playing_sum = 0 │ + │ + if do_shuffle then │ + state.deck = cards.new_deck() │ + cards.shuffle(state.deck) │ + end │ + │ + -- each player gets at least 4 cards, │ + -- and then an extra 4 cards are distributed among the players evenly (if possible) │ + -- The player must discard cards (into the crib) until they have 4 left. │ + -- If the crib does not have 4 cards right now, add deck cards until it is 4 │ + local player_cards_to_discard = math.floor(core.CARDS_PER_HAND/state.player_count) │ + local cards_per_hand = core.CARDS_PER_HAND + player_cards_to_discard │ + local deck_cards_to_crib = core.CARDS_PER_HAND - player_cards_to_discard * state.player_count │ + for player_idx=1,state.player_count do │ + state.hands[player_idx] = {} │ + state.tentative_discards[player_idx] = {} │ + state.playing[player_idx] = {} │ + state.played[player_idx] = {} │ + for _=1,cards_per_hand do │ + table.insert(state.hands[player_idx], table.remove(state.deck, 1)) │ + table.insert(state.tentative_discards[player_idx], false) │ end │ end │ - return bed_present and not patient_present │ + for _=1,deck_cards_to_crib do │ + table.insert(state.crib, table.remove(state.deck)) │ + end │ end │ │ -function core.use_start(state, player_idx) │ - local player_state = state.players[player_idx] │ - local nearest_item_cell = core.get_closest_item_cell(state, player_idx) │ │ - if player_state.holding == nil and │ - nearest_item_cell ~= nil and │ - get_item_idx_can_be_picked_up(state, nearest_item_cell) then │ - return core.pick_up_item(state, player_idx) │ +-- deck is optional, if nil or not provided then will generate and shuffle a deck │ +function core.new_game(player_count, deck) │ + if deck == nil then │ + deck = cards.new_deck() │ + cards.shuffle(deck) │ end │ + local state = { │ + state = core.states.PICK_DISCARD, │ + player_count = player_count, │ + deck = deck, │ + score = {}, │ + hands = {}, │ │ - local patient_info = nil │ - │ - if nearest_item_cell ~= nil then │ - patient_info = get_patient_in_cell(state, nearest_item_cell) │ + -- extra card that is drawn after the discard is done, but before players start playing/pegging │ + cut_deck_card = nil, -- is this name good? │ + │ + -- these are cards that count towards the current total of 31 │ + playing = {}, │ + │ + -- these are cards that at one point counted towards the │ + -- total of 31, but the limit was reached and now │ + -- they are put aside until everyone has played all the cards │ + -- in their hands, so that later all the played cards can be looked │ + -- at to determine points │ + played = {}, │ + │ + -- these are copies of cards that have been played in the `playing` array │ + -- Used to calculate runs/flush/etc │ + playing_sequence = {}, │ + │ + -- these are cards that the user has selected to discard for the crib, but they haven't yet │ + -- pressed the "confirm discard" button │ + tentative_discards = {}, │ + │ + crib = {}, │ + │ + -- array of booleans for if the player has pressed "next" when seeing the points from their hand │ + -- once all have played their cards. │ + -- Once all players press "next", move on to the crib │ + acknowledged_points = {}, │ + │ + player_crib = 1, │ + player_turn = 1, │ + playing_sum = 0, │ + │ + -- set this to the player index when a player can't move. │ + -- * if another player can move, clear it. │ + -- * if another player can not move, leave it set. │ + -- If it is still set when we return to the player who │ + -- set it originally, and that player can not move, then │ + -- end that round of play │ + -- (put `playing` cards in `played`, reset `playing_sum`) │ + first_player_cant_move = 0, │ + } │ + for player_idx=1,state.player_count do │ + state.score[player_idx] = 0 │ end │ │ - │ - local can_help = false │ - local use_time = nil │ + deal_new_hand(state, false) │ │ - -- if the player is holding a patient and near a bed │ - if player_state.holding ~= nil and │ - core.is_patient(player_state.holding) and │ - nearest_item_cell ~= nil and │ - empty_bed_in_cell(state, nearest_item_cell) then │ - can_help = true │ - player_state.using_action = core.USING_ACTION_PUT_PATIENT_IN_BED │ - player_state.patient_drop_pos = { y = nearest_item_cell.y, x = nearest_item_cell.x } │ - use_time = TIME_TO_PICK_UP_PATIENT │ - -- if the player is near a patient who requires aid │ - elseif patient_info ~= nil and patient_info.requires_help then │ - if not patient_info.needs_revealed then │ - can_help = true │ - player_state.helping_patient = patient_info │ - player_state.using_action = core.USING_ACTION_REVEAL_NEEDS │ - use_time = TIME_TO_REVEAL_NEEDS │ - else │ - if patient_info.needs_type ~= core.NEEDS_BROKEN_BONE and │ - player_state.holding ~= nil and │ - ary_contains(NEEDS_TO_ITEMS_MAP[patient_info.needs_type], player_state.holding.id) then │ - can_help = true │ - player_state.helping_patient = patient_info │ - player_state.using_action = needs_type_to_using_action(patient_info.needs_type) │ - use_time = NEEDS_TO_USE_TIME_MAP[patient_info.needs_type] │ - end │ - end │ + return state │ +end │ + │ + │ +function core.print_state(state) │ + if state == nil then │ + io.write("state = nil\n") │ + return │ + end │ + io.write("state = {\n") │ + io.write(string.format(" state = %s\n", state.state)) │ + io.write(string.format(" player_turn = %s\n", state.player_turn)) │ + io.write(string.format(" player_crib = %s\n", state.player_crib)) │ + io.write(string.format(" playing_sum = %s\n", state.playing_sum)) │ + if state.deck ~= nil then │ + io.write(string.format(" deck len = %d\n", #state.deck)) │ + else │ + io.write(string.format(" deck = nil\n")) │ end │ │ - if not can_help and patient_info ~= nil and │ - (player_state.holding == nil or not core.is_patient(player_state.holding)) then │ - -- can move any patient, whether they need help or not │ - can_help = true │ - player_state.helping_patient = patient_info │ - player_state.using_action = core.USING_ACTION_PICK_UP_PATIENT │ - use_time = TIME_TO_PICK_UP_PATIENT │ + io.write(string.format(" first_player_cant_move = %d\n", state.first_player_cant_move )) │ + │ + io.write(string.format(" playing_sequence = %s\n", cards.card_array_to_string(state.playing_sequence))) │ + │ + io.write(string.format(" hands[%d] = {\n", #state.hands)) │ + for player_idx, hand in pairs(state.hands) do │ + io.write(string.format(" [%d] = ", player_idx)) │ + io.write(cards.card_array_to_string(hand)) │ + io.write(",\n") │ + end │ + io.write(string.format(" },\n")) │ + │ + io.write(string.format(" playing[%d] = {\n", #state.playing)) │ + for player_idx, playing in pairs(state.playing) do │ + io.write(string.format(" [%d] = ", player_idx)) │ + io.write(cards.card_array_to_string(playing)) │ + io.write(",\n") │ + end │ + io.write(string.format(" },\n")) │ + │ + io.write(string.format(" played[%d] = {\n", #state.played)) │ + for player_idx, played in pairs(state.played) do │ + io.write(string.format(" [%d] = ", player_idx)) │ + io.write(cards.card_array_to_string(played)) │ + io.write(",\n") │ end │ + io.write(string.format(" },\n")) │ │ │ + io.write(string.format(" tentative_discards[%d] = {\n", #state.tentative_discards)) │ + for i=1,#state.tentative_discards do │ + io.write(" ") │ + -- io.write("{") │ + io.write(string.format("[%d] = {", i)) │ + for j=1,#state.tentative_discards[i] do │ + io.write(string.format("%s, ", state.tentative_discards[i][j])) │ + end │ + io.write("},\n") │ + end │ + io.write(string.format(" },\n")) │ │ - if can_help then │ - player_state.is_using = true │ - player_state.use_progress = 0 │ - player_state.use_time = use_time │ - return true │ + io.write(string.format(" crib = ")) │ + if state.crib ~= nil then │ + io.write(cards.card_array_to_string(state.crib)) │ else │ - return false │ + io.write("nil") │ end │ -end │ + io.write(string.format("\n")) │ │ -function core.use_stop(state, player_idx) │ - local player_state = state.players[player_idx] │ - player_state.is_using = false │ - player_state.use_progress = 0 │ - player_state.helping_patient = nil │ - player_state.using_action = nil │ + io.write(string.format(" score[%d] = {\n", #state.score)) │ + for i=1,#state.score do │ + io.write(string.format(" [%d] = %d,\n", i, state.score[i])) │ + end │ + io.write(" }\n") │ + io.write("}\n") │ end │ │ -local function get_patient_item_pos(patient_info) │ - return { │ - y = patient_info.y - 1, │ - x = patient_info.x + 1, │ - } │ -end │ +local function handle_discard_confirm(state, player) │ + if state.state ~= core.states.PICK_DISCARD then │ + error(string.format("Unexpected handle_discard_confirm from state %s", state.state)) │ + end │ │ -local function get_patient_cell_idx(state, patient_info) │ - local cell = state.cells[patient_info.y][patient_info.x] │ - for idx, item_in_cell in ipairs(cell) do │ - if item_in_cell == patient_info then │ - return idx │ + if #state.hands[player] == core.CARDS_PER_HAND then │ + error(string.format("Unexpected handle_discard_confirm when player has 4 cards")) │ + end │ + │ + for i=1,#state.tentative_discards[player] do │ + local i2 = #state.tentative_discards[player] - i + 1 │ + if state.tentative_discards[player][i2] then │ + state.crib[#state.crib+1] = table.remove(state.hands[player], i2) │ end │ end │ - return nil │ + │ + state.tentative_discards[player] = {} │ + │ + local discard_done = true │ + for player_idx=1, #state.hands do │ + if #state.hands[player_idx] ~= core.CARDS_PER_HAND then │ + discard_done = false │ + goto done_checking_players │ + end │ + end │ + ::done_checking_players:: │ + │ + if discard_done then │ + state.state = core.states.PLAY │ + state.cut_deck_card = table.remove(state.deck) │ + if state.cut_deck_card.val == cards.JACK then │ + -- TODO notify player that they were awarded points due to this │ + state.score[state.player_crib] = state.score[state.player_crib] + JACK_OF_SUIT_CUT_DECK_POINTS │ + end │ + end │ + │ + return core.RC_SUCCESS │ end │ │ -local function bed_fixes_needs(bed, needs_type) │ - if bed.fixes_needs == nil then │ +-- TODO put in a utility library or something │ +local function copy_ary(ary) │ + local ary_copied = {} │ + for i=1,#ary do │ + ary_copied[i] = ary[i] │ + end │ + return ary_copied │ +end │ + │ + │ +local function get_card_value(card) │ + if card.val <= 10 then return card.val │ + else return 10 end │ +end │ + │ +local function card_order(a,b) │ + return a.val < b.val │ +end │ + │ +-- runs can be out of order, │ +-- so the way to check is if the sorted │ +-- list of cards is sequential │ +local function check_is_run_add_card(sequence, card, len) │ + local new_sequence = {} │ + -- get the last (len-1) cards from sequence │ + local start_i = #sequence - (len-1) + 1 │ + if start_i < 1 then │ return false │ end │ - for _, bed_fixes in ipairs(bed.fixes_needs) do │ - if bed_fixes == needs_type then │ - return true │ + if card == nil then │ + error("card is nil") │ + end │ + │ + for i=start_i,#sequence do │ + new_sequence[#new_sequence+1] = sequence[i] │ + end │ + new_sequence[#new_sequence+1] = card │ + │ + --print("new_sequence = ", cards.card_array_to_string(new_sequence)) │ + --for i=1,#new_sequence-1 do │ + -- print("card_order(...) = ", card_order(new_sequence[i], new_sequence[i+1])) │ + --end │ + table.sort(new_sequence, card_order) │ + --print("new_sequence = ", cards.card_array_to_string(new_sequence)) │ + │ + if #new_sequence < 3 then │ + error(string.format("new_sequence len is %d?", #new_sequence)) │ + end │ + │ + local is_run = true │ + local last_elem = new_sequence[1] │ + for i=2,#new_sequence do │ + if new_sequence[i].val ~= last_elem.val + 1 then │ + is_run = false │ + goto done_run_len_check │ end │ + last_elem = new_sequence[i] │ end │ - return false │ + ::done_run_len_check:: │ + return is_run │ + │ end │ │ -local function patient_put_in_bed(state, patient_info) │ - local cell = state.cells[patient_info.y][patient_info.x] │ - local bed = nil │ - for _, item_info in ipairs(cell) do │ - if core.is_bed(item_info) then │ - bed = item_info │ - break │ +local function is_run_sequence_enabled(sequence, cards_enabled) │ + local enabled_seq = {} │ + for i=1,#cards_enabled do │ + if cards_enabled[i] then │ + table.insert(enabled_seq, sequence[i]) │ end │ end │ │ - patient_info.in_bed = bed │ - if bed_fixes_needs(bed, patient_info.needs_type) then │ - local fix_time = NEED_TO_BED_FIX_TIME_MS[patient_info.needs_type] │ - patient_info.orig_fix_time = fix_time │ - patient_info.fix_time = fix_time │ + if #enabled_seq < 3 then │ + return false │ end │ -end │ │ -function core.on_use_complete_func(state, player_idx, events) │ - local player_state = state.players[player_idx] │ - local patient_info = player_state.helping_patient │ - local using_action = player_state.using_action │ - core.use_stop(state, player_idx) │ + table.sort(enabled_seq, card_order) │ │ - if using_action == core.USING_ACTION_PUT_PATIENT_IN_BED then │ - local patient = player_state.holding │ - core.drop_item(state, player_idx, player_state.patient_drop_pos) │ - patient.y = player_state.patient_drop_pos.y │ - patient.x = player_state.patient_drop_pos.x │ - patient.held_by = nil │ - player_state.patient_drop_pos = nil │ - patient_put_in_bed(state, patient) │ - elseif using_action == core.USING_ACTION_PICK_UP_PATIENT then │ - if player_state.holding ~= nil then │ - core.drop_item(state, player_idx) │ + for i=1,#enabled_seq-1 do │ + if enabled_seq[i+1].val ~= enabled_seq[i].val + 1 then │ + return false │ end │ - local patient_cell_idx = get_patient_cell_idx(state, patient_info) │ - table.remove(state.cells[patient_info.y][patient_info.x], patient_cell_idx) │ - player_state.holding = patient_info │ - patient_info.held_by = player_state │ - patient_info.y = nil │ - patient_info.x = nil │ - patient_info.fix_time = nil │ - elseif patient_info.requires_help then │ - if not patient_info.needs_revealed then │ - if using_action == core.USING_ACTION_REVEAL_NEEDS then │ - patient_info.needs_revealed = true │ - end │ - else │ - if needs_type_to_using_action(patient_info.needs_type) == using_action then │ - patient_info.requires_help = false │ - patient_info.needs_revealed = false │ - if ITEMS_DROPPED_ON_USE_MAP[player_state.holding.id] then │ - core.drop_item(state, player_idx, get_patient_item_pos(patient_info)) │ - end │ + end │ │ - table.insert(events, { │ - event = core.EVT_PATIENT_CURED, │ - patient = patient_info, │ - }) │ + return true │ +end │ + │ +local function cards_enabled_to_card_idx(cards_enabled) │ + local card_idxes = {} │ + for i=1,#cards_enabled do │ + if cards_enabled[i] then │ + table.insert(card_idxes, i) │ + end │ + end │ + return card_idxes │ +end │ │ +local function run_is_subsequence(run, run_ary) │ + for _, run2 in ipairs(run_ary) do │ + local i=1 │ + for j=1,#run2 do │ + if run2[j] < run[i] then │ + -- pass │ + elseif run2[j] == run[i] then │ + if i == #run then │ + return true │ + end │ + i = i + 1 │ + else │ + goto next_run │ end │ end │ + ::next_run:: │ end │ end │ │ -return core │ -local draw = {} │ +-- Only handle sequences of 5 cards, │ +-- and only check for runs of length 5, 4, or 3 │ +-- Return array of array of indicies of cards that are enabled to make up a run │ +-- A run of 4 {2,3,4,5} must only count as one run, but │ +-- Two runs of 3 must be counted if they don't make a run of 4, e.g. {2, 2, 3, 4} is two runs of 3 │ +local function check_points_sequence_run(sequence) │ │ -local cell_size = nil │ -local x_offset = nil │ -local num_choice_y_offset = nil │ -local num_choice_x_offset = nil │ + if #sequence ~= 5 then │ + error(string.format("checked for run on sequences of len %d", #sequence)) │ + end │ │ -local OUTLINE_COLOUR = '#88888888' │ -local TEXT_COLOUR = '#000000' │ -local TEXT_SIZE = 24 │ -local TEXT_PADDING_Y = 5 │ + local cards_enabled = {} │ + for i=1,#sequence do │ + cards_enabled[i] = true │ + end │ │ -local ORIG_CELL_COLOUR = '#cccccc44' │ -local SELECTED_BG_COLOUR = '#0088cc33' │ + if is_run_sequence_enabled(sequence, cards_enabled) then │ + return {cards_enabled_to_card_idx(cards_enabled)} │ + end │ │ -local CELL_LINE_THICKNESS = 1 │ -local BOX_LINE_THICKNESS = 4 │ + local runs4 = {} │ + for card_disabled_idx=1,#cards_enabled do │ + cards_enabled[card_disabled_idx] = false │ + if is_run_sequence_enabled(sequence, cards_enabled) then │ + table.insert(runs4, cards_enabled_to_card_idx(cards_enabled)) │ + end │ + cards_enabled[card_disabled_idx] = true │ + end │ │ -local core = require("games/sudoku/sudoku_core") │ -local draw_shapes = require("libs/draw/draw_shapes") │ -local alexgames = require("alexgames") │ + -- TODO need to check for runs of length 3 that are not │ + -- contained within a run of 4 │ + local runs3 = {} │ + for card_disabled_idx1=1, #cards_enabled do │ + cards_enabled[card_disabled_idx1] = false │ + for card_disabled_idx2=card_disabled_idx1+1, #cards_enabled do │ + cards_enabled[card_disabled_idx2] = false │ + if is_run_sequence_enabled(sequence, cards_enabled) then │ + local run_seq = cards_enabled_to_card_idx(cards_enabled) │ + if not run_is_subsequence(run_seq, runs4) then │ + table.insert(runs3, run_seq) │ + end │ + end │ + cards_enabled[card_disabled_idx2] = true │ + end │ + cards_enabled[card_disabled_idx1] = true │ + end │ │ -local board_height = nil │ -local board_width = nil │ + local runs = {} │ + for i=1,#runs4 do │ + runs[#runs+1] = runs4[i] │ + end │ + for i=1,#runs3 do │ + runs[#runs+1] = runs3[i] │ + end │ │ -function draw.init(width, height) │ - cell_size = math.floor(math.min(width,height)*1.0/(core.GAME_SIZE + 2.5)) │ - x_offset = math.floor((width - cell_size*core.GAME_SIZE)/2) │ - board_height = height │ - board_width = width │ + return runs │ +end │ │ - num_choice_y_offset = board_height - cell_size │ - num_choice_x_offset = math.floor((board_width - (core.GAME_SIZE + 1)*cell_size)/2) │ +local function check_points_sequence_15(sequence) │ + local fifteen_count = 0 │ + local combinations = {} │ + │ + local cards_enabled = {} │ + for i=1,#sequence do │ + cards_enabled[i] = false │ + end │ + │ + │ + -- loop through all combinations of cards, like counting in binary: │ + -- 0 0 0 0 │ + -- 0 0 0 1 │ + -- 0 0 1 0 │ + -- 0 0 1 1 │ + -- 0 1 0 0 │ + -- ... │ + -- io.write(string.format("starting loop... %d %d\n", #sequence, #cards_enabled)) │ + while true do │ + local sum = 0 │ + local debug_str = "" │ + for i=1,#sequence do │ + -- debug_str = debug_str .. string.format("%d ", cards_enabled[i] and 1 or 0) │ + if cards_enabled[i] then │ + sum = sum + get_card_value(sequence[i]) │ + end │ + end │ + --debug_str = debug_str .. string.format("; sum=%d\n", sum) │ + --io.write(debug_str) │ + if sum == 15 then │ + fifteen_count = fifteen_count + 1 │ + local cards_enabled_copy = {} │ + for idx,val in ipairs(cards_enabled) do │ + cards_enabled_copy[idx] = val │ + end │ + table.insert(combinations, cards_enabled_copy) │ + end │ + │ + local j = 1 │ + while j <= #sequence and cards_enabled[j] do │ + cards_enabled[j] = false │ + j = j + 1 │ + end │ + if j > #sequence then │ + goto end_loop │ + else │ + cards_enabled[j] = true │ + end │ + end │ + ::end_loop:: │ return { │ - selected = nil, │ + count = fifteen_count, │ + combinations = combinations, │ } │ end │ │ -local function draw_num_choices() │ - local choices = { 'x' } │ - for num=1,core.GAME_SIZE do │ - table.insert(choices, string.format("%d", num)) │ - end │ - for choice_idx, choice_val in ipairs(choices) do │ - alexgames.draw_text(choice_val, TEXT_COLOUR, │ - math.floor(num_choice_y_offset + TEXT_SIZE/2), │ - num_choice_x_offset + math.floor((choice_idx-0.5)*cell_size), │ - TEXT_SIZE, 0) │ +local function pair_count_to_points(pair_count) │ + local pair_points = 0 │ + if pair_count == 2 then │ + pair_points = 2 │ + elseif pair_count == 3 then │ + pair_points = 6 │ + elseif pair_count == 4 then │ + pair_points = 12 │ end │ + return pair_points │ end │ │ -function draw.draw_state(state, ui_state) │ - alexgames.draw_clear() │ - for y, row in ipairs(state.board) do │ - for x, cell in ipairs(row) do │ - draw_shapes.draw_rect_outline(OUTLINE_COLOUR, CELL_LINE_THICKNESS, │ - (y-1)*cell_size, x_offset + (x-1)*cell_size, │ - y*cell_size, x_offset + x*cell_size) │ - local cell_bg = nil │ - if cell.is_init_val then │ - cell_bg = ORIG_CELL_COLOUR │ - elseif ui_state.selected ~= nil and │ - ui_state.selected.y == y and │ - ui_state.selected.x == x then │ - cell_bg = SELECTED_BG_COLOUR │ + │ + │ +local function check_points_seqeuence_pair(sequence) │ + local card_pairs = {} │ + for val=cards.MIN_VAL,cards.MAX_VAL do │ + local possible_pair = {} │ + for j=1,#sequence do │ + if sequence[j].val == val then │ + table.insert(possible_pair, j) │ end │ - if cell_bg ~= nil then │ - alexgames.draw_rect(cell_bg, │ - (y-1)*cell_size, x_offset + (x-1)*cell_size, │ - y*cell_size, x_offset + x*cell_size) │ + end │ + if #possible_pair > 1 then │ + table.insert(card_pairs, possible_pair) │ + end │ + end │ + return card_pairs │ +end │ + │ +local function check_points_sequence_flush(sequence, cut_deck_card) │ + local card_flushes = {} │ + for _, suit in ipairs(cards.suits) do │ + local possible_flush = {} │ + for i=1,#sequence do │ + if sequence[i].suit == suit then │ + table.insert(possible_flush, i) │ end │ - if cell.val ~= 0 then │ - alexgames.draw_text(string.format("%d", cell.val), TEXT_COLOUR, │ - math.floor((y-0.5)*cell_size + TEXT_SIZE/2), │ - math.floor((x-0.5)*cell_size) + x_offset, │ - TEXT_SIZE, 0) │ + end │ + │ + if #possible_flush >= 4 and suit == cut_deck_card.suit then │ + table.insert(possible_flush, #sequence + 1) │ + end │ + │ + if #possible_flush >= 4 then │ + table.insert(card_flushes, possible_flush) │ + end │ + end │ + return card_flushes │ +end │ + │ +function core.check_points_sequence(sequence, cut_deck_card) │ + local info = { │ + points_reasons = {}, │ + points = 0, │ + } │ + │ + local sequence2 = copy_ary(sequence) │ + table.insert(sequence2, cut_deck_card) │ + │ + local info_15 = check_points_sequence_15(sequence2) │ + │ + for _,combination in ipairs(info_15.combinations) do │ + local card_idxs = {} │ + for j=1,#combination do │ + if combination[j] then │ + table.insert(card_idxs, j) │ end │ end │ + info.points_reasons[#info.points_reasons+1] = { │ + reason = core.point_types.FIFTEEN, │ + points = 2, │ + card_idxs = card_idxs, │ + } │ end │ │ - for y=1,core.BOX_SIZE-1 do │ - alexgames.draw_line(OUTLINE_COLOUR, BOX_LINE_THICKNESS, │ - y*core.BOX_SIZE*cell_size, x_offset + 0, │ - y*core.BOX_SIZE*cell_size, x_offset + core.GAME_SIZE*cell_size) │ + info.points = info.points + info_15.count * 2 │ + │ + local runs = check_points_sequence_run(sequence2) │ + for _,run in ipairs(runs) do │ + info.points = info.points + #run │ + info.points_reasons[#info.points_reasons+1] = { │ + reason = core.point_types.RUN, │ + points = #run, │ + card_idxs = run, │ + } │ end │ - for x=1,core.BOX_SIZE-1 do │ - alexgames.draw_line(OUTLINE_COLOUR, BOX_LINE_THICKNESS, │ - 0, x_offset + x*core.BOX_SIZE*cell_size, │ - core.GAME_SIZE*cell_size, x_offset + x*core.BOX_SIZE*cell_size) │ + │ + local card_pairs = check_points_seqeuence_pair(sequence2) │ + for _,card_pair in ipairs(card_pairs) do │ + local pair_points = pair_count_to_points(#card_pair) info.points = info.points + pair_points │ + info.points_reasons[#info.points_reasons+1] = { │ + reason = core.point_types.PAIR, │ + points = pair_points, │ + card_idxs = card_pair, │ + } │ end │ │ - if ui_state.selected ~= nil then │ - draw_num_choices() │ + local card_flushes = check_points_sequence_flush(sequence, cut_deck_card) │ + for _, card_flush in ipairs(card_flushes) do │ + local flush_points = #card_flush │ + info.points = info.points + flush_points │ + info.points_reasons[#info.points_reasons+1] = { │ + reason = core.point_types.FLUSH, │ + points = flush_points, │ + card_idxs = card_flush, │ + } │ end │ - alexgames.draw_refresh() │ + │ + for card_idx, card in ipairs(sequence) do │ + if card.val == cards.JACK and card.suit == cut_deck_card.suit then │ + info.points_reasons[#info.points_reasons+1] = { │ + reason = core.point_types.JACK_OF_SUIT, │ + points = JACK_OF_SUIT_HAND_CRIB_POINTS, │ + card_idxs = {card_idx}, │ + } │ + end │ + end │ + │ + return info │ end │ │ -function draw.get_cell_coords(pos_y, pos_x) │ - local coords = { │ - y = math.floor(pos_y/cell_size) + 1, │ - x = math.floor((pos_x - x_offset)/cell_size) + 1, │ +local function check_points_add_card(playing_sequence, card) │ + local info = { │ + points_reasons = {}, │ + points = 0, │ } │ - │ - if 1 <= coords.y and coords.y <= core.GAME_SIZE and │ - 1 <= coords.x and coords.x <= core.GAME_SIZE then │ - return coords │ - else │ - return nil │ + if #playing_sequence == 0 then │ + return info │ end │ -end │ │ -function draw.get_num_choice(ui_state, pos_y, pos_x) │ - if ui_state.selected == nil then │ - return nil │ + -- check for runs │ + local run_len = 0 │ + local diff = playing_sequence[#playing_sequence].val - card.val │ + local last_card = playing_sequence[#playing_sequence] │ + for possible_run_len=#playing_sequence+1,3,-1 do │ + if check_is_run_add_card(playing_sequence, card, possible_run_len) then │ + run_len = possible_run_len │ + goto done_run_check │ + end │ end │ - if pos_y >= num_choice_y_offset then │ - if num_choice_x_offset <= pos_x and pos_x <= num_choice_x_offset + (core.GAME_SIZE+1) * cell_size then │ - local idx = math.floor((pos_x - num_choice_x_offset)/cell_size) │ - return idx │ + ::done_run_check:: │ + │ + info.points = info.points + run_len │ + info.points_reasons[#info.points_reasons] = { reason = core.point_types.RUN, points = run_len } │ + │ + -- check for pairs of two or more of cards with the same value │ + local pair_count = 1 │ + for i=#playing_sequence,1,-1 do │ + if playing_sequence[i].val == card.val then │ + pair_count = pair_count + 1 │ + else │ + goto done_pair_check │ end │ end │ + ::done_pair_check:: │ + │ + local pair_points = pair_count_to_points(pair_count) │ + │ + if pair_points > 0 then │ + info.points = info.points + pair_points │ + info.points_reasons[#info.points_reasons] = { reason = core.point_types.PAIR, points = pair_points } │ + end │ + │ + return info │ end │ │ -function draw.handle_user_sel(ui_state, cell) │ - if ui_state.selected ~= nil and │ - ui_state.selected.y == cell.y and │ - ui_state.selected.x == cell.x then │ - ui_state.selected = nil │ - else │ - ui_state.selected = cell │ +local function cards_in_hand_remaining(state) │ + for _,hand in ipairs(state.hands) do │ + if #hand > 0 then │ + return true │ + end │ end │ + return false │ end │ │ -return draw │ -local core = {} │ │ -local alexgames = require("alexgames") │ -local shuffle = require("libs/shuffle") │ │ -core.GAME_SIZE = 9 │ -core.BOX_SIZE = math.floor(math.sqrt(core.GAME_SIZE)) │ +local function handle_play(state, player, idx, points_reasons) │ + if state.player_turn ~= player then │ + return core.RC_NOT_YOUR_TURN │ + end │ │ -if core.BOX_SIZE*core.BOX_SIZE ~= core.GAME_SIZE then │ - error("Invalid box size: is not sqrt of game size") │ -end │ + if not (1 <= idx and idx <= #state.hands[player]) then │ + error(string.format("Invalid move card %d of hand with only %d cards", idx, #state.hands[player])) │ + end │ │ -local GROUP_TYPE_ROW = 1 │ -local GROUP_TYPE_COL = 2 │ -local GROUP_TYPE_BOX = 3 │ + local tentative_card_played = state.hands[player][idx] │ │ -local GROUP_TYPES = { │ - GROUP_TYPE_ROW, │ - GROUP_TYPE_COL, │ - GROUP_TYPE_BOX, │ -} │ + local tentative_card_value = get_card_value(tentative_card_played) │ │ -local function print_board(board) │ - for y=1,core.GAME_SIZE do │ - if y%3 == 1 then │ - print('+---+---+---+') │ - end │ - local s = '|' │ - for x=1,core.GAME_SIZE do │ - if board[y][x].val ~= 0 then │ - s = s .. string.format("%s", board[y][x].val) │ - else │ - s = s .. " " │ - end │ - if x%3 == 0 then │ - s = s .. '|' │ - end │ - end │ - print(s) │ + if state.playing_sum + tentative_card_value > core.MAX_PLAYING_SUM then │ + return core.RC_PLAY_HIGHER_THAN_31 │ end │ -end │ │ + state.playing_sum = state.playing_sum + tentative_card_value │ + state.first_player_cant_move = 0 │ │ -local function pt_eq(pt1, pt2) │ - return pt1.y == pt2.y and pt1.x == pt2.x │ -end │ + if state.playing_sum == 15 then │ + state.score[player] = state.score[player] + 2 │ + points_reasons[#points_reasons+1] = { reason = core.point_types.FIFTEEN, points = 2} │ + elseif state.playing_sum == 31 then │ + state.score[player] = state.score[player] + 2 │ + points_reasons[#points_reasons+1] = { reason = core.point_types.THIRTY_ONE, points = 2} │ + end │ │ + local card = table.remove(state.hands[player], idx) │ + │ + local points_info = check_points_add_card(state.playing_sequence, card) │ + for _,points_info_elem in ipairs(points_info.points_reasons) do │ + points_reasons[#points_reasons+1] = points_info_elem │ + end │ + state.score[player] = state.score[player] + points_info.points │ │ --- Return y,x coords where idx is value in each cell │ --- x=1, 2, 3 │ --- y=1[1][2][3], │ --- 2[4][5][6], │ --- 3[7][8][9] ] │ -local function get_box_pt(idx) │ - return { y = math.floor((idx-1)/core.BOX_SIZE)+1, │ - x = math.floor((idx-1)%core.BOX_SIZE)+1 } │ -end │ + -- TODO what oher cases result in points? │ + -- * a run of 3 or more? │ + -- * pairs? │ + -- * getting 30? │ + -- * last card │ + -- * multiple cards of the same suit? │ │ -assert(pt_eq(get_box_pt(1), {y=1,x=1})) │ -assert(pt_eq(get_box_pt(2), {y=1,x=2})) │ -assert(pt_eq(get_box_pt(3), {y=1,x=3})) │ -assert(pt_eq(get_box_pt(4), {y=2,x=1})) │ -assert(pt_eq(get_box_pt(5), {y=2,x=2})) │ -assert(pt_eq(get_box_pt(6), {y=2,x=3})) │ -assert(pt_eq(get_box_pt(7), {y=3,x=1})) │ -assert(pt_eq(get_box_pt(8), {y=3,x=2})) │ -assert(pt_eq(get_box_pt(9), {y=3,x=3})) │ + -- TODO do something if score is 31? │ │ --- Returns first cell in each box, e.g. │ --- y,x coords of each cell below, where box_idx is value in cell │ --- x=1, 2, 3, 4, 5, 6, 7, 8, 9 │ --- y=1[1][ ][ ]|[2][ ][ ]|[3][ ][ ] │ --- 2[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- 3[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- ---------+---------+--------- │ --- 4[4][ ][ ]|[5][ ][ ]|[6][ ][ ] │ --- 5[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- 6[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- ---------+---------+--------- │ --- 7[7][ ][ ]|[8][ ][ ]|[9][ ][ ] │ --- 8[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- 9[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ --- │ -local function get_box_start_pt(box_idx) │ - local pt = get_box_pt(box_idx) │ - pt.y = (pt.y-1) * core.BOX_SIZE + 1 │ - pt.x = (pt.x-1) * core.BOX_SIZE + 1 │ - return pt │ -end │ + table.insert(state.playing[player], card) │ + table.insert(state.playing_sequence, card) │ │ -assert(pt_eq(get_box_start_pt(1), {y=1, x=1})) │ -assert(pt_eq(get_box_start_pt(2), {y=1, x=4})) │ -assert(pt_eq(get_box_start_pt(3), {y=1, x=7})) │ -assert(pt_eq(get_box_start_pt(4), {y=4, x=1})) │ -assert(pt_eq(get_box_start_pt(5), {y=4, x=4})) │ -assert(pt_eq(get_box_start_pt(6), {y=4, x=7})) │ -assert(pt_eq(get_box_start_pt(7), {y=7, x=1})) │ -assert(pt_eq(get_box_start_pt(8), {y=7, x=4})) │ -assert(pt_eq(get_box_start_pt(9), {y=7, x=7})) │ │ -local function pt_ary_eq(pt_ary1, pt_ary2) │ - if #pt_ary1 ~= #pt_ary2 then │ - return false │ + if not cards_in_hand_remaining(state) then │ + │ + -- move all cards from playing to played │ + for i=1,state.player_count do │ + while #state.playing[i] > 0 do │ + table.insert(state.played[i], table.remove(state.playing[i], 1)) │ + │ + end │ + │ + end │ + │ + state.state = core.states.ACKNOWLEDGE_POINTS │ + else │ + state.player_turn = ((state.player_turn) % state.player_count) + 1 │ end │ │ - for i, _ in ipairs(pt_ary1) do │ - if not pt_eq(pt_ary1[i], pt_ary2[i]) then │ + -- check if player just played their last card and award a point? │ + -- No, it's last card of the run, I think │ + --if #state.hands[player] == 0 then │ + -- state.score[player] = state.score[player] + 1 │ + --end │ + │ + return core.RC_SUCCESS │ +end │ + │ +function core.cant_move(state) │ + local player = state.player_turn │ + for _,card in ipairs(state.hands[player]) do │ + if state.playing_sum + get_card_value(card) <= core.MAX_PLAYING_SUM then │ return false │ end │ end │ return true │ end │ │ -local function pt_add(pt1, pt2) │ - return { y = pt1.y + pt2.y, │ - x = pt1.x + pt2.x } │ -end │ +local function handle_cant_move_accept(state, player) │ + if player ~= state.player_turn then │ + return core.RC_NOT_YOUR_TURN │ + end │ │ -assert(pt_eq(get_box_start_pt(1), {y=1,x=1})) │ -assert(pt_eq(get_box_start_pt(2), {y=1,x=4})) │ -assert(pt_eq(get_box_start_pt(3), {y=1,x=7})) │ -assert(pt_eq(get_box_start_pt(4), {y=4,x=1})) │ -assert(pt_eq(get_box_start_pt(5), {y=4,x=4})) │ -assert(pt_eq(get_box_start_pt(6), {y=4,x=7})) │ -assert(pt_eq(get_box_start_pt(7), {y=7,x=1})) │ -assert(pt_eq(get_box_start_pt(8), {y=7,x=4})) │ -assert(pt_eq(get_box_start_pt(9), {y=7,x=7})) │ + if not core.cant_move(state) then │ + return core.RC_MUST_MOVE │ + end │ │ -local function cells_in_group(group_type, idx) │ - local cells = {} │ - if group_type == GROUP_TYPE_ROW then │ - local y = idx │ - for x=1,core.GAME_SIZE do │ - table.insert(cells, { y = y, x = x }) │ - end │ - elseif group_type == GROUP_TYPE_COL then │ - local x = idx │ - for y=1,core.GAME_SIZE do │ - table.insert(cells, { y = y, x = x }) │ - end │ - elseif group_type == GROUP_TYPE_BOX then │ - local box_idx = idx │ - for cell_idx=1,core.GAME_SIZE do │ - local pt = pt_add(get_box_start_pt(box_idx), get_box_pt(cell_idx)) │ - pt = pt_add(pt, { y = -1, x = -1 }) │ - table.insert(cells, pt) │ + state.player_turn = ((state.player_turn) % state.player_count) + 1 │ + if state.first_player_cant_move == state.player_turn then │ + local last_player_played = (state.first_player_cant_move-2) % state.player_count + 1 │ + -- one point for last card │ + -- TODO make sure this happens when no player has any cards remaining, too │ + -- TODO do not do this if each player pressed "can't move" after 31 was reached. │ + -- Maybe transition to "next" for that case │ + state.score[last_player_played] = state.score[last_player_played] + LAST_CARD_POINTS │ + state.first_player_cant_move = 0 │ + state.playing_sum = 0 │ + for player_idx=1,state.player_count do │ + while #state.playing[player_idx] > 0 do │ + table.insert(state.played[player_idx], table.remove(state.playing[player_idx], 1)) │ + end │ end │ + -- TODO if "can't move" goes around the whole table and no one can move, │ + -- then must set playing_sum to zero and put the "playing" cards to the "played" tables. │ + -- Also record points that people get during this whole thing │ + -- Also last card gets a point, I think │ else │ - error(string.format("unexpected group_type: %s", group_type)) │ + if state.first_player_cant_move == 0 then │ + state.first_player_cant_move = player │ + end │ end │ - return cells │ + │ + │ + return core.RC_SUCCESS │ end │ │ +function core.has_acknowledged_points(state, player) │ + return state.acknowledged_points[player] │ +end │ │ -assert(pt_ary_eq(cells_in_group(GROUP_TYPE_BOX, 1), { │ - { y = 1, x = 1}, │ - { y = 1, x = 2}, │ - { y = 1, x = 3}, │ - { y = 2, x = 1}, │ - { y = 2, x = 2}, │ - { y = 2, x = 3}, │ - { y = 3, x = 1}, │ - { y = 3, x = 2}, │ - { y = 3, x = 3}, │ -})) │ +local function handle_acknowledged_points(state, player) │ + local rc = core.RC_SUCCESS │ + state.acknowledged_points[player] = true │ │ -local function get_pt_group_idx(group_type, y, x) │ - if group_type == GROUP_TYPE_ROW then │ - return y │ - elseif group_type == GROUP_TYPE_COL then │ - return x │ - elseif group_type == GROUP_TYPE_BOX then │ - local box_idx = math.floor( (y-1)/core.BOX_SIZE)*core.BOX_SIZE + math.floor( (x-1)/core.BOX_SIZE) + 1 │ - return box_idx │ - else │ - error(string.format("unexpected group_type: %s", group_type)) │ + local all_acknowledged = true │ + for i=1,state.player_count do │ + if not state.acknowledged_points[i] then │ + all_acknowledged = false │ + goto done │ + end │ end │ -end │ + ::done:: │ │ + if all_acknowledged then │ + state.state = core.states.ACKNOWLEDGE_CRIB │ │ -local function is_board_valid(state) │ - for _, group_type in ipairs(GROUP_TYPES) do │ - for group_idx=1,core.GAME_SIZE do │ - local nums_seen = {} │ - for _, pt in ipairs(cells_in_group(group_type, group_idx)) do │ - local val = state.board[pt.y][pt.x].val │ - if val ~= 0 then │ - if nums_seen[val] then │ - return false │ - end │ - nums_seen[val] = true │ - end │ - end │ + -- reset acknowledged_points array │ + for i=1,state.player_count do │ + state.acknowledged_points[i] = false │ + end │ + │ + -- add points │ + for i=1,state.player_count do │ + local points_info = core.check_points_sequence(state.played[i], state.cut_deck_card) │ + │ + state.score[i] = state.score[i] + points_info.points │ end │ end │ - return true │ + │ + return rc │ end │ │ -local debug = false │ +local function handle_acknowledged_crib(state, player) │ + local rc = core.RC_SUCCESS │ + state.acknowledged_points[player] = true │ │ -local function get_possible_values(board, y, x) │ - local vals = {} │ - for i=1,core.GAME_SIZE do │ - vals[i] = true │ + local all_acknowledged = true │ + for i=1,state.player_count do │ + if not state.acknowledged_points[i] then │ + all_acknowledged = false │ + goto done │ + end │ end │ + ::done:: │ │ - if debug then print_board(board) end │ - if debug then print(string.format('--- checking y=%d,x=%d', y, x)) end │ - for _, group_type in ipairs(GROUP_TYPES) do │ - local group_idx = get_pt_group_idx(group_type, y, x) │ - for _, pt in ipairs(cells_in_group(group_type, group_idx)) do │ - local val = board[pt.y][pt.x].val │ - if val ~= 0 then │ - if debug then print(string.format("found val %d in group_type=%d, group_idx=%d", val, group_type, group_idx)) end │ - vals[val] = false │ - end │ + if all_acknowledged then │ + for i=1,state.player_count do │ + state.acknowledged_points[i] = false │ end │ + │ + local points_info = core.check_points_sequence(state.crib, state.cut_deck_card) │ + │ + state.score[state.player_crib] = state.score[state.player_crib] + points_info.points │ + │ + │ + state.state = core.states.PICK_DISCARD │ + state.player_crib = ((state.player_crib) % state.player_count) + 1 │ + deal_new_hand(state, true) │ end │ │ - local val_list = {} │ - for val, is_valid in ipairs(vals) do │ - if is_valid then │ - table.insert(val_list, val) │ + return rc │ + │ +end │ + │ +function core.handle_move(state, player, action) │ + if state.state == core.states.PICK_DISCARD then │ + if #state.hands[player] == core.CARDS_PER_HAND then │ + return core.RC_WAIT_FOR_OTHERS_TO_DISCARD │ + end │ + if action.action == core.actions.HAND then │ + state.tentative_discards[player][action.idx] = not(state.tentative_discards[player][action.idx]) │ + return core.RC_SUCCESS │ + elseif action.action == core.actions.DISCARD_CONFIRM then │ + return handle_discard_confirm(state, player) │ + end │ + elseif state.state == core.states.PLAY then │ + if action.action == core.actions.HAND then │ + -- TODO get this to the user somehow │ + local points_reasons = {} │ + local rc = handle_play(state, player, action.idx, points_reasons) │ + return rc │ + elseif action.action == core.actions.CANT_MOVE_ACCEPT then │ + return handle_cant_move_accept(state, player) │ + end │ + elseif state.state == core.states.ACKNOWLEDGE_POINTS then │ + if action.action == core.actions.NEXT then │ + return handle_acknowledged_points(state, player) │ + end │ + elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ + if action.action == core.actions.NEXT then │ + return handle_acknowledged_crib(state, player) │ end │ end │ - return val_list │ + error(string.format("Unhandled action %s from state %s", action.action, state.state)) │ + return core.RC_ERROR │ end │ │ -local function get_cell_with_min_possib_vals(board) │ - local cell = nil │ - local min_possib_vals = nil │ - for y=1,core.GAME_SIZE do │ - for x=1,core.GAME_SIZE do │ - if board[y][x].val ~= 0 then │ - goto next_cell │ - end │ - local possib_vals = get_possible_values(board, y, x) │ - if min_possib_vals == nil or #possib_vals < min_possib_vals then │ - min_possib_vals = #possib_vals │ - cell = { y = y, x = x } │ +-- get number of cards needed to select for discard before we can continue │ +function core.get_tentative_remaining_cards(state, player) │ + local tentative_discard_count = 0 │ + for i=1,#state.tentative_discards[player] do │ + if state.tentative_discards[player][i] then │ + tentative_discard_count = tentative_discard_count + 1 │ + end │ + end │ + │ + local tentative_remaining_cards = #state.hands[player] - tentative_discard_count │ + return tentative_remaining_cards │ +end │ + │ +-- Check what cards should be highlighted in the discard state │ +function core.get_highlight_ary(state, player) │ + │ + local highlight_ary = {} │ + if state.state == core.states.PICK_DISCARD then │ + local tentative_remaining_cards = core.get_tentative_remaining_cards(state, player) │ + │ + for i=1,#state.hands[player] do │ + local highlight = nil │ + if tentative_remaining_cards == core.CARDS_PER_HAND then │ + highlight = false │ + elseif tentative_remaining_cards > core.CARDS_PER_HAND then │ + highlight = not state.tentative_discards[player][i] │ + else │ + highlight = state.tentative_discards[player][i] │ end │ - if min_possib_vals == 0 then │ - return cell │ + highlight_ary[i] = highlight │ + end │ + elseif state.state == core.states.PLAY then │ + for i=1,#state.hands[player] do │ + local card = state.hands[player][i] │ + local can_play = nil │ + if state.player_turn ~= player then │ + can_play = false │ + else │ + can_play = (get_card_value(card) + state.playing_sum) <= core.MAX_PLAYING_SUM │ end │ - ::next_cell:: │ + highlight_ary[i] = can_play │ end │ + elseif state.state == core.states.ACKNOWLEDGE_POINTS or │ + state.state == core.states.ACKNOWLEDGE_CRIB then │ + -- no highlights │ + else │ + error(string.format("Unhandled state %s", state.state)) │ end │ - return cell │ + return highlight_ary │ end │ │ -local function copy_board(board) │ - local new_board = {} │ - for y, row in ipairs(board) do │ - new_board[y] = {} │ - for x, cell in ipairs(row) do │ - new_board[y][x] = {} │ - new_board[y][x].val = cell.val │ - end │ +function core.get_discard_status_str(state, player) │ + if state.state ~= core.states.PICK_DISCARD then │ + error("Not waiting for discard but called get_discard_status_str") │ + return "Not waiting for discard..." │ + end │ + │ + if #state.hands[player] == core.CARDS_PER_HAND then │ + return "Waiting for other players to discard" │ + end │ + │ + local tentative_remaining_cards = core.get_tentative_remaining_cards(state, player) │ + │ + local diff = tentative_remaining_cards - core.CARDS_PER_HAND │ + │ + if diff > 0 then │ + return string.format("Please select %d more cards for discard", diff) │ + elseif diff < 0 then │ + return string.format("Please select %d fewer cards for discard", -diff) │ + else │ + return "Press \"discard\" button to discard selected cards" │ end │ - return new_board │ end │ │ -local function is_board_complete(board) │ - for y=1,core.GAME_SIZE do │ - for x=1,core.GAME_SIZE do │ - if board[y][x].val == 0 then │ - return false │ - end │ +tests = { │ + { actual = check_is_run_add_card({{val=9}, {val=11}}, {val=10}, 3), expected = true }, │ + { actual = check_is_run_add_card({{val=9}, {val=12}}, {val=10}, 3), expected = false }, │ + { actual = check_is_run_add_card({{val=2}, {val=5}}, {val=4}, 3), expected = false }, │ + { actual = check_is_run_add_card({{val=3}, {val=5}, {val=4}}, {val=2}, 3), expected = false }, │ + { actual = check_is_run_add_card({{val=2}, {val=5}, {val=4}}, {val=3}, 3), expected = true }, │ + { actual = check_is_run_add_card({{val=2}, {val=5}, {val=4}}, {val=3}, 4), expected = true }, │ + │ + { actual = check_points_sequence_15({{val=10}, {val=4}, {val= 1}}).count, expected = 1}, │ + { actual = check_points_sequence_15({{val= 9}, {val=4}, {val= 1}}).count, expected = 0}, │ + { actual = check_points_sequence_15({{val= 9}, {val=4}, {val= 2}}).count, expected = 1}, │ + { actual = check_points_sequence_15({{val=10}, {val=5}, {val= 3}}).count, expected = 1}, │ + { actual = check_points_sequence_15({{val=10}, {val=5}, {val= 5}}).count, expected = 2}, │ + { actual = check_points_sequence_15({{val=10}, {val=5}, {val=10}}).count, expected = 2}, │ + { actual = check_points_sequence_15({{val= 5}, {val=6}, {val= 4}}).count, expected = 1}, │ + { actual = check_points_sequence_15({{val= 5}, {val=5}, {val= 5}}).count, expected = 1}, │ + { actual = check_points_sequence_15({{val= 5}, {val=5}, {val= 5}, {val=5}}).count, expected = 4}, │ + │ + -- { actual = check_points_sequence_15({{val= 13}, {val=7}, {val= 5}, {val=7}, {val=9}, {val=6}}).count, expected = 2}, │ + { actual = check_points_sequence_15({{val= 8}, {val=5}, {val= 9}, {val=11}, {val=6}, {val=2}}).count, expected = 3}, │ +} │ + │ +for test_idx, test in ipairs(tests) do │ + if test.actual ~= test.expected then │ + error(string.format("Test %d failed, expected %s, received %s", test_idx, test.expected, test.actual)) │ + end │ +end │ + │ +local run_tests = { │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=6}, {val=11}}), runs = 1, run_len = 3}, │ + { actual = check_points_sequence_run({{val=3}, {val=4}, {val=2}, {val=6}, {val=11}}), runs = 1, run_len = 3}, │ + { actual = check_points_sequence_run({{val=4}, {val=2}, {val=6}, {val=3}, {val=11}}), runs = 1, run_len = 3}, │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=11}}), runs = 0, run_len = nil}, │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=5}, {val=11}}), runs = 1, run_len = 4}, │ + { actual = check_points_sequence_run({{val=5}, {val=2}, {val=3}, {val=4}, {val=11}}), runs = 1, run_len = 4}, │ + { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=4}, {val=11}}), runs = 2, run_len = 3}, │ + { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=4}, {val=2}}), runs = 2, run_len = 4}, │ + { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=6}, {val=2}}), runs = 1, run_len = 5}, │ + │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=3}, {val=4}}), runs = 4, run_len = 3}, │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=3}, {val=4}}), runs = 4, run_len = 3}, │ + { actual = check_points_sequence_run({{val=4}, {val=2}, {val=4}, {val=2}, {val=3}}), runs = 4, run_len = 3}, │ + │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=7}}), runs = 1, run_len = 3}, │ + { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=8}}), runs = 0, run_len = nil}, │ + { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=1}, {val=2}}), runs = 1, run_len = 3}, │ + { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=10}, {val=2}}), runs = 1, run_len = 4}, │ + { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=10}, {val=9}}), runs = 1, run_len = 5}, │ + │ +} │ + │ +for test_idx, test in ipairs(run_tests) do │ + if #test.actual ~= test.runs then │ + error(string.format("Run test %d failed, expected %d runs, actual %d", test_idx, test.runs, #test.actual )) │ + end │ + for i=1,#test.actual do │ + if #test.actual[i] ~= test.run_len then │ + error(string.format("Run test %d failed, run %d had len %d, expected %d", │ + test_idx, i, #test.actual[i], test.run_len)) │ end │ end │ - return true │ end │ │ -local function get_num_possib_solutions(board, max_count) │ - --print_board(board) │ - board = copy_board(board) │ - local solution_count = 0 │ - local cell, possib_vals │ - while true do │ - if is_board_complete(board) then │ - return 1 │ +local pair_tests = { │ + { actual = check_points_seqeuence_pair({{val= 5}, {val=13}, {val=13}, {val= 4}}), pair_lens = {2} }, │ + { actual = check_points_seqeuence_pair({{val=13}, {val=13}, {val=13}, {val= 4}}), pair_lens = {3} }, │ + { actual = check_points_seqeuence_pair({{val=13}, {val= 4}, {val=13}, {val= 5}}), pair_lens = {2} }, │ + { actual = check_points_seqeuence_pair({{val=13}, {val= 4}, {val=13}, {val= 4}}), pair_lens = {2, 2} }, │ + { actual = check_points_seqeuence_pair({{val=13}, {val=13}, {val=13}, {val=13}}), pair_lens = {4} }, │ + { actual = check_points_seqeuence_pair({{val= 2}, {val= 2}, {val= 3}, {val= 4}}), pair_lens = {2} }, │ + { actual = check_points_seqeuence_pair({{val= 2}, {val= 2}, {val= 3}, {val= 3}}), pair_lens = {2, 2} }, │ +} │ + │ +for test_idx, test in ipairs(pair_tests) do │ + if #test.actual ~= #test.pair_lens then │ + error(string.format("Pair test %d failed, expected %d pairs, actual %d", test_idx, #test.pair_lens, #test.actual )) │ + end │ + for i=1,#test.actual do │ + if #test.actual[i] ~= test.pair_lens[i] then │ + error(string.format("Pair test %d failed, pair %d had len %d, expected %d", │ + test_idx, i, #test.actual[i], test.pair_lens[i])) │ end │ + end │ +end │ │ - cell = get_cell_with_min_possib_vals(board) │ - if cell == nil then │ - error("get_cell_with_min_possib_vals is nil?") │ - return 0 │ +local A = cards.DIAMONDS │ +local B = cards.SPADES │ + │ +local flush_tests = { │ + { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=B}}, {suit=A}), expected={} }, │ + { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=A}}, {suit=B}), expected={4} }, │ + { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=A}}, {suit=A}), expected={5} }, │ + { actual = check_points_sequence_flush({{suit=B}, {suit=A}, {suit=A}, {suit=A}}, {suit=A}), expected={} }, │ +} │ + │ +for test_idx, test in ipairs(flush_tests) do │ + if #test.actual ~= #test.expected then │ + error(string.format("Flush Test %d failed, expected %d flushes, actual %d", test_idx, #test.expected, #test.actual)) │ + end │ + │ + for i=1,#test.expected do │ + if #test.actual[i] ~= test.expected[i] then │ + error(string.format("Flush test %d failed, elem %d has len %d, expected %d", │ + test_idx, i, #test.actual[i], test.expected[i])) │ end │ + end │ +end │ │ - possib_vals = get_possible_values(board, cell.y, cell.x) │ - --print(string.format("found cell{y=%d,x=%d} has %d possib_vals", cell.y, cell.x, #possib_vals)) │ - if #possib_vals == 0 then │ - if is_board_complete(board) then │ - return 1 │ - else │ - return 0 │ - end │ - elseif #possib_vals == 1 then │ - --print(string.format("filling in easy val %d to {y=%d,x=%d}", possib_vals[1], cell.y, cell.x)) │ - board[cell.y][cell.x].val = possib_vals[1] │ +return core │ +local core = require("games/crib/crib_core") │ +local cards_draw = require("libs/cards/cards_draw") │ +local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ + │ +local draw = {} │ + │ +draw.ACTION_TYPE_GAME = 'game' │ +draw.ACTION_TYPE_UI = 'ui' │ + │ +draw.ACTION_UI_SHOW_POINTS_POPUP = "show_points" │ +draw.ACTION_UI_HIDE_POINTS_POPUP = "hide_points" │ + │ +local TEXT_COLOUR = '#000000' │ +local TEXT_SIZE = 24 │ +local text_height = 20 │ + │ +local CARD_POINTS_POPUP_BACKGROUND_COLOUR = '#aaaaaaf0' │ +local CARD_POINTS_POPUP_OUTLINE_COLOUR = '#000000' │ +local popup_padding = 40 │ + │ +draw.BTN_ID_DISCARD = "discard" │ +draw.BTN_ID_PASS = "pass" │ +draw.BTN_ID_NEXT = "next" │ + │ +local width = nil │ +local height = nil │ +local card_height = 105 │ +local card_width = 60 │ +local card_font_size = 28 │ +local card_padding = 15 │ +local card_discard_offset = 40 │ +-- when drawing a pile of cards, this is the y and x offset │ +-- that should be drawn to subsequent cards on the pile so │ +-- they appear to form a stack. │ +local card_pile_offset = 3 │ + │ +local more_info_btn_width = 50 │ +local more_info_btn_height = 50 │ + │ +local player_hand_y_centre = nil │ +local player_hand_x_centre = nil │ + │ + │ +local small_card_width = 35 │ +local small_card_height = 50 │ +local small_card_font_size = 12 │ +local small_card_padding = 3 │ + │ +local hand_width = nil │ + │ +function draw.init(height_arg, width_arg) │ + height = height_arg │ + width = width_arg │ + │ + player_hand_y_centre = math.floor(height - card_height/2 - card_padding) │ + player_hand_x_centre = math.floor(width/2) │ + │ + hand_width = core.CARDS_PER_HAND * card_width + (core.CARDS_PER_HAND - 1) * card_padding │ + │ + alexgames.create_btn(draw.BTN_ID_DISCARD, "Discard", 1) │ + alexgames.create_btn(draw.BTN_ID_PASS, "Can't move", 1) │ + alexgames.create_btn(draw.BTN_ID_NEXT, "Next", 1) │ + alexgames.set_btn_enabled(draw.BTN_ID_DISCARD, false) │ + alexgames.set_btn_enabled(draw.BTN_ID_PASS, false) │ + alexgames.set_btn_enabled(draw.BTN_ID_NEXT, false) │ + │ + local ui_state = { │ + points_popup_shown = false, │ + points_popup_player = nil, │ + } │ + return ui_state │ +end │ + │ +local function get_offset_ary(state, player) │ + if state.state ~= core.states.PICK_DISCARD then │ + return nil │ + end │ + local offset_ary = {} │ + for i=1,#state.hands[player] do │ + local offset = nil │ + if state.tentative_discards[player][i] then │ + offset = -card_discard_offset │ else │ - break │ + offset = 0 │ end │ + offset_ary[i] = offset │ end │ - for _, possib_val in ipairs(possib_vals) do │ - local board2 = copy_board(board) │ - --print(string.format("guessing val=%d at {y=%d,x=%d}", possib_val, cell.y, cell.x)) │ - board2[cell.y][cell.x].val = possib_val │ - if solution_count >= max_count then │ - return solution_count │ - end │ - solution_count = solution_count + get_num_possib_solutions(board2, max_count) │ + return offset_ary │ +end │ + │ +local function get_hand_pos(state, this_player, player) │ + local pos = {} │ + local adjusted_player_pos = ((player - this_player) % state.player_count) │ + if adjusted_player_pos == 0 then │ + pos.y = player_hand_y_centre │ + pos.x = player_hand_x_centre │ + elseif adjusted_player_pos == 1 then │ + pos.y = math.floor(card_height/2 + card_padding) │ + pos.x = math.floor(width/2) │ + else │ + error(string.format("Unhandled this_player=%s, player=%s, adjusted=%s", this_player, player, adjusted_player_pos)) │ end │ - return solution_count │ + │ + return pos │ end │ │ -local function solve_board(board) │ - board = copy_board(board) │ - while not is_board_complete(board) do │ - local cell = get_cell_with_min_possib_vals(board) │ - local possib_vals = get_possible_values(board, cell.y, cell.x) │ - --print(string.format("found cell {y=%d,x=%d} has %d possib vals", cell.y, cell.x, #possib_vals)) │ - if #possib_vals == 0 then │ - return board │ - end │ +local function get_more_info_btn_pos(this_player, player) │ + if this_player == player then │ + return { │ + y = math.floor(height - card_height - 2*card_padding - more_info_btn_height), │ + x = math.floor(width/2 + hand_width/2 - more_info_btn_width), │ + } │ + else │ + return { │ + y = math.floor(card_height + 2*card_padding), │ + x = math.floor(width/2 - hand_width/2), │ + } │ + end │ +end │ │ - if #possib_vals == 1 then │ - --print(string.format("filling in val %d to {y=%d,x=%d}", possib_vals[1], cell.y, cell.x)) │ - board[cell.y][cell.x].val = possib_vals[1] │ - else │ - shuffle.shuffle(possib_vals) │ - for _, possib_val in ipairs(possib_vals) do │ - --print("making guess val=%d, y=%d,x=%d", possib_val, cell.y, cell.x) │ - local board2 = copy_board(board) │ - board2[cell.y][cell.x].val = possib_val │ - board2 = solve_board(board2) │ - if is_board_complete(board2) then │ - return board2 │ +local function get_hand_score_pos(this_player, player) │ + if this_player == player then │ + return { │ + y = math.floor(height - card_height - 2*card_padding), │ + x = math.floor(width/2), │ + } │ + else │ + return { │ + y = math.floor(card_height + 2*card_padding + text_height), │ + x = math.floor(width/2), │ + } │ + end │ +end │ + │ +local function get_played_pos(state, this_player, player) │ + local pos = {} │ + --local adjusted_player_pos = ((player - this_player) % state.player_count) │ + local adjusted_player_pos = nil │ + if (this_player == player) then │ + adjusted_player_pos = 0 │ + else │ + adjusted_player_pos = 1 │ + end │ + │ + local offset_frac_y = 0.6 │ + local offset_card_widths_x = 2.0 │ + │ + if adjusted_player_pos == 0 then │ + pos.y = math.floor(offset_frac_y*height - card_height/2) │ + pos.x = math.floor(width/2 - card_width/2 + offset_card_widths_x*card_width) │ + elseif adjusted_player_pos == 1 then │ + pos.y = math.floor((1-offset_frac_y)*height - card_height/2) │ + pos.x = math.floor(width/2 - card_width/2 - offset_card_widths_x*card_width) │ + else │ + error(string.format("Unhandled this_player=%s, player=%s, adjusted=%s", this_player, player, adjusted_player_pos)) │ + end │ + return pos │ +end │ + │ +local function get_other_player(state, player) │ + if player == 1 then return 2 │ + else return 1 end │ +end │ + │ +local function player_pos_to_idx(state, player, pos) │ + if pos == 1 then return player │ + else return get_other_player(state, player) end │ +end │ + │ +local function draw_points_popup(state, points_info, player) │ + alexgames.draw_rect(CARD_POINTS_POPUP_BACKGROUND_COLOUR, │ + popup_padding, popup_padding, │ + width - popup_padding, height - popup_padding) │ + │ + alexgames.draw_text(string.format("Player %d points: %d", player, points_info.points), TEXT_COLOUR, │ + popup_padding + 2*card_padding, │ + popup_padding + card_padding, │ + TEXT_SIZE, 1, 0) │ + │ + for i,points_reason in ipairs(points_info.points_reasons) do │ + --local text_height = 16*2 │ + local text_height = small_card_height + small_card_padding │ + local text_pos_y = popup_padding + 4*card_padding + (i-1)*text_height │ + local reason_str = core.point_type_to_str(points_reason.reason) │ + alexgames.draw_text(string.format("+%2d %s", points_reason.points, reason_str), TEXT_COLOUR, │ + text_pos_y, popup_padding + 3*card_padding, 16, 1, 0) │ + for j,card_idx in ipairs(points_reason.card_idxs) do │ + local card_pos_x = width - popup_padding - j*(small_card_width + small_card_padding) │ + local card = nil │ + local hand = nil │ + if state.state == core.states.ACKNOWLEDGE_POINTS then │ + hand = state.played[player] │ + elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ + hand = state.crib │ + end │ + │ + if card_idx <= #hand then │ + card = hand[card_idx] │ + elseif card_idx == #state.played[player] + 1 then │ + card = state.cut_deck_card │ + else │ + error(string.format("Unexpected card_idx %s, #hand = %s", card_idx, #hand)) │ end │ + cards_draw.draw_card(card, │ + math.floor(text_pos_y - small_card_height/2), │ + card_pos_x, │ + small_card_width, │ + small_card_height, │ + small_card_font_size, │ + false, │ + 0) │ end │ - -- if we hit this, the board wasn't solvable │ - return board │ end │ - end │ - return board │ + │ + local btn_pos_y = height - popup_padding - more_info_btn_height - card_padding │ + local btn_pos_x = popup_padding + card_padding │ + alexgames.draw_rect('#dddddd', │ + btn_pos_y, btn_pos_x, │ + (width - popup_padding - card_padding), -- - btn_pos_x, │ + (height - popup_padding - card_padding)) -- - btn_pos_y) │ + alexgames.draw_text("Close", TEXT_COLOUR, │ + math.floor(btn_pos_y + more_info_btn_height/2), │ + math.floor(width/2), │ + TEXT_SIZE, 0, 0) │ end │ │ -local function get_random_filled_in_cell(board) │ - local cells = {} │ - for y=1,core.GAME_SIZE do │ - for x=1,core.GAME_SIZE do │ - if board[y][x].val ~= 0 then │ - table.insert(cells, { y=y, x=x} ) │ +local function get_hand_to_draw(state, this_player, player) │ + if state.state == core.states.ACKNOWLEDGE_POINTS then │ + return state.played[player] │ + elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ + if player == state.player_crib then │ + return state.crib │ + else │ + return {} │ + end │ + else │ + if this_player == player then │ + return state.hands[player] │ + else │ + local len = #state.hands[player] │ + local hand = {} │ + for i=1,len do │ + table.insert(hand, cards.UNREVEALED_CARD) │ end │ + return hand │ end │ end │ - return cells[math.random(#cells)] │ end │ │ -function core.new_game() │ - local state = { │ - board = {}, │ - } │ +local function get_crib_label_pos(player_crib, player) │ + if player == player_crib then │ + return { │ + y = math.floor(height - card_height - 4*card_padding), │ + x = math.floor(width - 2*card_padding), │ + align = -1, │ + } │ + else │ + return { │ + y = math.floor(card_height + 5*card_padding), │ + x = math.floor(2*card_padding), │ + align = 1, │ + } │ + end │ +end │ │ - for y=1,core.GAME_SIZE do │ - state.board[y] = {} │ - for x=1,core.GAME_SIZE do │ - state.board[y][x] = {} │ - state.board[y][x].val = 0 │ - end │ +local function get_score(state, player) │ + --if state == nil then return "" end │ + --if player == nil then return "" end │ + return string.format("%d", state.score[player]) │ +end │ + │ +function draw.draw(state, ui_state, player) │ + alexgames.draw_clear() │ + │ + │ + if state == nil then │ + return │ end │ │ - local start_time_ms = alexgames.get_time_ms() │ - state.board = solve_board(state.board) │ - local i = 0 │ - while i < 400 do │ - i = i + 1 │ - local orig_board = copy_board(state.board) │ - local cell = get_random_filled_in_cell(state.board) │ - state.board[cell.y][cell.x].val = 0 │ - if get_num_possib_solutions(state.board, 2) > 1 then │ - state.board = orig_board │ - break │ - elseif get_num_possib_solutions(state.board, 2) == 1 then │ - -- pass │ - else │ - error("more than 1 solution?") │ - end │ + local offset_ary = nil │ + local highlight_ary = core.get_highlight_ary(state, player) │ + │ + if state.state == core.states.PICK_DISCARD then │ + offset_ary = get_offset_ary(state, player) │ + elseif state.state == core.states.PLAY then │ end │ - for y=1,core.GAME_SIZE do │ - for x=1,core.GAME_SIZE do │ - state.board[y][x].is_init_val = (state.board[y][x].val ~= 0) │ + │ + if state.state == core.states.PLAY then │ + alexgames.draw_text(tostring(state.playing_sum), TEXT_COLOUR, │ + math.floor(height/2), │ + math.floor(width/2 + card_padding), │ + TEXT_SIZE, │ + 1, 0) │ + end │ + │ + if state.cut_deck_card ~= nil then │ + cards_draw.draw_card(state.cut_deck_card, │ + math.floor(height/2 - card_height/2), │ + math.floor(width/2 - card_width), │ + card_width, │ + card_height, │ + card_font_size, │ + false, 0) │ + end │ + │ + alexgames.draw_text(get_score(state, player), TEXT_COLOUR, │ + math.floor(height - card_height - 2*card_padding), │ + math.floor(width - 2*card_padding), │ + TEXT_SIZE, │ + -1, │ + 0) │ + │ + local crib_label_pos = get_crib_label_pos(state.player_crib, player) │ + alexgames.draw_text("crib", TEXT_COLOUR, │ + crib_label_pos.y, │ + crib_label_pos.x, │ + TEXT_SIZE, │ + crib_label_pos.aign, │ + 0) │ + │ + local my_hand = get_hand_pos(state, player, player) │ + cards_draw.draw_card_array(get_hand_to_draw(state, player, player), │ + my_hand.y, │ + my_hand.x, │ + card_width, │ + card_height, │ + card_font_size, │ + highlight_ary, │ + card_padding, │ + offset_ary) │ + │ + if #state.playing[player] > 0 then │ + local pos = get_played_pos(state, player, player) │ + --local card = state.playing[player][#state.playing[player]] │ + -- .draw_card(card, y, x, width, height, font_size, highlight, angle) │ + for card_idx, card in ipairs(state.playing[player]) do │ + cards_draw.draw_card( │ + card, │ + pos.y + card_idx*card_pile_offset, │ + pos.x + card_idx*card_pile_offset, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ end │ end │ - ::done_generating_game:: │ - local end_time_ms = alexgames.get_time_ms() │ │ + -- TODO loop through all other players and draw their cards │ + -- TODO should draw offset array for other players too │ + local other_player = get_other_player(state, player) │ + alexgames.draw_text(get_score(state, other_player), TEXT_COLOUR, │ + math.floor(card_height + 3*card_padding), -- TODO the other one is 2*padding. Ensure vertical centre? │ + math.floor(2*card_padding), │ + TEXT_SIZE, │ + 1, │ + 0) │ + local hand_pos = get_hand_pos(state, player, other_player) │ │ - alexgames.set_status_msg(string.format("Generated a game in %.3f seconds", (end_time_ms - start_time_ms)/1000)) │ - --local soln_count = get_num_possib_solutions(state.board, 5) │ - --print("found " .. soln_count .. " possible solutions (max 5)") │ - │ - debug = true │ - return state │ -end │ + cards_draw.draw_card_array(get_hand_to_draw(state, player, other_player), │ + hand_pos.y, │ + hand_pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + nil, │ + card_padding, │ + get_offset_ary(state, other_player)) │ │ -function core.user_enter(state, y, x, num_choice) │ - if state.board[y][x].is_init_val then │ - return -- TODO error code? │ + if #state.playing[other_player] > 0 then │ + local pos = get_played_pos(state, player, other_player) │ + local card = state.playing[other_player][#state.playing[other_player]] │ + -- .draw_card(card, y, x, width, height, font_size, highlight, angle) │ + for card_idx,card in ipairs(state.playing[other_player]) do │ + cards_draw.draw_card( │ + card, │ + pos.y + card_idx*card_pile_offset, │ + pos.x + card_idx*card_pile_offset, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ + end │ end │ │ - state.board[y][x].val = num_choice │ -end │ │ -return core │ + for player_idx=1,state.player_count do │ │ -local core = require("games/sudoku/sudoku_core") │ -local draw = require("games/sudoku/sudoku_draw") │ + local hand = nil │ + if state.state == core.states.ACKNOWLEDGE_POINTS then │ + hand = state.played[player_idx] │ + elseif state.state == core.states.ACKNOWLEDGE_CRIB and │ + state.player_crib == player_idx then │ + hand = state.crib │ + else │ + goto next_player │ + end │ │ -local ui_state = draw.init(480, 480) │ -local state = core.new_game() │ + local btn_pos = get_more_info_btn_pos(player, player) │ + draw_more.draw_graphic_ul("more_info_btn", │ + btn_pos.y, btn_pos.x, │ + more_info_btn_width, more_info_btn_height) │ │ -function update() │ - draw.draw_state(state, ui_state) │ -end │ + local points_info = core.check_points_sequence(hand, state.cut_deck_card) │ │ -function handle_user_clicked(pos_y, pos_x) │ - local cell = draw.get_cell_coords(pos_y, pos_x) │ - if cell ~= nil then │ - print("user clicked: " .. cell.y .. ", " .. cell.x) │ - draw.handle_user_sel(ui_state, cell) │ + local hand_score_pos = get_hand_score_pos(player, player_idx) │ + │ + alexgames.draw_text(string.format("+%d", points_info.points), │ + TEXT_COLOUR, │ + hand_score_pos.y, hand_score_pos.x, │ + TEXT_SIZE, 0, 0) │ + │ + if ui_state.points_popup_shown and player_idx == ui_state.points_popup_player then │ + draw_points_popup(state, points_info, player_idx) │ + end │ + │ + ::next_player:: │ end │ │ + alexgames.draw_refresh() │ │ - local num_choice = draw.get_num_choice(ui_state, pos_y, pos_x) │ - if num_choice ~= nil and ui_state.selected ~= nil then │ - print("user chose ", num_choice) │ - core.user_enter(state, ui_state.selected.y, ui_state.selected.x, num_choice) │ + local visible_btn_discard = (state.state == core.states.PICK_DISCARD) │ + local visible_btn_pass = (state.state == core.states.PLAY) │ + local visible_btn_next = (state.state == core.states.ACKNOWLEDGE_POINTS or │ + state.state == core.states.ACKNOWLEDGE_CRIB) │ + alexgames.set_btn_visible(draw.BTN_ID_DISCARD, visible_btn_discard) │ + alexgames.set_btn_visible(draw.BTN_ID_PASS, visible_btn_pass) │ + alexgames.set_btn_visible(draw.BTN_ID_NEXT, visible_btn_next) │ + │ + local enable_discard_btn = (state.state == core.states.PICK_DISCARD and │ + #state.hands[player] > core.CARDS_PER_HAND and │ + core.get_tentative_remaining_cards(state, player) == core.CARDS_PER_HAND) │ + local enable_pass_btn = (state.state == core.states.PLAY and │ + state.player_turn == player and │ + core.cant_move(state)) │ + local enable_btn_next = ((state.state == core.states.ACKNOWLEDGE_POINTS or │ + state.state == core.states.ACKNOWLEDGE_CRIB) and │ + not core.has_acknowledged_points(state, player)) │ + alexgames.set_btn_enabled(draw.BTN_ID_DISCARD, enable_discard_btn) │ + alexgames.set_btn_enabled(draw.BTN_ID_PASS, enable_pass_btn) │ + alexgames.set_btn_enabled(draw.BTN_ID_NEXT, enable_btn_next) │ +end │ + │ +function draw.coords_to_action(state, ui_state, player, coord_y, coord_x) │ + local action = { │ + action_type = nil, │ + action = nil, │ + idx = nil │ + } │ + │ + -- If clicked anywhere while the popup is shown, hide it │ + if ui_state.points_popup_shown then │ + action.action_type = draw.ACTION_TYPE_UI │ + action.action = draw.ACTION_UI_HIDE_POINTS_POPUP │ + return action │ end │ │ - update() │ + for other_player=1,state.player_count do │ + local btn_pos = get_more_info_btn_pos(player, other_player) │ + if btn_pos.y <= coord_y and coord_y <= btn_pos.y + more_info_btn_height and │ + btn_pos.x <= coord_x and coord_x <= btn_pos.x + more_info_btn_width then │ + action.action_type = draw.ACTION_TYPE_UI │ + action.action = draw.ACTION_UI_SHOW_POINTS_POPUP │ + action.idx = other_player │ + return action │ + end │ + end │ │ + │ + local offset_ary = get_offset_ary(state, player) │ + │ + local hand_idx = cards_draw.card_array_coords_to_idx( │ + #state.hands[player], │ + player_hand_y_centre, │ + player_hand_x_centre, │ + card_width, │ + card_height, │ + card_padding, │ + offset_ary, │ + coord_y, │ + coord_x) │ + if hand_idx ~= nil then │ + action.action_type = draw.ACTION_TYPE_GAME │ + action.action = core.actions.HAND │ + action.idx = hand_idx │ + end │ + │ + return action │ end │ │ -function start_game() │ +function draw.handle_ui_action(ui_state, ui_action) │ + if ui_action.action == draw.ACTION_UI_SHOW_POINTS_POPUP then │ + ui_state.points_popup_shown = true │ + ui_state.points_popup_player = ui_action.idx │ + elseif ui_action.action == draw.ACTION_UI_HIDE_POINTS_POPUP then │ + ui_state.points_popup_shown = false │ + ui_state.points_popup_player = nil │ + end │ end │ + │ +return draw │ local game31s = {} │ │ local cards = require("libs/cards/cards") │ │ -- each player holds 3 cards in their hand at a time │ local cards_per_hand = 3 │ │ @@ -11016,616 +10151,14 @@ │ end │ wait_for_players.init(players, player, start_host_game, start_client_game) │ print("... waiting ... ") │ │ init_ui() │ end │ │ -local draw = {} │ - │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ - │ -local cell_size = 35 │ - │ -local MINE_COUNT_TO_IMG_ID_MAP = { │ - [0] = 'minesweeper_box_empty', │ - [1] = 'minesweeper_box1', │ - [2] = 'minesweeper_box2', │ - [3] = 'minesweeper_box3', │ - [4] = 'minesweeper_box4', │ - [5] = 'minesweeper_box5', │ - [6] = 'minesweeper_box6', │ - [7] = 'minesweeper_box7', │ - [8] = 'minesweeper_box8', │ -} │ - │ -local FLAGGED_TO_IMG_ID_MAP = { │ - [1] = 'minesweeper_box_flagged_red', │ - [2] = 'minesweeper_box_flagged_blue', │ -} │ - │ -local BACKGROUND_COLOUR = '#bbbbbb' │ -local TEXT_COLOUR = '#000000' │ ---local TEXT_BACKGROUND_COLOUR = '#ffffffbb' │ -local TEXT_BACKGROUND_COLOUR = '#bbbbbbbb' │ -local TEXT_FONT_SIZE = 18 │ - │ -draw.draw_flag_flash = false │ - │ -local board_width = nil │ -local board_height = nil │ - │ -local g_victory_anim_timer = nil │ -local anim_state = draw_celebration_anim.new_state({ │ -}) │ - │ -local function cell_to_img_id(cell) │ - if not cell.revealed then │ - if cell.flagged_by_player == nil then │ - return 'minesweeper_box_unclicked' │ - else │ - local flag_img = FLAGGED_TO_IMG_ID_MAP[cell.flagged_by_player] │ - if flag_img == nil then │ - error(string.format("flagged_by_player %s not found in map", cell.flagged_by_player)) │ - end │ - return flag_img │ - end │ - elseif cell.has_mine then │ - return 'minesweeper_mine' │ - else │ - local img_id = MINE_COUNT_TO_IMG_ID_MAP[cell.touching_mine_count] │ - if img_id == nil then │ - error(string.format("touching_mine_count %s not found in map", cell.touching_mine_count)) │ - end │ - return img_id │ - end │ -end │ - │ -function draw.init(board_width_arg, board_height_arg, cell_size_arg) │ - board_width = board_width_arg │ - board_height = board_height_arg │ - cell_size = cell_size_arg │ -end │ - │ -function draw.update(dt_ms) │ - draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ -end │ - │ -function draw.draw_state(state, player) │ - alexgames.draw_clear() │ - if state == nil or state.game == nil then │ - return │ - end │ - alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, board_width, board_height) │ - -- TODO only draw cells that are (partially or fully) visible │ - for y, row in ipairs(state.game.board) do │ - for x, cell in ipairs(row) do │ - local offset_y = state.players[player].offset_y │ - local offset_x = state.players[player].offset_x │ - │ - local pos_y = (y-1)*cell_size - offset_y │ - local pos_x = (x-1)*cell_size - offset_x │ - │ - local zoom_fact = state.players[player].zoom_fact │ - │ - pos_y = math.floor(pos_y * zoom_fact) │ - pos_x = math.floor(pos_x * zoom_fact) │ - │ - local actual_cell_size = math.floor(cell_size * zoom_fact) │ - │ - local in_range = true │ - if pos_y + actual_cell_size <= 0 or │ - pos_x + actual_cell_size <= 0 or │ - pos_y >= board_height or │ - pos_x >= board_width then │ - in_range = false │ - end │ - │ - if in_range then │ - draw_more.draw_graphic_ul(cell_to_img_id(cell), │ - pos_y, pos_x, │ - actual_cell_size, actual_cell_size) │ - end │ - end │ - end │ - │ - local text_height = 30 │ - local player_text_width = 165 │ - local text_padding = 10 │ - alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ - board_height - #state.players*text_height - text_padding, │ - board_width - player_text_width - text_padding, │ - board_height, board_width) │ - for i=0,#state.players-1 do │ - local player_idx = #state.players - i │ - alexgames.draw_text(string.format("Player %d: %4d", player_idx, state.players[player_idx].score), │ - TEXT_COLOUR, │ - board_height - i * text_height - text_padding, │ - board_width - text_padding, │ - TEXT_FONT_SIZE, │ - -1) │ - │ - end │ - │ - local mines_text_width = 115 │ - alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ - board_height - text_height - text_padding, │ - 0, │ - board_height, mines_text_width + text_padding) │ - alexgames.draw_text(string.format("Mines: %3d", state.game.mines_unrevealed), │ - TEXT_COLOUR, │ - board_height - text_padding, │ - text_padding, │ - TEXT_FONT_SIZE, │ - alexgames.TEXT_ALIGN_LEFT) │ - │ - if draw.draw_flag_flash then │ - alexgames.draw_rect('#ffffff88', 0, 0, 480, 480) │ - draw.draw_flag_flash = false │ - end │ - draw_celebration_anim.draw(anim_state) │ - alexgames.draw_refresh() │ -end │ - │ -function draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - local zoom_fact = state.players[player].zoom_fact │ - return { │ - y = 1 + math.floor((state.players[player].offset_y + pos_y/zoom_fact)/cell_size), │ - x = 1 + math.floor((state.players[player].offset_x + pos_x/zoom_fact)/cell_size), │ - } │ -end │ - │ -function draw.victory_animation(fps) │ - print("setting timer") │ - if g_victory_anim_timer ~= nil then │ - error(string.format("victory_animation: anim_timer is not nil")) │ - end │ - g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ - draw_celebration_anim.fireworks_display(anim_state, { │ - colour_pref = "light", │ - on_finish = function () │ - if g_victory_anim_timer == nil then │ - alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ - else │ - alexgames.delete_timer(g_victory_anim_timer) │ - g_victory_anim_timer = nil │ - end │ - --print("animation finished! Resuming timer") │ - --alexgames.set_timer_update_ms(0) │ - --alexgames.set_timer_update_ms(1000/60) │ - end, │ - }) │ -end │ - │ - │ - │ -return draw │ - │ -local core = require("games/minesweeper/minesweeper_core") │ -local draw = require("games/minesweeper/minesweeper_draw") │ -local serialize = require("games/minesweeper/minesweeper_serialize") │ - │ -local wait_for_players = require("libs/multiplayer/wait_for_players") │ - │ -local alexgames = require("alexgames") │ - │ --- TODO add: │ --- * vibrate phone when flag has appeared? Show red circle so user knows when flag appears │ --- even if it is covered by their finger? │ --- │ --- TODO for multiplayer: │ --- * TODO add a graphic for "cell is loading". For now it is probably fine to just leave it as unclicked because │ --- of the low latency. (Actually, even on my LAN, I see a decent bit of latency when hosting on my phone and │ --- using my laptop as a client.) │ --- * animate points appearing over where you click │ - │ - │ --- maximum y or x distance that a player can move their finger/mouse before their gesture is no longer │ --- interpreted as a click │ -local MAX_CLICK_MOVE = 2 │ - │ -local game_size_y = 20 │ -local game_size_x = 20 │ - │ -local player = 1 │ -local player_count = 1 │ -local cell_size = core.cell_size │ --- TODO initialize player state but not game state │ -local state = core.new_state(player_count, game_size_y, game_size_x, cell_size) │ -local win_anim_shown = false │ -local state_set = false │ -local g_session_id = alexgames.get_new_session_id() │ ---local state = nil │ -local user_input_down = false │ -local user_input_down_timer_fired = false │ -local user_input_down_time = nil │ -local user_input_moved = false │ - │ --- These are only set on touchdown │ -local user_input_pos_y = nil │ -local user_input_pos_x = nil │ - │ --- These are updated on touchdown and touchmove events │ -local user_input_pos_move_y = nil │ -local user_input_pos_move_x = nil │ - │ -local user_input2_pos_move_y = nil │ -local user_input2_pos_move_x = nil │ -local user_init_touch_dist = nil │ -local user_offset_y = 0 │ -local user_offset_x = 0 │ -local active_touch = nil │ -local active_touch2 = nil │ - │ -local players = { │ - [1] = "You", │ -} │ -local player = 1 │ -local is_client = false │ -local player_name_to_idx = {} │ - │ -local GAME_OPT_NEW_GAME = "game_opt_new_game" │ - │ - │ -local USER_INPUT_DOWN_TIME_THRESHOLD_MS = 300 │ - │ - │ -local function handle_move_client(state, player, move, y, x) │ - local msg = string.format("move:%d,%d,%d,%d", player, move, y, x) │ - -- TODO only message the host in the future? │ - alexgames.send_message("all", msg) │ - return core.RC_SUCCESS │ -end │ - │ -local function handle_move(state, player, move, y, x) │ - local rc = nil │ - if is_client then │ - rc = handle_move_client(state, player, move, y, x) │ - else │ - rc = core.handle_move(state, player, move, y, x) │ - end │ - local state_serialized = serialize.serialize_state(state) │ - if move == core.MOVE_FLAG_CELL then │ - draw.draw_flag_flash = true │ - end │ - alexgames.save_state(g_session_id, state_serialized) │ - │ - if core.is_game_over(state) and not win_anim_shown then │ - print('alex showing victory animation') │ - win_anim_shown = true │ - draw.victory_animation(60) │ - end │ -end │ - │ -local function check_for_input_time_done() │ - if not user_input_down then │ - return │ - end │ - │ - local time_diff = alexgames.get_time_ms() - user_input_down_time │ - if user_input_down and │ - time_diff >= USER_INPUT_DOWN_TIME_THRESHOLD_MS and │ - not user_input_moved and │ - not user_input_down_timer_fired then │ - user_input_down_timer_fired = true │ - local cell_coords = draw.pos_to_cell_coords(state, player, user_input_pos_y, user_input_pos_x) │ - handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ - send_state_updates_if_host() │ - update() │ - end │ -end │ - │ --- TODO change update to some "update_evt" or something │ -function update(dt_ms) │ - if dt_ms ~= nil then │ - draw.update(dt_ms) │ - end │ - draw.draw_state(state, player) │ - check_for_input_time_done() │ -end │ - │ -local function handle_user_input_down(pos_y, pos_x) │ - user_input_down_time = alexgames.get_time_ms() │ - user_input_down = true │ - user_input_moved = false │ - user_input_down_timer_fired = false │ - user_input_pos_y = pos_y │ - user_input_pos_x = pos_x │ - user_input_pos_move_y = pos_y │ - user_input_pos_move_x = pos_x │ - user_offset_y = state.players[player].offset_y │ - user_offset_x = state.players[player].offset_x │ -end │ - │ -local function handle_user_input_release(pos_y, pos_x, cancel) │ - if not cancel and not user_input_moved and not user_input_down_timer_fired then │ - local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - local time_diff = alexgames.get_time_ms() - user_input_down_time │ - local move_type = nil │ - if time_diff <= USER_INPUT_DOWN_TIME_THRESHOLD_MS then │ - move_type = core.MOVE_CLICK_CELL │ - else │ - move_type = core.MOVE_FLAG_CELL │ - end │ - handle_move(state, player, move_type, cell_coords.y, cell_coords.x) │ - update() │ - send_state_updates_if_host() │ - end │ - user_input_down = false │ - user_input_down_timer_fired = false │ -end │ - │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - if evt_id == alexgames.MOUSE_EVT_DOWN then │ - handle_user_input_down(pos_y, pos_x) │ - elseif evt_id == alexgames.MOUSE_EVT_UP then │ - handle_user_input_release(pos_y, pos_x, false) │ - elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ - handle_user_input_release(pos_y, pos_x, true) │ - elseif evt_id == alexgames.MOUSE_EVT_ALT_DOWN then │ - local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ - else │ - print(string.format('unhandled evt_id %s', evt_id)) │ - end │ -end │ - │ -local function handle_user_input_move(pos_y, pos_x) │ - if user_input_down and ( │ - math.abs(user_input_pos_y - pos_y) > MAX_CLICK_MOVE or │ - math.abs(user_input_pos_x - pos_x) > MAX_CLICK_MOVE) then │ - user_input_moved = true │ - end │ - if user_input_down then │ - local offset_adj_y = user_input_pos_y - pos_y │ - local offset_adj_x = user_input_pos_x - pos_x │ - user_input_pos_move_y = pos_y │ - user_input_pos_move_x = pos_x │ - core.adjust_offset(state, player, │ - math.floor(user_offset_y + offset_adj_y), │ - math.floor(user_offset_x + offset_adj_x)) │ - update() │ - end │ -end │ - │ -function handle_mousemove(pos_y, pos_x) │ - handle_user_input_move(pos_y, pos_x) │ -end │ - │ -function handle_user_clicked() │ -end │ - │ -local function get_touch_dist() │ - local dy = user_input2_pos_move_y - user_input_pos_move_y │ - local dx = user_input2_pos_move_x - user_input_pos_move_x │ - return math.sqrt(dy*dy + dx*dx) │ -end │ - │ -function handle_touch_evt(evt_id, changed_touches) │ - for _, touch in ipairs(changed_touches) do │ - if evt_id == 'touchstart' then │ - if active_touch == nil then │ - active_touch = touch.id │ - handle_user_input_down(touch.y, touch.x) │ - elseif active_touch2 == nil then │ - active_touch2 = touch.id │ - user_input_moved = true │ - user_input2_pos_move_y = touch.y │ - user_input2_pos_move_x = touch.x │ - user_init_touch_dist = get_touch_dist() │ - init_zoom = core.get_zoom_fact(state, player) │ - end │ - elseif evt_id == 'touchmove' then │ - │ - if active_touch == touch.id then │ - handle_user_input_move(touch.y, touch.x) │ - end │ - │ - if active_touch2 ~= nil then │ - if active_touch2 == touch.id then │ - user_input2_pos_move_y = touch.y │ - user_input2_pos_move_x = touch.x │ - end │ - local touch_dist_fact = get_touch_dist() / user_init_touch_dist │ - local zoom_fact = init_zoom * touch_dist_fact │ - --alexgames.set_status_msg( │ - -- string.format("Touch dist fact is %.3f, dist=%.0f, orig=%.0f", │ - -- touch_dist_fact, get_touch_dist(), user_init_touch_dist)) │ - core.set_zoom_fact(state, player, zoom_fact) │ - end │ - │ - elseif evt_id == 'touchend' or │ - evt_id == 'touchcancel' then │ - local is_cancel = (evt_id == 'touchcancel') │ - if active_touch == touch.id then │ - handle_user_input_release(touch.y, touch.x, is_cancel) │ - active_touch = nil │ - elseif active_touch2 == touch.id then │ - active_touch2 = nil │ - end │ - end │ - end │ -end │ - │ -function handle_wheel_changed(dy, dx) │ - print(string.format("handle_wheel(dy=%s, dx=%s)", dy, dx)) │ - │ - local zoom_fact = core.get_zoom_fact(state, player) │ - │ - zoom_fact = zoom_fact + -dy/114 * 0.1 │ - │ - core.set_zoom_fact(state, player, zoom_fact) │ - │ - update() │ -end │ - │ -function send_state_updates_if_host() │ - print("send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - if is_client and not wait_for_players.is_host_tentative() then │ - print("return 1 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - return │ - end │ - │ - if state == nil then │ - print("return 2 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - return │ - end │ - │ - for dst_player, player_name in pairs(wait_for_players.players_tentative()) do │ - if dst_player == player then │ - goto next_player │ - end │ - print("Sending state update") │ - local state_msg = "state:" .. serialize.serialize_client_game_state(state, dst_player) │ - alexgames.send_message(player_name, state_msg) │ - ::next_player:: │ - end │ -end │ - │ -function new_game(player_count) │ - print(string.format("Starting game with %d players", player_count)) │ - state = core.new_state(player_count, game_size_y, game_size_x, cell_size) │ - win_anim_shown = false │ - g_session_id = alexgames.get_new_session_id() │ -end │ - │ - │ -local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as host") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = false │ - │ - if not state_set then │ - new_game(#players) │ - end │ - send_state_updates_if_host() │ - update() │ -end │ - │ -local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as client") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = true │ - -- TODO only initialize player_state here? │ - state = core.new_state(#players, 20, 20, cell_size) │ - -- no need to draw board here, a state update should soon follow │ -end │ - │ -function handle_msg_received(src, msg) │ - │ - local handled = wait_for_players.handle_msg_received(src, msg) │ - │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ - │ - if handled and header ~= "joined" then │ - return │ - end │ - │ - if header == "state" then │ - --if not is_client and not wait_for_players.is_host_tentative() then │ - -- error("Received state as host") │ - --end │ - serialize.deserialize_client_game_state(state, payload) │ - elseif header == "joined" then │ - print("player_joined") │ - send_state_updates_if_host() │ - elseif header == "player_joined" or │ - header == "player_left" then │ - -- ignore I guess? │ - elseif header == "move" then │ - if not is_client then │ - local m2 = payload:gmatch("(%d+),(%d+),(%d+),(%d+)") │ - if m2 == nil then │ - error(string.format("invalid move payload %s", payload)) │ - end │ - local player_str, move_type_str, y_str, x_str = m2() │ - local player = tonumber(player_str) │ - local move_type = tonumber(move_type_str) │ - local y = tonumber(y_str) │ - local x = tonumber(x_str) │ - │ - if player ~= player_name_to_idx[src] then │ - error(string.format("received move for player idx %s from player_name %s (%d)", │ - player, src, player_name_to_idx[src])) │ - end │ - handle_move(state, player, move_type, y, x) │ - send_state_updates_if_host() │ - end │ - else │ - error(string.format("Unhandled message %s", header)) │ - end │ - │ - send_state_updates_if_host() │ - update() │ -end │ - │ - │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ - if handled then │ - return │ - end │ -end │ - │ -function handle_game_option_evt(game_opt_id, value) │ - if game_opt_id == GAME_OPT_NEW_GAME then │ - new_game(#players) │ - update() │ - end │ -end │ - │ -function get_state() │ - return serialize.serialize_state(state) │ -end │ - │ --- TODO need proper state saving │ - │ -draw.init(480, 480, cell_size) │ - │ -function start_game(session_id, state_serialized) │ - if state_serialized ~= nil then │ - g_session_id = session_id │ - state = serialize.deserialize_state(state_serialized) │ - state_set = true │ - else │ - local last_sess_id = alexgames.get_last_session_id() │ - if last_sess_id ~= nil then │ - state_serialized = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ - g_session_id = last_sess_id │ - state = serialize.deserialize_state(state_serialized) │ - state_set = true │ - end │ - end │ - wait_for_players.init(players, player, start_host_game, start_client_game) │ - │ - alexgames.enable_evt("mouse_move") │ - alexgames.enable_evt("mouse_updown") │ - alexgames.enable_evt("mouse_alt_updown") │ - alexgames.enable_evt("touch") │ - alexgames.enable_evt("wheel") │ - │ - alexgames.add_game_option(GAME_OPT_NEW_GAME, { │ - type = alexgames.OPTION_TYPE_BTN, │ - label = "New Game" │ - }) │ - │ - -- Kind of sucks that I only need this timer for measuring touch/mouse down time. │ - -- Would be ideal if I could just set a 300 ms one off timer? │ - alexgames.set_timer_update_ms(50) │ - │ -end │ - │ local core = {} │ │ local MINE_PORTION = 0.20 │ │ local CELL_COUNT_BORDER_PADDING = 6 │ │ local dirs = { │ @@ -12161,2404 +10694,5363 @@ │ core.new_player_state(), │ } │ │ return state │ end │ │ return serialize │ --- TODO currently there's a bug where if you generate a custom puzzle via entering a │ --- string and press "enter" with the keyboard, you see a 'Invalid guess ""' error message, │ --- I guess the popup is being closed, and then the enter key is being processed. │ -local alexgames = require("alexgames") │ -local words_lib = require("libs/words") │ │ -local core = require("games/word_mastermind/word_mastermind_core") │ -local draw = require("games/word_mastermind/word_mastermind_draw") │ -local serialize = require("games/word_mastermind/word_mastermind_serialize") │ +local core = require("games/minesweeper/minesweeper_core") │ +local draw = require("games/minesweeper/minesweeper_draw") │ +local serialize = require("games/minesweeper/minesweeper_serialize") │ │ -local WORD_LEN = 5 │ -local MAX_GUESSES = 6 │ +local wait_for_players = require("libs/multiplayer/wait_for_players") │ │ -local SAVED_STATE_KEY = "word_mastermind_saved_state" │ -local SESSION_ID_KEY = "word_mastermind_session_id" │ +local alexgames = require("alexgames") │ │ -local state = { │ - session_id = nil, │ -} │ -state.ui_state = draw.init() │ +-- TODO add: │ +-- * vibrate phone when flag has appeared? Show red circle so user knows when flag appears │ +-- even if it is covered by their finger? │ +-- │ +-- TODO for multiplayer: │ +-- * TODO add a graphic for "cell is loading". For now it is probably fine to just leave it as unclicked because │ +-- of the low latency. (Actually, even on my LAN, I see a decent bit of latency when hosting on my phone and │ +-- using my laptop as a client.) │ +-- * animate points appearing over where you click │ │ -function update(dt_ms) │ - draw.draw_state(state.ui_state, state.game_state, dt_ms) │ -end │ │ -local function internal_draw_board(dt_ms) │ - draw.draw_state(state.ui_state, state.game_state, dt_ms) │ -end │ +-- maximum y or x distance that a player can move their finger/mouse before their gesture is no longer │ +-- interpreted as a click │ +local MAX_CLICK_MOVE = 2 │ │ -local function save_state(game_state) │ - local serialized_state = serialize.serialize_state(game_state) │ - alexgames.store_data(SAVED_STATE_KEY, serialized_state) │ - alexgames.store_data(SESSION_ID_KEY, serialize.serialize_session_id(state.session_id)) │ +local game_size_y = 20 │ +local game_size_x = 20 │ │ - alexgames.save_state(state.session_id, serialized_state) │ +local player = 1 │ +local player_count = 1 │ +local cell_size = core.cell_size │ +-- TODO initialize player state but not game state │ +local state = core.new_state(player_count, game_size_y, game_size_x, cell_size) │ +local win_anim_shown = false │ +local state_set = false │ +local g_session_id = alexgames.get_new_session_id() │ +--local state = nil │ +local user_input_down = false │ +local user_input_down_timer_fired = false │ +local user_input_down_time = nil │ +local user_input_moved = false │ + │ +-- These are only set on touchdown │ +local user_input_pos_y = nil │ +local user_input_pos_x = nil │ + │ +-- These are updated on touchdown and touchmove events │ +local user_input_pos_move_y = nil │ +local user_input_pos_move_x = nil │ + │ +local user_input2_pos_move_y = nil │ +local user_input2_pos_move_x = nil │ +local user_init_touch_dist = nil │ +local user_offset_y = 0 │ +local user_offset_x = 0 │ +local active_touch = nil │ +local active_touch2 = nil │ + │ +local players = { │ + [1] = "You", │ +} │ +local player = 1 │ +local is_client = false │ +local player_name_to_idx = {} │ + │ +local GAME_OPT_NEW_GAME = "game_opt_new_game" │ + │ + │ +local USER_INPUT_DOWN_TIME_THRESHOLD_MS = 300 │ + │ + │ +local function handle_move_client(state, player, move, y, x) │ + local msg = string.format("move:%d,%d,%d,%d", player, move, y, x) │ + -- TODO only message the host in the future? │ + alexgames.send_message("all", msg) │ + return core.RC_SUCCESS │ end │ │ -local function new_game(word) │ - alexgames.set_status_msg("Starting new game") │ - state.session_id = alexgames.get_new_session_id() │ - state.game_state = core.new_game(WORD_LEN, MAX_GUESSES, word) │ - save_state(state.game_state) │ - draw.draw_state(state.ui_state, state.game_state, 0) │ +local function handle_move(state, player, move, y, x) │ + local rc = nil │ + if is_client then │ + rc = handle_move_client(state, player, move, y, x) │ + else │ + rc = core.handle_move(state, player, move, y, x) │ + end │ + local state_serialized = serialize.serialize_state(state) │ + if move == core.MOVE_FLAG_CELL then │ + draw.draw_flag_flash = true │ + end │ + alexgames.save_state(g_session_id, state_serialized) │ + │ + if core.is_game_over(state) and not win_anim_shown then │ + print('alex showing victory animation') │ + win_anim_shown = true │ + draw.victory_animation(60) │ + end │ end │ │ -local function prompt_custom_puzzle() │ - local msg = "Enter your own word to generate a puzzle.\n" .. │ - "Then you can either let a friend play on your device, " .. │ - "or send them a link by pressing \"share state\" in the " .. │ - "options menu." │ - alexgames.prompt_string("Custom puzzle", msg) │ +local function check_for_input_time_done() │ + if not user_input_down then │ + return │ + end │ + │ + local time_diff = alexgames.get_time_ms() - user_input_down_time │ + if user_input_down and │ + time_diff >= USER_INPUT_DOWN_TIME_THRESHOLD_MS and │ + not user_input_moved and │ + not user_input_down_timer_fired then │ + user_input_down_timer_fired = true │ + local cell_coords = draw.pos_to_cell_coords(state, player, user_input_pos_y, user_input_pos_x) │ + handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ + send_state_updates_if_host() │ + update() │ + end │ end │ │ -function get_state() │ - local serialized_state = serialize.serialize_state(state.game_state) │ - local byteary = {} │ - for i=1,#serialized_state do │ - table.insert(byteary, string.byte(serialized_state:sub(i,i))) │ +-- TODO change update to some "update_evt" or something │ +function update(dt_ms) │ + if dt_ms ~= nil then │ + draw.update(dt_ms) │ end │ - return byteary │ + draw.draw_state(state, player) │ + check_for_input_time_done() │ end │ │ +local function handle_user_input_down(pos_y, pos_x) │ + user_input_down_time = alexgames.get_time_ms() │ + user_input_down = true │ + user_input_moved = false │ + user_input_down_timer_fired = false │ + user_input_pos_y = pos_y │ + user_input_pos_x = pos_x │ + user_input_pos_move_y = pos_y │ + user_input_pos_move_x = pos_x │ + user_offset_y = state.players[player].offset_y │ + user_offset_x = state.players[player].offset_x │ +end │ │ -function get_init_state() │ - local init_state = core.new_game(#state.game_state.word, state.game_state.max_guesses, state.game_state.word) │ - local serialized_state = serialize.serialize_state(init_state) │ - local byteary = {} │ - for i=1,#serialized_state do │ - table.insert(byteary, string.byte(serialized_state:sub(i,i))) │ +local function handle_user_input_release(pos_y, pos_x, cancel) │ + if not cancel and not user_input_moved and not user_input_down_timer_fired then │ + local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + local time_diff = alexgames.get_time_ms() - user_input_down_time │ + local move_type = nil │ + if time_diff <= USER_INPUT_DOWN_TIME_THRESHOLD_MS then │ + move_type = core.MOVE_CLICK_CELL │ + else │ + move_type = core.MOVE_FLAG_CELL │ + end │ + handle_move(state, player, move_type, cell_coords.y, cell_coords.x) │ + update() │ + send_state_updates_if_host() │ end │ - return byteary │ + user_input_down = false │ + user_input_down_timer_fired = false │ end │ │ - │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + if evt_id == alexgames.MOUSE_EVT_DOWN then │ + handle_user_input_down(pos_y, pos_x) │ + elseif evt_id == alexgames.MOUSE_EVT_UP then │ + handle_user_input_release(pos_y, pos_x, false) │ + elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ + handle_user_input_release(pos_y, pos_x, true) │ + elseif evt_id == alexgames.MOUSE_EVT_ALT_DOWN then │ + local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ + else │ + print(string.format('unhandled evt_id %s', evt_id)) │ + end │ +end │ │ -function handle_user_string_input(str_input, is_cancelled) │ - print(string.format("handle_user_string_input: %s, is_cancelled=%s", str_input, is_cancelled)) │ - local rc = core.validate_word(state.game_state, str_input) │ - if rc ~= core.RC_SUCCESS then │ - alexgames.set_status_err(string.format("Invalid word \"%s\": %s", str_input, core.rc_to_str(rc))) │ - return │ +local function handle_user_input_move(pos_y, pos_x) │ + if user_input_down and ( │ + math.abs(user_input_pos_y - pos_y) > MAX_CLICK_MOVE or │ + math.abs(user_input_pos_x - pos_x) > MAX_CLICK_MOVE) then │ + user_input_moved = true │ + end │ + if user_input_down then │ + local offset_adj_y = user_input_pos_y - pos_y │ + local offset_adj_x = user_input_pos_x - pos_x │ + user_input_pos_move_y = pos_y │ + user_input_pos_move_x = pos_x │ + core.adjust_offset(state, player, │ + math.floor(user_offset_y + offset_adj_y), │ + math.floor(user_offset_x + offset_adj_x)) │ + update() │ end │ - new_game(str_input) │ - internal_draw_board(0) │ end │ │ -function start_game(session_id, serialized_state) │ - core.init_lib() │ - if not core.dict_ready() then │ - alexgames.set_status_msg("Waiting for dictionary to load... not starting game yet") │ +function handle_mousemove(pos_y, pos_x) │ + handle_user_input_move(pos_y, pos_x) │ +end │ + │ +function handle_user_clicked() │ +end │ + │ +local function get_touch_dist() │ + local dy = user_input2_pos_move_y - user_input_pos_move_y │ + local dx = user_input2_pos_move_x - user_input_pos_move_x │ + return math.sqrt(dy*dy + dx*dx) │ +end │ + │ +function handle_touch_evt(evt_id, changed_touches) │ + for _, touch in ipairs(changed_touches) do │ + if evt_id == 'touchstart' then │ + if active_touch == nil then │ + active_touch = touch.id │ + handle_user_input_down(touch.y, touch.x) │ + elseif active_touch2 == nil then │ + active_touch2 = touch.id │ + user_input_moved = true │ + user_input2_pos_move_y = touch.y │ + user_input2_pos_move_x = touch.x │ + user_init_touch_dist = get_touch_dist() │ + init_zoom = core.get_zoom_fact(state, player) │ + end │ + elseif evt_id == 'touchmove' then │ + │ + if active_touch == touch.id then │ + handle_user_input_move(touch.y, touch.x) │ + end │ + │ + if active_touch2 ~= nil then │ + if active_touch2 == touch.id then │ + user_input2_pos_move_y = touch.y │ + user_input2_pos_move_x = touch.x │ + end │ + local touch_dist_fact = get_touch_dist() / user_init_touch_dist │ + local zoom_fact = init_zoom * touch_dist_fact │ + --alexgames.set_status_msg( │ + -- string.format("Touch dist fact is %.3f, dist=%.0f, orig=%.0f", │ + -- touch_dist_fact, get_touch_dist(), user_init_touch_dist)) │ + core.set_zoom_fact(state, player, zoom_fact) │ + end │ + │ + elseif evt_id == 'touchend' or │ + evt_id == 'touchcancel' then │ + local is_cancel = (evt_id == 'touchcancel') │ + if active_touch == touch.id then │ + handle_user_input_release(touch.y, touch.x, is_cancel) │ + active_touch = nil │ + elseif active_touch2 == touch.id then │ + active_touch2 = nil │ + end │ + end │ + end │ +end │ + │ +function handle_wheel_changed(dy, dx) │ + print(string.format("handle_wheel(dy=%s, dx=%s)", dy, dx)) │ + │ + local zoom_fact = core.get_zoom_fact(state, player) │ + │ + zoom_fact = zoom_fact + -dy/114 * 0.1 │ + │ + core.set_zoom_fact(state, player, zoom_fact) │ + │ + update() │ +end │ + │ +function send_state_updates_if_host() │ + print("send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ + if is_client and not wait_for_players.is_host_tentative() then │ + print("return 1 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ return │ end │ │ - -- if state wasn't passed via param, then check if it's stored in │ - -- persistent storage │ - if serialized_state == nil then │ - -- TODO now that the get_last_session_id() API was introduced, I should use that instead │ - session_id = serialize.deserialize_session_id(alexgames.read_stored_data(SESSION_ID_KEY)) │ - serialized_state = alexgames.read_stored_data(SAVED_STATE_KEY) │ + if state == nil then │ + print("return 2 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ + return │ end │ │ - -- if we do have some saved state, then deserialize it. │ - -- otherwise, start a new game │ - if serialized_state ~= nil then │ - state.session_id = session_id │ - state.game_state = serialize.deserialize_state(serialized_state) │ - else │ - new_game() │ + for dst_player, player_name in pairs(wait_for_players.players_tentative()) do │ + if dst_player == player then │ + goto next_player │ + end │ + print("Sending state update") │ + local state_msg = "state:" .. serialize.serialize_client_game_state(state, dst_player) │ + alexgames.send_message(player_name, state_msg) │ + ::next_player:: │ end │ +end │ │ - alexgames.enable_evt("key") │ +function new_game(player_count) │ + print(string.format("Starting game with %d players", player_count)) │ + state = core.new_state(player_count, game_size_y, game_size_x, cell_size) │ + win_anim_shown = false │ + g_session_id = alexgames.get_new_session_id() │ end │ │ -local function handle_guess(guess) │ - local rc = core.guess(state.game_state, guess) │ - if rc == core.RC_SUCCESS then │ - save_state(state.game_state) │ - draw.clear_user_input(state.ui_state) │ - local msg = string.format("User guessed \"%s\"", guess) │ - if state.game_state.game_over then │ - if core.user_won(state.game_state) then │ - msg = msg .. string.format(", you win! Correct answer in %d guesses.", #state.game_state.guesses) │ - draw.player_won(state.ui_state) │ - else │ - msg = msg .. string.format(", game over! Correct answer was \"%s\"", state.game_state.word) │ + │ +local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as host") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = false │ + │ + if not state_set then │ + new_game(#players) │ + end │ + send_state_updates_if_host() │ + update() │ +end │ + │ +local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as client") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = true │ + -- TODO only initialize player_state here? │ + state = core.new_state(#players, 20, 20, cell_size) │ + -- no need to draw board here, a state update should soon follow │ +end │ + │ +function handle_msg_received(src, msg) │ + │ + local handled = wait_for_players.handle_msg_received(src, msg) │ + │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ + │ + if handled and header ~= "joined" then │ + return │ + end │ + │ + if header == "state" then │ + --if not is_client and not wait_for_players.is_host_tentative() then │ + -- error("Received state as host") │ + --end │ + serialize.deserialize_client_game_state(state, payload) │ + elseif header == "joined" then │ + print("player_joined") │ + send_state_updates_if_host() │ + elseif header == "player_joined" or │ + header == "player_left" then │ + -- ignore I guess? │ + elseif header == "move" then │ + if not is_client then │ + local m2 = payload:gmatch("(%d+),(%d+),(%d+),(%d+)") │ + if m2 == nil then │ + error(string.format("invalid move payload %s", payload)) │ end │ + local player_str, move_type_str, y_str, x_str = m2() │ + local player = tonumber(player_str) │ + local move_type = tonumber(move_type_str) │ + local y = tonumber(y_str) │ + local x = tonumber(x_str) │ + │ + if player ~= player_name_to_idx[src] then │ + error(string.format("received move for player idx %s from player_name %s (%d)", │ + player, src, player_name_to_idx[src])) │ + end │ + handle_move(state, player, move_type, y, x) │ + send_state_updates_if_host() │ end │ - alexgames.set_status_msg(msg) │ else │ - alexgames.set_status_err(string.format("Invalid guess \"%s\", %s", guess, core.rc_to_str(rc))) │ + error(string.format("Unhandled message %s", header)) │ end │ -end │ │ --- I guess at some point I supported this? │ --- The user_string_input callback could really use an identifier to see what the purpose │ --- of the string is. │ --- For now I'm only using string input for generating custom puzzles. │ ---[[ │ -function handle_user_string_input(user_line, is_cancelled) │ - if not is_cancelled then │ - local guess = user_line │ - handle_guess(guess) │ - draw.draw_state(state.ui_state, state.game_state, 0) │ - end │ + send_state_updates_if_host() │ + update() │ end │ ---]] │ │ │ -function handle_user_clicked(pos_y, pos_x) │ - local word = draw.handle_user_clicked(state.ui_state, state.game_state, pos_y, pos_x) │ - if word then │ - handle_guess(word) │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ + if handled then │ + return │ end │ - draw.draw_state(state.ui_state, state.game_state, 0) │ end │ │ -function handle_key_evt(evt_id, key_code) │ - --print(string.format("handle_key_evt(%s, %s)", evt_id, key_code)) │ - local key_info = draw.handle_key_evt(state.ui_state, state.game_state, evt_id, key_code) │ - if key_info.guess_word ~= nil then │ - handle_guess(key_info.guess_word) │ +function handle_game_option_evt(game_opt_id, value) │ + if game_opt_id == GAME_OPT_NEW_GAME then │ + new_game(#players) │ + update() │ end │ - draw.draw_state(state.ui_state, state.game_state, 0) │ - return key_info.handled │ end │ │ -local function handle_action(action) │ - if action == nil then │ - -- do nothing │ - elseif action == draw.ACTION_NEW_GAME then │ - new_game() │ - internal_draw_board(0) │ - elseif action == draw.ACTION_CUSTOM_PUZZLE then │ - prompt_custom_puzzle() │ - -- TODO │ +function get_state() │ + return serialize.serialize_state(state) │ +end │ + │ +-- TODO need proper state saving │ + │ +draw.init(480, 480, cell_size) │ + │ +function start_game(session_id, state_serialized) │ + if state_serialized ~= nil then │ + g_session_id = session_id │ + state = serialize.deserialize_state(state_serialized) │ + state_set = true │ else │ - error(string.format("Unhandled action %s", action)) │ + local last_sess_id = alexgames.get_last_session_id() │ + if last_sess_id ~= nil then │ + state_serialized = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ + g_session_id = last_sess_id │ + state = serialize.deserialize_state(state_serialized) │ + state_set = true │ + end │ end │ -end │ + wait_for_players.init(players, player, start_host_game, start_client_game) │ │ -function handle_btn_clicked(btn_id) │ - local action = draw.handle_btn_pressed(state.game_state, state.ui_state, btn_id) │ - handle_action(action) │ -end │ + alexgames.enable_evt("mouse_move") │ + alexgames.enable_evt("mouse_updown") │ + alexgames.enable_evt("mouse_alt_updown") │ + alexgames.enable_evt("touch") │ + alexgames.enable_evt("wheel") │ + │ + alexgames.add_game_option(GAME_OPT_NEW_GAME, { │ + type = alexgames.OPTION_TYPE_BTN, │ + label = "New Game" │ + }) │ + │ + -- Kind of sucks that I only need this timer for measuring touch/mouse down time. │ + -- Would be ideal if I could just set a 300 ms one off timer? │ + alexgames.set_timer_update_ms(50) │ │ -function handle_popup_btn_clicked(popup_id, btn_id) │ - local action = draw.handle_popup_btn_pressed(state.game_state, state.ui_state, popup_id, btn_id) │ - handle_action(action) │ end │ -local serialize = {} │ │ -local serialize_lib = require("libs/serialize/serialize") │ +local draw = {} │ │ -local core = require("games/word_mastermind/word_mastermind_core") │ +local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ │ -serialize.version = 1 │ +local cell_size = 35 │ │ -function serialize.serialize_state(state) │ - if state == nil then return nil end │ - local output = "" │ +local MINE_COUNT_TO_IMG_ID_MAP = { │ + [0] = 'minesweeper_box_empty', │ + [1] = 'minesweeper_box1', │ + [2] = 'minesweeper_box2', │ + [3] = 'minesweeper_box3', │ + [4] = 'minesweeper_box4', │ + [5] = 'minesweeper_box5', │ + [6] = 'minesweeper_box6', │ + [7] = 'minesweeper_box7', │ + [8] = 'minesweeper_box8', │ +} │ │ - output = output .. serialize_lib.serialize_byte(serialize.version) │ +local FLAGGED_TO_IMG_ID_MAP = { │ + [1] = 'minesweeper_box_flagged_red', │ + [2] = 'minesweeper_box_flagged_blue', │ +} │ │ - output = output .. serialize_lib.serialize_byte(state.max_guesses) │ - output = output .. serialize_lib.serialize_string(state.word) │ - output = output .. serialize_lib.serialize_16bit(#state.guesses) │ - for _, guess in ipairs(state.guesses) do │ - output = output .. serialize_lib.serialize_string(guess.word) │ - end │ +local BACKGROUND_COLOUR = '#bbbbbb' │ +local TEXT_COLOUR = '#000000' │ +--local TEXT_BACKGROUND_COLOUR = '#ffffffbb' │ +local TEXT_BACKGROUND_COLOUR = '#bbbbbbbb' │ +local TEXT_FONT_SIZE = 18 │ │ - return output │ +draw.draw_flag_flash = false │ + │ +local board_width = nil │ +local board_height = nil │ + │ +local g_victory_anim_timer = nil │ +local anim_state = draw_celebration_anim.new_state({ │ +}) │ + │ +local function cell_to_img_id(cell) │ + if not cell.revealed then │ + if cell.flagged_by_player == nil then │ + return 'minesweeper_box_unclicked' │ + else │ + local flag_img = FLAGGED_TO_IMG_ID_MAP[cell.flagged_by_player] │ + if flag_img == nil then │ + error(string.format("flagged_by_player %s not found in map", cell.flagged_by_player)) │ + end │ + return flag_img │ + end │ + elseif cell.has_mine then │ + return 'minesweeper_mine' │ + else │ + local img_id = MINE_COUNT_TO_IMG_ID_MAP[cell.touching_mine_count] │ + if img_id == nil then │ + error(string.format("touching_mine_count %s not found in map", cell.touching_mine_count)) │ + end │ + return img_id │ + end │ end │ │ -function serialize.deserialize_state(bytes) │ - if bytes == nil then return nil end │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ +function draw.init(board_width_arg, board_height_arg, cell_size_arg) │ + board_width = board_width_arg │ + board_height = board_height_arg │ + cell_size = cell_size_arg │ +end │ │ - local version = serialize_lib.deserialize_byte(bytes) │ +function draw.update(dt_ms) │ + draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ +end │ │ - if version ~= serialize.version then │ - error(string.format("can't deserialize state: received version %d, this implementation version is %d", version, serialize.version)) │ +function draw.draw_state(state, player) │ + alexgames.draw_clear() │ + if state == nil or state.game == nil then │ + return │ end │ + alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, board_width, board_height) │ + -- TODO only draw cells that are (partially or fully) visible │ + for y, row in ipairs(state.game.board) do │ + for x, cell in ipairs(row) do │ + local offset_y = state.players[player].offset_y │ + local offset_x = state.players[player].offset_x │ │ - local partial_state = {} │ - partial_state.max_guesses = serialize_lib.deserialize_byte(bytes) │ - partial_state.word = serialize_lib.deserialize_string(bytes) │ - partial_state.guesses = {} │ - local guess_count = serialize_lib.deserialize_16bit(bytes) │ - for i=1,guess_count do │ - table.insert(partial_state.guesses, serialize_lib.deserialize_string(bytes)) │ + local pos_y = (y-1)*cell_size - offset_y │ + local pos_x = (x-1)*cell_size - offset_x │ + │ + local zoom_fact = state.players[player].zoom_fact │ + │ + pos_y = math.floor(pos_y * zoom_fact) │ + pos_x = math.floor(pos_x * zoom_fact) │ + │ + local actual_cell_size = math.floor(cell_size * zoom_fact) │ + │ + local in_range = true │ + if pos_y + actual_cell_size <= 0 or │ + pos_x + actual_cell_size <= 0 or │ + pos_y >= board_height or │ + pos_x >= board_width then │ + in_range = false │ + end │ + │ + if in_range then │ + draw_more.draw_graphic_ul(cell_to_img_id(cell), │ + pos_y, pos_x, │ + actual_cell_size, actual_cell_size) │ + end │ + end │ end │ │ - local state = core.new_game(#partial_state.word, partial_state.max_guesses, partial_state.word) │ - for guess_idx, guess in ipairs(partial_state.guesses) do │ - core.force_guess(state, guess) │ + local text_height = 30 │ + local player_text_width = 165 │ + local text_padding = 10 │ + alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ + board_height - #state.players*text_height - text_padding, │ + board_width - player_text_width - text_padding, │ + board_height, board_width) │ + for i=0,#state.players-1 do │ + local player_idx = #state.players - i │ + alexgames.draw_text(string.format("Player %d: %4d", player_idx, state.players[player_idx].score), │ + TEXT_COLOUR, │ + board_height - i * text_height - text_padding, │ + board_width - text_padding, │ + TEXT_FONT_SIZE, │ + -1) │ + │ end │ │ - return state │ + local mines_text_width = 115 │ + alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ + board_height - text_height - text_padding, │ + 0, │ + board_height, mines_text_width + text_padding) │ + alexgames.draw_text(string.format("Mines: %3d", state.game.mines_unrevealed), │ + TEXT_COLOUR, │ + board_height - text_padding, │ + text_padding, │ + TEXT_FONT_SIZE, │ + alexgames.TEXT_ALIGN_LEFT) │ + │ + if draw.draw_flag_flash then │ + alexgames.draw_rect('#ffffff88', 0, 0, 480, 480) │ + draw.draw_flag_flash = false │ + end │ + draw_celebration_anim.draw(anim_state) │ + alexgames.draw_refresh() │ end │ │ -function serialize.serialize_session_id(bytes) │ - return serialize_lib.serialize_s32(bytes) │ +function draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + local zoom_fact = state.players[player].zoom_fact │ + return { │ + y = 1 + math.floor((state.players[player].offset_y + pos_y/zoom_fact)/cell_size), │ + x = 1 + math.floor((state.players[player].offset_x + pos_x/zoom_fact)/cell_size), │ + } │ end │ │ -function serialize.deserialize_session_id(bytestr) │ - if bytestr == nil then │ - return nil │ +function draw.victory_animation(fps) │ + print("setting timer") │ + if g_victory_anim_timer ~= nil then │ + error(string.format("victory_animation: anim_timer is not nil")) │ end │ - bytes = serialize_lib.bytestr_to_byteary(bytestr) │ - return serialize_lib.deserialize_s32(bytes) │ + g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ + draw_celebration_anim.fireworks_display(anim_state, { │ + colour_pref = "light", │ + on_finish = function () │ + if g_victory_anim_timer == nil then │ + alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ + else │ + alexgames.delete_timer(g_victory_anim_timer) │ + g_victory_anim_timer = nil │ + end │ + --print("animation finished! Resuming timer") │ + --alexgames.set_timer_update_ms(0) │ + --alexgames.set_timer_update_ms(1000/60) │ + end, │ + }) │ end │ │ -return serialize │ -local core = {} │ │ -local words_lib = require("libs/words") │ │ -local LANGUAGE = "en" -- TODO get from state │ +return draw │ │ -core.LETTER_UNUSED = 1 │ -core.LETTER_PRESENT_IN_WORD = 2 │ -core.LETTER_PRESENT_IN_POS = 3 │ -core.LETTER_UNKNOWN = 4 │ +local core = require("games/minesweeper_life/minesweeper_life_core") │ +local draw = require("games/minesweeper_life/minesweeper_draw") │ +local serialize = require("games/minesweeper_life/minesweeper_serialize") │ │ -core.RC_SUCCESS = 0 │ -core.RC_WRONG_GUESS_LEN = -1 │ -core.RC_NOT_VALID_WORD = -2 │ +local wait_for_players = require("libs/multiplayer/wait_for_players") │ +local show_buttons_popup = require("libs/ui/show_buttons_popup") │ │ -VALID_GUESS_FREQ = 1e-8 │ -VALID_SECRET_WORD_FREQ = 1e-6 │ +local alexgames = require("alexgames") │ │ -local ERR_MSGS = { │ - [core.RC_WRONG_GUESS_LEN] = "Guess not correct length", │ - [core.RC_NOT_VALID_WORD] = "Guess is not in dictionary", │ +-- TODO add: │ +-- * vibrate phone when flag has appeared? Show red circle so user knows when flag appears │ +-- even if it is covered by their finger? │ +-- │ +-- TODO for multiplayer: │ +-- * TODO add a graphic for "cell is loading". For now it is probably fine to just leave it as unclicked because │ +-- of the low latency. (Actually, even on my LAN, I see a decent bit of latency when hosting on my phone and │ +-- using my laptop as a client.) │ +-- * animate points appearing over where you click │ + │ + │ +-- maximum y or x distance that a player can move their finger/mouse before their gesture is no longer │ +-- interpreted as a click │ +local MAX_CLICK_MOVE = 2 │ + │ +local game_size_y = 20 │ +local game_size_x = 20 │ + │ +local player = 1 │ +local player_count = 1 │ +local cell_size = core.cell_size │ +-- TODO initialize player state but not game state │ +local state = core.new_state(player_count, game_size_y, game_size_x, cell_size, core.DEFAULT_MINE_PORTION) │ +local win_anim_shown = false │ +local state_set = false │ +local g_session_id = alexgames.get_new_session_id() │ +local g_multiplayer_init = false │ + │ +--local state = nil │ +local user_input_down = false │ +local user_input_down_timer_fired = false │ +local user_input_down_time = nil │ +local user_input_moved = false │ + │ +-- These are only set on touchdown │ +local user_input_pos_y = nil │ +local user_input_pos_x = nil │ + │ +-- These are updated on touchdown and touchmove events │ +local user_input_pos_move_y = nil │ +local user_input_pos_move_x = nil │ + │ +local user_input2_pos_move_y = nil │ +local user_input2_pos_move_x = nil │ +local user_init_touch_dist = nil │ +local user_offset_y = 0 │ +local user_offset_x = 0 │ +local active_touch = nil │ +local active_touch2 = nil │ + │ +local players = { │ + [1] = "You", │ } │ +local player = 1 │ +local is_client = false │ +local player_name_to_idx = {} │ │ -function core.dict_ready() │ - return words_lib.is_ready() │ +local GAME_OPT_NEW_GAME = "game_opt_new_game" │ + │ + │ +local USER_INPUT_DOWN_TIME_THRESHOLD_MS = 300 │ + │ +local POPUP_ID_LEVEL_SEL = "popup_level_sel" │ + │ +local DIFFICULTY_EASY = 0 │ +local DIFFICULTY_MEDIUM = 1 │ +local DIFFICULTY_HARD = 2 │ + │ +local levels = { │ + { label = "Single moving structure", premade = 1 }, │ + { label = "Many moving structures", premade = 5 }, │ + { label = "Single High entropy shape", premade = 6 }, │ + { label = "Many high entropy shapes", premade = 2 }, │ + { label = "Five period oscillator", premade = 3 }, │ + { label = "16 period oscillator", premade = 4 }, │ + │ + { label = "", portion = 0.25 }, │ + { label = "", portion = 0.30 }, │ + { label = "", portion = 0.35 }, │ + { label = "", portion = 0.45 }, │ + { label = "", portion = 0.45 }, │ + { label = "", portion = 0.55 }, │ + { label = "", portion = 0.65 }, │ + { label = "", portion = 0.75 }, │ +} │ + │ +local difficulty_btns = {} │ +for _, level in ipairs(levels) do │ + local output = "" │ + if #level.label > 0 then │ + output = level.label .. " " │ + end │ + if level.portion then │ + output = output .. string.format("Random (%.0f%% mines)", level.portion*100) │ + end │ + │ + if level.premade then │ + output = output .. string.format("Premade puzzle %d", level.premade) │ + end │ + table.insert(difficulty_btns, output) │ end │ │ -function core.rc_to_str(rc) │ - return ERR_MSGS[rc] │ +local function prompt_level() │ + show_buttons_popup.show_popup(POPUP_ID_LEVEL_SEL, │ + "Select Puzzle Type", │ + "Select a puzzle type", │ + difficulty_btns) │ end │ │ -local function get_random_word(len) │ - return words_lib.get_random_word(LANGUAGE, VALID_SECRET_WORD_FREQ, len) │ + │ +local function handle_move_client(state, player, move, y, x) │ + local msg = string.format("move:%d,%d,%d,%d", player, move, y, x) │ + -- TODO only message the host in the future? │ + alexgames.send_message("all", msg) │ + return core.RC_SUCCESS │ end │ │ -local function get_possib_word_count(len) │ - return words_lib.get_possib_word_count(LANGUAGE, VALID_SECRET_WORD_FREQ, len) │ +local function handle_move(state, player, move, y, x) │ + local rc = nil │ + if is_client then │ + rc = handle_move_client(state, player, move, y, x) │ + else │ + rc = core.handle_move(state, player, move, y, x) │ + end │ + local state_serialized = serialize.serialize_state(state) │ + if move == core.MOVE_FLAG_CELL then │ + draw.draw_flag_flash = true │ + end │ + alexgames.save_state(g_session_id, state_serialized) │ + │ + if core.is_game_over(state) and not win_anim_shown then │ + print('alex showing victory animation') │ + win_anim_shown = true │ + draw.victory_animation(60) │ + end │ end │ │ +local function check_for_input_time_done() │ + if not user_input_down then │ + return │ + end │ │ -local function is_valid_word(word) │ - return words_lib.is_valid_word(LANGUAGE, word) │ + local time_diff = alexgames.get_time_ms() - user_input_down_time │ + if user_input_down and │ + time_diff >= USER_INPUT_DOWN_TIME_THRESHOLD_MS and │ + not user_input_moved and │ + not user_input_down_timer_fired then │ + user_input_down_timer_fired = true │ + local cell_coords = draw.pos_to_cell_coords(state, player, user_input_pos_y, user_input_pos_x) │ + handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ + send_state_updates_if_host() │ + update() │ + end │ end │ │ -function core.init_lib() │ - words_lib.init(LANGUAGE) │ +-- TODO change update to some "update_evt" or something │ +function update(dt_ms) │ + if dt_ms ~= nil then │ + draw.update(dt_ms) │ + end │ + draw.draw_state(state, player) │ + check_for_input_time_done() │ end │ │ -function core.new_game(word_len, max_guesses, word) │ - local state = { │ - word_len = word_len, │ - max_guesses = max_guesses, │ - possible_words = nil, │ - word = nil, │ - guesses = {}, │ - letter_states = {}, │ - game_over = false, │ - } │ - if word == nil then │ - --print(string.format("Got random word: %q", state.word)) │ - state.word = get_random_word(word_len) │ +local function handle_user_input_down(pos_y, pos_x) │ + user_input_down_time = alexgames.get_time_ms() │ + user_input_down = true │ + user_input_moved = false │ + user_input_down_timer_fired = false │ + user_input_pos_y = pos_y │ + user_input_pos_x = pos_x │ + user_input_pos_move_y = pos_y │ + user_input_pos_move_x = pos_x │ + user_offset_y = state.players[player].offset_y │ + user_offset_x = state.players[player].offset_x │ +end │ + │ +local function handle_user_input_release(pos_y, pos_x, cancel) │ + if not cancel and not user_input_moved and not user_input_down_timer_fired then │ + local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + local time_diff = alexgames.get_time_ms() - user_input_down_time │ + local move_type = nil │ + if time_diff <= USER_INPUT_DOWN_TIME_THRESHOLD_MS then │ + move_type = core.MOVE_CLICK_CELL │ + else │ + move_type = core.MOVE_FLAG_CELL │ + end │ + handle_move(state, player, move_type, cell_coords.y, cell_coords.x) │ + update() │ + send_state_updates_if_host() │ + end │ + user_input_down = false │ + user_input_down_timer_fired = false │ +end │ + │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + if evt_id == alexgames.MOUSE_EVT_DOWN then │ + handle_user_input_down(pos_y, pos_x) │ + elseif evt_id == alexgames.MOUSE_EVT_UP then │ + handle_user_input_release(pos_y, pos_x, false) │ + elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ + handle_user_input_release(pos_y, pos_x, true) │ + elseif evt_id == alexgames.MOUSE_EVT_ALT_DOWN then │ + local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ else │ - word = string.lower(word) │ - state.word = word │ + print(string.format('unhandled evt_id %s', evt_id)) │ end │ - state.possible_words = get_possib_word_count(word_len) │ +end │ │ - print(string.format("There are %d possible words of length %d in this dictionary", │ - state.possible_words, word_len)) │ +local function handle_user_input_move(pos_y, pos_x) │ + if user_input_down and ( │ + math.abs(user_input_pos_y - pos_y) > MAX_CLICK_MOVE or │ + math.abs(user_input_pos_x - pos_x) > MAX_CLICK_MOVE) then │ + user_input_moved = true │ + end │ + if user_input_down then │ + local offset_adj_y = user_input_pos_y - pos_y │ + local offset_adj_x = user_input_pos_x - pos_x │ + user_input_pos_move_y = pos_y │ + user_input_pos_move_x = pos_x │ + core.adjust_offset(state, player, │ + math.floor(user_offset_y + offset_adj_y), │ + math.floor(user_offset_x + offset_adj_x)) │ + update() │ + end │ +end │ │ - return state │ +function handle_mousemove(pos_y, pos_x) │ + handle_user_input_move(pos_y, pos_x) │ end │ │ -local function get_word_letter_scores(answer, guess) │ - local word_len = #answer │ - if #guess ~= word_len then │ - error("answer and guess must have some number of letters", 2) │ +function handle_user_clicked() │ +end │ + │ +local function get_touch_dist() │ + local dy = user_input2_pos_move_y - user_input_pos_move_y │ + local dx = user_input2_pos_move_x - user_input_pos_move_x │ + return math.sqrt(dy*dy + dx*dx) │ +end │ + │ +function handle_touch_evt(evt_id, changed_touches) │ + for _, touch in ipairs(changed_touches) do │ + if evt_id == 'touchstart' then │ + if active_touch == nil then │ + active_touch = touch.id │ + handle_user_input_down(touch.y, touch.x) │ + elseif active_touch2 == nil then │ + active_touch2 = touch.id │ + user_input_moved = true │ + user_input2_pos_move_y = touch.y │ + user_input2_pos_move_x = touch.x │ + user_init_touch_dist = get_touch_dist() │ + init_zoom = core.get_zoom_fact(state, player) │ + end │ + elseif evt_id == 'touchmove' then │ + │ + if active_touch == touch.id then │ + handle_user_input_move(touch.y, touch.x) │ + end │ + │ + if active_touch2 ~= nil then │ + if active_touch2 == touch.id then │ + user_input2_pos_move_y = touch.y │ + user_input2_pos_move_x = touch.x │ + end │ + local touch_dist_fact = get_touch_dist() / user_init_touch_dist │ + local zoom_fact = init_zoom * touch_dist_fact │ + --alexgames.set_status_msg( │ + -- string.format("Touch dist fact is %.3f, dist=%.0f, orig=%.0f", │ + -- touch_dist_fact, get_touch_dist(), user_init_touch_dist)) │ + core.set_zoom_fact(state, player, zoom_fact) │ + end │ + │ + elseif evt_id == 'touchend' or │ + evt_id == 'touchcancel' then │ + local is_cancel = (evt_id == 'touchcancel') │ + if active_touch == touch.id then │ + handle_user_input_release(touch.y, touch.x, is_cancel) │ + active_touch = nil │ + elseif active_touch2 == touch.id then │ + active_touch2 = nil │ + end │ + end │ end │ - local letter_scores = {} │ - for _=1,word_len do │ - table.insert(letter_scores, core.LETTER_UNUSED) │ +end │ + │ +function handle_wheel_changed(dy, dx) │ + print(string.format("handle_wheel(dy=%s, dx=%s)", dy, dx)) │ + │ + local zoom_fact = core.get_zoom_fact(state, player) │ + │ + zoom_fact = zoom_fact + -dy/114 * 0.1 │ + │ + core.set_zoom_fact(state, player, zoom_fact) │ + │ + update() │ +end │ + │ +function send_state_updates_if_host() │ + print("send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ + if is_client and not wait_for_players.is_host_tentative() then │ + print("return 1 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ + return │ end │ │ - local answer_letter_counts = {} │ - for i=1,word_len do │ - if answer:sub(i,i) == guess:sub(i,i) then │ - letter_scores[i] = core.LETTER_PRESENT_IN_POS │ - else │ - if answer_letter_counts[answer:sub(i,i)] == nil then │ - answer_letter_counts[answer:sub(i,i)] = 0 │ - end │ - answer_letter_counts[answer:sub(i,i)] = answer_letter_counts[answer:sub(i,i)] + 1 │ + if state == nil then │ + print("return 2 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ + return │ + end │ + │ + for dst_player, player_name in pairs(wait_for_players.players_tentative()) do │ + if dst_player == player then │ + goto next_player │ end │ + print("Sending state update") │ + local state_msg = "state:" .. serialize.serialize_client_game_state(state, dst_player) │ + alexgames.send_message(player_name, state_msg) │ + ::next_player:: │ end │ +end │ │ - for i=1,word_len do │ - if answer:sub(i,i) ~= guess:sub(i,i) then │ - local count = answer_letter_counts[guess:sub(i,i)] │ - if count ~= nil and count > 0 then │ - letter_scores[i] = core.LETTER_PRESENT_IN_WORD │ - answer_letter_counts[guess:sub(i,i)] = answer_letter_counts[guess:sub(i,i)] - 1 │ +function apply_shape(state, shape, y, x) │ + for dy=0,#shape-1 do │ + for dx=0,#shape[1]-1 do │ + if y+dy < state.game.height and │ + x+dx < state.game.width then │ + state.game.board[y+dy][x+dx].has_mine = (shape[1+dy][1+dx] > 0) │ end │ end │ end │ │ - return letter_scores │ end │ │ +function new_game(player_count, level) │ + print(string.format("Starting game with %d players, level %d", player_count, level)) │ + local puzzle_info = levels[level+1] │ + if not puzzle_info.premade then │ + local mine_portion = puzzle_info.portion │ + print(string.format("Initializing game with mine portion %.0f%% (level idx %d)", mine_portion*100, level)) │ + alexgames.set_status_msg(string.format("Initializing game with mine portion %.0f%%", mine_portion*100)) │ + state = core.new_state(player_count, game_size_y, game_size_x, cell_size, mine_portion) │ + elseif puzzle_info.premade == 1 or puzzle_info.premade == 5 then │ + state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ + local shape1 = { │ + { 1, 0, 0}, │ + { 0, 1, 1}, │ + { 1, 1, 0}, │ + } │ │ -local function update_letter_states(state, guess, letter_scores) │ - local word_len = #guess │ - for i=1,word_len do │ - local c = guess:sub(i,i) │ - local c_score = letter_scores[i] │ - if state.letter_states[c] == core.LETTER_PRESENT_IN_POS then │ - goto next_letter │ + if puzzle_info.premade == 1 then │ + apply_shape(state, shape1, 2, 2) │ + elseif puzzle_info.premade == 5 then │ + local delta = 5 │ + for i=0,8 do │ + for y=1,game_size_y,delta do │ + apply_shape(state, shape1, y + delta*i, 2 + delta*i) │ + end │ + end │ + │ + local shape2 = { │ + { 0, 1, 1}, │ + { 1, 1, 0}, │ + { 0, 0, 1}, │ + } │ + │ + local delta = 5 │ + for i=0,8 do │ + apply_shape(state, shape2, 2 + delta*i, 16 + delta*i) │ + apply_shape(state, shape2, 2 + delta*i, 11 + delta*i) │ + end │ end │ │ - if c_score == core.LETTER_PRESENT_IN_POS then │ - state.letter_states[c] = core.LETTER_PRESENT_IN_POS │ - elseif c_score == core.LETTER_PRESENT_IN_WORD then │ - state.letter_states[c] = core.LETTER_PRESENT_IN_WORD │ - end │ + core.reveal_cell(state, 0, game_size_y, game_size_x) │ │ - if state.letter_states[c] ~= core.LETTER_PRESENT_IN_WORD then │ - if c_score == core.LETTER_UNUSED then │ - state.letter_states[c] = core.LETTER_UNUSED │ + core.get_touching_mine_count(state) │ + elseif puzzle_info.premade == 2 or puzzle_info.premade == 6 then │ + state = core.new_state(player_count, 30, 30, cell_size, 0) │ + shape = { │ + { 0, 1, 1}, │ + { 1, 1, 0}, │ + { 0, 1, 0}, │ + } │ + │ + if puzzle_info.premade == 6 then │ + apply_shape(state, shape, 13, 13) │ + elseif puzzle_info.premade == 2 then │ + for y=4,state.game.height,8 do │ + for x=4,state.game.width,8 do │ + apply_shape(state, shape, y, x) │ + end │ end │ end │ - ::next_letter:: │ + │ + core.reveal_cell(state, 0, 30, 1) │ + │ + core.get_touching_mine_count(state) │ + elseif puzzle_info.premade == 3 then │ + state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ + shape = { │ + { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, │ + { 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0 }, │ + { 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, │ + { 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1 }, │ + { 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, │ + { 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0 }, │ + { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, │ + } │ + │ + apply_shape(state, shape, 3, 3) │ + │ + --core.reveal_cell(state, 0, game_size_y, game_size_x) │ + │ + core.get_touching_mine_count(state) │ + │ + alexgames.set_status_msg("Spoiler: See https://conwaylife.appspot.com/pattern/average for this pattern") │ + elseif puzzle_info.premade == 4 then │ + state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ + shape = { │ + { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0 }, │ + { 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0 }, │ + { 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, │ + { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ + { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 }, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 }, │ + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0 }, │ + { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, │ + { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, │ + { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, │ + } │ + │ + apply_shape(state, shape, 2, 2) │ + │ + core.reveal_cell(state, 0, game_size_y, game_size_x) │ + │ + core.get_touching_mine_count(state) │ + │ + alexgames.set_status_msg("Spoiler: see https://conwaylife.appspot.com/pattern/achimsp16 for this pattern") │ + else │ + error(string.format("Unhandled premade index %s", puzzle_info.premade)) │ end │ + win_anim_shown = false │ + g_session_id = alexgames.get_new_session_id() │ end │ │ -function core.validate_word(state, word_input) │ - local word_len = #state.word │ - if #word_input ~= word_len then │ - print(string.format("Guess length is %d, need length %d", #word_input, word_len)) │ - return core.RC_WRONG_GUESS_LEN │ - end │ │ - if not is_valid_word(word_input) then │ - return core.RC_NOT_VALID_WORD │ +local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as host") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = false │ + │ + if not state_set then │ + prompt_level() │ end │ + send_state_updates_if_host() │ + update() │ +end │ │ - return core.RC_SUCCESS │ +local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as client") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = true │ + -- TODO only initialize player_state here? │ + state = core.new_state(#players, 20, 20, cell_size, core.DEFAULT_MINE_PORTION) -- TODO hacky to include mine portion here, this should never be used... │ + -- no need to draw board here, a state update should soon follow │ end │ │ --- like the normal "guess" call that a player would call, but │ --- without any dictionary checks. This is for loading games from save state. │ -function core.force_guess(state, guess) │ - local letter_scores = get_word_letter_scores(state.word, guess) │ +function handle_msg_received(src, msg) │ │ - update_letter_states(state, guess, letter_scores) │ + local handled = wait_for_players.handle_msg_received(src, msg) │ │ - table.insert(state.guesses, { │ - word = guess, │ - score = letter_scores, │ - }) │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ │ - if state.word == guess or │ - #state.guesses >= state.max_guesses then │ - state.game_over = true │ + if handled and header ~= "joined" then │ + return │ + end │ + │ + if header == "state" then │ + --if not is_client and not wait_for_players.is_host_tentative() then │ + -- error("Received state as host") │ + --end │ + serialize.deserialize_client_game_state(state, payload) │ + elseif header == "joined" then │ + print("player_joined") │ + send_state_updates_if_host() │ + elseif header == "player_joined" or │ + header == "player_left" then │ + -- ignore I guess? │ + elseif header == "move" then │ + if not is_client then │ + local m2 = payload:gmatch("(%d+),(%d+),(%d+),(%d+)") │ + if m2 == nil then │ + error(string.format("invalid move payload %s", payload)) │ + end │ + local player_str, move_type_str, y_str, x_str = m2() │ + local player = tonumber(player_str) │ + local move_type = tonumber(move_type_str) │ + local y = tonumber(y_str) │ + local x = tonumber(x_str) │ + │ + if player ~= player_name_to_idx[src] then │ + error(string.format("received move for player idx %s from player_name %s (%d)", │ + player, src, player_name_to_idx[src])) │ + end │ + handle_move(state, player, move_type, y, x) │ + send_state_updates_if_host() │ + end │ + else │ + error(string.format("Unhandled message %s", header)) │ end │ + │ + send_state_updates_if_host() │ + update() │ end │ │ --- This is what players should call when making a guess (with a full word). │ -function core.guess(state, guess) │ │ - local rc = core.validate_word(state, guess) │ - if rc ~= core.RC_SUCCESS then │ - return rc │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ + if handled then │ + return │ end │ │ - -- TODO add the option to only allow words that fit │ - -- the existing knowledge? │ + if popup_id == POPUP_ID_LEVEL_SEL then │ + new_game(#players, btn_idx) │ + alexgames.hide_popup() │ │ - core.force_guess(state, guess) │ + if not g_multiplayer_init then │ + wait_for_players.init(players, player, start_host_game, start_client_game) │ + end │ + else │ + error(string.format("Unhandled popup id %s", popup_id)) │ + end │ +end │ │ - return core.RC_SUCCESS │ +function handle_game_option_evt(game_opt_id, value) │ + if game_opt_id == GAME_OPT_NEW_GAME then │ + --new_game(#players) │ + prompt_level() │ + update() │ + end │ end │ │ -function core.user_won(state, guess) │ - return #state.guesses > 0 and state.guesses[#state.guesses].word == state.word │ +local function load_state_offset(offset) │ + local ui_states = core.copy_player_ui_states(state) │ + local state_serialized = alexgames.adjust_saved_state_offset(g_session_id, offset) │ + if state_serialized ~= nil then │ + state = serialize.deserialize_state(state_serialized) │ + core.apply_player_ui_states(state, ui_states) │ + draw.draw_state(state, player) │ + end │ end │ │ -local function print_state_pretty(state) │ - for guess_idx=1,state.max_guesses do │ - if guess_idx <= #state.guesses then │ - local guess = state.guesses[guess_idx] │ - for i=1,state.word_len do │ - if guess.score[i] == core.LETTER_PRESENT_IN_WORD then │ - io.write("\27[43;30m") │ - elseif guess.score[i] == core.LETTER_PRESENT_IN_POS then │ - io.write("\27[42;30m") │ - end │ - local c = guess.word:sub(i,i) │ - io.write(" " .. c .. " ") │ - io.write("\27[0m") │ - io.write(" ") │ - end │ - io.write("\n") │ +function handle_btn_clicked(btn_id) │ + if btn_id == draw.BTN_ID_UNDO then │ + load_state_offset(-1) │ + elseif btn_id == draw.BTN_ID_REDO then │ + load_state_offset(1) │ + end │ +end │ + │ +function get_state() │ + return serialize.serialize_state(state) │ +end │ + │ +-- TODO need proper state saving │ + │ +draw.init(480, 480, cell_size) │ + │ +function start_game(session_id, state_serialized) │ + if state_serialized ~= nil then │ + g_session_id = session_id │ + state = serialize.deserialize_state(state_serialized) │ + state_set = true │ + else │ + local last_sess_id = alexgames.get_last_session_id() │ + if last_sess_id ~= nil then │ + state_serialized = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ + g_session_id = last_sess_id │ + state = serialize.deserialize_state(state_serialized) │ + state_set = true │ + end │ + end │ + │ + if state_serialized ~= nil then │ + wait_for_players.init(players, player, start_host_game, start_client_game) │ + g_multiplayer_init = true │ + else │ + prompt_level() │ + end │ + │ + alexgames.enable_evt("mouse_move") │ + alexgames.enable_evt("mouse_updown") │ + alexgames.enable_evt("mouse_alt_updown") │ + alexgames.enable_evt("touch") │ + alexgames.enable_evt("wheel") │ + │ + alexgames.add_game_option(GAME_OPT_NEW_GAME, { │ + type = alexgames.OPTION_TYPE_BTN, │ + label = "New Game" │ + }) │ + │ + -- Kind of sucks that I only need this timer for measuring touch/mouse down time. │ + -- Would be ideal if I could just set a 300 ms one off timer? │ + alexgames.set_timer_update_ms(50) │ + │ +end │ +local serialize = {} │ + │ +local bit_pack = require("libs/serialize/bit_pack") │ +local core = require("games/minesweeper_life/minesweeper_life_core") │ + │ +serialize.VERSION = 1 │ +local serialize_lib = require("libs/serialize/serialize") │ + │ +local function serialize_cell_for_client(cell) │ + if not cell.revealed then │ + if cell.flagged_by_player == nil then return 0 │ + else return 10 + cell.flagged_by_player end │ + else │ + if cell.has_mine then return 10 │ else │ - for i=1,state.word_len do │ - io.write("___ ") │ + if cell.touching_mine_count > 0 then │ + return cell.touching_mine_count │ + else │ + return 9 │ end │ - io.write("\n") │ end │ end │ +end │ │ - print("") │ - │ - local keyboard = { │ - "qwertyuiop", │ - "asdfghjkl", │ - "zxcvbnm", │ +local function client_deserialize_cell(bytes) │ + local byte = table.remove(bytes, 1) │ + byte = string.byte(byte) │ + local cell = { │ + revealed = false, │ + has_mine = false, │ + flagged_by_player = nil, │ + touching_mine_count = nil, │ } │ + if byte == 0 then │ + -- pass │ + elseif 11 <= byte and byte <= 14 then │ + cell.flagged_by_player = byte - 10 │ + elseif byte == 10 then │ + cell.revealed = true │ + cell.has_mine = true │ + elseif byte == 9 then │ + cell.revealed = true │ + cell.touching_mine_count = 0 │ + elseif 1 <= byte and byte <= 8 then │ + cell.revealed = true │ + cell.touching_mine_count = byte │ + else │ + error(string.format("unexpected serialized cell byte=%s", byte)) │ + end │ │ - for row_idx, keyboard_row in ipairs(keyboard) do │ - for i=0,row_idx-2 do │ - io.write(" ") │ + return cell │ +end │ + │ +function serialize.serialize_client_game_state(state, player) │ + local game_state = state.game │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(#state.players) │ + output = output .. serialize_lib.serialize_16bit(game_state.width) │ + output = output .. serialize_lib.serialize_16bit(game_state.height) │ + for i=1,#state.players do │ + local player_state = state.players[i] │ + output = output .. serialize_lib.serialize_s32(player_state.score) │ + end │ + for y=1,game_state.height do │ + for x=1,game_state.width do │ + local serialized_cell = serialize_cell_for_client(game_state.board[y][x]) │ + output = output .. serialize_lib.serialize_byte(serialized_cell) │ end │ - for i=1,#keyboard_row do │ - local c = keyboard_row:sub(i,i) │ - local key_state = state.letter_states[c] │ - if key_state == core.LETTER_PRESENT_IN_WORD then │ - io.write("\27[43;30m") │ - elseif key_state == core.LETTER_PRESENT_IN_POS then │ - io.write("\27[42;30m") │ - elseif key_state == core.LETTER_UNUSED then │ - c = ' ' │ - end │ - io.write(c) │ - io.write("\27[0m") │ - io.write(" ") │ + end │ + return output │ +end │ + │ +function serialize.deserialize_client_game_state(state, bytes) │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + local game_state = state.game │ + local player_count = serialize_lib.deserialize_byte(bytes) │ + game_state.width = serialize_lib.deserialize_16bit(bytes) │ + game_state.height = serialize_lib.deserialize_16bit(bytes) │ + for i=1,player_count do │ + if state.players[i] == nil then │ + error(string.format("player idx %d not in map when len %d", i, #state.players)) │ + end │ + state.players[i].score = serialize_lib.deserialize_s32(bytes) │ + end │ + game_state.board = {} │ + for y=1,game_state.height do │ + game_state.board[y] = {} │ + for x=1,game_state.width do │ + game_state.board[y][x] = client_deserialize_cell(bytes) │ end │ - io.write("\n") │ end │ + return game_state │ end │ │ -local function example_main_loop() │ - local word_len = 5 │ - local max_guesses = 6 │ +local function serialize_cell_concise(cell) │ + local val = 0 │ + if cell.flagged_by_player ~= nil then val = val | 0x4 end │ + if cell.revealed then val = val | 0x2 end │ + if cell.has_mine then val = val | 0x1 end │ │ - local state = core.new_game(word_len, max_guesses) │ + return val │ +end │ │ - while true do │ - ::new_guess:: │ - io.write("Enter a guess: ") │ - local guess = io.read("*l") │ - guess = guess:gsub("%s+", "") │ - io.write("\n\n") │ - │ - local rc = core.guess(state, guess) │ - if rc ~= core.RC_SUCCESS then │ - --print(string.format("Error %d", rc)) │ - print(core.rc_to_str(rc)) │ - goto new_guess │ +local function deserialize_cell_concise(val) │ + local cell = {} │ + cell.flagged_by_player = (val & 0x4) > 0 │ + if cell.flagged_by_player then │ + cell.flagged_by_player = 1 │ + else │ + cell.flagged_by_player = nil │ + end │ + cell.revealed = (val & 0x2) > 0 │ + cell.has_mine = (val & 0x1) > 0 │ + return cell │ +end │ + │ +local function serialize_cells_concise(cells) │ + local cells_3bits = {} │ + for y=1,#cells do │ + for x=1,#cells[1] do │ + table.insert(cells_3bits, serialize_cell_concise(cells[y][x])) │ end │ + end │ │ - print_state_pretty(state) │ + return bit_pack.pack(cells_3bits, 3) │ +end │ │ - if state.game_over then │ - if state.guesses[#state.guesses].word ~= state.word then │ - print(string.format("Game over! The word was \"%s\"", state.word)) │ - else │ - print(string.format("You guessed the word in %d guesses.", #state.guesses)) │ - end │ - break │ +local function deserialize_cells_concise(cells_bytes) │ + local cells = {} │ + for y=1,#cells_bytes do │ + local row = {} │ + for x=1,#cells_bytes[1] do │ + table.insert(row, deserialize_cell_concise(cells_bytes[y][x])) │ end │ + table.insert(cells, row) │ + end │ + return cells │ +end │ + │ +local function unflatten(cells_flat, height, width) │ + local cells = {} │ + for y=1,height do │ + local row = {} │ + for x=1,width do │ + table.insert(row, cells_flat[(y-1)*width + x] ) │ + end │ + table.insert(cells, row) │ end │ + return cells │ +end │ │ │ +function serialize.serialize_state(state) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ + output = output .. serialize_lib.serialize_byte(state.game.height) │ + output = output .. serialize_lib.serialize_byte(state.game.width) │ + output = output .. serialize_lib.serialize_bytes(serialize_cells_concise(state.game.board)) │ + return output │ end │ │ --- example_main_loop() │ +function serialize.deserialize_state(bytes) │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + local state = { │ + game = {}, │ + } │ + local version = serialize_lib.deserialize_byte(bytes) │ + if version ~= serialize.VERSION then │ + error(string.format("Can only deserialize state version %d, found %d", serialize.VERSION, version)) │ + end │ + state.game.height = serialize_lib.deserialize_byte(bytes) │ + state.game.width = serialize_lib.deserialize_byte(bytes) │ │ ---local scores = get_word_letter_scores("crane", "creep") │ ---for i, score in ipairs(scores) do │ --- print(string.format("%d: %s", i, score)) │ ---end │ + local cells_flat_bytes_packed = serialize_lib.deserialize_bytes(bytes) │ + local cells_flat_serialized = bit_pack.unpack(cells_flat_bytes_packed, 3) │ + local cells_bytes = unflatten(cells_flat_serialized, state.game.height, state.game.width) │ + state.game.board = deserialize_cells_concise(cells_bytes) │ + │ + core.calc_state_vals(state) │ + │ + state.players = { │ + core.new_player_state(), │ + } │ + │ + return state │ +end │ + │ +return serialize │ │ -return core │ local draw = {} │ │ local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ │ -local core = require("games/word_mastermind/word_mastermind_core") │ +draw.BTN_ID_UNDO = "btn_undo" │ +draw.BTN_ID_REDO = "btn_redo" │ │ -local draw_keyboard = require("libs/draw/draw_keyboard") │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ -local draw_shapes = require("libs/draw/draw_shapes") │ -local show_buttons_popup = require("libs/ui/show_buttons_popup") │ +local cell_size = 35 │ │ -draw.ACTION_NEW_GAME = 1 │ -draw.ACTION_CUSTOM_PUZZLE = 2 │ +local MINE_COUNT_TO_IMG_ID_MAP = { │ + [0] = 'minesweeper_box_empty', │ + [1] = 'minesweeper_box1', │ + [2] = 'minesweeper_box2', │ + [3] = 'minesweeper_box3', │ + [4] = 'minesweeper_box4', │ + [5] = 'minesweeper_box5', │ + [6] = 'minesweeper_box6', │ + [7] = 'minesweeper_box7', │ + [8] = 'minesweeper_box8', │ +} │ │ -local BTN_ID_CUSTOM_PUZZLE = "custom_puzzle" │ -local BTN_ID_NEW_GAME = "new_game" │ +local FLAGGED_TO_IMG_ID_MAP = { │ + [1] = 'minesweeper_box_flagged_red', │ + [2] = 'minesweeper_box_flagged_blue', │ +} │ │ -local POPUP_ID_NEW_GAME_CONFIRM = "popup_new_game_confirm" │ -local POPUP_ID_CUSTOM_PUZZLE_CONFIRM = "popup_custom_puzzle_confirm" │ +local BACKGROUND_COLOUR = '#bbbbbb' │ +local TEXT_COLOUR = '#000000' │ +--local TEXT_BACKGROUND_COLOUR = '#ffffffbb' │ +local TEXT_BACKGROUND_COLOUR = '#bbbbbbbb' │ +local TEXT_FONT_SIZE = 18 │ │ -local OUTLINE_WIDTH = 1 │ -local CHAR_TEXT_COLOUR = '#ffffff' │ -local CHAR_TEXT_COLOUR_UNKNOWN = '#000000' │ -local CHAR_BG_COLOUR_POS_KNOWN = '#008800' │ -local CHAR_BG_COLOUR_CHAR_KNOWN = '#aaaa00' │ -local CHAR_BG_COLOUR_UNUSED = '#444444' │ -local CHAR_BG_COLOUR_UNKNOWN = '#ffffff' │ +draw.draw_flag_flash = false │ │ -if alexgames.get_user_colour_pref() == "dark" or │ - alexgames.get_user_colour_pref() == "very_dark" then │ - CHAR_TEXT_COLOUR = '#888888' │ - CHAR_TEXT_COLOUR_UNKNOWN = '#888888' │ - CHAR_BG_COLOUR_POS_KNOWN = '#003300' │ - CHAR_BG_COLOUR_CHAR_KNOWN = '#333300' │ - CHAR_BG_COLOUR_UNUSED = '#000000' │ - CHAR_BG_COLOUR_UNKNOWN = '#222222' │ +local board_width = nil │ +local board_height = nil │ + │ +local g_victory_anim_timer = nil │ +local anim_state = draw_celebration_anim.new_state({ │ +}) │ + │ +local function cell_to_img_id(cell) │ + if not cell.revealed then │ + if cell.flagged_by_player == nil then │ + return 'minesweeper_box_unclicked' │ + else │ + local flag_img = FLAGGED_TO_IMG_ID_MAP[cell.flagged_by_player] │ + if flag_img == nil then │ + error(string.format("flagged_by_player %s not found in map", cell.flagged_by_player)) │ + end │ + return flag_img │ + end │ + elseif cell.has_mine then │ + return 'minesweeper_mine' │ + else │ + local img_id = MINE_COUNT_TO_IMG_ID_MAP[cell.touching_mine_count] │ + if img_id == nil then │ + error(string.format("touching_mine_count %s not found in map", cell.touching_mine_count)) │ + end │ + return img_id │ + end │ end │ │ -local BG_COLOURS = { │ - [core.LETTER_PRESENT_IN_WORD] = CHAR_BG_COLOUR_CHAR_KNOWN, │ - [core.LETTER_PRESENT_IN_POS] = CHAR_BG_COLOUR_POS_KNOWN, │ - [core.LETTER_UNUSED] = CHAR_BG_COLOUR_UNUSED, │ - [core.LETTER_UNKNOWN] = CHAR_BG_COLOUR_UNKNOWN, │ -} │ +function draw.init(board_width_arg, board_height_arg, cell_size_arg) │ + board_width = board_width_arg │ + board_height = board_height_arg │ + cell_size = cell_size_arg │ │ -local FG_COLOURS = { │ - [core.LETTER_PRESENT_IN_WORD] = CHAR_TEXT_COLOUR, │ - [core.LETTER_PRESENT_IN_POS] = CHAR_TEXT_COLOUR, │ - [core.LETTER_UNUSED] = CHAR_TEXT_COLOUR, │ - [core.LETTER_UNKNOWN] = CHAR_TEXT_COLOUR_UNKNOWN, │ + alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ + alexgames.create_btn(draw.BTN_ID_REDO, "Redo", 1) │ +end │ + │ +function draw.update(dt_ms) │ + draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ +end │ + │ +function draw.draw_state(state, player) │ + alexgames.draw_clear() │ + if state == nil or state.game == nil then │ + return │ + end │ + alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, board_width, board_height) │ + -- TODO only draw cells that are (partially or fully) visible │ + for y, row in ipairs(state.game.board) do │ + for x, cell in ipairs(row) do │ + local offset_y = state.players[player].offset_y │ + local offset_x = state.players[player].offset_x │ + │ + local pos_y = (y-1)*cell_size - offset_y │ + local pos_x = (x-1)*cell_size - offset_x │ + │ + local zoom_fact = state.players[player].zoom_fact │ + │ + pos_y = math.floor(pos_y * zoom_fact) │ + pos_x = math.floor(pos_x * zoom_fact) │ + │ + local actual_cell_size = math.floor(cell_size * zoom_fact) │ + │ + local in_range = true │ + if pos_y + actual_cell_size <= 0 or │ + pos_x + actual_cell_size <= 0 or │ + pos_y >= board_height or │ + pos_x >= board_width then │ + in_range = false │ + end │ + │ + if in_range then │ + draw_more.draw_graphic_ul(cell_to_img_id(cell), │ + pos_y, pos_x, │ + actual_cell_size, actual_cell_size) │ + end │ + end │ + end │ + │ + local text_height = 30 │ + local player_text_width = 165 │ + local text_padding = 10 │ + alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ + board_height - #state.players*text_height - text_padding, │ + board_width - player_text_width - text_padding, │ + board_height, board_width) │ + for i=0,#state.players-1 do │ + local player_idx = #state.players - i │ + alexgames.draw_text(string.format("Player %d: %4d", player_idx, state.players[player_idx].score), │ + TEXT_COLOUR, │ + board_height - i * text_height - text_padding, │ + board_width - text_padding, │ + TEXT_FONT_SIZE, │ + -1) │ + │ + end │ + │ + local mines_text_width = 115 │ + alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ + board_height - text_height - text_padding, │ + 0, │ + board_height, mines_text_width + text_padding) │ + alexgames.draw_text(string.format("Mines: %3d", state.game.mines_unrevealed), │ + TEXT_COLOUR, │ + board_height - text_padding, │ + text_padding, │ + TEXT_FONT_SIZE, │ + alexgames.TEXT_ALIGN_LEFT) │ + │ + if draw.draw_flag_flash then │ + alexgames.draw_rect('#ffffff88', 0, 0, 480, 480) │ + draw.draw_flag_flash = false │ + end │ + draw_celebration_anim.draw(anim_state) │ + alexgames.draw_refresh() │ +end │ + │ +function draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ + local zoom_fact = state.players[player].zoom_fact │ + return { │ + y = 1 + math.floor((state.players[player].offset_y + pos_y/zoom_fact)/cell_size), │ + x = 1 + math.floor((state.players[player].offset_x + pos_x/zoom_fact)/cell_size), │ + } │ +end │ + │ +function draw.victory_animation(fps) │ + print("setting timer") │ + if g_victory_anim_timer ~= nil then │ + error(string.format("victory_animation: anim_timer is not nil")) │ + end │ + g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ + draw_celebration_anim.fireworks_display(anim_state, { │ + colour_pref = "light", │ + on_finish = function () │ + if g_victory_anim_timer == nil then │ + alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ + else │ + alexgames.delete_timer(g_victory_anim_timer) │ + g_victory_anim_timer = nil │ + end │ + --print("animation finished! Resuming timer") │ + --alexgames.set_timer_update_ms(0) │ + --alexgames.set_timer_update_ms(1000/60) │ + end, │ + }) │ +end │ + │ + │ + │ +return draw │ + │ +local core = {} │ + │ +core.INIT_ZOOM_FACT = 0.5 │ + │ +local CELL_COUNT_BORDER_PADDING = 6 │ + │ +local dirs = { │ + {y = 0, x = 1}, │ + {y = 1, x = 1}, │ + {y = 1, x = 0}, │ + {y = 1, x =-1}, │ + {y = 0, x =-1}, │ + {y =-1, x =-1}, │ + {y =-1, x = 0}, │ + {y =-1, x = 1}, │ } │ │ -local TEXT_SIZE = 32 │ -local padding = 10 │ +core.DEFAULT_MINE_PORTION = 0.1 │ │ --- TODO this might be the first game that requires me to increase the height of the canvas │ -local board_width = 480 │ -local board_height = 480 │ │ -local text_start_x = math.floor((board_width - (TEXT_SIZE + padding) * 5)/2) │ -local big_text_size_y = (TEXT_SIZE + padding) * 6 + 2*padding │ +local MIN_MAX_ZOOM_FACT = 3 │ │ -function draw.init() │ - local draw_state = { │ - user_input = {}, │ - anim = draw_celebration_anim.new_state({ │ - on_finish = function () │ - alexgames.set_timer_update_ms(0) │ - end, │ +core.MOVE_FLAG_CELL = 1 │ +core.MOVE_CLICK_CELL = 2 │ + │ +core.RC_SUCCESS = 0 │ +core.RC_OUT_OF_RANGE = -1 │ +core.RC_INVALID_MOVE = -2 │ +core.RC_CAN_NOT_AUTO_REVEAL = -3 │ + │ +local FLAG_MINE_SUCCESS_SCORE = 10 │ +local FLAG_MINE_FAIL_SCORE = -30 │ +local REVEAL_MINE_SCORE = -100 │ +local REVEAL_CELL_SCORE = 1 │ + │ + │ +-- TODO this should be in the draw file only │ +-- apparently I wrote this game before I was used to properly separating the UI and the game logic │ +core.cell_size = 35 │ + │ +local function in_range(state, y, x) │ + return 1 <= y and y <= state.game.height and │ + 1 <= x and x <= state.game.width │ +end │ + │ +-- TODO rename this to "update" │ +function core.get_touching_mine_count(state) │ + │ + for y=1,state.game.height do │ + for x=1,state.game.width do │ + local count = 0 │ + for _,dir in ipairs(dirs) do │ + local y2 = y + dir.y │ + local x2 = x + dir.x │ + if not in_range(state, y2, x2) then │ + goto next_dir │ + end │ + │ + if state.game.board[y2][x2].has_mine then │ + count = count + 1 │ + end │ + ::next_dir:: │ + end │ + state.game.board[y][x].touching_mine_count = count │ + end │ + end │ + │ +end │ + │ +function core.new_player_state() │ + local player_state = { │ + offset_y = 0, │ + offset_x = 0, │ + zoom_fact = core.INIT_ZOOM_FACT, │ + score = 0, │ + } │ + return player_state │ +end │ + │ +function core.copy_player_ui_states(state) │ + local ui_states = {} │ + for _, player in ipairs(state.players) do │ + table.insert(ui_states, { │ + offset_y = player.offset_y, │ + offset_x = player.offset_x, │ + zoom_fact = player.zoom_fact, │ }) │ + end │ + return ui_states │ +end │ + │ +function core.apply_player_ui_states(state, ui_states) │ + for player_idx, player in ipairs(state.players) do │ + player.offset_y = ui_states[player_idx].offset_y │ + player.offset_x = ui_states[player_idx].offset_x │ + player.zoom_fact = ui_states[player_idx].zoom_fact │ + end │ +end │ + │ +local function copy_cell(cell) │ + local new_cell = { │ + has_mine = cell.has_mine, │ + revealed = cell.revealed, │ + flagged_by_player = cell.flagged_by_player, │ + touching_mine_count = cell.touching_mine_count, │ } │ + return new_cell │ +end │ │ - alexgames.create_btn(BTN_ID_CUSTOM_PUZZLE, "New Custom Puzzle", 1) │ - alexgames.create_btn(BTN_ID_NEW_GAME, "New Game", 1) │ +function core.new_state(player_count, game_height, game_width, cell_size, mine_portion) │ + local state = { │ + game = { │ + width = game_width, │ + height = game_height, │ + board = {}, │ + cells_unrevealed = nil, │ + mines_unrevealed = nil, │ + }, │ + players = {}, │ + cell_size = cell_size, │ + } │ │ - return draw_state │ + for y=1,game_height do │ + state.game.board[y] = {} │ + for x=1,game_width do │ + state.game.board[y][x] = {} │ + state.game.board[y][x].has_mine = (math.random() <= mine_portion) │ + state.game.board[y][x].revealed = false │ + state.game.board[y][x].flagged_by_player = nil │ + state.game.board[y][x].touching_mine_count = nil │ + end │ + end │ + │ + for i=1,player_count do │ + state.players[i] = core.new_player_state() │ + end │ + │ + core.calc_state_vals(state) │ + │ + return state │ end │ │ -local function draw_word(game_state, pos, word, score) │ +function core.calc_state_vals(state) │ + core.get_touching_mine_count(state) │ + core.calc_cells_unrevealed(state) │ + core.calc_mines_unrevealed(state) │ +end │ │ - local padding = 10 │ +function core.calc_cells_unrevealed(state) │ + local cells_unrevealed = 0 │ + for y=1,state.game.height do │ + for x=1,state.game.width do │ + local cell = state.game.board[y][x] │ + if not cell.revealed and not cell.flagged_by_player then │ + cells_unrevealed = cells_unrevealed + 1 │ + end │ + end │ + end │ + state.game.cells_unrevealed = cells_unrevealed │ +end │ │ - x_pos = padding │ - y_pos = padding + (TEXT_SIZE + padding) * (pos-1) │ +function core.calc_mines_unrevealed(state) │ + local mines_unrevealed = 0 │ + for y=1,state.game.height do │ + for x=1,state.game.width do │ + local cell = state.game.board[y][x] │ + if cell.has_mine and not cell.revealed and not cell.flagged_by_player then │ + mines_unrevealed = mines_unrevealed + 1 │ + end │ + end │ + end │ + state.game.mines_unrevealed = mines_unrevealed │ +end │ │ - local chars = {} │ - if word == nil then │ - for _=1,game_state.word_len do │ - table.insert(chars, " ") │ + │ +function core.is_game_over(state) │ + return state.game.cells_unrevealed == 0 │ +end │ + │ + │ +local function clip_min_max(val, min_val, max_val) │ + if val < min_val then return min_val │ + elseif val > max_val then return max_val │ + else return val end │ +end │ + │ +function core.get_zoom_fact(state, player) │ + return state.players[player].zoom_fact │ +end │ +function core.set_zoom_fact(state, player, zoom_fact) │ + state.players[player].zoom_fact = clip_min_max(zoom_fact, 1/MIN_MAX_ZOOM_FACT, MIN_MAX_ZOOM_FACT) │ +end │ + │ +function add_pts(arg1, arg2) │ + return { y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ +end │ + │ +-- TODO there must be a minesweeper version of this already, │ +-- but I copied it from my "life" game │ +function count_neighbours(state, pos) │ + local count = 0 │ + for _, dir in ipairs(dirs) do │ + local pt2 = add_pts(pos, dir) │ + if not in_range(state, pt2.y, pt2.x) then │ + goto next_dir │ end │ - else │ - for i=1,#word do │ - table.insert(chars, word:sub(i,i)) │ + │ + if state.game.board[pt2.y][pt2.x].has_mine then │ + count = count + 1 │ end │ + │ + ::next_dir:: │ end │ │ - for char_idx, char in ipairs(chars) do │ - x_pos = text_start_x + (TEXT_SIZE + padding) * (char_idx-1 + 0.5) │ - local bg_colour = CHAR_BG_COLOUR_UNUSED │ - local bg_outline_colour = CHAR_TEXT_COLOUR │ - local fg_colour = CHAR_TEXT_COLOUR │ - if score then │ - local char_score = score[char_idx] │ - if char_score ~= nil then │ - bg_colour = BG_COLOURS[char_score] │ + return count │ +end │ + │ +local function copy_board(board) │ + local new_board = {} │ + for _, row in ipairs(board) do │ + local new_row = {} │ + for _, cell in ipairs(row) do │ + table.insert(new_row, copy_cell(cell)) │ + end │ + table.insert(new_board, new_row) │ + end │ + return new_board │ +end │ + │ +function core.life_increment(state) │ + local new_board = copy_board(state.game.board) │ + for y=1,#state.game.board do │ + for x=1,#state.game.board[y] do │ + local prev_mine_state = state.game.board[y][x].has_mine │ + local neighbour_count = count_neighbours(state, {y=y, x=x}) │ + │ + local new_mine_state │ + if prev_mine_state and 2 <= neighbour_count and neighbour_count <= 3 then │ + new_mine_state = true │ + elseif not prev_mine_state and neighbour_count == 3 then │ + new_mine_state = true │ + else │ + new_mine_state = false │ + end │ + │ + new_board[y][x].has_mine = new_mine_state │ + -- when a mine goes away, leave an unrevealed cell in its wake │ + -- I'm not sure if this will be too hard yet, or if │ + -- it would be better to have separate states for "explicitly revealed by player" │ + -- and "was revealed from the start", and only un-reveal the latter │ + if prev_mine_state and not new_mine_state then │ + new_board[y][x].revealed = false │ end │ - │ end │ - if bg_colour == CHAR_BG_COLOUR_UNKNOWN then │ - fg_colour = CHAR_TEXT_COLOUR_UNKNOWN │ + end │ + state.game.board = new_board │ +end │ + │ +-- normally this "autoreveal" happens when the user first reveals │ +-- an "empty" cell (meaning it has no neighbouring mines). │ +-- But in "life" mines move around, and I've found it cumbersome │ +-- to require the user to click the empty cells even though they │ +-- are guaranteed to be safe (i.e. no flagging/mines nearby are needed) │ +function core.autoreveal_empty_cells(state, player) │ + for y=1,state.game.height do │ + for x=1,state.game.width do │ + if state.game.board[y][x].revealed then │ + if count_neighbours(state, {y=y, x=x}) == 0 then │ + core.reveal_neighbours(state, player, y, x) │ + end │ + end │ end │ - local rect_y1 = y_pos + padding/2 │ - local rect_x1 = x_pos - (TEXT_SIZE + padding/2)/2 │ - local rect_y2 = y_pos + TEXT_SIZE + padding/2 │ - local rect_x2 = x_pos + (TEXT_SIZE+padding/2)/2 │ - alexgames.draw_rect(bg_colour, │ - rect_y1, rect_x1, │ - rect_y2, rect_x2) │ - draw_shapes.draw_rect_outline(bg_outline_colour, OUTLINE_WIDTH, │ - rect_y1, rect_x1, │ - rect_y2, rect_x2) │ - alexgames.draw_text(string.upper(char), fg_colour, │ - y_pos + TEXT_SIZE, x_pos, │ - math.floor(0.7*TEXT_SIZE), │ - alexgames.TEXT_ALIGN_CENTRE) │ end │ end │ │ -local function get_key_bg_colours(game_state) │ - local bg_colours = {} │ - for key, key_state in pairs(game_state.letter_states) do │ - if key_state ~= nil then │ - bg_colours[key] = BG_COLOURS[key_state] │ +-- Before adding "life", minesweeper wouldn't let you flag cells that │ +-- don't contain a mine (since in multiplayer, that could become a mess. │ +-- in single player though, it would be reasonable) │ +-- │ +-- But in "life", the mines move around, and flags no longer contain mines sometimes. │ +-- So remove the flags │ +function core.remove_flags_if_no_longer_valid(state) │ + for y=1,state.game.height do │ + for x=1,state.game.width do │ + local cell = state.game.board[y][x] │ + if not cell.has_mine and cell.flagged_by_player ~= nil then │ + cell.flagged_by_player = nil │ + cell.revealed = true │ + end │ end │ end │ - return bg_colours │ end │ │ -local function get_key_fg_colours(game_state) │ - local bg_colours = {} │ - for key, key_state in pairs(game_state.letter_states) do │ - if key_state ~= nil then │ - bg_colours[key] = FG_COLOURS[key_state] │ +local function is_valid_move(move, cell_prev_state, cell_current_state, y, x) │ + if move == core.MOVE_FLAG_CELL then │ + if not cell_current_state.revealed then │ + return true │ + end │ + │ + if not cell_prev_state.has_mine and cell_current_state.has_mine then │ + return true │ end │ + │ + return false │ + elseif move == core.MOVE_CLICK_CELL then │ + return not cell_current_state.revealed │ + else │ + error(string.format("Unhandled move type %s", move)) │ end │ - return bg_colours │ end │ │ +function core.handle_move(state, player, move, y, x) │ │ -local function get_keyboard_params(game_state) │ - return { │ - y_start = big_text_size_y, │ - x_start = 0, │ - y_end = board_height, │ - x_end = board_width, │ - key_bg_colours = get_key_bg_colours(game_state), │ - key_bg_colour_default = CHAR_BG_COLOUR_UNKNOWN, │ - key_fg_colours = get_key_fg_colours(game_state), │ - key_fg_colour_default = CHAR_TEXT_COLOUR_UNKNOWN, │ + local cell_prev_state = state.game.board[y][x] │ + │ + -- kind of a hack, I should modify the life_increment function to │ + -- take in a board, rather than do this │ + local state2 = { │ + game = { │ + height = state.game.height, │ + width = state.game.width, │ + board = copy_board(state.game.board), │ + }, │ } │ -end │ + core.life_increment(state2) │ │ -function draw.draw_state(ui_state, game_state, dt_ms) │ - alexgames.draw_clear() │ - if game_state == nil then return end │ - for i=1,game_state.max_guesses do │ - if i <= #game_state.guesses then │ - local guess = game_state.guesses[i] │ - draw_word(game_state, i, guess.word, guess.score) │ - elseif i == 1+#game_state.guesses and #ui_state.user_input > 0 then │ - local word = "" │ - local score = {} │ - for _, c in ipairs(ui_state.user_input) do │ - word = word .. c │ - table.insert(score, core.LETTER_UNKNOWN) │ - end │ - while #word < game_state.word_len do │ - word = word .. " " │ - table.insert(score, core.LETTER_UNUSED) │ - end │ - draw_word(game_state, i, word, score) │ + print(string.format("On copy of state, incremented life state and found cell %d %d is revealed=%s, has_mine=%s prev_has_mine=%s (move=%s)", y, x, state2.game.board[y][x].revealed, state2.game.board[y][x].has_mine, cell_prev_state.has_mine, move)) │ + │ + local rc │ + -- if flagging, only support flagging cells that previously were not mines, │ + -- and have become one since the life update-- or cells that were unrevealed. │ + -- if revealing, only support unrevealed cells │ + if is_valid_move(move, cell_prev_state, state2.game.board[y][x], y, x) then │ + -- TODO maybe only do this every 10 moves or so │ + core.life_increment(state) │ + │ + -- I'm not sure if this takes too much of the fun out of it. │ + --core.autoreveal_empty_cells(state, player) │ + core.get_touching_mine_count(state) │ + core.remove_flags_if_no_longer_valid(state) │ + │ + -- Update "mine count" and etc, and check if game is now won │ + core.calc_state_vals(state) │ + if state.game.cells_unrevealed == 0 then │ + end │ + │ + if move == core.MOVE_FLAG_CELL then │ + rc = core.flag_cell(state, player, y, x) │ + elseif move == core.MOVE_CLICK_CELL then │ + rc = core.clicked_cell(state, player, y, x) │ else │ - -- otherwise, draw empty squares │ - draw_word(game_state, i, nil) │ + error(string.format("unhandled move type %s", move)) │ end │ - end │ - draw_keyboard.draw_keyboard(get_keyboard_params(game_state)) │ │ + if rc ~= core.RC_SUCCESS then │ + error(string.format("Received rc %s?", rc)) │ + end │ │ - if dt_ms ~= 0 then │ - draw_celebration_anim.update(ui_state.anim, dt_ms/1000.0) │ end │ - draw_celebration_anim.draw(ui_state.anim) │ - alexgames.draw_refresh() │ + │ + │ + return rc │ end │ │ -local function handle_enter(ui_state) │ - local word = "" │ - for _, c in ipairs(ui_state.user_input) do │ - word = word .. c │ +local function in_ary(ary, y, x) │ + if ary[y] == nil then │ + return false │ + else │ + return ary[y][x] ~= nil │ end │ - return word │ end │ │ -local function handle_bksp(ui_state) │ - table.remove(ui_state.user_input) │ + │ +-- I think what I need here is the width of the view-- how │ +-- many mines fit in the view window │ +local function get_max_y_offset(state) │ + return (state.game.height - CELL_COUNT_BORDER_PADDING) * core.cell_size │ end │ │ -function draw.handle_user_clicked(ui_state, game_state, pos_y, pos_x) │ - if game_state.game_over then │ - return │ - end │ - local keyboard_params = get_keyboard_params(game_state) │ - local key_pressed = draw_keyboard.get_key_pressed(keyboard_params, pos_y, pos_x) │ - if key_pressed == nil then │ - return │ - end │ - print(string.format("User pressed soft key %s", key_pressed)) │ - if key_pressed == draw_keyboard.SPECIAL_KEY_ENTER then │ - print("user pressed enter!!!") │ - return handle_enter(ui_state) │ - elseif key_pressed == draw_keyboard.SPECIAL_KEY_BKSP then │ - handle_bksp(ui_state) │ - elseif #ui_state.user_input < game_state.word_len then │ - table.insert(ui_state.user_input, key_pressed) │ - end │ +local function get_max_x_offset(state) │ + return (state.game.width - CELL_COUNT_BORDER_PADDING) * core.cell_size │ end │ │ -function draw.clear_user_input(ui_state) │ - ui_state.user_input = {} │ +function core.adjust_offset(state, player, offset_y, offset_x) │ + state.players[player].offset_y = clip_min_max(offset_y, │ + -core.cell_size*CELL_COUNT_BORDER_PADDING, │ + get_max_y_offset(state)) │ + state.players[player].offset_x = clip_min_max(offset_x, │ + -core.cell_size*CELL_COUNT_BORDER_PADDING, │ + get_max_x_offset(state)) │ end │ │ +function core.reveal_cell(state, player, y, x) │ + if player == nil then │ + error("player param is nil") │ + end │ + if not in_range(state, y, x) then │ + return core.RC_OUT_OF_RANGE │ + end │ │ -function draw.handle_key_evt(ui_state, game_state, evt_id, key_code) │ - local key_status = { │ - handled = false, │ - guess_word = nil, │ - } │ - if game_state.game_over then │ - return key_status │ + if state.game.board[y][x].revealed then │ + return core.RC_SUCCESS │ end │ - if evt_id == "keydown" then │ - if key_code == "Enter" then │ - key_status.handled = true │ - key_status.guess_word = handle_enter(ui_state) │ - elseif key_code == "Backspace" then │ - key_status.handled = true │ - handle_bksp(ui_state) │ - else │ - local user_input_letter = string.match(key_code, "Key(%a)") │ - if user_input_letter then │ - key_status.handled = true │ - if #ui_state.user_input < game_state.word_len then │ - user_input_letter = string.lower(user_input_letter) │ - table.insert(ui_state.user_input, user_input_letter) │ - end │ + │ + local to_visit = { │ + { y = y, x = x } │ + } │ + local visited = {} │ + │ + while #to_visit > 0 do │ + local pos = table.remove(to_visit) │ + │ + if not in_range(state, pos.y, pos.x) or │ + in_ary(visited, pos.y, pos.x) then │ + goto next_cell │ + end │ + │ + │ + if not state.game.board[pos.y][pos.x].revealed then │ + state.game.cells_unrevealed = state.game.cells_unrevealed - 1 │ + end │ + state.game.board[pos.y][pos.x].revealed = true │ + local score_change = 0 │ + if state.game.board[pos.y][pos.x].has_mine then │ + score_change = REVEAL_MINE_SCORE │ + state.game.mines_unrevealed = state.game.mines_unrevealed - 1 │ + else │ + score_change = REVEAL_CELL_SCORE │ + end │ + │ + -- for the case where cells are revealed initially, on puzzle creation │ + if player ~= 0 then │ + state.players[player].score = state.players[player].score + score_change │ + end │ + │ + if visited[pos.y] == nil then │ + visited[pos.y] = {} │ + end │ + visited[pos.y][pos.x] = true │ + │ + if state.game.board[pos.y][pos.x].touching_mine_count > 0 or │ + state.game.board[pos.y][pos.x].has_mine then │ + goto next_cell │ + end │ + │ + for _, dir in ipairs(dirs) do │ + local y2 = pos.y + dir.y │ + local x2 = pos.x + dir.x │ + if in_range(state, y2, x2) and │ + not in_ary(visited, y2, x2) and │ + not state.game.board[y2][x2].has_mine then │ + table.insert(to_visit, {y=y2, x=x2}) │ end │ end │ + ::next_cell:: │ end │ - return key_status │ -end │ │ -function draw.player_won(ui_state) │ - draw_celebration_anim.fireworks_display(ui_state.anim) │ - alexgames.set_timer_update_ms(1000/60) │ + return core.RC_SUCCESS │ end │ │ -function draw.handle_btn_pressed(game_state, ui_state, btn_id) │ - if btn_id == BTN_ID_NEW_GAME then │ - if game_state and game_state.game_over then │ - return draw.ACTION_NEW_GAME │ +function core.flag_cell(state, player, y, x) │ + if not in_range(state, y, x) then │ + return core.RC_OUT_OF_RANGE │ + end │ + │ + --if state.game.board[y][x].revealed then │ + -- return core.RC_INVALID_MOVE │ + --end │ + │ + -- in single player, remove your own flag, if desired │ + if #state.players == 1 and state.game.board[y][x].flagged_by_player == player then │ + state.game.board[y][x].flagged_by_player = nil │ + state.players[player].score = state.players[player].score - FLAG_MINE_SUCCESS_SCORE │ + state.game.cells_unrevealed = state.game.cells_unrevealed + 1 │ + state.game.mines_unrevealed = state.game.mines_unrevealed + 1 │ + -- can only flag unflagged cells │ + elseif state.game.board[y][x].flagged_by_player == nil then │ + if state.players == 1 then │ + state.game.board[y][x].flagged_by_player = player │ else │ - -- TODO now I definitely need to implement the history browser for this game │ - show_buttons_popup.show_popup(POPUP_ID_NEW_GAME_CONFIRM, "Start New Game?", │ - "Are you sure you want to start a new game?\n" .. │ - "Current progress can be resumed " .. │ - "from the \"Load Autosaved Game\" in the options.", │ - {"New Game", "Cancel"}) │ + local score_change │ + if state.game.board[y][x].has_mine == true then │ + state.game.board[y][x].flagged_by_player = player │ + score_change = FLAG_MINE_SUCCESS_SCORE │ + state.game.mines_unrevealed = state.game.mines_unrevealed - 1 │ + else │ + state.game.board[y][x].revealed = true │ + score_change = FLAG_MINE_FAIL_SCORE │ + -- TODO need to communicate this state to the user, so animations can be shown │ + end │ + state.game.cells_unrevealed = state.game.cells_unrevealed - 1 │ + state.players[player].score = state.players[player].score + score_change │ end │ - elseif btn_id == BTN_ID_CUSTOM_PUZZLE then │ - if game_state and game_state.game_over then │ - return draw.ACTION_CUSTOM_PUZZLE │ + │ + -- Now that Conway's game of life is introduced, │ + -- it is possible to flag cells that were previously revealed, but will │ + -- contain a mine on the next life update. │ + -- TODO: it would be better to simply make the UI code render revealed and flagged │ + -- cells as flagged instead of revealed, but I don't want to │ + -- make that change just yet in case it turns out to be more complicated │ + if state.game.board[y][x].has_mine then │ + state.game.board[y][x].revealed = false │ else │ - show_buttons_popup.show_popup(POPUP_ID_CUSTOM_PUZZLE_CONFIRM, "Generate custom puzzle?", │ - "Are you sure you want to generate a custom puzzle?\n" .. │ - "Current progress can be resumed " .. │ - "from the \"Load Autosaved Game\" in the options.", │ - {"Generate custom puzzle", "Cancel"}) │ + -- though if the user flagged a cell with no mine, │ + -- reveal it anyway │ + state.game.board[y][x].revealed = true │ end │ end │ + │ + return core.RC_SUCCESS │ end │ │ -function draw.handle_popup_btn_pressed(game_state, ui_state, popup_id, btn_id) │ - if popup_id == POPUP_ID_NEW_GAME_CONFIRM then │ - alexgames.hide_popup() │ - if btn_id == 0 then │ - return draw.ACTION_NEW_GAME │ - elseif btn_id == 1 then │ - else │ - error(string.format("Unhandled btn_id %d for popup %s", btn_id, popup_id)) │ +function core.reveal_neighbours(state, player, y, x) │ + if not in_range(state, y, x) then │ + return core.RC_OUT_OF_RANGE │ + end │ + if not state.game.board[y][x].revealed then │ + return │ + end │ + │ + local flags_or_revealed_mines_nearby = 0 │ + │ + for _, dir in ipairs(dirs) do │ + local y2 = y + dir.y │ + local x2 = x + dir.x │ + │ + if in_range(state, y2, x2) then │ + local cell = state.game.board[y2][x2] │ + if cell.revealed and cell.has_mine or │ + cell.flagged_by_player ~= nil then │ + flags_or_revealed_mines_nearby = flags_or_revealed_mines_nearby + 1 │ + end │ end │ - elseif popup_id == POPUP_ID_CUSTOM_PUZZLE_CONFIRM then │ - alexgames.hide_popup() │ - if btn_id == 0 then │ - return draw.ACTION_CUSTOM_PUZZLE │ - elseif btn_id == 1 then │ - alexgames.hide_popup() │ + end │ + │ + if flags_or_revealed_mines_nearby >= state.game.board[y][x].touching_mine_count then │ + local activity = false │ + for _, dir in ipairs(dirs) do │ + local y2 = y + dir.y │ + local x2 = x + dir.x │ + │ + if in_range(state, y2, x2) then │ + local cell = state.game.board[y2][x2] │ + print(string.format("cell{y=%d,x=%d}: revealed %s, has_mine %s, flagged_by_player %s", y2, x2, cell.revealed, cell.has_mine, cell.flagged_by_player)) │ + if not cell.revealed and │ + not cell.has_mine and │ + cell.flagged_by_player == nil then │ + core.reveal_cell(state, player, y2, x2) │ + activity = true │ + end │ + end │ + end │ + if activity then │ + return core.RC_SUCCESS │ else │ - error(string.format("Unhandled btn_id %d for popup %s", btn_id, popup_id)) │ + -- TODO remove │ + print(string.format("Can not auto reveal due to no activity")) │ end │ - else │ - print(string.format("Popup id %s not handled", popup_id)) │ end │ + │ + return core.RC_CAN_NOT_AUTO_REVEAL │ + │ end │ │ +function core.clicked_cell(state, player, y, x) │ + if not in_range(state, y, x) then │ + return core.RC_OUT_OF_RANGE │ + end │ + │ + if state.game.board[y][x].revealed then │ + return core.reveal_neighbours(state, player, y, x) │ + elseif state.game.board[y][x].flagged_by_player == nil then │ + return core.reveal_cell(state, player, y, x) │ + end │ + │ + │ +end │ │ -return draw │ -local draw = {} │ │ +return core │ local alexgames = require("alexgames") │ +local cards = require("libs/cards/cards") │ │ --- Helper library to draw shapes from the base APIs defined in alexgames │ -local draw_more = require("libs/draw/draw_shapes") │ +local core = {} │ │ -local g_board_width │ -local g_board_height │ +core.PICK_UP_EVT_ID = 2 │ +core.PUT_DOWN_EVT_ID = 1 │ +core.MOVE_EVT_ID = 3 │ │ -local BORDER_COLOUR = '#8888ff88' │ -local BORDER_THICKNESS = 3 │ +-- when drawing a deck of cards, draw cards in `offset_count` distinct positions, │ +-- evenly distributed `offset_size` pixels away from the start. │ +local offset_count = 4 │ +local offset_size = 8 │ │ -function draw.init(board_width, board_height) │ - g_board_width = board_width │ - g_board_height = board_height │ +function core.init(args) │ + local state = { │ + height = args.height, │ + width = args.width, │ + reveal_area = args.reveal_area, │ + │ + card_height = args.card_height, │ + card_width = args.card_width, │ + │ + │ + player_states = {}, │ + │ + cards = {}, │ + } │ + │ + for i=1,args.player_count do │ + state.player_states[i] = { │ + y = nil, │ + x = nil, │ + │ + card_idx = nil, │ + -- either the numeric ID of the touch, or 'mouse' for mouse │ + input_src = nil, │ + card_orig_y = nil, │ + card_orig_x = nil, │ + } │ + end │ + │ + local deck = cards.new_deck() │ + cards.shuffle(deck) │ + │ + for i, card in ipairs(deck) do │ + local offset = math.floor(i*offset_count/#deck) * offset_size / offset_count │ + state.cards[#state.cards+1] = { │ + recvd = false, │ + held_by = nil, │ + revealed_to_all = false, │ + revealed_to_player = nil, │ + card = card, │ + y = math.floor(args.width/2 + offset), │ + x = math.floor(args.height/2 - offset), │ + } │ + end │ + return state │ end │ │ -local function in_range(min_val, val, max_val) │ - return min_val <= val and val <= max_val │ + │ +function core.find_card_under_cursor(state, pos_y, pos_x) │ + for i=#state.cards,1,-1 do │ + local card_info = state.cards[i] │ + if card_info.y - state.card_height/2 <= pos_y and pos_y <= card_info.y + state.card_height/2 and │ + card_info.x - state.card_width/2 <= pos_x and pos_x <= card_info.x + state.card_width/2 then │ + return i │ + end │ + end │ + return nil │ end │ │ +function core.in_revealed_area(state, pos_y, pos_x) │ + if (0 <= pos_y and pos_y <= state.reveal_area) then │ + return 2 │ + elseif (state.height - state.reveal_area <= pos_y and pos_y <= state.height) then │ + return 1 │ + else │ + return nil │ + end │ + │ +end │ │ -function draw.draw(state) │ - -- This clears anything on the screen from previous `update` calls. │ - alexgames.draw_clear() │ │ +local function player_move(state, player_idx, input_src, pos_y, pos_x) │ + if not(1 <= player_idx and player_idx <= #state.player_states) then │ + error("Invalid player_idx " .. player_idx) │ + end │ + local player_state = state.player_states[player_idx] │ + player_state.y = pos_y │ + player_state.x = pos_x │ + if player_state.card_idx ~= nil and player_state.input_src == input_src then │ + state.cards[player_state.card_idx].y = pos_y │ + state.cards[player_state.card_idx].x = pos_x │ │ - -- Draw a border around the screen to show where the ball will bounce │ - local padding = 3 │ - local outline_pt1 = { y = padding, x = padding } │ - local outline_pt2 = { y = g_board_height - padding, x = g_board_width - padding } │ - draw_more.draw_rect_outline(BORDER_COLOUR, BORDER_THICKNESS, │ - outline_pt1.y, outline_pt1.x, │ - outline_pt2.y, outline_pt2.x) │ - -- draw_more.draw_rect_outline(...) is a helper function to do this (draw 4 lines in a rectangle): │ - --[[ │ - alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ - 0, 0, │ - 0, g_board_width) │ - alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ - 0, g_board_width, │ - g_board_height, g_board_width) │ - alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ - g_board_height, g_board_width, │ - g_board_height, 0) │ - alexgames.draw_line(BORDER_COLOUR, BORDER_THICKNESS, │ - g_board_height, 0, │ - 0 , 0) │ - --]] │ + local reveal_player = core.in_revealed_area(state, pos_y, pos_x) │ + state.cards[player_state.card_idx].revealed_to_player = reveal_player │ + if reveal_player ~= nil then │ + state.cards[player_state.card_idx].revealed_all = false │ + end │ + end │ +end │ │ - local msg = string.format("time: %s, frame: %5d", alexgames.get_time_of_day(), state.frame_idx) │ - local text_color = '#000000' │ - local text_size = 18 │ +function core.handle_mousemove(state, player_idx, pos_y, pos_x) │ + local input_src = 'mouse' │ + player_move(state, player_idx, input_src, pos_y, pos_x) │ +end │ │ - local padding = 5 │ +local function touch_start_to_move(state, player_idx, input_src, pos_y, pos_x) │ + local player_state = state.player_states[player_idx] │ + local card_idx = core.find_card_under_cursor(state, pos_y, pos_x) │ + if card_idx == nil then │ + print(string.format("Player %d: Found no card at pos y=%f, x=%f", player_idx, pos_y, pos_x)) │ + return nil │ + end │ + if state.cards[card_idx].held_by ~= nil then │ + print(string.format("Player %d: Card is already held by player %s", player_idx, │ + state.cards[card_idx].held_by)) │ + return nil │ + end │ │ - local y_pos = text_size + padding │ - local x_pos = padding │ + return { player = player_idx, │ + input_src = input_src, │ + move_type = core.PICK_UP_EVT_ID, │ + y = math.floor(pos_y), │ + x = math.floor(pos_x) │ + } │ +end │ │ - -- Draw text on the screen │ - alexgames.draw_text(msg, text_color, │ - y_pos, x_pos, │ - text_size, │ - alexgames.TEXT_ALIGN_LEFT) │ │ - alexgames.draw_text('Hello, world!', '#ff0000', │ - y_pos + padding + text_size, x_pos, │ - text_size, │ - alexgames.TEXT_ALIGN_LEFT) │ +local function pick_up_card(state, player_idx, input_src, pos_y, pos_x) │ + local player_state = state.player_states[player_idx] │ + local card_idx = core.find_card_under_cursor(state, pos_y, pos_x) │ + if card_idx == nil then │ + print(string.format("Player %d: Found no card at pos y=%f, x=%f", player_idx, pos_y, pos_x)) │ + return │ + end │ + if state.cards[card_idx].held_by ~= nil then │ + print(string.format("Player %d: Card is already held by player %s", player_idx, │ + state.cards[card_idx].held_by)) │ + return │ + end │ + -- note that calling this with card_idx nil will remove the last card │ + local tmp = table.remove(state.cards, card_idx) │ + local old_card_idx = card_idx │ + tmp.held_by = player_idx │ + table.insert(state.cards, tmp) │ + player_state.card_idx = #state.cards │ + player_state.input_src = input_src │ + player_state.card_orig_y = pos_y │ + player_state.card_orig_x = pos_x │ + if player_state.card_idx ~= nil then │ + print(string.format("Player %d picked up card idx %d, input_src %s", player_idx, player_state.card_idx, input_src)) │ + end │ + for i = 1, #state.player_states do │ + if i == player_idx then │ + goto next_player │ + end │ + if state.player_states[i].card_idx ~= nil and │ + state.player_states[i].card_idx > old_card_idx then │ + state.player_states[i].card_idx = state.player_states[i].card_idx - 1 │ + end │ + │ + ::next_player:: │ + end │ +end │ │ - local square_size = 40 │ - local squares_per_row = math.ceil(g_board_width / square_size) │ - local squares_per_col = math.ceil(g_board_height / square_size) │ - --[[ │ - local square_y_pos = math.floor(state.ball_pos_y/square_size)*square_size │ - local square_x_pos = math.floor(state.ball_pos_x/square_size)*square_size │ │ - local square_color │ - if (square_y_pos + square_x_pos * squares_per_row) % squares_per_row == 0 then │ - square_color = '#ffffff88' │ +local function touch_end_to_move(state, player_idx, touch_id, touch_y, touch_x) │ + local move = { │ + player = player_idx, │ + move_type = core.PUT_DOWN_EVT_ID, │ + input_src = touch_id, │ + y = math.floor(touch_y), │ + x = math.floor(touch_x) } │ + return move │ +end │ + │ +local function touch_move_to_move(state, player_idx, touch_id, touch_y, touch_x) │ + local move = { │ + player = player_idx, │ + move_type = core.MOVE_EVT_ID, │ + input_src = touch_id, │ + y = math.floor(touch_y), │ + x = math.floor(touch_x) } │ + return move │ +end │ + │ +local function put_down_card(state, player_idx, input_src, pos_y, pos_x) │ + local player_state = state.player_states[player_idx] │ + if player_state.card_idx ~= nil then │ + print(string.format("Player %d Put down card, input_src %s", player_idx, player_state.card_idx, input_src)) │ + state.cards[player_state.card_idx].held_by = nil │ + end │ + │ + -- if a card is held, it has not moved, and it is not in a revealed area, │ + -- then reveal it to all if clicked │ + if player_state.card_idx ~= nil and │ + -- TODO should change this to be a flag that is cleared once it has moved. │ + -- otherwise, if you move it to exactly the same position you took it from, │ + -- it would be revealed │ + pos_y == player_state.card_orig_y and pos_x == player_state.card_orig_x and │ + core.in_revealed_area(state, pos_y, pos_x) == nil then │ + │ + state.cards[player_state.card_idx].revealed_all = not state.cards[player_state.card_idx].revealed_all │ + end │ + player_state.card_idx = nil │ + player_state.input_src = nil │ +end │ + │ + │ + │ +function core.handle_mouse_evt(state, player_idx, evt_id, pos_y, pos_x) │ + local input_src = 'mouse' │ + if evt_id == 2 then │ + pick_up_card(state, player_idx, input_src, pos_y, pos_x) │ + elseif evt_id == 1 or │ + evt_id == 3 then │ + put_down_card(state, player_idx, input_src, pos_y, pos_x) │ else │ - square_color = '#00000088' │ + error("Unhandled evt " .. evt_id) │ end │ +end │ │ - alexgames.draw_rect(square_color, │ - square_y_pos, square_x_pos, │ - square_y_pos + square_size, square_x_pos + square_size) │ - --]] │ - for square_y_idx=0,squares_per_col-1 do │ - for square_x_idx=0,squares_per_row-1 do │ - local square_y_pos1 = square_y_idx * square_size │ - local square_x_pos1 = square_x_idx * square_size │ - local square_y_pos2 = (square_y_idx+1) * square_size │ - local square_x_pos2 = (square_x_idx+1) * square_size │ │ - local ball_in_square = (in_range(0, (math.floor(state.ball_pos_y/square_size + 0.5) - square_y_idx), 1) and │ - in_range(0, (math.floor(state.ball_pos_x/square_size + 0.5) - square_x_idx), 1)) │ - local square_is_white = ((square_y_idx + square_x_idx * (squares_per_row+1)) % 2 == 0) │ +function core.touches_to_moves(state, player_idx, evt_id, changed_touches) │ + local moves = {} │ + local player_state = state.player_states[player_idx] │ + if evt_id == 'touchstart' then │ + for _, touch in ipairs(changed_touches) do │ + local move = touch_start_to_move(state, player_idx, touch.id, touch.y, touch.x) │ + table.insert(moves, move) │ + end │ + elseif evt_id == 'touchmove' then │ + for _, touch in ipairs(changed_touches) do │ + local move = touch_move_to_move(state, player_idx, touch.id, touch.y, touch.x) │ + table.insert(moves, move) │ + end │ + elseif evt_id == 'touchend' or │ + evt_id == 'touchcancel' then │ + for _, touch in ipairs(changed_touches) do │ + local move = touch_end_to_move(state, player_idx, touch.id, touch.y, touch.x) │ + table.insert(moves, move) │ + end │ + end │ + return moves │ +end │ │ - local square_color │ - if square_is_white then │ - if ball_in_square then square_color = '#ffffff' │ - else square_color = '#ffffff33' end │ - else │ - if ball_in_square then square_color = '#000000' │ - else square_color = '#00000033' end │ - end │ - │ - alexgames.draw_rect(square_color, │ - square_y_pos1, square_x_pos1, │ - square_y_pos2, square_x_pos2) │ +function core.handle_touch_evt(state, player_idx, evt_id, changed_touches) │ + local moves = core.touches_to_moves(state, player_idx, evt_id, changed_touches) │ + for _, move in ipairs(moves) do │ + if move.move_type == core.PICK_UP_EVT_ID then │ + pick_up_card(state, move.player, move.input_src, move.y, move.x) │ + elseif move.move_type == core.PUT_DOWN_EVT_ID then │ + put_down_card(state, move.player, move.input_src, move.y, move.x) │ + elseif move.move_type == core.MOVE_EVT_ID then │ + player_move(state, move.player, move.input_src, move.y, move.x) │ + else │ + error(string.format("Unhandled move type %s", move.move_type)) │ end │ end │ - │ - local circle_color = '#aaaacc88' │ - local circle_outline = '#0000ff' │ - alexgames.draw_circle(circle_color, circle_outline, │ - state.ball_pos_y, state.ball_pos_x, state.ball_radius) │ +end │ │ - -- TODO I need to implement the ability to upload custom graphics │ - -- For now this API uses an ID that is hardcoded in a hashmap mapping this to │ - -- a graphic file. │ - alexgames.draw_graphic('chess_rook_black', │ - state.ball_pos_y, state.ball_pos_x, │ - 2*state.ball_radius, 2*state.ball_radius, │ - { angle_degrees = state.frame_idx / 60 * 90, }) │ +return core │ +local alexgames = require("alexgames") │ +local cards = require("libs/cards/cards") │ +local card_draw = require("libs/cards/cards_draw") │ │ - -- Draw a red line in the direction of the desired user position │ - -- if they are pressing keys, clicking, or touching the screen. │ - if state.user_input_vec ~= nil then │ - local angle = math.atan(state.user_input_vec.y, state.user_input_vec.x) │ - alexgames.draw_line('#ff0000', 4, │ - state.ball_pos_y, state.ball_pos_x, │ - state.ball_pos_y + 2*state.ball_radius*math.sin(angle), state.ball_pos_x + 2*state.ball_radius*math.cos(angle)) │ +local draw = {} │ + │ +local card_height = nil │ +local card_width = nil │ +local card_font_size = nil │ + │ +local REVEAL_AREA_COLOUR = '#8888ff33' │ +local REVEAL_AREA_TEXT = 'Revealed' │ +local REVEAL_AREA_TEXT_COLOUR = '#0000ff88' │ +local REVEAL_AREA_TEXT_SIZE = 18 │ +local text_y_size = 25 │ + │ +local width = nil │ +local height = nil │ +local reveal_area = nil │ + │ +local PLAYER_CURSOR_RADIUS = 5 │ +local PLAYER_COLOURS = { │ + { fill = '#ff000088', outline = '#ff0000' }, │ + { fill = '#0000ff88', outline = '#0000ff' }, │ + { fill = '#00ff0088', outline = '#00ff00' }, │ + { fill = '#00888888', outline = '#00ffff' }, │ +} │ + │ +function draw.init(args) │ + width = args.width │ + height = args.height │ + reveal_area = args.reveal_area │ + card_height = args.card_height │ + card_width = args.card_width │ + card_font_size = args.card_font_size │ +end │ + │ +function draw.draw(state, player) │ + alexgames.draw_clear() │ + │ + if state == nil then │ + return │ end │ │ - -- Show text indicating user input to help debug, also │ - -- explain to user how they can provide input to move the ball. │ - if state.mouse_down then │ - alexgames.draw_text(string.format('Mouse pos: {y=%3.0f, x=%3.0f}', state.user_input_pos_y, state.user_input_pos_x), text_color, │ - g_board_height - padding, padding, │ - text_size, alexgames.TEXT_ALIGN_LEFT) │ - elseif state.active_touch ~= nil then │ - alexgames.draw_text(string.format('Touch pos: {y=%3.0f, x=%3.0f}', state.user_input_pos_y, state.user_input_pos_x), text_color, │ - g_board_height - padding, padding, │ - text_size, alexgames.TEXT_ALIGN_LEFT) │ - else │ - -- Admittedly I don't have a multi line draw_text function yet │ - alexgames.draw_text('Press arrow keys, WASD, or mouse/touch', text_color, │ - g_board_height - 2*padding - text_size, padding, │ - text_size, alexgames.TEXT_ALIGN_LEFT) │ - alexgames.draw_text('to move ball', text_color, │ - g_board_height - padding, padding, │ - text_size, alexgames.TEXT_ALIGN_LEFT) │ + alexgames.draw_rect(REVEAL_AREA_COLOUR, │ + 0, 0, reveal_area, width) │ + alexgames.draw_text(REVEAL_AREA_TEXT, REVEAL_AREA_TEXT_COLOUR, │ + text_y_size, 0, REVEAL_AREA_TEXT_SIZE, 1, 0) │ + │ + alexgames.draw_rect(REVEAL_AREA_COLOUR, │ + height - reveal_area, 0, height, width) │ + alexgames.draw_text(REVEAL_AREA_TEXT, REVEAL_AREA_TEXT_COLOUR, │ + height - reveal_area + text_y_size, 0, REVEAL_AREA_TEXT_SIZE, 1, 0) │ + for _, card_info in ipairs(state.cards) do │ + local card = nil │ + if card_info.recvd or card_info.revealed_all or card_info.revealed_to_player == player then │ + card = card_info.card │ + else │ + card = cards.UNREVEALED_CARD │ + end │ + card_draw.draw_card(card, │ + math.floor(card_info.y - card_height/2), │ + math.floor(card_info.x - card_width/2), │ + card_width, card_height, card_font_size, false, 0) │ + end │ + │ + for i=1,#state.player_states do │ + if state.player_states[i].y == nil or │ + state.player_states[i].x == nil then │ + goto next_player_cursor │ + end │ + alexgames.draw_circle(PLAYER_COLOURS[i].fill, PLAYER_COLOURS[i].outline, │ + state.player_states[i].y, │ + state.player_states[i].x, │ + PLAYER_CURSOR_RADIUS) │ + ::next_player_cursor:: │ end │ │ - -- On the web version, this does nothing. │ - -- On other implementations, this is needed to cause the previous draw APIs to take effect. │ alexgames.draw_refresh() │ end │ │ return draw │ --- This is the "main" file of the example game "api_demo". │ --- It is intended to show some examples of how the APIs work, including: │ --- * drawing graphics, │ --- * drawing lines, rectangles, │ --- * setting a timer to update the game state and redraw 60 (`FPS`) times per second │ --- * receiving keyboard ("key") events, │ --- * receiving mouse events (mouse button pressed ("down"), released ("up"), move), │ --- * receiving touch events (finger(s) pressed), only available on mobile. │ +local wait_for_players = require("libs/multiplayer/wait_for_players") │ +local alexgames = require("alexgames") │ │ --- These are other Lua files defined in the rest of the game bundle. │ --- If this line is failing then either you removed them or renamed them in the zip you uploaded, │ --- or I forgot to include the right path in Lua `package.path`. │ --- Note that in most of the other games I wrote, I instead referenced the global path (something like "games/whatever_game/game_core") │ --- and didn't bother adding the game's local directory to `package.path`. │ --- For uploaded games, I made an exception and added it. │ -local core = require("game_core") -- game_core.lua │ -local draw = require("game_draw") -- game_draw.lua │ +local core = require("games/card_sim/card_generic_core") │ +local draw = require("games/card_sim/card_generic_draw") │ +local serialize = require("games/card_sim/card_generic_serialize") │ │ --- This is the API that I defined, defined in `lua_api.c`. │ -local alexgames = require("alexgames") │ +-- TODO if two players click the same card, then there is a big bug. │ +-- Need to remember two things when a player picks up a card: │ +-- * who is holding the card, │ +-- * what touch ID (either 'mouse', or the ID from the touch event) │ +-- Also need to handle something when someone picks up a card... update the card_idx │ +-- of other players if they were holding that card? │ +-- │ +-- Also will likely need to implement throttling. │ +-- │ +-- Ideally would also implement client side control of the cards, so that I could just send │ +-- the held card index and coordinates, instead of sending all the state │ +-- │ +-- TODO I think there is a bug if you pick up a card, move the mouse off screen, then │ +-- click to pick up the card again, if another player has picked up a card since then? │ +-- When re-ordering cards, need to update all the player's card_idx. │ +-- Maybe remember cards by value, not position in array │ +-- │ +-- TODO there is still an issue if two players pick up a card at the same time │ +-- │ │ +local width = 480 │ +local height = 480 │ │ -print( │ -"Hello, world! You should see this message in the developer tools console " .. │ -"if you\'re using the web version.") │ +local MAX_MOVE_PERIOD_MS = 50 │ +local throttled_count = 0 │ │ --- The dots are simply to concatentate strings (instead of "+" like in most │ --- languages). They could be omitted here, I just wanted to break │ --- this long string across multiple lines. │ -print(string.format("If you're new to Lua, this is a way to achieve printf " .. │ - "like behaviour: %d %s %q", │ - 123, "test", nil)) │ │ --- TODO these should come from an API │ -local board_height = 480 │ -local board_width = 480 │ +local args = { │ + width = width, │ + height = height, │ │ + player_count = 2, │ │ --- This is calling into the "game_core.lua" file to create │ --- a new table with the game's initial state. │ -local state = core.new_state(board_height, board_width) │ + card_height = 70, │ + card_width = 40, │ + card_font_size = 16, │ │ -local FPS = 60 │ -local MS_PER_FRAME = math.floor(1000/FPS) │ + reveal_area = math.floor(height/5), │ +} │ │ +local players = { │ + [1] = "You", │ +} │ +local player_name_to_idx = {} │ +local player = 1 │ +local state = nil │ +local is_client = false │ │ --- This function is called initially, and then many times repeatedly if `alexgames.set_timer_update_ms(time_ms)` │ --- is called, to update state. │ --- TODO It really should be renamed from "update" to "update" or something. │ --- │ --- TODO I think it would also be cleaner to move away from global symbols like this, and instead register the important methods │ --- in something like `alexgames.init({update=update})`, and register the others (key, touch, mousemove) when I enable those events. │ -function update() │ - local dt_ms = MS_PER_FRAME │ │ +local function send_state_updates_if_host() │ + if is_client then │ + return │ + end │ │ - if state.mouse_down or state.active_touch ~= nil then │ - core.set_user_input_pos(state, {y=state.user_input_pos_y, x=state.user_input_pos_x}) │ + for i=1,#state.player_states do │ + if i == player then │ + goto next_player │ + end │ + local serialized_state = serialize.serialize_state_for_client(state, i) │ + alexgames.send_message(players[i], "state:" .. serialized_state) │ + ::next_player:: │ end │ +end │ │ - -- Lua doesn't have an increment operator. This is not ideal, but whenever you encounter │ - -- minor annoyances like this, try to remember that the entire interpreter compiles to ~400 kB of WASM and │ - -- is wonderfully nice to integrate with C. │ - -- And rather than apply a patch that does have an increment operator, I'd like be consistent with standard │ - -- Lua (for now, at least). │ - state.frame_idx = state.frame_idx + 1 │ │ - core.update_ball_pos(state, dt_ms) │ +function update() │ + draw.draw(state, player) │ +end │ │ - draw.draw(state) │ +alexgames.enable_evt("mouse_move") │ +alexgames.enable_evt("mouse_updown") │ + │ +function handle_user_clicked(pos_y, pos_x) │ end │ │ --- Lua table (like a dictionary/hashmap) to track if a key is down │ --- or not. │ --- This way, when a user presses "up", we can check if they're also │ --- pressing "left", and then move them diagonally. │ -local keys_pressed = {} │ +local last_move_time = nil │ +function handle_mousemove(pos_y, pos_x) │ + local time = alexgames.get_time_ms() │ + if last_move_time ~= nil and time - last_move_time < MAX_MOVE_PERIOD_MS then │ + throttled_count = throttled_count + 1 │ + return │ + end │ + last_move_time = time │ + if not is_client then │ + core.handle_mousemove(state, player, pos_y, pos_x) │ + else │ + alexgames.send_message("all", string.format("move:%d,%d,%s,%d,%d", player, 3, 'mouse', pos_y, pos_x)) │ + end │ + send_state_updates_if_host() │ + update() │ +end │ │ --- Lua table (like a dictionary/hashmap) to track if keys are handled or not. │ --- This step is somewhat optional, I'm doing this so that we can tell the browser │ --- which keys we don't handle, so it can choose to handle them │ --- (e.g. not call evt.preventDefault() for Ctrl L (jump to address bar), │ --- but it should call evt.preventDefault() for the arrow keys/WASD, so that │ --- the arrow keys don't scroll on the page (as they normally would). │ --- Instead, arrow keys move the player around. │ -local keys_handled = { │ - ['ArrowLeft'] = true, │ - ['ArrowRight'] = true, │ - ['ArrowUp'] = true, │ - ['ArrowDown'] = true, │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + if not is_client then │ + core.handle_mouse_evt(state, player, evt_id, pos_y, pos_x) │ + else │ + alexgames.send_message("all", string.format("move:%d,%d,%s,%d,%d", player, evt_id, 'mouse', pos_y, pos_x)) │ + end │ + send_state_updates_if_host() │ + update() │ +end │ │ - ['KeyW'] = true, │ - ['KeyA'] = true, │ - ['KeyS'] = true, │ - ['KeyD'] = true, │ -} │ +local function handle_recvd_move(state, msg_player, msg_evt, msg_y, msg_x) │ + if msg_evt == 1 or msg_evt == 2 then │ + core.handle_mouse_evt(state, msg_player, msg_evt, msg_y, msg_x) │ + elseif msg_evt == 3 then │ + core.handle_mousemove(state, msg_player, msg_y, msg_x) │ + else │ + error("Unhandled evt_id " .. msg_evt) │ + end │ + send_state_updates_if_host() │ + update() │ +end │ │ -function handle_key_evt(evt_id, key_code) │ - print(string.format("handle_key_evt(evt=%s, code=%s)", evt_id, key_code)) │ +function handle_msg_received(src, msg) │ + --print("handle_msg_received (from src:" .. src .. "): " .. msg); │ │ - if not keys_handled[key_code] then │ - local msg = string.format("key %s not handled", key_code) │ - alexgames.set_status_msg(msg) │ - print(msg) │ - return false │ + local handled = wait_for_players.handle_msg_received(src, msg) │ + if handled then │ + return │ end │ │ - if evt_id == 'keydown' then │ - keys_pressed[key_code] = true │ - elseif evt_id == 'keyup' then │ - keys_pressed[key_code] = false │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ + │ + if header == "state" then │ + local recvd_state = serialize.deserialize_client_state(payload) │ + state = recvd_state │ + elseif header == "move" then │ + local other_player = player_name_to_idx[src] │ + local m2 = payload:gmatch("(%d+),(%d+),([^,]+),(%d+),(%d+)") │ + if m2 == nil then │ + error("Invalid recvd payload " .. payload) │ + end │ + local msg_player, msg_evt, msg_input_src, msg_y, msg_x = m2() │ + msg_player = tonumber(msg_player) │ + msg_evt = tonumber(msg_evt) │ + msg_y = tonumber(msg_y) │ + msg_x = tonumber(msg_x) │ + handle_recvd_move(state, msg_player, msg_evt, msg_y, msg_x) │ + elseif header == "player_joined" or │ + header == "player_left" then │ + -- ignore I guess? │ else │ - error(string.format("unhandled evt_id=%s", evt_id)) │ + error("Unhandled msg: " .. msg) │ end │ + update() │ +end │ │ - local x_vec = 0 │ - local y_vec = 0 │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ + if handled then │ + return │ + end │ │ - if keys_pressed['ArrowLeft'] or keys_pressed['KeyA'] then x_vec = x_vec - 1 end │ - if keys_pressed['ArrowRight'] or keys_pressed['KeyD'] then x_vec = x_vec + 1 end │ - if keys_pressed['ArrowUp'] or keys_pressed['KeyW'] then y_vec = y_vec - 1 end │ - if keys_pressed['ArrowDown'] or keys_pressed['KeyS'] then y_vec = y_vec + 1 end │ + error("Unhandled popup_btn_clicked") │ +end │ │ - local vec = nil │ - if x_vec ~= 0 or y_vec ~= 0 then │ - vec = { y = y_vec, x = x_vec } │ - end │ │ - core.set_user_input_vec(state, vec) │ - return true │ +local function new_game(player_count) │ + state = core.init(args) │ + draw.init(args) │ end │ │ +local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as host") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = false │ + new_game(#players) │ + send_state_updates_if_host() │ + update() │ +end │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - print(string.format("handle_mouse_evt(evt_id=%d, pos_y=%d, pos_x=%d)", evt_id, pos_y, pos_x)) │ - if evt_id == alexgames.MOUSE_EVT_DOWN then │ - state.mouse_down = true │ - state.user_input_pos_y = pos_y │ - state.user_input_pos_x = pos_x │ - --core.set_user_input_pos(state, {y=pos_y, x=pos_x}) │ - elseif evt_id == alexgames.MOUSE_EVT_UP then │ - state.mouse_down = false │ - core.set_user_input_pos(state, nil) │ - elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ - -- not handled, but including it here as an example │ +local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ + print("Starting game as client") │ + players = players_arg │ + player = player_arg │ + player_name_to_idx = player_name_to_idx_arg │ + is_client = true │ + -- no need to draw board here, a state update should soon follow │ +end │ + │ +-- TODO I really don't want to have to serialize all of this... │ +function handle_touch_evt(evt_id, changed_touches) │ + if evt_id == "touchmove" then │ + local time = alexgames.get_time_ms() │ + if last_move_time ~= nil and time - last_move_time < MAX_MOVE_PERIOD_MS then │ + throttled_count = throttled_count + 1 │ + return │ + end │ + last_move_time = time │ + end │ + if not is_client then │ + core.handle_touch_evt(state, player, evt_id, changed_touches) │ + else │ + local moves = core.touches_to_moves(state, player, evt_id, changed_touches) │ + for _, move in ipairs(moves) do │ + local move_msg = string.format("move:%d,%d,%s,%d,%d", │ + move.player, move.move_type, move.input_src, move.y, move.x) │ + alexgames.send_message("all", move_msg) │ + end │ end │ + send_state_updates_if_host() │ + update() │ end │ │ -function handle_mousemove(pos_y, pos_x) │ - if state.mouse_down then │ - state.user_input_pos_y = pos_y │ - state.user_input_pos_x = pos_x │ - --core.set_user_input_pos(state, {y=pos_y, x=pos_x}) │ + │ +alexgames.enable_evt('touch') │ + │ +wait_for_players.init(players, player, start_host_game, start_client_game) │ +draw.init(args) │ +local cards = require("libs/cards/cards") │ + │ +local serialize = {} │ + │ +-- TODO put it a library │ +local function serialize_16bit(val) │ + local output = "" │ + local orig_val = val │ + if val == nil then │ + val = 0x7fff │ + else │ + val = math.floor(val) │ + end │ + val = val + 0x7fff │ + if not(0 <= val and val <= 0xffff) then │ + error(string.format("Need 16 bit val, recvd %s", orig_val)) │ + return nil │ + end │ + output = output .. string.char(math.floor((val/256))&0xff) │ + output = output .. string.char(math.floor(val%256)) │ + return output │ +end │ +-- TODO put in a library │ +local function deserialize_16bit(bytes) │ + if #bytes < 2 then │ + error(string.format("Expected at least 2 bytes, recvd %d", #bytes)) │ + end │ + local msb = string.byte(table.remove(bytes,1)) │ + local lsb = string.byte(table.remove(bytes,1)) │ + local val = ((msb << 8) | lsb) - 0x7fff │ + --print(string.format("deserialize_16bit %02x %02x returning %s", msb, lsb, val)) │ + if val == 0x7fff then │ + return nil │ + else │ + return val │ end │ end │ │ -function handle_touch_evt(evt_id, touches) │ - print(string.format("handle_touch_evt(evt_id=%s, touches[%d])", evt_id, #touches)) │ - for _, touch in ipairs(touches) do │ - if evt_id == 'touchstart' and state.active_touch == nil then │ - state.active_touch = touch.id │ - state.user_input_pos_y = touch.y │ - state.user_input_pos_x = touch.x │ - elseif evt_id == 'touchmove' and touch.id == state.active_touch then │ - state.user_input_pos_y = touch.y │ - state.user_input_pos_x = touch.x │ - elseif evt_id == 'touchend' or evt_id == 'touchcancel' and touch.id == state.active_touch then │ - state.active_touch = nil │ - core.set_user_input_pos(state, nil) │ - end │ +local function bytestr_to_byteary(byte_str) │ + local byte_ary = {} │ + for i=1,#byte_str do │ + byte_ary[i] = byte_str:sub(i,i) │ end │ - │ + return byte_ary │ end │ │ --- This function is called when the game is started. │ --- It is better to put game init stuff here than at the top level, │ --- so that the game code could be loaded only once, but multiple game states │ --- could be rendered (e.g. history browser). │ --- │ --- The session_id_arg and state_serialized should be set if the game │ --- is being loaded from the history browser (for the player to play, or │ --- to render a preview), or the state is loaded from the URL parameter. │ --- session_id_arg is only used when storing state with the │ --- `alexgames.save_state` API, it indicates whether the state of a previous │ --- game should be updated, or if a new saved state session should be created. │ -function start_game(session_id_arg, state_serialized) │ - draw.init(board_height, board_width) │ - │ - -- This causes update to be called every `MS_PER_FRAME` ms. │ - alexgames.set_timer_update_ms(MS_PER_FRAME) │ - │ - -- This causes handle_key_evt to get key presses. │ - alexgames.enable_evt("key") │ - │ - -- This causes handle_mouse_evt to get events on mouse up/down. │ - alexgames.enable_evt("mouse_updown") │ - │ - -- This causes handle_mousemove to get events on mouse move. │ - alexgames.enable_evt("mouse_move") │ + │ + │ +function serialize.serialize_state_for_client(state, player) │ + local output = "" │ + │ │ - -- This causes handle_touch_evt to get events on touchscreen inputs. │ - alexgames.enable_evt("touch") │ + output = output .. serialize_16bit(state.card_height) │ + output = output .. serialize_16bit(state.card_width) │ + output = output .. serialize_16bit(#state.player_states) │ + for _, player_state in ipairs(state.player_states) do │ + output = output .. serialize_16bit(player_state.y) │ + output = output .. serialize_16bit(player_state.x) │ + -- this could be a single byte │ + output = output .. serialize_16bit(player_state.card_idx) │ + output = output .. serialize_16bit(player_state.card_orig_y) │ + output = output .. serialize_16bit(player_state.card_orig_x) │ + end │ + │ + output = output .. serialize_16bit(#state.cards) │ + for _, card_info in ipairs(state.cards) do │ + local card_int = nil │ + if card_info.revealed_all or card_info.revealed_to_player == player then │ + card_int = cards.card_to_int(card_info.card) │ + else │ + card_int = cards.UNREVEALED_CARD │ + end │ + output = output .. serialize_16bit(card_int) │ + output = output .. serialize_16bit(card_info.y) │ + output = output .. serialize_16bit(card_info.x) │ + end │ + return output │ end │ -local core = {} │ │ -local BALL_RADIUS = 20 │ +function serialize.deserialize_client_state(bytes) │ + local state = {} │ + bytes = bytestr_to_byteary(bytes) │ │ -local MAX_DIM_VEL = 200 │ + state.card_height = deserialize_16bit(bytes) │ + state.card_width = deserialize_16bit(bytes) │ │ -local USER_INPUT_SPEED = 300 │ + local player_count = deserialize_16bit(bytes) │ + state.player_states = {} │ + for i=1,player_count do │ + state.player_states[i] = {} │ + state.player_states[i].y = deserialize_16bit(bytes) │ + state.player_states[i].x = deserialize_16bit(bytes) │ + state.player_states[i].card_idx = deserialize_16bit(bytes) │ + state.player_states[i].card_orig_y = deserialize_16bit(bytes) │ + state.player_states[i].card_orig_x = deserialize_16bit(bytes) │ + end │ │ -function core.new_state(board_width, board_height) │ - local state = { │ - frame_idx = 0, │ + local card_count = deserialize_16bit(bytes) │ + state.cards = {} │ + for i=1,card_count do │ + state.cards[i] = {} │ + local card_int = deserialize_16bit(bytes) │ + state.cards[i].card = cards.int_to_card(card_int) │ + state.cards[i].y = deserialize_16bit(bytes) │ + state.cards[i].x = deserialize_16bit(bytes) │ + state.cards[i].recvd = true │ + end │ │ - board_height = board_height, │ - board_width = board_width, │ + return state │ +end │ │ - ball_radius = BALL_RADIUS, │ - ball_pos_y = BALL_RADIUS, │ - ball_pos_x = BALL_RADIUS, │ - ball_vel_y = 200, │ - ball_vel_x = 80, │ +return serialize │ +local draw = {} │ │ - user_input_vec = nil, │ +local cell_size = nil │ +local x_offset = nil │ +local num_choice_y_offset = nil │ +local num_choice_x_offset = nil │ │ - mouse_down = false, │ - active_touch = nil, │ - user_input_pos_y = nil, │ - user_input_pos_x = nil, │ +local OUTLINE_COLOUR = '#88888888' │ +local TEXT_COLOUR = '#000000' │ +local TEXT_SIZE = 24 │ +local TEXT_PADDING_Y = 5 │ + │ +local ORIG_CELL_COLOUR = '#cccccc44' │ +local SELECTED_BG_COLOUR = '#0088cc33' │ + │ +local CELL_LINE_THICKNESS = 1 │ +local BOX_LINE_THICKNESS = 4 │ + │ +local core = require("games/sudoku/sudoku_core") │ +local draw_shapes = require("libs/draw/draw_shapes") │ +local alexgames = require("alexgames") │ + │ +local board_height = nil │ +local board_width = nil │ + │ +function draw.init(width, height) │ + cell_size = math.floor(math.min(width,height)*1.0/(core.GAME_SIZE + 2.5)) │ + x_offset = math.floor((width - cell_size*core.GAME_SIZE)/2) │ + board_height = height │ + board_width = width │ + │ + num_choice_y_offset = board_height - cell_size │ + num_choice_x_offset = math.floor((board_width - (core.GAME_SIZE + 1)*cell_size)/2) │ + return { │ + selected = nil, │ } │ - return state │ end │ │ -local function clip(min_val, val, max_val) │ - if val < min_val then return min_val │ - elseif val > max_val then return max_val │ - else return val end │ +local function draw_num_choices() │ + local choices = { 'x' } │ + for num=1,core.GAME_SIZE do │ + table.insert(choices, string.format("%d", num)) │ + end │ + for choice_idx, choice_val in ipairs(choices) do │ + alexgames.draw_text(choice_val, TEXT_COLOUR, │ + math.floor(num_choice_y_offset + TEXT_SIZE/2), │ + num_choice_x_offset + math.floor((choice_idx-0.5)*cell_size), │ + TEXT_SIZE, 0) │ + end │ end │ │ -function core.update_ball_pos(state, dt_ms) │ - if state.user_input_vec ~= nil then │ - print(string.format("Adjusting ball pos from user input {y=%f, x=%f}", state.user_input_vec.y, state.user_input_vec.x)) │ - state.ball_vel_x = state.ball_vel_x + state.user_input_vec.x * USER_INPUT_SPEED / 1000 * dt_ms │ - state.ball_vel_y = state.ball_vel_y + state.user_input_vec.y * USER_INPUT_SPEED / 1000 * dt_ms │ +function draw.draw_state(state, ui_state) │ + alexgames.draw_clear() │ + for y, row in ipairs(state.board) do │ + for x, cell in ipairs(row) do │ + draw_shapes.draw_rect_outline(OUTLINE_COLOUR, CELL_LINE_THICKNESS, │ + (y-1)*cell_size, x_offset + (x-1)*cell_size, │ + y*cell_size, x_offset + x*cell_size) │ + local cell_bg = nil │ + if cell.is_init_val then │ + cell_bg = ORIG_CELL_COLOUR │ + elseif ui_state.selected ~= nil and │ + ui_state.selected.y == y and │ + ui_state.selected.x == x then │ + cell_bg = SELECTED_BG_COLOUR │ + end │ + if cell_bg ~= nil then │ + alexgames.draw_rect(cell_bg, │ + (y-1)*cell_size, x_offset + (x-1)*cell_size, │ + y*cell_size, x_offset + x*cell_size) │ + end │ + if cell.val ~= 0 then │ + alexgames.draw_text(string.format("%d", cell.val), TEXT_COLOUR, │ + math.floor((y-0.5)*cell_size + TEXT_SIZE/2), │ + math.floor((x-0.5)*cell_size) + x_offset, │ + TEXT_SIZE, 0) │ + end │ + end │ end │ │ - state.ball_vel_x = clip(-MAX_DIM_VEL, state.ball_vel_x, MAX_DIM_VEL) │ - state.ball_vel_y = clip(-MAX_DIM_VEL, state.ball_vel_y, MAX_DIM_VEL) │ + for y=1,core.BOX_SIZE-1 do │ + alexgames.draw_line(OUTLINE_COLOUR, BOX_LINE_THICKNESS, │ + y*core.BOX_SIZE*cell_size, x_offset + 0, │ + y*core.BOX_SIZE*cell_size, x_offset + core.GAME_SIZE*cell_size) │ + end │ + for x=1,core.BOX_SIZE-1 do │ + alexgames.draw_line(OUTLINE_COLOUR, BOX_LINE_THICKNESS, │ + 0, x_offset + x*core.BOX_SIZE*cell_size, │ + core.GAME_SIZE*cell_size, x_offset + x*core.BOX_SIZE*cell_size) │ + end │ │ - state.ball_pos_y = state.ball_pos_y + state.ball_vel_y * dt_ms/1000 │ - state.ball_pos_x = state.ball_pos_x + state.ball_vel_x * dt_ms/1000 │ + if ui_state.selected ~= nil then │ + draw_num_choices() │ + end │ + alexgames.draw_refresh() │ +end │ │ - if state.ball_pos_y < state.ball_radius or state.ball_pos_y + state.ball_radius >= state.board_height then │ - state.ball_vel_y = -state.ball_vel_y │ +function draw.get_cell_coords(pos_y, pos_x) │ + local coords = { │ + y = math.floor(pos_y/cell_size) + 1, │ + x = math.floor((pos_x - x_offset)/cell_size) + 1, │ + } │ + │ + if 1 <= coords.y and coords.y <= core.GAME_SIZE and │ + 1 <= coords.x and coords.x <= core.GAME_SIZE then │ + return coords │ + else │ + return nil │ end │ +end │ │ - if state.ball_pos_x < state.ball_radius or state.ball_pos_x + state.ball_radius >= state.board_width then │ - state.ball_vel_x = -state.ball_vel_x │ +function draw.get_num_choice(ui_state, pos_y, pos_x) │ + if ui_state.selected == nil then │ + return nil │ + end │ + if pos_y >= num_choice_y_offset then │ + if num_choice_x_offset <= pos_x and pos_x <= num_choice_x_offset + (core.GAME_SIZE+1) * cell_size then │ + local idx = math.floor((pos_x - num_choice_x_offset)/cell_size) │ + return idx │ + end │ end │ end │ │ -local function get_vec_towards_pt(state, pt) │ - if pt == nil then return nil end │ - local dy = pt.y - state.ball_pos_y │ - local dx = pt.x - state.ball_pos_x │ +function draw.handle_user_sel(ui_state, cell) │ + if ui_state.selected ~= nil and │ + ui_state.selected.y == cell.y and │ + ui_state.selected.x == cell.x then │ + ui_state.selected = nil │ + else │ + ui_state.selected = cell │ + end │ +end │ │ - if dy == 0 and dx == 0 then return nil end │ +return draw │ +local core = {} │ │ - local mag = math.sqrt(dy*dy + dx*dx) │ +local alexgames = require("alexgames") │ +local shuffle = require("libs/shuffle") │ │ - dy = dy / mag │ - dx = dx / mag │ +core.GAME_SIZE = 9 │ +core.BOX_SIZE = math.floor(math.sqrt(core.GAME_SIZE)) │ │ - return { y = dy, x = dx } │ +if core.BOX_SIZE*core.BOX_SIZE ~= core.GAME_SIZE then │ + error("Invalid box size: is not sqrt of game size") │ end │ │ -function core.set_user_input_vec(state, vec) │ - state.user_input_vec = vec │ +local GROUP_TYPE_ROW = 1 │ +local GROUP_TYPE_COL = 2 │ +local GROUP_TYPE_BOX = 3 │ + │ +local GROUP_TYPES = { │ + GROUP_TYPE_ROW, │ + GROUP_TYPE_COL, │ + GROUP_TYPE_BOX, │ +} │ + │ +local function print_board(board) │ + for y=1,core.GAME_SIZE do │ + if y%3 == 1 then │ + print('+---+---+---+') │ + end │ + local s = '|' │ + for x=1,core.GAME_SIZE do │ + if board[y][x].val ~= 0 then │ + s = s .. string.format("%s", board[y][x].val) │ + else │ + s = s .. " " │ + end │ + if x%3 == 0 then │ + s = s .. '|' │ + end │ + end │ + print(s) │ + end │ end │ │ -function core.set_user_input_pos(state, pos) │ - local vec = get_vec_towards_pt(state, pos) │ - core.set_user_input_vec(state, vec) │ + │ +local function pt_eq(pt1, pt2) │ + return pt1.y == pt2.y and pt1.x == pt2.x │ end │ │ -return core │ -local core = require("games/endless_runner/endless_runner_core") │ -local draw = require("games/endless_runner/endless_runner_draw") │ │ -local alexgames = require("alexgames") │ +-- Return y,x coords where idx is value in each cell │ +-- x=1, 2, 3 │ +-- y=1[1][2][3], │ +-- 2[4][5][6], │ +-- 3[7][8][9] ] │ +local function get_box_pt(idx) │ + return { y = math.floor((idx-1)/core.BOX_SIZE)+1, │ + x = math.floor((idx-1)%core.BOX_SIZE)+1 } │ +end │ │ -local FPS = 60 │ +assert(pt_eq(get_box_pt(1), {y=1,x=1})) │ +assert(pt_eq(get_box_pt(2), {y=1,x=2})) │ +assert(pt_eq(get_box_pt(3), {y=1,x=3})) │ +assert(pt_eq(get_box_pt(4), {y=2,x=1})) │ +assert(pt_eq(get_box_pt(5), {y=2,x=2})) │ +assert(pt_eq(get_box_pt(6), {y=2,x=3})) │ +assert(pt_eq(get_box_pt(7), {y=3,x=1})) │ +assert(pt_eq(get_box_pt(8), {y=3,x=2})) │ +assert(pt_eq(get_box_pt(9), {y=3,x=3})) │ │ -local g_state = nil │ +-- Returns first cell in each box, e.g. │ +-- y,x coords of each cell below, where box_idx is value in cell │ +-- x=1, 2, 3, 4, 5, 6, 7, 8, 9 │ +-- y=1[1][ ][ ]|[2][ ][ ]|[3][ ][ ] │ +-- 2[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- 3[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- ---------+---------+--------- │ +-- 4[4][ ][ ]|[5][ ][ ]|[6][ ][ ] │ +-- 5[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- 6[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- ---------+---------+--------- │ +-- 7[7][ ][ ]|[8][ ][ ]|[9][ ][ ] │ +-- 8[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- 9[ ][ ][ ]|[ ][ ][ ]|[ ][ ][ ] │ +-- │ +local function get_box_start_pt(box_idx) │ + local pt = get_box_pt(box_idx) │ + pt.y = (pt.y-1) * core.BOX_SIZE + 1 │ + pt.x = (pt.x-1) * core.BOX_SIZE + 1 │ + return pt │ +end │ │ -function update(dt_ms) │ - if dt_ms and dt_ms > 0 then │ - core.update_state(g_state, dt_ms) │ +assert(pt_eq(get_box_start_pt(1), {y=1, x=1})) │ +assert(pt_eq(get_box_start_pt(2), {y=1, x=4})) │ +assert(pt_eq(get_box_start_pt(3), {y=1, x=7})) │ +assert(pt_eq(get_box_start_pt(4), {y=4, x=1})) │ +assert(pt_eq(get_box_start_pt(5), {y=4, x=4})) │ +assert(pt_eq(get_box_start_pt(6), {y=4, x=7})) │ +assert(pt_eq(get_box_start_pt(7), {y=7, x=1})) │ +assert(pt_eq(get_box_start_pt(8), {y=7, x=4})) │ +assert(pt_eq(get_box_start_pt(9), {y=7, x=7})) │ + │ +local function pt_ary_eq(pt_ary1, pt_ary2) │ + if #pt_ary1 ~= #pt_ary2 then │ + return false │ end │ - draw.update(g_state) │ + │ + for i, _ in ipairs(pt_ary1) do │ + if not pt_eq(pt_ary1[i], pt_ary2[i]) then │ + return false │ + end │ + end │ + return true │ end │ │ -local jump_keys = { │ - ["Space"] = true, │ - ["Enter"] = true, │ - ["ArrowUp"] = true, │ - ["KeyK"] = true, │ - ["KeyW"] = true │ -} │ +local function pt_add(pt1, pt2) │ + return { y = pt1.y + pt2.y, │ + x = pt1.x + pt2.x } │ +end │ │ -local function new_game() │ - g_state = core.new_state() │ +assert(pt_eq(get_box_start_pt(1), {y=1,x=1})) │ +assert(pt_eq(get_box_start_pt(2), {y=1,x=4})) │ +assert(pt_eq(get_box_start_pt(3), {y=1,x=7})) │ +assert(pt_eq(get_box_start_pt(4), {y=4,x=1})) │ +assert(pt_eq(get_box_start_pt(5), {y=4,x=4})) │ +assert(pt_eq(get_box_start_pt(6), {y=4,x=7})) │ +assert(pt_eq(get_box_start_pt(7), {y=7,x=1})) │ +assert(pt_eq(get_box_start_pt(8), {y=7,x=4})) │ +assert(pt_eq(get_box_start_pt(9), {y=7,x=7})) │ + │ +local function cells_in_group(group_type, idx) │ + local cells = {} │ + if group_type == GROUP_TYPE_ROW then │ + local y = idx │ + for x=1,core.GAME_SIZE do │ + table.insert(cells, { y = y, x = x }) │ + end │ + elseif group_type == GROUP_TYPE_COL then │ + local x = idx │ + for y=1,core.GAME_SIZE do │ + table.insert(cells, { y = y, x = x }) │ + end │ + elseif group_type == GROUP_TYPE_BOX then │ + local box_idx = idx │ + for cell_idx=1,core.GAME_SIZE do │ + local pt = pt_add(get_box_start_pt(box_idx), get_box_pt(cell_idx)) │ + pt = pt_add(pt, { y = -1, x = -1 }) │ + table.insert(cells, pt) │ + end │ + else │ + error(string.format("unexpected group_type: %s", group_type)) │ + end │ + return cells │ end │ │ -function handle_key_evt(key_evt, key_id) │ - print(string.format("evt=%s, id=%s", key_evt, key_id)) │ - if jump_keys[key_id] then │ - if key_evt == "keydown" then │ - core.jump(g_state, core.JUMP_TYPE_KEY) │ + │ +assert(pt_ary_eq(cells_in_group(GROUP_TYPE_BOX, 1), { │ + { y = 1, x = 1}, │ + { y = 1, x = 2}, │ + { y = 1, x = 3}, │ + { y = 2, x = 1}, │ + { y = 2, x = 2}, │ + { y = 2, x = 3}, │ + { y = 3, x = 1}, │ + { y = 3, x = 2}, │ + { y = 3, x = 3}, │ +})) │ + │ +local function get_pt_group_idx(group_type, y, x) │ + if group_type == GROUP_TYPE_ROW then │ + return y │ + elseif group_type == GROUP_TYPE_COL then │ + return x │ + elseif group_type == GROUP_TYPE_BOX then │ + local box_idx = math.floor( (y-1)/core.BOX_SIZE)*core.BOX_SIZE + math.floor( (x-1)/core.BOX_SIZE) + 1 │ + return box_idx │ + else │ + error(string.format("unexpected group_type: %s", group_type)) │ + end │ +end │ + │ + │ +local function is_board_valid(state) │ + for _, group_type in ipairs(GROUP_TYPES) do │ + for group_idx=1,core.GAME_SIZE do │ + local nums_seen = {} │ + for _, pt in ipairs(cells_in_group(group_type, group_idx)) do │ + local val = state.board[pt.y][pt.x].val │ + if val ~= 0 then │ + if nums_seen[val] then │ + return false │ + end │ + nums_seen[val] = true │ + end │ + end │ end │ - return true │ end │ - return false │ + return true │ end │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - if evt_id == alexgames.MOUSE_EVT_DOWN then │ - core.jump(g_state, core.JUMP_TYPE_KEY) │ - if draw.in_new_game_btn(state, pos_y, pos_x) then │ - new_game() │ +local debug = false │ + │ +local function get_possible_values(board, y, x) │ + local vals = {} │ + for i=1,core.GAME_SIZE do │ + vals[i] = true │ + end │ + │ + if debug then print_board(board) end │ + if debug then print(string.format('--- checking y=%d,x=%d', y, x)) end │ + for _, group_type in ipairs(GROUP_TYPES) do │ + local group_idx = get_pt_group_idx(group_type, y, x) │ + for _, pt in ipairs(cells_in_group(group_type, group_idx)) do │ + local val = board[pt.y][pt.x].val │ + if val ~= 0 then │ + if debug then print(string.format("found val %d in group_type=%d, group_idx=%d", val, group_type, group_idx)) end │ + vals[val] = false │ + end │ end │ end │ │ + local val_list = {} │ + for val, is_valid in ipairs(vals) do │ + if is_valid then │ + table.insert(val_list, val) │ + end │ + end │ + return val_list │ end │ │ -function handle_touch_evt(evt_id, touches) │ - for _, touch in ipairs(touches) do │ - if evt_id == "touchstart" then │ - core.jump(g_state, core.JUMP_TYPE_TOUCH) │ - if draw.in_new_game_btn(state, touch.y, touch.x) then │ - new_game() │ +local function get_cell_with_min_possib_vals(board) │ + local cell = nil │ + local min_possib_vals = nil │ + for y=1,core.GAME_SIZE do │ + for x=1,core.GAME_SIZE do │ + if board[y][x].val ~= 0 then │ + goto next_cell │ end │ + local possib_vals = get_possible_values(board, y, x) │ + if min_possib_vals == nil or #possib_vals < min_possib_vals then │ + min_possib_vals = #possib_vals │ + cell = { y = y, x = x } │ + end │ + if min_possib_vals == 0 then │ + return cell │ + end │ + ::next_cell:: │ end │ end │ + return cell │ +end │ │ +local function copy_board(board) │ + local new_board = {} │ + for y, row in ipairs(board) do │ + new_board[y] = {} │ + for x, cell in ipairs(row) do │ + new_board[y][x] = {} │ + new_board[y][x].val = cell.val │ + end │ + end │ + return new_board │ end │ │ -function start_game(session_id_arg, serialized_state_arg) │ - new_game() │ +local function is_board_complete(board) │ + for y=1,core.GAME_SIZE do │ + for x=1,core.GAME_SIZE do │ + if board[y][x].val == 0 then │ + return false │ + end │ + end │ + end │ + return true │ +end │ │ - alexgames.set_timer_update_ms(1000/FPS) │ - alexgames.enable_evt("key") │ - alexgames.enable_evt("mouse_updown") │ - alexgames.enable_evt("touch") │ +local function get_num_possib_solutions(board, max_count) │ + --print_board(board) │ + board = copy_board(board) │ + local solution_count = 0 │ + local cell, possib_vals │ + while true do │ + if is_board_complete(board) then │ + return 1 │ + end │ + │ + cell = get_cell_with_min_possib_vals(board) │ + if cell == nil then │ + error("get_cell_with_min_possib_vals is nil?") │ + return 0 │ + end │ + │ + possib_vals = get_possible_values(board, cell.y, cell.x) │ + --print(string.format("found cell{y=%d,x=%d} has %d possib_vals", cell.y, cell.x, #possib_vals)) │ + if #possib_vals == 0 then │ + if is_board_complete(board) then │ + return 1 │ + else │ + return 0 │ + end │ + elseif #possib_vals == 1 then │ + --print(string.format("filling in easy val %d to {y=%d,x=%d}", possib_vals[1], cell.y, cell.x)) │ + board[cell.y][cell.x].val = possib_vals[1] │ + else │ + break │ + end │ + end │ + for _, possib_val in ipairs(possib_vals) do │ + local board2 = copy_board(board) │ + --print(string.format("guessing val=%d at {y=%d,x=%d}", possib_val, cell.y, cell.x)) │ + board2[cell.y][cell.x].val = possib_val │ + if solution_count >= max_count then │ + return solution_count │ + end │ + solution_count = solution_count + get_num_possib_solutions(board2, max_count) │ + end │ + return solution_count │ end │ -local core = {} │ │ --- TODO remove, only for debugging │ -local alexgames = require("alexgames") │ +local function solve_board(board) │ + board = copy_board(board) │ + while not is_board_complete(board) do │ + local cell = get_cell_with_min_possib_vals(board) │ + local possib_vals = get_possible_values(board, cell.y, cell.x) │ + --print(string.format("found cell {y=%d,x=%d} has %d possib vals", cell.y, cell.x, #possib_vals)) │ + if #possib_vals == 0 then │ + return board │ + end │ │ -local Y_MIN = 0 │ -local Y_MAX = 10 │ + if #possib_vals == 1 then │ + --print(string.format("filling in val %d to {y=%d,x=%d}", possib_vals[1], cell.y, cell.x)) │ + board[cell.y][cell.x].val = possib_vals[1] │ + else │ + shuffle.shuffle(possib_vals) │ + for _, possib_val in ipairs(possib_vals) do │ + --print("making guess val=%d, y=%d,x=%d", possib_val, cell.y, cell.x) │ + local board2 = copy_board(board) │ + board2[cell.y][cell.x].val = possib_val │ + board2 = solve_board(board2) │ + if is_board_complete(board2) then │ + return board2 │ + end │ + end │ + -- if we hit this, the board wasn't solvable │ + return board │ + end │ + end │ + return board │ +end │ │ -core.PLAYER_SIZE_Y = 0.5 │ -core.PLAYER_SIZE_X = 0.75 │ +local function get_random_filled_in_cell(board) │ + local cells = {} │ + for y=1,core.GAME_SIZE do │ + for x=1,core.GAME_SIZE do │ + if board[y][x].val ~= 0 then │ + table.insert(cells, { y=y, x=x} ) │ + end │ + end │ + end │ + return cells[math.random(#cells)] │ +end │ │ -core.WALL_SIZE_X = 1 │ +function core.new_game() │ + local state = { │ + board = {}, │ + } │ │ -core.JUMP_TYPE_KEY = 1 │ -core.JUMP_TYPE_TOUCH = 2 │ + for y=1,core.GAME_SIZE do │ + state.board[y] = {} │ + for x=1,core.GAME_SIZE do │ + state.board[y][x] = {} │ + state.board[y][x].val = 0 │ + end │ + end │ │ -local DIST_BETWEEN_WALLS = 4 │ -local GRAVITY = 15 │ ---local JUMP_SPEED_INC_KEY = 8 │ ---local JUMP_SPEED_INC_TOUCH = 6.5 │ + local start_time_ms = alexgames.get_time_ms() │ + state.board = solve_board(state.board) │ + local i = 0 │ + while i < 400 do │ + i = i + 1 │ + local orig_board = copy_board(state.board) │ + local cell = get_random_filled_in_cell(state.board) │ + state.board[cell.y][cell.x].val = 0 │ + if get_num_possib_solutions(state.board, 2) > 1 then │ + state.board = orig_board │ + break │ + elseif get_num_possib_solutions(state.board, 2) == 1 then │ + -- pass │ + else │ + error("more than 1 solution?") │ + end │ + end │ + for y=1,core.GAME_SIZE do │ + for x=1,core.GAME_SIZE do │ + state.board[y][x].is_init_val = (state.board[y][x].val ~= 0) │ + end │ + end │ + ::done_generating_game:: │ + local end_time_ms = alexgames.get_time_ms() │ │ -local Y_VEL_ON_JUMP = 5 │ │ -local Y_POS_INIT = 5 │ ---local WALL_GAP_SIZE = 3.5 -- this doesn't seem hard enough, even on mobile │ ---local WALL_GAP_SIZE = 3.25 -- this seems a bit harder, but not much │ ---local WALL_GAP_SIZE = 3 -- this seems about right │ ---local WALL_GAP_SIZE = 2.75 │ ---local WALL_GAP_SIZE = 2.5 │ -local WALL_GAP_SIZE = 2.0 │ + alexgames.set_status_msg(string.format("Generated a game in %.3f seconds", (end_time_ms - start_time_ms)/1000)) │ + --local soln_count = get_num_possib_solutions(state.board, 5) │ + --print("found " .. soln_count .. " possible solutions (max 5)") │ + │ + debug = true │ + return state │ +end │ │ -local FIRST_WALL_X = 8 │ +function core.user_enter(state, y, x, num_choice) │ + if state.board[y][x].is_init_val then │ + return -- TODO error code? │ + end │ │ + state.board[y][x].val = num_choice │ +end │ │ -local WALL_GAP_POS_MIN = 2 │ -local WALL_GAP_POS_MAX = 8 │ +return core │ │ -local WALL_INIT_SEGMENTS = 5 │ +local core = require("games/sudoku/sudoku_core") │ +local draw = require("games/sudoku/sudoku_draw") │ │ -local PLAYER_X_VEL = DIST_BETWEEN_WALLS │ +local ui_state = draw.init(480, 480) │ +local state = core.new_game() │ │ --- Once a wall is this far away behind the player, │ --- remove it │ -local REMOVE_WALLS_BEHIND_DIST = 5 │ +function update() │ + draw.draw_state(state, ui_state) │ +end │ │ -local function clip(val, min_val, max_val) │ - if val <= min_val then │ - return min_val │ +function handle_user_clicked(pos_y, pos_x) │ + local cell = draw.get_cell_coords(pos_y, pos_x) │ + if cell ~= nil then │ + print("user clicked: " .. cell.y .. ", " .. cell.x) │ + draw.handle_user_sel(ui_state, cell) │ end │ │ - if val >= max_val then │ - return max_val │ + │ + local num_choice = draw.get_num_choice(ui_state, pos_y, pos_x) │ + if num_choice ~= nil and ui_state.selected ~= nil then │ + print("user chose ", num_choice) │ + core.user_enter(state, ui_state.selected.y, ui_state.selected.x, num_choice) │ end │ │ - return val │ + update() │ + │ end │ │ -local function random_range(min_val, max_val) │ - return min_val + math.random() * (max_val - min_val) │ +function start_game() │ end │ +-- Game: Chess │ +-- Author: Alex Barry (github.com/alexbarry) │ +--[[ │ +TODO: │ +* implement logic for check and checkmate │ +* prevent player from moving into check │ +* implement serializing state so state can be saved or network games can be played │ +* implement castling │ +* implement pawn en-passant capturing?? (I didn't even know about this rule) │ +* implement history (undo/redo) │ +--]] │ +local alexgames = require("alexgames") │ │ -local function generate_new_wall_segs(prev_gap_y_pos, x_pos) │ - local new_gap_pos = prev_gap_y_pos + math.random(-3,3) │ - --local new_gap_pos = prev_gap_y_pos + math.random(-1,1) * 3 │ - new_gap_pos = clip(new_gap_pos, WALL_GAP_POS_MIN, WALL_GAP_POS_MAX) │ - -- TODO consider decreasing gap size gradually from say 4 to 3 or so │ - -- from wall 0 to 100. │ - -- TODO change x_pos to index │ - --local wall_gap_size = random_range(2,4) │ - local wall_gap_size = 2.75 │ - local wall1_y = new_gap_pos - wall_gap_size/2 │ - local wall2_y = new_gap_pos + wall_gap_size/2 │ - local wall1 = { │ - x = x_pos, │ - y_outer = Y_MIN, │ - y_inner = wall1_y │ - } │ - local wall2 = { │ - x = x_pos, │ - y_outer = Y_MAX, │ - y_inner = wall2_y │ - } │ +local core = require("games/chess/chess_core") │ +local draw = require("games/chess/chess_draw") │ +local serialize = require("games/chess/chess_serialize") │ │ - return { │ - wall1 = wall1, │ - wall2 = wall2, │ - gap_pos = new_gap_pos │ - } │ -end │ +local utils = require("libs/utils") │ +local two_player = require("libs/multiplayer/two_player") │ │ -local function get_last_gap_pos(state) │ - assert(#state.walls >= 2) │ - local wall1 = state.walls[#state.walls-1] │ - local wall2 = state.walls[#state.walls-0] │ +local g_session_id = alexgames.get_new_session_id() │ +local g_state = core.new_game() │ +--local player = core.PLAYER_WHITE │ +local player = nil │ +local local_multiplayer = nil │ +local player_name_to_id = {} │ +local g_other_player = nil │ +local session_id = alexgames.get_new_session_id() │ │ - return (wall1.y_inner + wall2.y_inner)/2 │ -end │ +local SELECT_PLAYER_POPUP_ID = "select_player" │ +local PLAYER_CHOICE_BTNS = { │ + "White", │ + "Black", │ +} │ +local BTN_MAP = { │ + [0] = core.PLAYER_WHITE, │ + [1] = core.PLAYER_BLACK, │ +} │ │ -function core.update_state(state, dt_ms) │ - if state.game_over then │ - return │ - end │ │ - local dt = dt_ms / 1000 │ +local BTN_ID_UNDO = "btn_undo" │ +local BTN_ID_REDO = "btn_redo" │ │ - local prev_player_x = state.player_x │ +local POPUP_ID_NEW_GAME = "game_over" │ +local POPUP_ITEM_ID_NEW_GAME_BTN = 1 │ │ - state.player_x = state.player_x + PLAYER_X_VEL * dt │ - state.player_y_vel = state.player_y_vel - GRAVITY * dt │ - state.player_y = state.player_y + state.player_y_vel * dt │ +local OPTION_ID_NEW_GAME = "new_game" │ │ - if state.player_y - core.PLAYER_SIZE_Y/2 < Y_MIN then │ - state.game_over = true │ +function get_player() │ + if local_multiplayer then │ + return g_state.player_turn │ + else │ + return player │ end │ - if state.player_y + core.PLAYER_SIZE_Y/2 >= Y_MAX then │ - state.game_over = true │ +end │ + │ +function get_other_player(player) │ + if player == core.PLAYER_WHITE then │ + return core.PLAYER_BLACK │ + elseif player == core.PLAYER_BLACK then │ + return core.PLAYER_WHITE │ + else │ + error(string.format("unexpected player: %s", player), 2) │ end │ +end │ │ - for _, wall in ipairs(state.walls) do │ - if prev_player_x - core.PLAYER_SIZE_X/2 <= wall.x + core.WALL_SIZE_X/2 and │ - wall.x - core.WALL_SIZE_X/2 <= state.player_x + core.PLAYER_SIZE_X/2 then │ - -- TODO this is a bit ugly │ - if wall.y_outer == Y_MAX and state.player_y + core.PLAYER_SIZE_Y/2 > wall.y_inner or │ - wall.y_outer == Y_MIN and state.player_y - core.PLAYER_SIZE_Y/2 < wall.y_inner then │ - local debug_str = string.format("wall { y_outer: %s, y_inner: %s, x: %s }, player = { y: %s, x: %s }", │ - wall.y_outer, wall.y_inner, wall.x, state.player_y, state.player_x) │ - -- TODO remove │ - alexgames.set_status_msg("Wall collision! Debug info: " .. debug_str) │ - state.game_over = true │ - break │ - end │ - │ +local function get_draw_state_params() │ + return { │ + local_multiplayer = local_multiplayer, │ + player = player, │ + } │ +end │ + │ +draw.init(480,480, false) │ +local function draw_board_internal() │ + --core.print_state(g_state) │ + draw.draw_state(g_state, get_draw_state_params()) │ + alexgames.set_btn_enabled(BTN_ID_UNDO, alexgames.has_saved_state_offset(g_session_id, -1)) │ + alexgames.set_btn_enabled(BTN_ID_REDO, alexgames.has_saved_state_offset(g_session_id, 1)) │ +end │ + │ +function update() │ + draw_board_internal() │ +end │ + │ +function handle_rc(rc, is_other_player) │ + if rc == core.SUCCESS then │ + -- TODO need to come up with a way to only save real moves │ + save_state() │ + alexgames.set_status_msg(core.get_status_msg(g_state)) │ + local state_serialized = serialize.serialize_state(g_state) │ + print(string.format("State is now: %s", utils.binstr_to_hr_str(state_serialized))) │ + elseif rc == core.RC_GAME_OVER then │ + local msg = core.get_status_msg(g_state) │ + alexgames.set_status_msg(msg) │ + alexgames.show_popup(POPUP_ID_NEW_GAME, { title = "Game Over", items = { │ + { item_type = alexgames.POPUP_ITEM_TYPE_MSG, msg = msg }, │ + { id = POPUP_ITEM_ID_NEW_GAME_BTN, item_type = alexgames.POPUP_ITEM_TYPE_BTN, text = "New Game" }, │ + } }) │ + else │ + local msg = core.get_err_msg(rc) │ + if is_other_player then │ + msg = "Other player invalid move: " .. msg │ end │ + alexgames.set_status_err(msg) │ end │ +end │ │ - while #state.walls > 0 and state.walls[1].x < state.player_x - REMOVE_WALLS_BEHIND_DIST do │ - table.remove(state.walls, 1) │ +function handle_user_clicked(pos_y, pos_x) │ + local coords = draw.draw_coords_to_cell(pos_y, pos_x) │ + local rc = core.player_touch(g_state, get_player(), coords) │ + if not local_multiplayer and rc == core.SUCCESS then │ + alexgames.send_message("all", string.format("move:%d,%d,%d", get_player(), coords.y, coords.x)) │ end │ + handle_rc(rc) │ + --core.print_state(g_state) │ + draw_board_internal() │ +end │ │ - local prev_gap_pos = get_last_gap_pos(state) │ - local prev_x_pos = state.walls[#state.walls].x │ - while #state.walls < 2*WALL_INIT_SEGMENTS do │ - local x_pos = prev_x_pos + DIST_BETWEEN_WALLS │ - local wall_info = generate_new_wall_segs(prev_gap_pos, x_pos) │ - table.insert(state.walls, wall_info.wall1) │ - table.insert(state.walls, wall_info.wall2) │ - prev_gap_pos = wall_info.gap_pos │ - prev_x_pos = x_pos │ +function handle_popup_btn_clicked(popup_id, btn_id, popup_state) │ + if two_player.handle_popup_btn_clicked(popup_id, btn_id) then │ + -- handled │ + elseif popup_id == POPUP_ID_NEW_GAME then │ + if btn_id == POPUP_ITEM_ID_NEW_GAME_BTN then │ + start_game() │ + alexgames.hide_popup() │ + else │ + error(string.format("Unhandled btn_id=\"%s\"", btn_id)) │ + end │ + else │ + error(string.format("Unhandled popup_id=\"%s\"", popup_id)) │ end │ +end │ │ - --print(string.format("walls count: %d; first x: %5d, last x: %5d", #state.walls, state.walls[1].x, state.walls[#state.walls].x)) │ +local function broadcast_state(dst) │ + alexgames.send_message(dst, "state:" .. serialize.serialize_state(g_state)) │ end │ │ -function core.jump(state, jump_type) │ - if state.game_over then │ - return │ - end │ +function handle_msg_received(src, msg) │ + print("Recvd msg " .. msg) │ │ + if two_player.handle_msg_received(src, msg) then │ + return │ + end │ │ - --[[ │ - local jump_inc = nil │ + local m = msg:gmatch("([^:]+):(.*)") │ + if m == nil then │ + print("Unable to parse header from msg " .. msg) │ + return │ + end │ + local header, payload = m() │ │ - if jump_type == core.JUMP_TYPE_KEY then │ - jump_inc = JUMP_SPEED_INC_KEY │ - elseif jump_type == core.JUMP_TYPE_TOUCH then │ - jump_inc = JUMP_SPEED_INC_TOUCH │ + if header == "move" then │ + local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ + if m2 == nil then │ + error("Invalid \"move\" msg from " .. src) │ + return │ + end │ + local player_idx, y, x = m2() │ + player_idx = tonumber(player_idx) │ + y = tonumber(y) │ + x = tonumber(x) │ + local coords = { y = y, x = x } │ + local rc = core.player_touch(g_state, player_idx, coords) │ + handle_rc(rc, --[[is_other_player=]] true) │ + │ + if rc ~= core.SUCCESS then │ + alexgames.set_status_err("Other player made an invalid move") │ + else │ + alexgames.set_status_msg("Your move") │ + draw_board_internal() │ + save_state() │ + end │ + │ + elseif header == "get_state" then │ + broadcast_state(src) │ + elseif header == "state" then │ + local recvd_state = serialize.deserialize_state(payload) │ + print("Recieved state:") │ + --core.print_state(recvd_state) │ + g_state = recvd_state │ + draw_board_internal() │ + save_state() │ + elseif header == "player_left" and src == "ctrl" then │ + elseif header == "player_joined" then │ + else │ + error("Unhandled message: " .. header ) │ + end │ +end │ + │ +function two_player_init() │ + local args = { │ + supports_local_multiplayer = true, │ + title = "Choose piece colour", │ + player_choices = PLAYER_CHOICE_BTNS, │ + handle_multiplayer_type_choice = function (multiplayer_type) │ + if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ + local_multiplayer = true │ + player = g_state.player_turn │ + elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ + local_multiplayer = false │ + end │ + end, │ + choice_id_to_player_id = function (btn_id) │ + return BTN_MAP[btn_id] │ + end, │ + player_name_to_id = player_name_to_id, │ + player_id_to_nice_name = function (player_id) │ + local player_colour = core.get_player_name(player_id) │ + return utils.make_first_char_uppercase(player_colour) │ + end, │ + get_msg = function () │ + local msg = "White moves first." │ + if utils.table_len(player_name_to_id) == 0 then │ + msg = msg .. "\nThe other player has not yet chosen." │ + else │ + --msg = msg .. string.format("The other player has chosen %s", │ + -- core.player_id_to_name(other_player)) │ + for player_name, player_id in pairs(player_name_to_id) do │ + local player_colour = core.get_player_name(player_id) │ + msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ + end │ + end │ + return msg │ + end, │ + handle_player_choice = function (player_name, player_id) │ + local choice_str = core.get_player_name(player_id) │ + print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ + if player_name == two_player.LOCAL_PLAYER then │ + player = player_id │ + else │ + g_other_player = player_id │ + end │ + end, │ + │ + need_reselect = function () │ + local this_player = player │ + local other_player = g_other_player │ + │ + return this_player == nil or this_player == other_player │ + end, │ + │ + get_local_player_choice = function () │ + return player │ + end │ + } │ + │ + two_player.init(args) │ +end │ + │ +local function load_state(session_id_arg, state_serialized) │ + g_session_id = session_id_arg │ + g_state = serialize.deserialize_state(state_serialized) │ +end │ + │ +local function load_state_offset(session_id_arg, move_offset) │ + local state_serialized = alexgames.adjust_saved_state_offset(session_id_arg, move_offset) │ + if state_serialized == nil then │ + error(string.format("state_serialized is nil")) │ end │ + load_state(session_id_arg, state_serialized) │ + broadcast_state("all") │ +end │ │ - state.player_y_vel = state.player_y_vel + jump_inc │ - --]] │ - state.player_y_vel = Y_VEL_ON_JUMP │ +function save_state() │ + local serialized_state = serialize.serialize_state(g_state) │ + alexgames.save_state(g_session_id, serialized_state) │ end │ │ -function core.score(state) │ - local score = math.ceil( (state.player_x - FIRST_WALL_X) / DIST_BETWEEN_WALLS ) │ - if score < 0 then │ - return 0 │ +function handle_btn_clicked(btn_id) │ + if btn_id == BTN_ID_UNDO then │ + load_state_offset(g_session_id, -1) │ + draw_board_internal() │ + elseif btn_id == BTN_ID_REDO then │ + load_state_offset(g_session_id, 1) │ + draw_board_internal() │ else │ - return score │ + error(string.format("Unhandled btn_id %s", btn_id)) │ end │ end │ │ -function core.new_state() │ - local state = { │ - player_y = Y_POS_INIT, │ - player_x = 0, │ - player_y_vel = 0, │ - │ - walls = {}, │ +function handle_game_option_evt(option_id) │ + if option_id == OPTION_ID_NEW_GAME then │ + g_session_id = alexgames.get_new_session_id() │ + g_state = core.new_game() │ + save_state() │ + draw_board_internal() │ + end │ +end │ │ - game_over = false, │ - } │ +function get_state() │ + return serialize.serialize_state(g_state) │ +end │ │ - local prev_gap_pos = Y_POS_INIT │ - for i=1,WALL_INIT_SEGMENTS do │ - if #state.walls >= 2 then │ - assert(get_last_gap_pos(state) == prev_gap_pos) │ +function start_game(session_id_arg, state_serialized) │ + local state_loaded = false │ + if state_serialized ~= nil then │ + load_state(session_id_arg, state_serialized) │ + state_loaded = true │ + else │ + local saved_session_id = alexgames.get_last_session_id() │ + if saved_session_id ~= nil and alexgames.has_saved_state_offset(saved_session_id, 0) then │ + alexgames.set_status_msg(string.format("Loading saved state session %d", saved_session_id)) │ + load_state_offset(saved_session_id, 0) │ + state_loaded = true │ end │ - local x_pos = FIRST_WALL_X + (i-1)*DIST_BETWEEN_WALLS │ - local wall_info = generate_new_wall_segs(prev_gap_pos, x_pos) │ - table.insert(state.walls, wall_info.wall1) │ - table.insert(state.walls, wall_info.wall2) │ - prev_gap_pos = wall_info.gap_pos │ end │ - return state │ + │ + two_player_init() │ + │ + alexgames.send_message("all", "get_state:") │ + │ + alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game" }) │ + │ + alexgames.create_btn(BTN_ID_UNDO, "Undo", 1) │ + alexgames.create_btn(BTN_ID_REDO, "Redo", 1) │ + --[[ │ + g_session_id = alexgames.get_new_session_id() │ + g_state = core.new_game() │ + player = core.PLAYER_WHITE │ + local_multiplayer = true │ + update() │ + --]] │ end │ +-- Game: Chess │ +-- Author: Alex Barry (github.com/alexbarry) │ │ -return core │ local draw = {} │ │ -local core = require("games/endless_runner/endless_runner_core") │ +local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ +local draw_shapes = require("libs/draw/draw_shapes") │ +local draw_colours = require("libs/draw/draw_colours") │ │ -local buttons = require("libs/ui/buttons") │ +local core = require("games/chess/chess_core") │ │ -local alexgames = require("alexgames") │ │ -local PLAYER_FILL_COLOUR = '#ff0000' │ -local PLAYER_OUTLINE_COLOUR = '#000000' │ -local PLAYER_RADIUS = 20 │ +local board_height = nil │ +local board_width = nil │ +local show_labels = nil │ │ +local OUTLINE_WIDTH = 4 │ +local cell_size = nil │ +local piece_padding = 0 │ +local border_padding = 20 │ │ -local WALL_COLOUR = '#0000ff' │ -local WALL_THICKNESS = 10 │ +local LABEL_COLOUR = '#000000' │ +local LABEL_FONT_SIZE = 12 │ +-- the number of pixels taken up by the parts of a letter that are drawn below the line, like the "tail" of the letter "g" │ +local text_y_buffer = 4 │ │ -local BTN_BACKGROUND_COLOUR = '#888' │ +--local CELL_COLOUR_WHITE = '#ffffff' │ +--local CELL_COLOUR_WHITE = '#dc802f' │ +--local CELL_COLOUR_BLACK = '#000000' │ +local CELL_COLOUR_WHITE = '#ffce9e' │ +local CELL_COLOUR_BLACK = '#d18b47' │ +local PIECE_SEL_HIGHLIGHT_OUTLINE = draw_colours.ALT_HIGHLIGHT_OUTLINE │ +local PIECE_SEL_HIGHLIGHT_COLOUR = draw_colours.ALT_HIGHLIGHT_FILL │ │ -local board_width = 480 │ -local board_height = 480 │ +local PIECE_SEL_HIGHLIGHT_OUTLINE_REMOTE = draw_colours.ALT_HIGHLIGHT_OUTLINE_REMOTE │ +local PIECE_SEL_HIGHLIGHT_COLOUR_REMOTE = draw_colours.ALT_HIGHLIGHT_FILL_REMOTE │ │ -local player_pos_y = board_height/2 │ -local player_pos_x = board_height/4 │ +local function get_cell_colour_white() │ + if alexgames.get_user_colour_pref() == "very_dark" then │ + return '#352215cc' │ + elseif alexgames.get_user_colour_pref() == "dark" then │ + return '#453225' │ + else │ + return CELL_COLOUR_WHITE │ + end │ +end │ │ -local SCORE_TEXT_SIZE = 24 │ -local padding = 5 │ +local function get_cell_colour_black() │ + if alexgames.get_user_colour_pref() == "very_dark" then │ + return '#201000cc' │ + elseif alexgames.get_user_colour_pref() == "dark" then │ + return '#302005' │ + else │ + return CELL_COLOUR_BLACK │ + end │ +end │ +local DST_HIGHLIGHT_OUTLINE = draw_colours.HIGHLIGHT_OUTLINE │ +local DST_HIGHLIGHT_COLOUR = draw_colours.HIGHLIGHT_FILL │ +local DST_HIGHLIGHT_OUTLINE_REMOTE = draw_colours.HIGHLIGHT_OUTLINE_REMOTE │ +local DST_HIGHLIGHT_COLOUR_REMOTE = draw_colours.HIGHLIGHT_FILL_REMOTE │ │ -local buttons_state = buttons.new_state() │ -local BTN_ID_NEW_GAME = "btn_new_game" │ +function draw.init(height, width, show_labels_arg) │ + board_height = height │ + board_width = width │ │ -buttons.new_button(buttons_state, { │ - id = BTN_ID_NEW_GAME, │ - text = "New Game", │ - -- TODO add defaults for all of these │ - bg_colour = "#888", │ - fg_colour = "#000", │ - outline_colour = "#000", │ - outline_width = 3, │ - text_size = 24, │ + show_labels = show_labels_arg │ + if not show_labels then │ + border_padding = 0 │ + end │ │ - y_start = padding, │ - y_end = padding + 75, │ + cell_size = math.floor((math.min(board_height, board_width) - 2*border_padding) / core.BOARD_SIZE) │ +end │ │ - x_start = board_width - padding - 200, │ - x_end = board_width - padding, │ -}) │ +local function is_cell_white(y, x) │ + return (y*(core.BOARD_SIZE+1) + x) % 2 ~= 0 │ +end │ │ +local function get_piece_graphic_id(player, piece_type, params) │ + if params == nil then params = {} end │ │ -local WALL_TO_PIXEL_SCALE = 480/10 │ + if player == core.PLAYER_BLACK then │ + if params.is_dark then │ + if piece_type == core.PIECE_ROOK then return 'chess_rook_black_dark' │ + elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_black_dark' │ + elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_black_dark' │ + elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_black_dark' │ + elseif piece_type == core.PIECE_KING then return 'chess_king_black_dark' │ + elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_black_dark' │ + else │ + error(string.format("Unexpected piece_type: %s", piece_type)) │ + end │ + else │ + if piece_type == core.PIECE_ROOK then return 'chess_rook_black' │ + elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_black' │ + elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_black' │ + elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_black' │ + elseif piece_type == core.PIECE_KING then return 'chess_king_black' │ + elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_black' │ + else │ + error(string.format("Unexpected piece_type: %s", piece_type)) │ + end │ + end │ + elseif player == core.PLAYER_WHITE then │ + if piece_type == core.PIECE_ROOK then return 'chess_rook_white' │ + elseif piece_type == core.PIECE_KNIGHT then return 'chess_knight_white' │ + elseif piece_type == core.PIECE_BISHOP then return 'chess_bishop_white' │ + elseif piece_type == core.PIECE_QUEEN then return 'chess_queen_white' │ + elseif piece_type == core.PIECE_KING then return 'chess_king_white' │ + elseif piece_type == core.PIECE_PAWN then return 'chess_pawn_white' │ + else │ + error(string.format("Unexpected piece_type: %s", piece_type)) │ + end │ + else │ + error(string.format("Unexpected player: %s", player)) │ + end │ +end │ │ -local function game_pos_to_screen_pos(state, pt) │ - local screen_pt = {} │ - screen_pt.y = board_height - (pt.y * WALL_TO_PIXEL_SCALE) │ - screen_pt.x = (pt.x - state.player_x) * WALL_TO_PIXEL_SCALE + player_pos_x │ +function draw.draw_coords_to_cell(y, x) │ + y = y - border_padding │ + x = x - border_padding │ + local y_idx = math.floor(y/cell_size)+1 │ + local x_idx = math.floor(x/cell_size)+1 │ │ - return screen_pt │ + if 1 <= x_idx and x_idx <= core.BOARD_SIZE and │ + 1 <= y_idx and y_idx <= core.BOARD_SIZE then │ + return { y=y_idx, x=x_idx } │ + else │ + return nil │ + end │ end │ │ -function draw.update(state, dt_ms) │ +function draw_rect_at_pos(colour, outline_colour, y, x) │ + cell_start_y = border_padding + (y-1)*cell_size │ + cell_start_x = border_padding + (x-1)*cell_size │ + │ + cell_end_y = border_padding + (y )*cell_size │ + cell_end_x = border_padding + (x )*cell_size │ + alexgames.draw_rect(colour, │ + cell_start_y, cell_start_x, │ + cell_end_y , cell_end_x) │ + if outline_colour then │ + draw_shapes.draw_rect_outline(outline_colour, OUTLINE_WIDTH, │ + cell_start_y, cell_start_x, │ + cell_end_y , cell_end_x) │ + end │ +end │ + │ +local function get_col_label(col) │ + return string.char(string.byte('a') + col-1) │ +end │ + │ +local function get_row_label(row) │ + return string.format('%d', row) │ +end │ + │ +local function get_piece_brightness(player) │ + if alexgames.get_user_colour_pref() == "very_dark" then │ + return 35 │ + elseif alexgames.get_user_colour_pref() == "dark" then │ + return 50 │ + else │ + return 100 │ + end │ +end │ + │ +local function draw_piece_graphic(player, piece_type, pos_y, pos_x, size_y, size_x) │ + local img_id = get_piece_graphic_id(player, piece_type) │ + local brightness = get_piece_brightness(player) │ + local invert = false │ + │ + local brightness = get_piece_brightness(player) │ + local user_colour_pref = alexgames.get_user_colour_pref() │ + if user_colour_pref == "very_dark" or user_colour_pref == "dark" then │ + if player == core.PLAYER_BLACK then │ + img_id = get_piece_graphic_id(core.PLAYER_BLACK, piece_type, {is_dark = true}) │ + --img_id = get_piece_graphic_id(core.PLAYER_WHITE, piece_type) │ + -- invert = true -- originally I just inverted the white piece, but safari doesn't support that │ + brightness = 50 │ + end │ + end │ + draw_more.draw_graphic_ul(img_id, │ + pos_y, pos_x, │ + size_y, size_x, │ + { invert = invert, brightness_percent = brightness } ) │ +end │ + │ + │ +function draw.draw_state(state, params) │ alexgames.draw_clear() │ + alexgames.draw_rect('#000000', 0, 0, board_height, board_width) │ + -- Draw checkerboard │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + local cell_colour │ + if is_cell_white(y,x) then │ + cell_colour = get_cell_colour_white() │ + else │ + cell_colour = get_cell_colour_black() │ + end │ + draw_rect_at_pos(cell_colour, nil, y, x) │ + end │ + end │ │ - for _, wall in ipairs(state.walls) do │ - local pt1 = game_pos_to_screen_pos(state, { y = wall.y_outer, x = wall.x - core.WALL_SIZE_X/2 }) │ - local pt2 = game_pos_to_screen_pos(state, { y = wall.y_inner, x = wall.x + core.WALL_SIZE_X/2 }) │ - --alexgames.draw_line(WALL_COLOUR, WALL_THICKNESS, │ - -- pt1.y, pt1.x, │ - -- pt2.y, pt2.x) │ - alexgames.draw_rect(WALL_COLOUR, │ - pt1.y, pt1.x, │ - pt2.y, pt2.x) │ + -- Add labels to rows and columns │ + if show_labels then │ + for _, y_pos in ipairs({border_padding-text_y_buffer, border_padding + core.BOARD_SIZE*cell_size+LABEL_FONT_SIZE}) do │ + for x=1,core.BOARD_SIZE do │ + local label = get_col_label(x) │ + alexgames.draw_text(label, LABEL_COLOUR, │ + y_pos, border_padding + math.floor(cell_size*(x-0.5)), │ + LABEL_FONT_SIZE, 0) │ + end │ + end │ + │ + for _, x_pos_info in ipairs({{pos = border_padding, align=-1}, {pos = board_width-border_padding, align=1}}) do │ + for y=1,core.BOARD_SIZE do │ + local label = get_row_label(y) │ + alexgames.draw_text(label, LABEL_COLOUR, │ + border_padding + math.floor(cell_size*(y-0.5)), x_pos_info.pos, │ + LABEL_FONT_SIZE, x_pos_info.align) │ + end │ + end │ end │ │ - local player_ul = { y = state.player_y + core.PLAYER_SIZE_Y/2, x = state.player_x - core.PLAYER_SIZE_X/2 } │ - local player_lr = { y = state.player_y - core.PLAYER_SIZE_Y/2, x = state.player_x + core.PLAYER_SIZE_X/2 } │ - player_ul = game_pos_to_screen_pos(state, player_ul) │ - player_lr = game_pos_to_screen_pos(state, player_lr) │ - --alexgames.draw_circle(PLAYER_FILL_COLOUR, PLAYER_OUTLINE_COLOUR, │ - -- player_pos.y, player_pos.x, PLAYER_RADIUS) │ - alexgames.draw_rect(PLAYER_FILL_COLOUR, │ - player_ul.y, player_ul.x, │ - player_lr.y, player_lr.x) │ + local highlight_colour = PIECE_SEL_HIGHLIGHT_COLOUR │ + local highlight_outline = PIECE_SEL_HIGHLIGHT_OUTLINE │ + local dst_highlight = DST_HIGHLIGHT_COLOUR │ + local dst_outline = DST_HIGHLIGHT_OUTLINE │ │ - local score_text = string.format("%d", core.score(state)) │ - alexgames.draw_text(score_text, '#880000', │ - SCORE_TEXT_SIZE + padding, │ - board_width/2, │ - SCORE_TEXT_SIZE, alexgames.TEXT_ALIGN_CENTRE) │ + if not params.local_multiplayer and params.player ~= state.player_turn then │ + highlight_colour = PIECE_SEL_HIGHLIGHT_COLOUR_REMOTE │ + highlight_outline = PIECE_SEL_HIGHLIGHT_OUTLINE_REMOTE │ + dst_highlight = DST_HIGHLIGHT_COLOUR_REMOTE │ + dst_outline = DST_HIGHLIGHT_OUTLINE_REMOTE │ + end │ │ - buttons.set_visible(buttons_state, BTN_ID_NEW_GAME, state.game_over) │ + -- If a cell is selected, highlight it │ + if state.selected ~= nil then │ + draw_rect_at_pos(highlight_colour, highlight_outline, state.selected.y, state.selected.x) │ + │ + -- Also highlight the possible moves that could be made by the selected piece │ + local possib_dsts = core.get_possib_dsts(state, state.selected) │ + for _, possib_dst in ipairs(possib_dsts) do │ + draw_rect_at_pos(dst_highlight, dst_outline, possib_dst.y, possib_dst.x) │ + end │ + end │ │ - buttons.draw(buttons_state) │ + -- Finally, draw the pieces (on top of the highlights) │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + local piece_id = state.board[y][x] │ + local player = core.get_player(piece_id) │ + if piece_id ~= core.EMPTY_PIECE_ID then │ + local piece_type = core.get_piece_type(piece_id) │ + │ + local piece_pos_y = border_padding + (y-1)*cell_size + piece_padding │ + local piece_pos_x = border_padding + (x-1)*cell_size + piece_padding │ + local piece_size_y = cell_size - 2*piece_padding │ + local piece_size_x = cell_size - 2*piece_padding │ + │ + draw_piece_graphic(player, piece_type, │ + piece_pos_y, piece_pos_x, │ + piece_size_y, piece_size_x) │ + end │ + end │ + end │ │ alexgames.draw_refresh() │ end │ │ +return draw │ +local serialize = {} │ │ -function draw.in_new_game_btn(state, pos_y, pos_x) │ - if buttons.on_user_click(buttons_state, pos_y, pos_x) then │ - return true │ +local core = require("games/chess/chess_core") │ +local serialize_lib = require("libs/serialize/serialize") │ + │ +function serialize.deserialize_state(byte_str) │ + local bytes = serialize_lib.bytestr_to_byteary(byte_str) │ + local state = {} │ + state.player_turn = serialize_lib.deserialize_byte(bytes) │ + state.board = {} │ + state.selected = nil │ + for y=1,core.BOARD_SIZE do │ + state.board[y] = {} │ + for x=1,core.BOARD_SIZE do │ + state.board[y][x] = serialize_lib.deserialize_byte(bytes) │ + end │ end │ │ - return false │ -end │ + if #bytes ~= 0 then │ + error(string.format("%d bytes remaining after deserializing", #bytes)) │ + end │ │ -return draw │ -local draw = {} │ + return state │ +end │ │ -local core = require("games/hospital/hospital_core") │ -local draw_more = require("libs/draw/draw_more") │ -local alexgames = require("alexgames") │ +function serialize.serialize_state(state) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(state.player_turn) │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + output = output .. serialize_lib.serialize_byte(state.board[y][x]) │ + end │ + end │ │ -draw.INPUT_TYPE_KEYBOARD = 1 │ -draw.INPUT_TYPE_TOUCH = 2 │ + return output │ +end │ │ -local ANIM_TYPE_FLOAT_TEXT = 1 │ +return serialize │ +-- Game: Chess │ +-- Author: Alex Barry (github.com/alexbarry) │ │ -local TIME_LEFT_BG_COLOUR = '#66666666' │ -local TIME_LEFT_FG_GOOD_COLOUR = '#008800aa' │ -local TIME_LEFT_FG_MED_COLOUR = '#ffff00ff' │ -local TIME_LEFT_FG_BAD_COLOUR = '#ff0000ff' │ -local TIME_LEFT_FG_BAD_COLOUR2 = '#bb5500ff' │ +local core = {} │ │ -local FIX_TIME_PROGRSS_BAR_BG_COLOUR = '#66ff6666' │ -local FIX_TIME_PROGRSS_BAR_FG_COLOUR = '#22ff22cc' │ +core.BOARD_SIZE = 8 │ │ -local HIGHLIGHT_COLOUR = '#ffff00' │ -local CONTROLS_TEXT_COLOUR = '#000000' │ -local CONTROLS_TEXT_SIZE = 12 │ +core.PLAYER_WHITE = 1 │ +core.PLAYER_BLACK = 2 │ +core.PIECE_COUNT = 2 │ │ -local TIME_LEFT_ICON_WIDTH = 10 │ -local PADDING = 3 │ +core.PIECE_PAWN = 1 │ +core.PIECE_ROOK = 2 │ +core.PIECE_KNIGHT = 3 │ +core.PIECE_BISHOP = 4 │ +core.PIECE_QUEEN = 5 │ +core.PIECE_KING = 6 │ +core.PIECE_TYPE_COUNT = core.PIECE_KING │ │ -local PLAYER_HIGHLIGHT_COLOURS = { │ - { fill = "#20a4a966", stroke = "#0000ff99" }, │ - { fill = "#a72ea566", stroke = "#ff008899" }, │ - { fill = "#774a1e66", stroke = "#f7aa5e99" }, │ - { fill = "#c5202066", stroke = "#ff000099" }, │ -} │ +core.EMPTY_PIECE_ID = 0 │ │ -local animations = {} │ +core.GAME_STATUS_NORMAL = 1 │ +core.GAME_STATUS_CHECK = 2 │ +core.GAME_STATUS_CHECKMATE = 3 │ │ -local highlight_line_size = 5 │ +core.SUCCESS = 0 │ +core.NOT_YOUR_PIECE = 1 │ +core.NOT_YOUR_TURN = 2 │ +core.RC_CANT_MOVE_INTO_CHECK = 3 │ +core.RC_MUST_RESOLVE_CHECK = 4 │ +core.RC_GAME_OVER = 5 │ +--core.INVALID_MOVE = 2 │ │ -local TILE_SIZE = 25 │ -local SCREEN_ORIGIN = { │ - y = 480/2, │ - x = 480/2, │ +local ERROR_CODE_MAP = { │ + [core.SUCCESS] = "Success", │ + [core.NOT_YOUR_PIECE] = "Not your piece", │ + [core.NOT_YOUR_TURN] = "Not your turn", │ + [core.RC_CANT_MOVE_INTO_CHECK] = "Can not move into check", │ + [core.RC_MUST_RESOLVE_CHECK] = "Must move out of check", │ + [core.RC_GAME_OVER] = "Game over!", │ } │ │ -local draw_pt_order = nil │ +function core.get_err_msg(rc) │ + return ERROR_CODE_MAP[rc] │ +end │ │ -local UI_PADDING = 10 │ -local DIRPAD_SIZE = 170 │ -local DIRPAD_SIZE_Y = DIRPAD_SIZE │ -local DIRPAD_SIZE_X = DIRPAD_SIZE │ -local dirpad_pos_y = nil │ -local dirpad_pos_x = nil │ +function core.get_piece_id(player, piece_type) │ + return ((player - 1) * core.PIECE_TYPE_COUNT + (piece_type - 1)) + 1 │ +end │ │ -local THUMB_BUTTONS_SIZE = 150 │ -local THUMB_BUTTONS_SIZE_Y = THUMB_BUTTONS_SIZE │ -local THUMB_BUTTONS_SIZE_X = THUMB_BUTTONS_SIZE │ -local thumb_buttons_pos_y = nil │ -local thumb_buttons_pos_x = nil │ │ -local screen_width = nil │ -local screen_height = nil │ │ +function core.get_player(piece_id) │ + if piece_id == nil then error(string.format("core.get_player called with nil arg"), 2) end │ │ + if piece_id == core.EMPTY_PIECE_ID then return nil end │ + return math.floor((piece_id-1)/core.PIECE_TYPE_COUNT) + 1 │ +end │ │ -local function point(y, x) │ - return { y = y, x = x } │ +local function get_other_player(player) │ + if player == core.PLAYER_BLACK then return core.PLAYER_WHITE │ + elseif player == core.PLAYER_WHITE then return core.PLAYER_BLACK │ + else │ + error(string.format("unexpected player %s", player)) │ + end │ end │ │ --- "cart" (cartesian) meaning the game space, convert it to │ --- an isometric grid (how it's drawn) │ -local function cart_to_iso(pt) │ - local x = (pt.x - pt.y) │ - local y = (pt.x + pt.y)/2 │ - return point(y,x) │ +local function coords_eq(a, b) │ + return a.y == b.y and a.x == b.x │ end │ │ -local function iso_to_cart(pt) │ - local x = (2*pt.y + pt.x)/2 │ - local y = (2*pt.y - pt.x)/2 │ - return point(y,x) │ + │ +function core.get_piece_type(piece_id) │ + return ((piece_id-1) % core.PIECE_TYPE_COUNT) + 1 │ end │ │ -local function game_pt_to_gfx_pt(pt, ui_state) │ - if pt.x == nil or pt.y == nil then │ - error("nil pt.x or y", 2) │ +local function get_player_pawn_row(player) │ + if player == core.PLAYER_WHITE then return 7 │ + elseif player == core.PLAYER_BLACK then return 2 end │ +end │ + │ +function core.new_game() │ + local state = { │ + player_turn = core.PLAYER_WHITE, │ + board = {}, │ + selected = nil │ + } │ + │ + for y=1,core.BOARD_SIZE do │ + state.board[y] = {} │ + for x=1,core.BOARD_SIZE do │ + state.board[y][x] = core.EMPTY_PIECE_ID │ + end │ end │ - pt = point(pt.y, pt.x) │ - pt.y = pt.y + ui_state.offset_y │ - pt.x = pt.x + ui_state.offset_x │ - pt = point(pt.y*TILE_SIZE, pt.x*TILE_SIZE) │ - pt = cart_to_iso(pt) │ - pt = point(pt.y + SCREEN_ORIGIN.y, pt.x + SCREEN_ORIGIN.x) │ - return pt │ + │ + for x=1,core.BOARD_SIZE do │ + state.board[7][x] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_PAWN) │ + end │ + state.board[8][1] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_ROOK) │ + state.board[8][2] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KNIGHT) │ + state.board[8][3] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_BISHOP) │ + state.board[8][4] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_QUEEN) │ + state.board[8][5] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KING) │ + state.board[8][6] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_BISHOP) │ + state.board[8][7] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_KNIGHT) │ + state.board[8][8] = core.get_piece_id(core.PLAYER_WHITE, core.PIECE_ROOK) │ + │ + for x=1,core.BOARD_SIZE do │ + state.board[2][x] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_PAWN) │ + end │ + state.board[1][1] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_ROOK) │ + state.board[1][2] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KNIGHT) │ + state.board[1][3] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_BISHOP) │ + state.board[1][4] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_QUEEN) │ + state.board[1][5] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KING) │ + state.board[1][6] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_BISHOP) │ + state.board[1][7] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_KNIGHT) │ + state.board[1][8] = core.get_piece_id(core.PLAYER_BLACK, core.PIECE_ROOK) │ + │ + return state │ end │ │ -local function get_doctor_img_id(player_idx) │ - local map = { │ - [1] = 'hospital_doctor1', │ - [2] = 'hospital_doctor2', │ - [3] = 'hospital_doctor3', │ - [4] = 'hospital_doctor4', │ +local function copy_coords(pos) │ + if pos == nil then return nil end │ + return { y = pos.y, x = pos.x } │ +end │ + │ +local function copy_state(state) │ + local new_state = { │ + player_turn = state.player_turn, │ + board = {}, │ + selected = copy_coords(state.selected), │ + game_status = nil, │ } │ - local img_id = map[player_idx] │ - if img_id == nil then │ - error(string.format("Could not find doctor img_id for %d", player_idx)) │ + │ + for y=1,core.BOARD_SIZE do │ + new_state.board[y] = {} │ + for x=1,core.BOARD_SIZE do │ + new_state.board[y][x] = state.board[y][x] │ + end │ end │ - return img_id │ + │ + return new_state │ end │ │ -local function generate_draw_pt_order(y_size, x_size) │ - local pt_order = {} │ - for y=0,y_size-1 do │ - local x = 0 │ - while y >= 0 and x < x_size do │ - table.insert(pt_order, { y = y, x = x }) │ - y = y - 1 │ - x = x + 1 │ +function core.get_player_name(player) │ + if player == core.PLAYER_BLACK then return "Black" │ + elseif player == core.PLAYER_WHITE then return "White" end │ +end │ + │ +function core.get_status_msg(state) │ + local player_name = core.get_player_name(state.player_turn) │ + local game_status_str = "" │ + if state.game_status == nil then │ + state.game_status = core.get_game_status(state) │ + end │ + if state.game_status == core.GAME_STATUS_NORMAL then │ + -- do nothing │ + elseif state.game_status == core.GAME_STATUS_CHECK then │ + game_status_str = string.format("%s is in check!", player_name) │ + elseif state.game_status == core.GAME_STATUS_CHECKMATE then │ + return string.format("%s is in checkmate! Game over, %s wins.", player_name, core.get_player_name(get_other_player(state.player_turn))) │ + else │ + error(string.format("Unhandled game_status %s", state.game_status)) │ + end │ + if #game_status_str > 0 then │ + game_status_str = game_status_str .. ' ' │ + end │ + │ + local action │ + if state.selected == nil then │ + action = "select a piece to move" │ + else │ + action = "select a destination" │ + end │ + return string.format("%s%s, %s", game_status_str, player_name, action) │ +end │ + │ +local function get_player_letter(player) │ + if player == core.PLAYER_BLACK then return 'B' │ + elseif player == core.PLAYER_WHITE then return 'W' │ + else │ + error(string.format("Unhandled player %s", player)) │ + end │ +end │ + │ +local function get_piece_letter(piece_type) │ + if piece_type == core.PIECE_KING then return "K" │ + elseif piece_type == core.PIECE_QUEEN then return "Q" │ + elseif piece_type == core.PIECE_BISHOP then return "B" │ + elseif piece_type == core.PIECE_KNIGHT then return "N" │ + elseif piece_type == core.PIECE_ROOK then return "R" │ + elseif piece_type == core.PIECE_PAWN then return "P" │ + else │ + error(string.format("Unhandled piece type %s", piece_type)) │ + end │ +end │ + │ +local function piece_id_to_hr_str(piece_id) │ + local player = core.get_player(piece_id) │ + local piece_type = core.get_piece_type(piece_id) │ + return get_player_letter(player) .. get_piece_letter(piece_type) │ +end │ + │ +function core.print_state(state) │ + -- 1 2 3 4 5 6 7 8 │ + row_sep = '+--+--+--+--+--+--+--+--+' │ + io.write(row_sep .. '\n') │ + for y=1,core.BOARD_SIZE do │ + io.write('|') │ + for x=1,core.BOARD_SIZE do │ + local piece_id = state.board[y][x] │ + if piece_id == core.EMPTY_PIECE_ID then │ + io.write(' ') │ + else │ + io.write(piece_id_to_hr_str(piece_id)) │ + end │ + io.write('|') │ end │ + io.write('\n' .. row_sep .. '\n') │ end │ +end │ │ - for x=0,x_size-1 do │ - local y = y_size-1 │ - while y >= 0 and x < x_size do │ - table.insert(pt_order, { y = y, x = x }) │ - y = y - 1 │ - x = x + 1 │ +local function get_piece_move_cells(piece_type, dy, dx) │ + if piece_type == core.PIECE_KNIGHT then │ + return ((math.abs(dy) == 2 and math.abs(dx) == 1) or │ + (math.abs(dy) == 1 and math.abs(dx) == 2)) │ + elseif piece_type == core.PIECE_KING then │ + return math.abs(dx) <= 1 and math.abs(dy) <= 1 and │ + (math.abs(dy) > 0 or math.abs(dx) > 0) │ + end │ +end │ + │ +local function get_piece_move_vecs(piece_type) │ + if piece_type == core.PIECE_ROOK then │ + return { { y=1, x=0 }, {y=-1, x=0}, {y=0, x=1}, {y=0, x=-1} } │ + elseif piece_type == core.PIECE_BISHOP then │ + return { { y=1, x=1 }, {y=-1, x=1}, {y=1, x=-1}, {y=-1, x=-1} } │ + elseif piece_type == core.PIECE_QUEEN then │ + return { { y=1, x=0 }, {y=-1, x=0}, {y=0, x=1}, {y= 0, x=-1}, │ + { y=1, x=1 }, {y=-1, x=1}, {y=1, x=-1}, {y=-1, x=-1} } │ + else │ + return {} │ + end │ +end │ + │ + │ +local function out_of_range(pos) │ + return not (1 <= pos.x and pos.x <= core.BOARD_SIZE and │ + 1 <= pos.y and pos.y <= core.BOARD_SIZE) │ +end │ + │ +local function get_player_move_dir(player) │ + if player == core.PLAYER_WHITE then return -1 │ + elseif player == core.PLAYER_BLACK then return 1 end │ +end │ + │ +local function get_player_rel_delta_pos(player, src, dst) │ + local dy = dst.y - src.y │ + local dx = dst.x - src.x │ + │ + dy = get_player_move_dir(player) * dy │ + │ + return { dy = dy, dx = dx } │ +end │ + │ +-- Checks if a move can be made by that kind of piece, and that │ +-- no pieces are in the way. │ +-- Does not check if the move results in check or checkmate. (i.e. │ +-- this can return true for moves that would put your own king in check) │ +-- Also doesn't check for castling or en passant │ +local function is_valid_move_pos(state, src, dst) │ + local src_piece_id = state.board[src.y][src.x] │ + local dst_piece_id = state.board[dst.y][dst.x] │ + │ + local src_player = core.get_player(src_piece_id) │ + local src_piece_type = core.get_piece_type(src_piece_id) │ + │ + local dst_player = core.get_player(dst_piece_id) │ + │ + local delta_pos = get_player_rel_delta_pos(src_player, src, dst) │ + local dy = delta_pos.dy │ + local dx = delta_pos.dx │ + │ + if src_piece_type == core.PIECE_PAWN then │ + if dx == 0 then │ + if dy == 1 and dst_piece_id == core.EMPTY_PIECE_ID then │ + return true │ + elseif dy == 2 and src.y == get_player_pawn_row(src_player) then │ + return (state.board[src.y+1*get_player_move_dir(src_player)][src.x] == core.EMPTY_PIECE_ID and │ + state.board[src.y+2*get_player_move_dir(src_player)][src.x] == core.EMPTY_PIECE_ID) │ + end │ + elseif math.abs(dx) == 1 and dy == 1 then │ + return core.get_player(dst_piece_id) == get_other_player(src_player) │ + else │ + return false │ + end │ + elseif get_piece_move_cells(src_piece_type, dy, dx) then │ + return dst_piece_id == core.EMPTY_PIECE_ID or dst_player ~= src_player │ + else │ + for _, move_vec in ipairs(get_piece_move_vecs(src_piece_type)) do │ + for i=1,core.BOARD_SIZE do │ + local dst2 = { y = src.y + move_vec.y*i, │ + x = src.x + move_vec.x*i} │ + if out_of_range(dst2) then │ + goto next_move_vec │ + end │ + local dst2_piece_id = state.board[dst2.y][dst2.x] │ + if core.get_player(dst2_piece_id) == src_player then │ + goto next_move_vec │ + elseif core.get_player(dst2_piece_id) == get_other_player(src_player) then │ + if coords_eq(dst, dst2) then │ + return true │ + end │ + goto next_move_vec │ + else │ + if coords_eq(dst, dst2) then │ + return true │ + end │ + end │ + end │ + ::next_move_vec:: │ end │ end │ - return pt_order │ end │ │ -function draw.init(width, height, game_params) │ +function core.get_possib_dsts(state, src) │ + local piece_id = state.board[src.y][src.x] │ + if piece_id == core.EMPTY_PIECE_ID then return {} end │ + local piece_type = core.get_piece_type(piece_id) │ + local player = core.get_player(piece_id) │ │ - screen_width = width │ - screen_height = height │ + local possib_dsts = {} │ │ - thumb_buttons_pos_y = height - THUMB_BUTTONS_SIZE_Y - UI_PADDING │ - thumb_buttons_pos_x = width - THUMB_BUTTONS_SIZE_X - UI_PADDING │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + local dst_piece_id = state.board[y][x] │ │ - dirpad_pos_y = height - DIRPAD_SIZE_Y - UI_PADDING │ - dirpad_pos_x = UI_PADDING │ + if is_valid_move_pos(state, src, {y=y, x=x}) then │ + table.insert(possib_dsts, {y=y, x=x}) │ + end │ │ - local ui_state = { │ - dirpad_touch_id = nil, │ - use_btn_touch_id = nil, │ - drop_btn_touch_id = nil, │ - } │ + ::next_dst:: │ + end │ + end │ │ - --draw_pt_order = generate_draw_pt_order(game_params.y_size, game_params.x_size) │ - draw_pt_order = generate_draw_pt_order(game_params.y_size, 15) -- TODO FIX THIS TODO TODO TODO │ - return ui_state │ + return possib_dsts │ end │ │ -function draw.set_input_type(ui_state, input_type) │ - ui_state.input_type = input_type │ +function core.in_check(state, player) │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + local src = { y = y, x = x } │ + local src_piece_id = state.board[y][x] │ + -- Only check other player's pieces │ + if src_piece_id == core.EMPTY_PIECE_ID or │ + core.get_player(src_piece_id) == player then │ + goto next_square │ + end │ + │ + local dsts = core.get_possib_dsts(state, src) │ + for _, dst in ipairs(dsts) do │ + local dst_piece_id = state.board[dst.y][dst.x] │ + -- See if any of them could capture the king on their next move │ + if core.get_piece_type(dst_piece_id) == core.PIECE_KING and │ + core.get_player(dst_piece_id) == player then │ + return true │ + end │ + │ + end │ + │ + ::next_square:: │ + end │ + end │ + return false │ end │ │ -local function get_item_img_id(item_id) │ - local map = { │ - [core.ITEM_ID_PATIENT_IN_BED] = "hospital_patient_in_bed", │ - [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = "hospital_patient_in_bed_flipped", │ - [core.ITEM_ID_BED] = "hospital_bed", │ - [core.ITEM_ID_BED_FLIPPED]= "hospital_bed_flipped", │ - [core.ITEM_ID_IV_BAG] = "hospital_iv_bag", │ - [core.ITEM_ID_DEFIB] = "hospital_defib", │ - [core.ITEM_ID_VENTILATOR] = "hospital_ventilator", │ - [core.ITEM_ID_XRAY_SHEET] = "hospital_xray_sheet", │ - [core.ITEM_ID_XRAY_SOURCE] = "hospital_xray_source", │ +local function move_piece(state, src, dst) │ + local piece_id = state.board[src.y][src.x] │ + local this_player = core.get_player(piece_id) │ + if piece_id == core.EMPTY_PIECE_ID then │ + return core.SUCCESS │ + end │ │ - } │ - local img_id = map[item_id] │ - if img_id == nil then │ - error(string.format("Could not find image id for item id %s", item_id)) │ + local state_copy = copy_state(state) │ + state_copy.board[src.y][src.x] = core.EMPTY_PIECE_ID │ + state_copy.board[dst.y][dst.x] = piece_id │ + state_copy.selected = nil │ + state_copy.player_turn = get_other_player(state.player_turn) │ + if core.in_check(state_copy, this_player) then │ + return core.RC_CANT_MOVE_INTO_CHECK │ end │ - return img_id │ + │ + state.board[src.y][src.x] = core.EMPTY_PIECE_ID │ + state.board[dst.y][dst.x] = piece_id │ + state.selected = nil │ + state.player_turn = get_other_player(state.player_turn) │ + state.game_status = core.get_game_status(state) │ + if state.game_status == core.GAME_STATUS_CHECKMATE then │ + return core.RC_GAME_OVER │ + end │ + return core.SUCCESS │ end │ │ -local function get_item_size(item_id) │ - local sizes = { │ - [core.ITEM_ID_PLAYER] = { x= 1.5*TILE_SIZE, y= 2*TILE_SIZE }, │ - [core.ITEM_ID_BED] = { x= 2.9*TILE_SIZE, y= 2.2*TILE_SIZE }, │ - [core.ITEM_ID_BED_FLIPPED] = { x= 2.9*TILE_SIZE, y= 2.2*TILE_SIZE }, │ - [core.ITEM_ID_PATIENT_IN_BED] = { x= 2.0*TILE_SIZE, y= 1.5*TILE_SIZE }, │ - [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = { x= 2.0*TILE_SIZE, y= 1.5*TILE_SIZE }, │ - [core.ITEM_ID_IV_BAG] = { x= 2*TILE_SIZE, y= 3*TILE_SIZE }, │ - [core.ITEM_ID_VENTILATOR] = { x= 1.8*TILE_SIZE, y= 2.2*TILE_SIZE }, │ - [core.ITEM_ID_XRAY_SHEET] = { x= 2.0*TILE_SIZE, y= 3.0*TILE_SIZE }, │ - [core.ITEM_ID_XRAY_SOURCE] = { x= 2.0*TILE_SIZE, y= 3.0*TILE_SIZE }, │ - --[core.ITEM_ID_OXYGEN_TANK] = { x= 2*TILE_SIZE, y= 3*TILE_SIZE }, │ - [core.ITEM_ID_DEFIB] = { x= 2*TILE_SIZE, y= 2*TILE_SIZE }, │ - } │ - local size = sizes[item_id] │ - if size == nil then │ - error(string.format("could not find size for id %s", item_id)) │ +local function get_player_pieces(state, player) │ + local pieces_pos = {} │ + for y=1,core.BOARD_SIZE do │ + for x=1,core.BOARD_SIZE do │ + local piece_id = state.board[y][x] │ + if piece_id ~= core.EMPTY_PIECE_ID and │ + core.get_player(piece_id) == player then │ + table.insert(pieces_pos, {y=y, x=x}) │ + end │ + end │ end │ - return size │ + return pieces_pos │ end │ │ -local function get_item_offset(item_id) │ - local offsets = { │ - [core.ITEM_ID_PLAYER] = { x= 0.50, y= 0.80 }, │ - [core.ITEM_ID_BED] = { x= 0.35, y= 0.55 }, │ - [core.ITEM_ID_BED_FLIPPED] = { x= 0.35, y= 0.55 }, │ - [core.ITEM_ID_PATIENT_IN_BED] = { x= 0.35, y= 0.90 }, │ - [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = { x= 0.35, y= 0.90 }, │ - [core.ITEM_ID_IV_BAG] = { x= 0.6, y= 0.7 }, │ - [core.ITEM_ID_VENTILATOR] = { x= 0.50, y= 0.55 }, │ - [core.ITEM_ID_XRAY_SHEET] = { x= 0.60, y= 0.60 }, │ - [core.ITEM_ID_XRAY_SOURCE] = { x= 0.50, y= 0.68 }, │ - --[core.ITEM_ID_OXYGEN_TANK] = { x= 0.45, y= 0.65 }, │ - --[core.ITEM_ID_FLOOR_TILE] = { x= 0.50, y= 0.00 }, │ - --[core.ITEM_ID_FLOOR_HIGHLIGHT] = { x= 0.50, y= 0.00 }, │ - [core.ITEM_ID_DEFIB] = { x= 0.55, y= 0.50 }, │ - --[core.ITEM_ID_PATIENT_NEEDS_ICON] = { x= 0.0, y= 1.5 }, │ - --[core.ITEM_ID_TUT_NEED_ACTION] = { x= 0.5, y= 1.5 }, │ - --[core.ITEM_ID_FIXER_ICON] = { x= 0.5, y= 1.5 }, │ - --[core.ITEM_ID_PROGRESS_CIRCLE] = { x= 0.55, y= 2.20 }, │ - --[core.ITEM_ID_PATIENT_HEALTH_INDICATORS] = { x= 0.55, y= 2.20 }, │ - --[core.ITEM_ID_PATIENT_IND_ICON] = { x= 0.0*TILE_SIZE, y= 0.0*TILE_SIZE }, │ - } │ - local offset = offsets[item_id] │ - if offset == nil then │ - error(string.format("could not find offset for id %s", item_id)) │ +function core.get_game_status(state) │ + local in_check = core.in_check(state, state.player_turn) │ + │ + if not in_check then │ + return core.GAME_STATUS_NORMAL │ + else │ + for _, src_pos in ipairs(get_player_pieces(state, state.player_turn)) do │ + for _, dst_pos in ipairs(core.get_possib_dsts(state, src_pos)) do │ + local state_copy = copy_state(state) │ + local rc = move_piece(state_copy, src_pos, dst_pos) │ + if rc == core.SUCCESS then │ + return core.GAME_STATUS_CHECK │ + end │ + end │ + end │ + return core.GAME_STATUS_CHECKMATE │ end │ - return offset │ end │ │ -local function draw_item(state, ui_state, item_info, pt) │ - local gfx_pt = game_pt_to_gfx_pt(point(pt.y, pt.x), ui_state) │ - local size = get_item_size(item_info.id) │ - local offset = get_item_offset(item_info.id) │ - gfx_pt.y = gfx_pt.y - size.y*offset.y │ - gfx_pt.x = gfx_pt.x - size.x*offset.x │ - draw_more.draw_graphic_ul(get_item_img_id(item_info.id), │ - math.floor(gfx_pt.y), math.floor(gfx_pt.x), │ - math.floor(size.x), math.floor(size.y)) │ +function core.player_touch(state, player, coords) │ + if player ~= state.player_turn then │ + return core.NOT_YOUR_TURN │ + end │ + │ + if state.selected == nil then │ + if coords == nil then return core.SUCCESS end │ + local dst_piece_id = state.board[coords.y][coords.x] │ + if core.get_player(dst_piece_id) ~= player then │ + return core.NOT_YOUR_PIECE │ + else │ + state.selected = coords │ + return core.SUCCESS │ + end │ + else │ + if coords == nil or coords_eq(coords, state.selected) then │ + state.selected = nil │ + return core.SUCCESS │ + else │ + if not is_valid_move_pos(state, state.selected, coords) then │ + local dst_piece_id = state.board[coords.y][coords.x] │ + -- If the player clicks on one of their own pieces, select that one instead │ + if core.get_player(dst_piece_id) == player then │ + print("player selected a different piece") │ + state.selected = coords │ + -- If the player clicks on an empty piece or enemy piece that can't be captured, │ + -- unselect │ + else │ + print("player selected an empty or other player piece") │ + state.selected = nil │ + end │ + return core.SUCCESS │ + else │ + local rc = move_piece(state, state.selected, coords) │ + if rc == core.RC_CANT_MOVE_INTO_CHECK then │ + if core.in_check(state, state.player_turn) then │ + return core.RC_MUST_RESOLVE_CHECK │ + end │ + end │ + return rc │ + end │ + end │ + end │ end │ │ -local function draw_using_progress(state, ui_state, player_idx) │ - local player_state = state.players[player_idx] │ - local gfx_pt = game_pt_to_gfx_pt(point(player_state.y, player_state.x), ui_state) │ - local size = { x = 2.5*TILE_SIZE, y = 0.5*TILE_SIZE } │ - local offset = { x = 0.5, y = 4.00 } │ - local draw_pt = point(gfx_pt.y - offset.y*size.y, │ - gfx_pt.x - offset.x*size.x); │ +return core │ +local core = {} │ │ +local utils = require("libs/utils") │ │ - local progress = player_state.use_progress/100.0 │ - alexgames.draw_rect(PLAYER_HIGHLIGHT_COLOURS[player_idx].fill, │ - math.floor(draw_pt.y), math.floor(draw_pt.x), │ - math.floor(draw_pt.y + size.y), math.floor(draw_pt.x + size.x)) │ +--local ENEMY_MOVE_SPEED = 60 │ +local ENEMY_MOVE_SPEED = 120 │ +local PLAYER_MOVE_SPEED = 150 │ │ - alexgames.draw_rect(PLAYER_HIGHLIGHT_COLOURS[player_idx].stroke, │ - math.floor(draw_pt.y), math.floor(draw_pt.x), │ - math.floor(draw_pt.y + size.y), math.floor(draw_pt.x + progress*size.x)) │ +local ENEMY_SPAWN_DIST_FROM_PLAYER = 400 │ +local ENEMY_DIST_TO_PLAYER = 10 │ + │ +local MAX_BROCCOLI_OFFSET = 400 │ +local BROC_DMG = 200 │ +local BROCCOLI_MOVE_SPEED = 35 │ + │ +local HAMMER_RADIUS = 150 │ +local HAMMER_ROT_SPEED = 1.0/2*(2*math.pi) │ + │ +local HAMMER_SIZE = 20 │ + │ +core.ATTACK_TYPE_BROCCOLI = 1 │ +core.ATTACK_TYPE_FROG = 2 │ +core.ATTACK_TYPE_HAMMER = 3 │ │ +core.ENTITY_TYPE_PLAYER = 1 │ +core.ENTITY_TYPE_ENEMY = 2 │ + │ + │ +core.ATTACK_INFO = { │ + [core.ATTACK_TYPE_BROCCOLI] = { │ + size_y = 80, │ + size_x = 80, │ + }, │ + [core.ATTACK_TYPE_HAMMER] = { │ + size_y = HAMMER_SIZE, │ + size_x = HAMMER_SIZE, │ + }, │ +} │ + │ +local function get_enemy_spawn_time(state) │ end │ │ -local function draw_player(state, ui_state, item_info) │ - local player_state = state.players[item_info.player_idx] │ - local gfx_pt = game_pt_to_gfx_pt(point(player_state.y, player_state.x), ui_state) │ - local size = { x = 1.5*TILE_SIZE, y = 2*TILE_SIZE } │ - local offset = { x = 0.50, y = 0.80 } │ +local function squared(x) │ + return x*x │ +end │ │ - local draw_pt = point(gfx_pt.y - offset.y*size.y, │ - gfx_pt.x - offset.x*size.x); │ +local function abs(x) │ + if x >= 0 then return x │ + else return -x end │ +end │ │ - draw_more.draw_graphic_ul(get_doctor_img_id(item_info.player_idx), │ - math.floor(draw_pt.y), math.floor(draw_pt.x), │ - math.floor(size.x), math.floor(size.y)) │ +local ENTITY_MAP_STEP = 20 │ │ - if player_state.holding ~= nil then │ - draw_item(state, ui_state, player_state.holding, player_state) │ +local function entity_map_round(val) │ + return math.floor(val/ENTITY_MAP_STEP)*ENTITY_MAP_STEP │ +end │ + │ +local function get_entity_map_pos(pos) │ + if pos.y == nil or pos.x == nil then │ + error(string.format("invalid pos{y=%s,x=%s}", pos.y, pos.x), 2) │ end │ + return { │ + y = entity_map_round(pos.y), │ + x = entity_map_round(pos.x), │ + } │ +end │ │ - if player_state.is_using then │ - draw_using_progress(state, ui_state, item_info.player_idx) │ +local function get_entity_map_cell_or_create(entity_map, y, x) │ + if entity_map[y] == nil then │ + entity_map[y] = {} │ + end │ + │ + if entity_map[y][x] == nil then │ + entity_map[y][x] = {} │ end │ + │ + return entity_map[y][x] │ end │ │ -local function do_nothing(arg1, arg2, arg3) │ +local function add_to_entity_map(entity_map, item_type, item_state) │ + local entity_map_pos = get_entity_map_pos(item_state) │ + local new_cell = get_entity_map_cell_or_create(entity_map, entity_map_pos.y, entity_map_pos.x) │ + │ + table.insert(new_cell, { │ + item_type = item_type, │ + state = item_state, │ + }) │ + --print(string.format("Added entity type=%s, state=%s to entity map at y=%d, x=%d", │ + -- item_type, item_state, entity_map_pos.y, entity_map_pos.x)) │ + │ end │ │ -local draw_funcs = { │ - [core.ITEM_ID_BED_SEGMENT_2] = do_nothing, │ - [core.ITEM_ID_PLAYER] = draw_player, │ -} │ +local function print_entity_map(entity_map) │ + for y, row in pairs(entity_map) do │ + for x, entities in pairs(row) do │ + if #entities > 0 then │ + print(string.format("entity_map[y=%3d][x=%3d] has %d entities", │ + y, x, #entities)) │ + end │ + end │ + end │ +end │ │ -local function draw_items(state, ui_state, player) │ - for _, pt in ipairs(draw_pt_order) do │ - if state.cells[pt.y][pt.x] == nil then │ - goto next_pt │ +local function get_entity_map_cell(entity_map, y, x) │ + if entity_map[y] == nil or │ + entity_map[y][x] == nil then │ + error(string.format("y=%d,x=%d not found in entity_map", y, x), 2) │ + end │ + │ + return entity_map[y][x] │ +end │ + │ +local function update_attack_states(state, player_state, dt_ms) │ + for _, attack_state in pairs(player_state.attack_states) do │ + if attack_state.enabled then │ + attack_state.update(state, player_state, attack_state, dt_ms) │ end │ - for _, item_info in ipairs(state.cells[pt.y][pt.x]) do │ - local draw_func = draw_funcs[item_info.id] │ - if draw_func ~= nil then │ - draw_func(state, ui_state, item_info) │ - else │ - draw_item(state, ui_state, item_info, pt) │ + end │ +end │ + │ +local function area_contains_enemy(state, start_y, start_x, end_y, end_x) │ + local found_enemies = {} │ + for y=entity_map_round(start_y),entity_map_round(end_y),ENTITY_MAP_STEP do │ + for x=entity_map_round(start_x),entity_map_round(end_x),ENTITY_MAP_STEP do │ + for val_idx, val in ipairs(get_entity_map_cell_or_create(state.entity_map, y, x)) do │ + if val.item_type == core.ENTITY_TYPE_ENEMY then │ + table.insert(found_enemies, val.state) │ + end │ end │ end │ - ::next_pt:: │ end │ + │ + return { found = #found_enemies > 0, enemies = found_enemies } │ end │ │ -local function patient_to_needs_img_id(patient_info) │ - local needs_to_img_id_map = { │ - [core.NEEDS_LOW_FLUIDS] = 'hospital_ui_patient_needs_low_fluids', │ - [core.NEEDS_LOW_OXYGEN] = 'hospital_ui_patient_needs_low_oxygen', │ - [core.NEEDS_NO_HEARTBEAT] = 'hospital_ui_patient_needs_no_heartbeat', │ - [core.NEEDS_BROKEN_BONE] = 'hospital_ui_patient_needs_broken_bone', │ - } │ - if not patient_info.needs_revealed then │ - return 'hospital_ui_patient_needs_attention' │ - else │ - return needs_to_img_id_map[patient_info.needs_type] │ +local function remove_entity(state, entity) │ + local pos = get_entity_map_pos(entity) │ + local cell = get_entity_map_cell(state.entity_map, pos.y, pos.x) │ + local entity_idx │ + for idx, val in ipairs(cell) do │ + if val.state == entity then │ + entity_idx = idx │ + end │ end │ │ + if entity_idx == nil then │ + error(string.format("Could not find entity %s in entity_map", entity)) │ + end │ + │ + table.remove(cell, entity_idx) │ end │ │ -local function get_time_left_colour(portion) │ - if portion > 0.7 then │ - return TIME_LEFT_FG_GOOD_COLOUR │ - elseif portion > 0.4 then │ - return TIME_LEFT_FG_MED_COLOUR │ - else │ - -- blinking animation │ - local time_ms = alexgames.get_time_ms() │ - if math.floor(time_ms/200) % 2 == 1 then │ - return TIME_LEFT_FG_BAD_COLOUR │ - else │ - return TIME_LEFT_FG_BAD_COLOUR2 │ +local function remove_enemy(state, enemy) │ + remove_entity(state, enemy) │ + local enemy_idx │ + for val_idx, val in ipairs(state.enemies) do │ + if val == enemy then │ + enemy_idx = val_idx │ end │ end │ + │ + if enemy_idx == nil then │ + error(string.format("Could not find enemy %s in state.enemies", enemy)) │ + end │ + table.remove(state.enemies, enemy_idx) │ + print(string.format("Removed enemy %s", enemy)) │ end │ │ -local function draw_ui_layer_patient(state, ui_state, player, patient) │ - if patient.requires_help then │ - local pos_pt = patient │ - if patient.held_by ~= nil then │ - pos_pt = patient.held_by │ +local function damage_enemy(state, enemy, dmg) │ + enemy.health = enemy.health - dmg │ + if enemy.health <= 0 then │ + remove_enemy(state, enemy) │ + end │ +end │ + │ +function update_broccoli_state(state, player_state, attack_state, dt_ms) │ + local spawn_dirs = { │ + { y_vel = 0, x_vel = 1 }, │ + { y_vel = 0, x_vel = -1 }, │ + { y_vel = 1, x_vel = 0 }, │ + { y_vel =-1, x_vel = 0 }, │ + } │ + attack_state.time_to_next_spawn_ms = attack_state.time_to_next_spawn_ms - dt_ms │ + if attack_state.time_to_next_spawn_ms < 0 then │ + attack_state.time_to_next_spawn_ms = attack_state.spawn_period_ms │ + │ + for i=1,attack_state.entities_per_spawn do │ + print("spawning broccoli") │ + local y_vel = spawn_dirs[attack_state.next_spawn_dir].y_vel * BROCCOLI_MOVE_SPEED * dt_ms/1000 │ + local x_vel = spawn_dirs[attack_state.next_spawn_dir].x_vel * BROCCOLI_MOVE_SPEED * dt_ms/1000 │ + │ + attack_state.next_spawn_dir = (attack_state.next_spawn_dir % #spawn_dirs) + 1 │ + table.insert(attack_state.particles, { │ + y_offset = 0, │ + x_offset = 0, │ + │ + y_vel = y_vel, │ + x_vel = x_vel, │ + }) │ end │ - local gfx_pt = game_pt_to_gfx_pt(pos_pt, ui_state) │ - gfx_pt.y = math.floor(gfx_pt.y - 4.0*TILE_SIZE) │ - gfx_pt.x = math.floor(gfx_pt.x) │ - local size = { x = math.floor(TILE_SIZE*2.0), y = math.floor(TILE_SIZE*2.5) } │ - draw_more.draw_graphic_ul('hospital_ui_patient_needs_bg', │ - gfx_pt.y, gfx_pt.x, │ - size.x, size.y) │ - local needs_img_id = patient_to_needs_img_id(patient) │ - draw_more.draw_graphic_ul(needs_img_id, │ - gfx_pt.y, gfx_pt.x, │ - size.x, size.y) │ - if patient.needs_revealed then │ - local portion = patient.time_left / patient.orig_time_left │ - alexgames.draw_rect(TIME_LEFT_BG_COLOUR, │ - gfx_pt.y, │ - gfx_pt.x - TIME_LEFT_ICON_WIDTH - PADDING, │ - gfx_pt.y + size.y, │ - gfx_pt.x - PADDING) │ + end │ │ - alexgames.draw_rect(get_time_left_colour(portion), │ - gfx_pt.y + math.floor((1-portion) * size.y), │ - gfx_pt.x - TIME_LEFT_ICON_WIDTH - PADDING, │ - gfx_pt.y + size.y, │ - gfx_pt.x - PADDING) │ + local broc_idxes_to_remove = {} │ + │ + for particle_idx, particle in ipairs(attack_state.particles) do │ + particle.y_offset = particle.y_offset + particle.y_vel * dt_ms │ + particle.x_offset = particle.x_offset + particle.x_vel * dt_ms │ + │ + if abs(particle.y_offset) > MAX_BROCCOLI_OFFSET or │ + abs(particle.x_offset) > MAX_BROCCOLI_OFFSET then │ + table.insert(broc_idxes_to_remove, particle_idx) │ end │ + end │ │ - if patient.fix_time ~= nil then │ - -- TODO draw a little green cross icon │ - local cross_size = { │ - y = 10, │ - x = 10, │ - } │ + local positions = core.get_broccoli_particle_positions(state, player_state, attack_state) │ + local BROC_SIZE_Y = 80 │ + local BROC_SIZE_X = 80 │ + --print_entity_map(state.entity_map) │ + for pos_idx, pos in ipairs(positions) do │ + local info = area_contains_enemy(state, │ + pos.y - BROC_SIZE_Y/2, pos.x - BROC_SIZE_X/2, │ + pos.y + BROC_SIZE_Y/2, pos.x + BROC_SIZE_X/2) │ + --[[ │ + print(string.format("area y in {%s, %s}, x in {%s, %s} contained enemies: %s", │ + pos.y - BROC_SIZE_Y/2, pos.y + BROC_SIZE_Y/2, │ + pos.x - BROC_SIZE_Y/2, pos.x + BROC_SIZE_Y/2, │ + info.found)) │ + --]] │ + if info.found then │ + print("broccoli hit enemy!") │ + for _, enemy in ipairs(info.enemies) do │ + damage_enemy(state, enemy, BROC_DMG) │ + end │ + if attack_state.consumed_on_dmg then │ + table.insert(broc_idxes_to_remove, pos_idx) │ + end │ + end │ + end │ + -- TODO handle removing more than one at a time │ + if #broc_idxes_to_remove > 0 then │ + table.remove(attack_state.particles, broc_idxes_to_remove[1]) │ + end │ + │ +end │ │ - local fix_bar_pos = { │ - y = gfx_pt.y, │ - x = gfx_pt.x - 2*TIME_LEFT_ICON_WIDTH - 2*PADDING, │ - } │ - local fix_bar_size = { │ - y = size.y, │ - x = TIME_LEFT_ICON_WIDTH, │ - } │ - draw_more.draw_graphic_ul('hospital_ui_green_cross', │ - math.floor(fix_bar_pos.y - cross_size.y - PADDING), │ - math.floor(fix_bar_pos.x), │ - math.floor(cross_size.y), │ - math.floor(cross_size.x)) │ - local portion = patient.fix_time / patient.orig_fix_time │ - alexgames.draw_rect(FIX_TIME_PROGRSS_BAR_BG_COLOUR, │ - fix_bar_pos.y, │ - fix_bar_pos.x, │ - fix_bar_pos.y + fix_bar_size.y, │ - fix_bar_pos.x + fix_bar_size.x) │ - alexgames.draw_rect(FIX_TIME_PROGRSS_BAR_FG_COLOUR, │ - fix_bar_pos.y + math.floor(portion*size.y), │ - fix_bar_pos.x, │ - fix_bar_pos.y + fix_bar_size.y, │ - fix_bar_pos.x + fix_bar_size.x) │ +-- TODO make private │ +function core.get_broccoli_particle_positions(state, player_state, attack_state) │ + local positions = {} │ + for _, particle in ipairs(attack_state.particles) do │ + table.insert(positions, { │ + y = player_state.y + particle.y_offset, │ + x = player_state.x + particle.x_offset, │ + }) │ + end │ + │ + return positions │ +end │ + │ +local function get_missing_hammer_idx(attack_state) │ + for i=1,attack_state.max_particles do │ + if attack_state.particles[i] == nil then │ + return i │ end │ end │ + return nil │ end │ │ -local function draw_ui_layer(state, ui_state, player) │ - local highlight_needs_types = {} │ - for _, patient in ipairs(state.patients) do │ - if patient.requires_help and patient.needs_revealed then │ - highlight_needs_types[patient.needs_type] = true │ +local function update_hammer_state(state, player_state, attack_state, dt_ms) │ + print("update_hammer_state") │ + attack_state.time_to_next_spawn_ms = attack_state.time_to_next_spawn_ms - dt_ms │ + if attack_state.time_to_next_spawn_ms < 0 then │ + while utils.table_len(attack_state.particles) < attack_state.max_particles do │ + attack_state.time_to_next_spawn_ms = attack_state.spawn_period_ms │ + local i = get_missing_hammer_idx(attack_state) │ + attack_state.particles[i] = { │ + hammer_radius = HAMMER_RADIUS + i*HAMMER_SIZE, │ + angle = 0, │ + idx = i, │ + } │ end │ end │ │ - for y=0, state.y_size-1 do │ - for x=0, state.x_size-1 do │ - for _, item in ipairs(state.cells[y][x]) do │ - local items_needs_type = core.get_item_needs_type(item.id) │ - if highlight_needs_types[item_needs_type] then │ - -- TODO draw fixer icon │ - end │ + for _, particle in pairs(attack_state.particles) do │ + particle.angle = particle.angle + HAMMER_ROT_SPEED*dt_ms/1000 │ + end │ + │ + local hammers_to_remove = {} │ + │ + local positions = core.get_hammer_particle_positions(state, player_state, attack_state) │ + for hammer_idx, hammer in ipairs(positions) do │ + local info = area_contains_enemy(state, │ + hammer.y - HAMMER_SIZE/2, hammer.x - HAMMER_SIZE/2, │ + hammer.y + HAMMER_SIZE/2, hammer.x + HAMMER_SIZE/2) │ + if info.found then │ + print(string.format("Hammer hit %d enemies", #info.enemies)) │ + for _, enemy in ipairs(info.enemies) do │ + damage_enemy(state, enemy, 200) │ + end │ + if attack_state.hammers_consumable then │ + table.insert(hammers_to_remove, hammer_idx) │ end │ end │ end │ - │ - for _, patient in ipairs(state.patients) do │ - draw_ui_layer_patient(state, ui_state, player, patient) │ + │ + for _, idx in ipairs(hammers_to_remove) do │ + attack_state.particles[idx] = nil │ end │ │ end │ │ -local function draw_highlight_floor_cell(ui_state, colour, y, x) │ - local padding = 0.1 │ - local ia = game_pt_to_gfx_pt(point(y - padding,x - padding), ui_state) │ - local ib = game_pt_to_gfx_pt(point(y+1+padding,x+0-padding), ui_state) │ - local ic = game_pt_to_gfx_pt(point(y+1+padding,x+1+padding), ui_state) │ - local id = game_pt_to_gfx_pt(point(y+0-padding,x+1+padding), ui_state) │ - alexgames.draw_line(colour, highlight_line_size, │ - math.floor(ia.y), math.floor(ia.x), │ - math.floor(ib.y), math.floor(ib.x)) │ - alexgames.draw_line(colour, highlight_line_size, │ - math.floor(ib.y), math.floor(ib.x), │ - math.floor(ic.y), math.floor(ic.x)) │ - alexgames.draw_line(colour, highlight_line_size, │ - math.floor(ic.y), math.floor(ic.x), │ - math.floor(id.y), math.floor(id.x)) │ - alexgames.draw_line(colour, highlight_line_size, │ - math.floor(id.y), math.floor(id.x), │ - math.floor(ia.y), math.floor(ia.x)) │ +function core.get_hammer_particle_positions(state, player_state, attack_state) │ + local positions = {} │ + for _, particle in pairs(attack_state.particles) do │ + table.insert(positions, { │ + y = player_state.y + particle.hammer_radius * math.cos(particle.angle), │ + x = player_state.x + particle.hammer_radius * math.sin(particle.angle), │ + }) │ + end │ + │ + return positions │ end │ │ -local function draw_touch_input() │ - draw_more.draw_graphic_ul('hospital_ui_dirpad', │ - dirpad_pos_y, dirpad_pos_x, │ - DIRPAD_SIZE_Y, DIRPAD_SIZE_X) │ │ - draw_more.draw_graphic_ul('hospital_ui_thumb_buttons', │ - thumb_buttons_pos_y, thumb_buttons_pos_x, │ - THUMB_BUTTONS_SIZE_Y, THUMB_BUTTONS_SIZE_X) │ + │ +local function update_entity_map(entity_map, old_pos, item_state) │ + --print_entity_map(entity_map) │ + local old_entity_map_pos = get_entity_map_pos(old_pos) │ + local new_entity_map_pos = get_entity_map_pos(item_state) │ + --[[ │ + print(string.format("Moving entity from {y=%d,x=%d} to {y=%d,x=%d}", │ + old_entity_map_pos.y, │ + old_entity_map_pos.x, │ + new_entity_map_pos.y, │ + new_entity_map_pos.x)) │ + --]] │ + │ + if old_entity_map_pos.y == new_entity_map_pos.y and │ + old_entity_map_pos.x == new_entity_map_pos.x then │ + return │ + end │ + │ + local old_map_cell = get_entity_map_cell(entity_map, old_entity_map_pos.y, old_entity_map_pos.x) │ + local old_map_idx │ + local old_val │ + for idx, val in ipairs(old_map_cell) do │ + if val.state == item_state then │ + old_map_idx = idx │ + old_val = val │ + end │ + end │ + │ + if old_map_idx == nil then │ + print(string.format("old_map_cell has len %d", #old_map_cell)) │ + for idx, val in ipairs(old_map_cell) do │ + print(string.format("old_map_cell[%d] = %s", idx, val.state)) │ + end │ + error(string.format("Could not find item %s in old entity_map cell", item_state)) │ + end │ + │ + local new_map_cell = get_entity_map_cell_or_create(entity_map, new_entity_map_pos.y, new_entity_map_pos.x) │ + table.remove(old_map_cell, idx) │ + table.insert(new_map_cell, old_val) │ end │ │ -local function draw_keyboard_input() │ - alexgames.draw_text('[Z]: Pick up / use', CONTROLS_TEXT_COLOUR, │ - screen_height - 50, 10, CONTROLS_TEXT_SIZE, 1) │ - alexgames.draw_text('[X]: Drop', CONTROLS_TEXT_COLOUR, │ - screen_height - 20, 10, CONTROLS_TEXT_SIZE, 1) │ - alexgames.draw_text('[Arrows]: Move', CONTROLS_TEXT_COLOUR, │ - screen_height - 20, screen_width - 10, CONTROLS_TEXT_SIZE, -1) │ +function core.new_state(num_players) │ + local state = { │ + entity_map = {}, │ + players = {}, │ + enemies = {}, │ + --enemies_to_spawn_per_period = 50, │ + enemies_to_spawn_per_period = 1, │ + enemy_spawn_time_ms = 400, │ + --enemy_spawn_time_ms = 400, │ + time_to_next_enemy_spawn_ms = 0, │ + } │ + │ + for i=1,num_players do │ + │ + table.insert(state.players, { │ + y = 0, │ + x = 0, │ + │ + move_vec = { │ + y = 0, │ + x = 0, │ + }, │ + │ + level = 1, │ + attack_states = { │ + [core.ATTACK_TYPE_BROCCOLI] = { │ + enabled = true, │ + update = update_broccoli_state, │ + get_positions = core.get_broccoli_particle_positions, │ + consumed_on_dmg = false, │ + level = 1, │ + time_to_next_spawn_ms = 500, │ + --entities_per_spawn = 1, │ + entities_per_spawn = 4, │ + spawn_period_ms = 1000, │ + next_spawn_dir = 1, │ + particles = {}, │ + }, │ + │ + [core.ATTACK_TYPE_HAMMER] = { │ + enabled = true, │ + update = update_hammer_state, │ + get_positions = core.get_hammer_particle_positions, │ + max_particles = 3, │ + level = 1, │ + time_to_next_spawn_ms = 500, │ + spawn_period_ms = 1000, │ + next_spawn_dir = 1, │ + hammers_consumable = false, │ + particles = {}, │ + }, │ + │ + }, │ + }) │ + add_to_entity_map(state.entity_map, core.ENTITY_TYPE_PLAYER, state.players[i]) │ + end │ + │ + return state │ end │ │ -local function draw_unknown_input() │ - alexgames.draw_text('Touch screen or use keyboard to select input', CONTROLS_TEXT_COLOUR, │ - screen_height - 20, math.floor(screen_width/2), CONTROLS_TEXT_SIZE, 0) │ +local function get_random_dist_from_player(player_state, dist_from_player) │ + local angle = math.random()*2*math.pi │ + local pos = { │ + y = player_state.y + dist_from_player*math.cos(angle), │ + x = player_state.x + dist_from_player*math.sin(angle), │ + } │ + return pos │ end │ │ -local function draw_animations(animations) │ - for _, anim in ipairs(animations) do │ - if anim.anim_type == ANIM_TYPE_FLOAT_TEXT then │ - alexgames.draw_text(anim.text, anim.text_colour, │ - math.floor(anim.y), math.floor(anim.x), │ - anim.font_size, 0) │ - else │ - error("unhandled anim type", anim.anim_type) │ - end │ - end │ +local function spawn_enemy(state, pos) │ + local enemy_state = { │ + y = pos.y, │ + x = pos.x, │ + health = 10, │ + move_speed = ENEMY_MOVE_SPEED, │ + } │ + table.insert(state.enemies, enemy_state) │ + add_to_entity_map(state.entity_map, core.ENTITY_TYPE_ENEMY, enemy_state) │ end │ │ -function draw.draw_state(state, ui_state, player) │ - alexgames.draw_clear() │ +local function collides_with_new_pos(state, entity, tentative_pos) │ + local old_entity_pos = get_entity_map_pos(entity) │ + local new_entity_pos = get_entity_map_pos(tentative_pos) │ │ - if state == nil then │ - return │ + if old_entity_pos.y == new_entity_pos.y and │ + old_entity_pos.x == new_entity_pos.x then │ + return false │ + else │ + return #get_entity_map_cell_or_create(state.entity_map, new_entity_pos.y, new_entity_pos.x) > 0 │ end │ │ - local player_state = state.players[player] │ + │ +end │ │ - ui_state.offset_y = -player_state.y │ - ui_state.offset_x = -player_state.x │ +local function move_enemies_toward_player(state, dt_ms) │ + local player_state = state.players[1] │ + for _, enemy in ipairs(state.enemies) do │ + local dy = player_state.y - enemy.y │ + local dx = player_state.x - enemy.x │ │ - for y, row in pairs(state.cells) do │ - for x, cell in pairs(row) do │ + local angle = math.atan(dy, dx) │ + local dist_squared = dy*dy + dx*dx │ │ - local ia = game_pt_to_gfx_pt(point(y,x), ui_state) │ - draw_more.draw_graphic_ul('hospital_floor_tile', │ - math.floor(ia.y), math.floor(ia.x - TILE_SIZE), │ - 2*TILE_SIZE, TILE_SIZE); │ + local old_pos = { │ + y = enemy.y, │ + x = enemy.x, │ + } │ + │ + if dist_squared > squared(ENEMY_DIST_TO_PLAYER) then │ + local tentative_pos = { │ + y = enemy.y + enemy.move_speed * math.sin(angle) * dt_ms/1000.0, │ + x = enemy.x + enemy.move_speed * math.cos(angle) * dt_ms/1000.0, │ + } │ + │ + local map_pos = get_entity_map_pos(tentative_pos) │ + local map_cell = get_entity_map_cell_or_create(state.entity_map, map_pos.y, map_pos.x) │ + if not collides_with_new_pos(state, enemy, tentative_pos) then │ + enemy.y = tentative_pos.y │ + enemy.x = tentative_pos.x │ + else │ + -- otherwise, collision. Do not move │ + end │ + --print(string.format("enemy is at pos y=%s, x=%s", enemy.y, enemy.x)) │ end │ + │ + update_entity_map(state.entity_map, old_pos, enemy) │ end │ +end │ │ - for _, cell in ipairs(core.get_cells_to_highlight(state, player)) do │ - if cell.y == nil or cell.x == nil then │ - error("cell has nil coords") │ +function core.update_state(state, dt_ms) │ + if state.time_to_next_enemy_spawn_ms < 0 then │ + for i=1,state.enemies_to_spawn_per_period do │ + local new_enemy_pos = get_random_dist_from_player(state.players[1], ENEMY_SPAWN_DIST_FROM_PLAYER) │ + spawn_enemy(state, new_enemy_pos) │ end │ - draw_highlight_floor_cell(ui_state, HIGHLIGHT_COLOUR, │ - cell.y, cell.x) │ + state.time_to_next_enemy_spawn_ms = state.enemy_spawn_time_ms │ end │ │ - for player_idx, _ in ipairs(state.players) do │ - local highlight_cell = core.get_closest_item_cell(state, player_idx) │ - if highlight_cell ~= nil then │ - draw_highlight_floor_cell(ui_state, PLAYER_HIGHLIGHT_COLOURS[player_idx].stroke, │ - highlight_cell.y, highlight_cell.x) │ + state.time_to_next_enemy_spawn_ms = state.time_to_next_enemy_spawn_ms - dt_ms │ + │ + for _, player_state in ipairs(state.players) do │ + if player_state.move_vec.y ~= 0 or │ + player_state.move_vec.x ~= 0 then │ + local dy = PLAYER_MOVE_SPEED * player_state.move_vec.y * dt_ms/1000.0 │ + local dx = PLAYER_MOVE_SPEED * player_state.move_vec.x * dt_ms/1000.0 │ + │ + player_state.y = player_state.y + dy │ + player_state.x = player_state.x + dx │ end │ + update_attack_states(state, player_state, dt_ms) │ end │ │ - draw_items(state, ui_state, player) │ - draw_ui_layer(state, ui_state, player) │ - draw_animations(animations) │ + move_enemies_toward_player(state, dt_ms) │ +end │ │ - if ui_state.input_type == draw.INPUT_TYPE_TOUCH then │ - draw_touch_input() │ - elseif ui_state.input_type == draw.INPUT_TYPE_KEYBOARD then │ - draw_keyboard_input() │ - else │ - draw_unknown_input() │ +function core.set_player_move_vec(state, player_idx, move_vec) │ + state.players[player_idx].move_vec.y = move_vec.y │ + state.players[player_idx].move_vec.x = move_vec.x │ +end │ + │ +return core │ +--[[ │ +-- │ +-- TODO better AoE damage: │ +-- hard to do much AoE damage when the attacks are consumed as soon as they hit the edge of a mob of enemies, especially the hammer. │ +-- should mark them as "remove in 300 ms" or something, so they get some time to do more damage. │ +-- maybe also only let them do a certain amount of damage │ +-- │ +-- TODO: │ +-- * add touch dirpad, refactor into common library for use with other games like thrust and hospital/bound │ +-- │ +--]] │ +local core = require("games/swarm/swarm_core") │ +local draw = require("games/swarm/swarm_draw") │ +local keyboard_input = require("games/swarm/swarm_keyboard_input") │ +local alexgames = require("alexgames") │ + │ +local FPS = 60 │ +--local FPS = 2 │ +local MS_PER_FRAME = math.floor(1000/FPS) │ +local player_idx = 1 │ + │ +local is_paused = false │ + │ +local height = 480 │ +local width = 480 │ + │ +local g_state = { │ + ui = draw.init(height, width), │ + game = core.new_state(1), │ + key_state = keyboard_input.new_key_state(), │ +} │ + │ +function update() │ + draw.draw_state(g_state.game, g_state.ui, player_idx) │ + if not is_paused then │ + core.update_state(g_state.game, MS_PER_FRAME) │ end │ +end │ │ - alexgames.draw_refresh() │ +function handle_key_evt(evt, code) │ + local handled = false │ + if code == "KeyP" and evt == "keydown" then │ + is_paused = not is_paused │ + local pause_str │ + if is_paused then │ + pause_str = "paused" │ + else │ + pause_str = "unpaused" │ + end │ + alexgames.set_status_msg(string.format("Game %s. (Press \"P\" to toggle)", pause_str)) │ + handled = true │ + end │ + local info = keyboard_input.get_move_vec_from_key_evt(g_state.key_state, evt, code) │ + handled = handled or info.handled │ + core.set_player_move_vec(g_state.game, player_idx, info.vec) │ + return handled │ +end │ + │ +function handle_touch_evt(evt, touches) │ + local actions = draw.handle_touch_evts(g_state.ui, evt, touches) │ + for _, action in ipairs(actions) do │ + if action.action_type == draw.ACTION_PLAYER_VEC_CHANGE then │ + core.set_player_move_vec(g_state.game, player_idx, action.new_player_vec) │ + end │ + end │ +end │ + │ +alexgames.set_timer_update_ms(MS_PER_FRAME) │ +alexgames.enable_evt("key") │ +alexgames.enable_evt("touch") │ +local keyboard_input = {} │ + │ +local INV_SQRT2 = 1/math.sqrt(2) │ + │ +function keyboard_input.new_key_state() │ + local state = { │ + keys_pressed = {}, │ + } │ + return state │ +end │ + │ +local function abs(x) │ + if x >= 0 then return x │ + else return -x end │ end │ │ local function sign(x) │ if x >= 0 then return 1 │ else return -1 end │ end │ │ -local function get_dirpad_vec(touch) │ - local centre_y = math.floor(dirpad_pos_y + DIRPAD_SIZE_Y/2) │ - local centre_x = math.floor(dirpad_pos_x + DIRPAD_SIZE_X/2) │ +function keyboard_input.get_move_vec_from_key_evt(state, evt, code) │ + if state.keys_pressed[code] == nil then │ + state.keys_pressed[code] = false │ + end │ │ - local vec_y = ((touch.y - centre_y)*1.0/(DIRPAD_SIZE/2)) │ - local vec_x = ((touch.x - centre_x)*1.0/(DIRPAD_SIZE/2)) │ + state.keys_pressed[code] = (evt == "keydown") │ │ - local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ + local keys_handled = { │ + ["ArrowLeft"] = true, │ + ["ArrowRight"] = true, │ + ["ArrowUp"] = true, │ + ["ArrowDown"] = true, │ │ - if mag > 1.0 then │ - vec_y = vec_y / mag │ - vec_x = vec_x / mag │ + ["ArrowH"] = true, │ + ["ArrowJ"] = true, │ + ["ArrowK"] = true, │ + ["ArrowL"] = true, │ + } │ + │ + local left = state.keys_pressed["ArrowLeft"] or state.keys_pressed["KeyH"] │ + local right = state.keys_pressed["ArrowRight"] or state.keys_pressed["KeyL"] │ + local down = state.keys_pressed["ArrowDown"] or state.keys_pressed["KeyJ"] │ + local up = state.keys_pressed["ArrowUp"] or state.keys_pressed["KeyK"] │ + │ + local move_vec_y = 0 │ + local move_vec_x = 0 │ + │ + if left and right then │ + -- pass │ + elseif left then │ + move_vec_x = -1 │ + elseif right then │ + move_vec_x = 1 │ end │ │ - local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ + if up and down then │ + -- pass │ + elseif up then │ + move_vec_y = -1 │ + elseif down then │ + move_vec_y = 1 │ + end │ │ - return { y = vec_y, x = vec_x} │ + if abs(move_vec_y) > 0 and abs(move_vec_x) > 0 then │ + move_vec_y = sign(move_vec_y)*INV_SQRT2 │ + move_vec_x = sign(move_vec_x)*INV_SQRT2 │ + end │ + │ + return { │ + handled = keys_handled[code], │ + vec = { │ + y = move_vec_y, │ + x = move_vec_x, │ + }, │ + } │ + │ end │ │ -local function touch_in_dirpad(pos) │ - local centre_y = math.floor(dirpad_pos_y + DIRPAD_SIZE_Y/2) │ - local centre_x = math.floor(dirpad_pos_x + DIRPAD_SIZE_X/2) │ +return keyboard_input │ +local draw = {} │ │ - local dy = (pos.y - centre_y) │ - local dx = (pos.x - centre_x) │ +local core = require("games/swarm/swarm_core") │ +local touchpad = require("libs/ui/touchpad") │ +local alexgames = require("alexgames") │ │ - return (math.abs(dy) <= DIRPAD_SIZE_Y/2 and │ - math.abs(dx) <= DIRPAD_SIZE_X/2) │ -end │ +draw.ACTION_PLAYER_VEC_CHANGE = 1 │ │ -local function touch_in_use_btn(pos) │ - local top = thumb_buttons_pos_y │ - local bottom = thumb_buttons_pos_y + THUMB_BUTTONS_SIZE_Y │ - local left = thumb_buttons_pos_x │ - local right = thumb_buttons_pos_x + THUMB_BUTTONS_SIZE_X │ +local height = 480 │ +local width = 480 │ │ - return top <= pos.y and pos.y <= bottom and │ - left <= pos.x and pos.x <= right and │ - (pos.y - top) >= (pos.x - left) │ -end │ +local padding = 5 │ │ -local function touch_in_drop_btn(pos) │ - local top = thumb_buttons_pos_y │ - local bottom = thumb_buttons_pos_y + THUMB_BUTTONS_SIZE_Y │ - local left = thumb_buttons_pos_x │ - local right = thumb_buttons_pos_x + THUMB_BUTTONS_SIZE_X │ +local TOUCHPAD_RADIUS = 85 │ +local TOUCHPAD_POS = { │ + y = height - TOUCHPAD_RADIUS - padding, │ + x = width - TOUCHPAD_RADIUS - padding, │ +} │ │ - return top <= pos.y and pos.y <= bottom and │ - left <= pos.x and pos.x <= right and │ - (pos.y - top) < (pos.x - left) │ +local BACKGROUND_COLOUR = '#0f7901' │ + │ +local function get_attack_img(attack_type) │ + local MAP = { │ + [core.ATTACK_TYPE_BROCCOLI] = "swarm_broccoli", │ + [core.ATTACK_TYPE_HAMMER] = "swarm_hammer", │ + } │ + return MAP[attack_type] │ end │ │ -function draw.touches_to_actions(state, ui_state, evt_id, touches) │ - local actions = {} │ - for _, touch in ipairs(touches) do │ - if evt_id == 'touchstart' and ui_state.dirpad_touch_id == nil and touch_in_dirpad(touch) then │ - ui_state.dirpad_touch_id = touch.id │ - elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.dirpad_touch_id == touch.id then │ - ui_state.dirpad_touch_id = nil │ - local action = { │ - action = core.ACTION_DIR_PAD_POS_CHANGE, │ - vec_y = 0, │ - vec_x = 0, │ - } │ - table.insert(actions, action) │ - end │ - if ui_state.dirpad_touch_id == touch.id then │ - local vec = get_dirpad_vec(touch) │ - local action = { │ - action = core.ACTION_DIR_PAD_POS_CHANGE, │ - vec_y = vec.y, │ - vec_x = vec.x │ - } │ - table.insert(actions, action) │ - end │ +local function get_screen_pos(state, game_pos) │ + return { │ + y = math.floor(height/2 - state.players[1].y + game_pos.y), │ + x = math.floor(width/2 - state.players[1].x + game_pos.x), │ + } │ +end │ │ - if evt_id == 'touchstart' and ui_state.use_btn_touch_id == nil and touch_in_use_btn(touch) then │ - ui_state.use_btn_touch_id = touch.id │ - table.insert(actions, { action = core.ACTION_USE_BTN_DOWN }) │ - elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.use_btn_touch_id == touch.id then │ - ui_state.use_btn_touch_id = nil │ - table.insert(actions, { action = core.ACTION_USE_BTN_RELEASE }) │ - end │ +local function draw_bg(state, player_idx) │ + --alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, height, width) │ │ - if evt_id == 'touchstart' and ui_state.drop_btn_touch_id == nil and touch_in_drop_btn(touch) then │ - ui_state.drop_btn_touch_id = touch.id │ - table.insert(actions, { action = core.ACTION_DROP_BTN_DOWN }) │ - elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.drop_btn_touch_id == touch.id then │ - ui_state.drop_btn_touch_id = nil │ - table.insert(actions, { action = core.ACTION_DROP_BTN_RELEASE }) │ + for _, bg_y_idx in ipairs({0, 1}) do │ + for _, bg_x_idx in ipairs({0, 1}) do │ + local bg = get_screen_pos(state, { │ + y = (math.floor(state.players[player_idx].y/height) + bg_y_idx)*height, │ + x = (math.floor(state.players[player_idx].x/width) + bg_x_idx)*width, │ + }) │ + alexgames.draw_graphic("swarm_grass_bg1", bg.y, bg.x, height, width) │ end │ end │ - return actions │ end │ │ -function draw.add_animations_for_events(state, ui_state, events) │ - for _, event in ipairs(events) do │ - if event.event == core.EVT_PATIENT_NEED_EXPIRED then │ - local pt = event.patient │ - local gfx_pt = game_pt_to_gfx_pt(event.patient, ui_state) │ - table.insert(animations, { │ - anim_type = ANIM_TYPE_FLOAT_TEXT, │ - text = '-100', │ - text_colour = '#ff0000ff', │ - font_size = 16, │ - orig_y = gfx_pt.y, │ - orig_x = gfx_pt.x, │ +local function draw_attacks_state(state, player_idx) │ + local player_state = state.players[player_idx] │ + for attack_type, attack_state in pairs(player_state.attack_states) do │ + local img_id = get_attack_img(attack_type) │ + local positions = attack_state.get_positions(state, player_state, attack_state) │ + --local broccoli_positions = core.get_broccoli_particle_positions(state, state.players[player_idx], state.players[player_idx].attack_states[core.ATTACK_TYPE_BROCCOLI]) │ + for _, pos in ipairs(positions) do │ + local screen_pos = get_screen_pos(state, pos) │ + local attack_info = core.ATTACK_INFO[attack_type] │ + alexgames.draw_graphic(img_id, screen_pos.y, screen_pos.x, │ + attack_info.size_y, attack_info.size_x) │ + end │ + end │ │ - y = gfx_pt.y, │ - x = gfx_pt.x, │ +end │ │ - dst_y = gfx_pt.y - 70, │ - dst_x = gfx_pt.x, │ +function draw.draw_state(state, ui_state, player_idx) │ + alexgames.draw_clear() │ │ - orig_time_left = 3000, │ - time_left = 3000, │ - }) │ - elseif event.event == core.EVT_PATIENT_CURED then │ - local pt = event.patient │ - local gfx_pt = game_pt_to_gfx_pt(event.patient, ui_state) │ - table.insert(animations, { │ - anim_type = ANIM_TYPE_FLOAT_TEXT, │ - text = '+10', │ - text_colour = '#008800cc', │ - font_size = 16, │ + draw_bg(state, player_idx) │ │ - orig_y = gfx_pt.y, │ - orig_x = gfx_pt.x, │ + alexgames.draw_text("player", '#000000', height/2, width/2, 12, 0) │ + draw_attacks_state(state, player_idx) │ + --alexgames.draw_graphic("swarm_broccoli", height/4, width/4, 80, 80) │ + --alexgames.draw_graphic("swarm_hammer", height/4, width/4, 50, 50) │ │ - y = gfx_pt.y, │ - x = gfx_pt.x, │ + for enemy_idx, enemy in ipairs(state.enemies) do │ + local screen_pos = get_screen_pos(state, enemy) │ + alexgames.draw_text(string.format("%d", enemy_idx), '#000000', screen_pos.y, screen_pos.x, 12, 0) │ + end │ │ - dst_y = gfx_pt.y - 70, │ - dst_x = gfx_pt.x, │ + alexgames.draw_graphic('hospital_ui_dirpad', │ + ui_state.touchpad.pos.y, │ + ui_state.touchpad.pos.x, │ + 2*ui_state.touchpad.radius, │ + 2*ui_state.touchpad.radius) │ + │ │ - orig_time_left = 3000, │ - time_left = 3000, │ - }) │ - else │ - error("unhandled event", event.event) │ - end │ - end │ end │ │ -function draw.update_animations(state, dt) │ - for _, anim in ipairs(animations) do │ - local dy = (anim.dst_y - anim.orig_y)*1.0/anim.orig_time_left │ - local dx = (anim.dst_x - anim.orig_x)*1.0/anim.orig_time_left │ +function draw.handle_touch_evts(state, evt_id, touches) │ + local actions = {} │ │ - anim.y = anim.y + dy * dt │ - anim.x = anim.x + dx * dt │ - anim.time_left = anim.time_left - dt │ + local new_player_vec = touchpad.handle_touch_evts(state.touchpad, evt_id, touches) │ + if new_player_vec ~= nil then │ + table.insert(actions, { │ + action_type = draw.ACTION_PLAYER_VEC_CHANGE, │ + new_player_vec = new_player_vec, │ + }) │ end │ │ - local i=1 │ - while i <= #animations do │ - if animations[i].time_left <= 0 then │ - table.remove(animations, i) │ - else │ - i = i + 1 │ - end │ - end │ + return actions │ end │ │ +function draw.init(height, width) │ + local state = { │ + touchpad = touchpad.new_state(TOUCHPAD_POS, TOUCHPAD_RADIUS), │ + } │ + return state │ +end │ │ return draw │ local core = {} │ │ local PLAYER_MOVE_SPEED = 3.0/1000 │ │ core.ITEM_ID_PLAYER = 1 │ @@ -15743,14 +17235,722 @@ │ error(string.format("received %d leftover bytes when deserializing", #bytes)) │ end │ │ return state │ end │ │ return serialize │ +local draw = {} │ + │ +local core = require("games/hospital/hospital_core") │ +local draw_more = require("libs/draw/draw_more") │ +local alexgames = require("alexgames") │ + │ +draw.INPUT_TYPE_KEYBOARD = 1 │ +draw.INPUT_TYPE_TOUCH = 2 │ + │ +local ANIM_TYPE_FLOAT_TEXT = 1 │ + │ +local TIME_LEFT_BG_COLOUR = '#66666666' │ +local TIME_LEFT_FG_GOOD_COLOUR = '#008800aa' │ +local TIME_LEFT_FG_MED_COLOUR = '#ffff00ff' │ +local TIME_LEFT_FG_BAD_COLOUR = '#ff0000ff' │ +local TIME_LEFT_FG_BAD_COLOUR2 = '#bb5500ff' │ + │ +local FIX_TIME_PROGRSS_BAR_BG_COLOUR = '#66ff6666' │ +local FIX_TIME_PROGRSS_BAR_FG_COLOUR = '#22ff22cc' │ + │ +local HIGHLIGHT_COLOUR = '#ffff00' │ +local CONTROLS_TEXT_COLOUR = '#000000' │ +local CONTROLS_TEXT_SIZE = 12 │ + │ +local TIME_LEFT_ICON_WIDTH = 10 │ +local PADDING = 3 │ + │ +local PLAYER_HIGHLIGHT_COLOURS = { │ + { fill = "#20a4a966", stroke = "#0000ff99" }, │ + { fill = "#a72ea566", stroke = "#ff008899" }, │ + { fill = "#774a1e66", stroke = "#f7aa5e99" }, │ + { fill = "#c5202066", stroke = "#ff000099" }, │ +} │ + │ +local animations = {} │ + │ +local highlight_line_size = 5 │ + │ +local TILE_SIZE = 25 │ +local SCREEN_ORIGIN = { │ + y = 480/2, │ + x = 480/2, │ +} │ + │ +local draw_pt_order = nil │ + │ +local UI_PADDING = 10 │ +local DIRPAD_SIZE = 170 │ +local DIRPAD_SIZE_Y = DIRPAD_SIZE │ +local DIRPAD_SIZE_X = DIRPAD_SIZE │ +local dirpad_pos_y = nil │ +local dirpad_pos_x = nil │ + │ +local THUMB_BUTTONS_SIZE = 150 │ +local THUMB_BUTTONS_SIZE_Y = THUMB_BUTTONS_SIZE │ +local THUMB_BUTTONS_SIZE_X = THUMB_BUTTONS_SIZE │ +local thumb_buttons_pos_y = nil │ +local thumb_buttons_pos_x = nil │ + │ +local screen_width = nil │ +local screen_height = nil │ + │ + │ + │ +local function point(y, x) │ + return { y = y, x = x } │ +end │ + │ +-- "cart" (cartesian) meaning the game space, convert it to │ +-- an isometric grid (how it's drawn) │ +local function cart_to_iso(pt) │ + local x = (pt.x - pt.y) │ + local y = (pt.x + pt.y)/2 │ + return point(y,x) │ +end │ + │ +local function iso_to_cart(pt) │ + local x = (2*pt.y + pt.x)/2 │ + local y = (2*pt.y - pt.x)/2 │ + return point(y,x) │ +end │ + │ +local function game_pt_to_gfx_pt(pt, ui_state) │ + if pt.x == nil or pt.y == nil then │ + error("nil pt.x or y", 2) │ + end │ + pt = point(pt.y, pt.x) │ + pt.y = pt.y + ui_state.offset_y │ + pt.x = pt.x + ui_state.offset_x │ + pt = point(pt.y*TILE_SIZE, pt.x*TILE_SIZE) │ + pt = cart_to_iso(pt) │ + pt = point(pt.y + SCREEN_ORIGIN.y, pt.x + SCREEN_ORIGIN.x) │ + return pt │ +end │ + │ +local function get_doctor_img_id(player_idx) │ + local map = { │ + [1] = 'hospital_doctor1', │ + [2] = 'hospital_doctor2', │ + [3] = 'hospital_doctor3', │ + [4] = 'hospital_doctor4', │ + } │ + local img_id = map[player_idx] │ + if img_id == nil then │ + error(string.format("Could not find doctor img_id for %d", player_idx)) │ + end │ + return img_id │ +end │ + │ +local function generate_draw_pt_order(y_size, x_size) │ + local pt_order = {} │ + for y=0,y_size-1 do │ + local x = 0 │ + while y >= 0 and x < x_size do │ + table.insert(pt_order, { y = y, x = x }) │ + y = y - 1 │ + x = x + 1 │ + end │ + end │ + │ + for x=0,x_size-1 do │ + local y = y_size-1 │ + while y >= 0 and x < x_size do │ + table.insert(pt_order, { y = y, x = x }) │ + y = y - 1 │ + x = x + 1 │ + end │ + end │ + return pt_order │ +end │ + │ +function draw.init(width, height, game_params) │ + │ + screen_width = width │ + screen_height = height │ + │ + thumb_buttons_pos_y = height - THUMB_BUTTONS_SIZE_Y - UI_PADDING │ + thumb_buttons_pos_x = width - THUMB_BUTTONS_SIZE_X - UI_PADDING │ + │ + dirpad_pos_y = height - DIRPAD_SIZE_Y - UI_PADDING │ + dirpad_pos_x = UI_PADDING │ + │ + local ui_state = { │ + dirpad_touch_id = nil, │ + use_btn_touch_id = nil, │ + drop_btn_touch_id = nil, │ + } │ + │ + --draw_pt_order = generate_draw_pt_order(game_params.y_size, game_params.x_size) │ + draw_pt_order = generate_draw_pt_order(game_params.y_size, 15) -- TODO FIX THIS TODO TODO TODO │ + return ui_state │ +end │ + │ +function draw.set_input_type(ui_state, input_type) │ + ui_state.input_type = input_type │ +end │ + │ +local function get_item_img_id(item_id) │ + local map = { │ + [core.ITEM_ID_PATIENT_IN_BED] = "hospital_patient_in_bed", │ + [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = "hospital_patient_in_bed_flipped", │ + [core.ITEM_ID_BED] = "hospital_bed", │ + [core.ITEM_ID_BED_FLIPPED]= "hospital_bed_flipped", │ + [core.ITEM_ID_IV_BAG] = "hospital_iv_bag", │ + [core.ITEM_ID_DEFIB] = "hospital_defib", │ + [core.ITEM_ID_VENTILATOR] = "hospital_ventilator", │ + [core.ITEM_ID_XRAY_SHEET] = "hospital_xray_sheet", │ + [core.ITEM_ID_XRAY_SOURCE] = "hospital_xray_source", │ + │ + } │ + local img_id = map[item_id] │ + if img_id == nil then │ + error(string.format("Could not find image id for item id %s", item_id)) │ + end │ + return img_id │ +end │ + │ +local function get_item_size(item_id) │ + local sizes = { │ + [core.ITEM_ID_PLAYER] = { x= 1.5*TILE_SIZE, y= 2*TILE_SIZE }, │ + [core.ITEM_ID_BED] = { x= 2.9*TILE_SIZE, y= 2.2*TILE_SIZE }, │ + [core.ITEM_ID_BED_FLIPPED] = { x= 2.9*TILE_SIZE, y= 2.2*TILE_SIZE }, │ + [core.ITEM_ID_PATIENT_IN_BED] = { x= 2.0*TILE_SIZE, y= 1.5*TILE_SIZE }, │ + [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = { x= 2.0*TILE_SIZE, y= 1.5*TILE_SIZE }, │ + [core.ITEM_ID_IV_BAG] = { x= 2*TILE_SIZE, y= 3*TILE_SIZE }, │ + [core.ITEM_ID_VENTILATOR] = { x= 1.8*TILE_SIZE, y= 2.2*TILE_SIZE }, │ + [core.ITEM_ID_XRAY_SHEET] = { x= 2.0*TILE_SIZE, y= 3.0*TILE_SIZE }, │ + [core.ITEM_ID_XRAY_SOURCE] = { x= 2.0*TILE_SIZE, y= 3.0*TILE_SIZE }, │ + --[core.ITEM_ID_OXYGEN_TANK] = { x= 2*TILE_SIZE, y= 3*TILE_SIZE }, │ + [core.ITEM_ID_DEFIB] = { x= 2*TILE_SIZE, y= 2*TILE_SIZE }, │ + } │ + local size = sizes[item_id] │ + if size == nil then │ + error(string.format("could not find size for id %s", item_id)) │ + end │ + return size │ +end │ + │ +local function get_item_offset(item_id) │ + local offsets = { │ + [core.ITEM_ID_PLAYER] = { x= 0.50, y= 0.80 }, │ + [core.ITEM_ID_BED] = { x= 0.35, y= 0.55 }, │ + [core.ITEM_ID_BED_FLIPPED] = { x= 0.35, y= 0.55 }, │ + [core.ITEM_ID_PATIENT_IN_BED] = { x= 0.35, y= 0.90 }, │ + [core.ITEM_ID_PATIENT_IN_BED_FLIPPED] = { x= 0.35, y= 0.90 }, │ + [core.ITEM_ID_IV_BAG] = { x= 0.6, y= 0.7 }, │ + [core.ITEM_ID_VENTILATOR] = { x= 0.50, y= 0.55 }, │ + [core.ITEM_ID_XRAY_SHEET] = { x= 0.60, y= 0.60 }, │ + [core.ITEM_ID_XRAY_SOURCE] = { x= 0.50, y= 0.68 }, │ + --[core.ITEM_ID_OXYGEN_TANK] = { x= 0.45, y= 0.65 }, │ + --[core.ITEM_ID_FLOOR_TILE] = { x= 0.50, y= 0.00 }, │ + --[core.ITEM_ID_FLOOR_HIGHLIGHT] = { x= 0.50, y= 0.00 }, │ + [core.ITEM_ID_DEFIB] = { x= 0.55, y= 0.50 }, │ + --[core.ITEM_ID_PATIENT_NEEDS_ICON] = { x= 0.0, y= 1.5 }, │ + --[core.ITEM_ID_TUT_NEED_ACTION] = { x= 0.5, y= 1.5 }, │ + --[core.ITEM_ID_FIXER_ICON] = { x= 0.5, y= 1.5 }, │ + --[core.ITEM_ID_PROGRESS_CIRCLE] = { x= 0.55, y= 2.20 }, │ + --[core.ITEM_ID_PATIENT_HEALTH_INDICATORS] = { x= 0.55, y= 2.20 }, │ + --[core.ITEM_ID_PATIENT_IND_ICON] = { x= 0.0*TILE_SIZE, y= 0.0*TILE_SIZE }, │ + } │ + local offset = offsets[item_id] │ + if offset == nil then │ + error(string.format("could not find offset for id %s", item_id)) │ + end │ + return offset │ +end │ + │ +local function draw_item(state, ui_state, item_info, pt) │ + local gfx_pt = game_pt_to_gfx_pt(point(pt.y, pt.x), ui_state) │ + local size = get_item_size(item_info.id) │ + local offset = get_item_offset(item_info.id) │ + gfx_pt.y = gfx_pt.y - size.y*offset.y │ + gfx_pt.x = gfx_pt.x - size.x*offset.x │ + draw_more.draw_graphic_ul(get_item_img_id(item_info.id), │ + math.floor(gfx_pt.y), math.floor(gfx_pt.x), │ + math.floor(size.x), math.floor(size.y)) │ +end │ + │ +local function draw_using_progress(state, ui_state, player_idx) │ + local player_state = state.players[player_idx] │ + local gfx_pt = game_pt_to_gfx_pt(point(player_state.y, player_state.x), ui_state) │ + local size = { x = 2.5*TILE_SIZE, y = 0.5*TILE_SIZE } │ + local offset = { x = 0.5, y = 4.00 } │ + local draw_pt = point(gfx_pt.y - offset.y*size.y, │ + gfx_pt.x - offset.x*size.x); │ + │ + │ + local progress = player_state.use_progress/100.0 │ + alexgames.draw_rect(PLAYER_HIGHLIGHT_COLOURS[player_idx].fill, │ + math.floor(draw_pt.y), math.floor(draw_pt.x), │ + math.floor(draw_pt.y + size.y), math.floor(draw_pt.x + size.x)) │ + │ + alexgames.draw_rect(PLAYER_HIGHLIGHT_COLOURS[player_idx].stroke, │ + math.floor(draw_pt.y), math.floor(draw_pt.x), │ + math.floor(draw_pt.y + size.y), math.floor(draw_pt.x + progress*size.x)) │ + │ +end │ + │ +local function draw_player(state, ui_state, item_info) │ + local player_state = state.players[item_info.player_idx] │ + local gfx_pt = game_pt_to_gfx_pt(point(player_state.y, player_state.x), ui_state) │ + local size = { x = 1.5*TILE_SIZE, y = 2*TILE_SIZE } │ + local offset = { x = 0.50, y = 0.80 } │ + │ + local draw_pt = point(gfx_pt.y - offset.y*size.y, │ + gfx_pt.x - offset.x*size.x); │ + │ + draw_more.draw_graphic_ul(get_doctor_img_id(item_info.player_idx), │ + math.floor(draw_pt.y), math.floor(draw_pt.x), │ + math.floor(size.x), math.floor(size.y)) │ + │ + if player_state.holding ~= nil then │ + draw_item(state, ui_state, player_state.holding, player_state) │ + end │ + │ + if player_state.is_using then │ + draw_using_progress(state, ui_state, item_info.player_idx) │ + end │ +end │ + │ +local function do_nothing(arg1, arg2, arg3) │ +end │ + │ +local draw_funcs = { │ + [core.ITEM_ID_BED_SEGMENT_2] = do_nothing, │ + [core.ITEM_ID_PLAYER] = draw_player, │ +} │ + │ +local function draw_items(state, ui_state, player) │ + for _, pt in ipairs(draw_pt_order) do │ + if state.cells[pt.y][pt.x] == nil then │ + goto next_pt │ + end │ + for _, item_info in ipairs(state.cells[pt.y][pt.x]) do │ + local draw_func = draw_funcs[item_info.id] │ + if draw_func ~= nil then │ + draw_func(state, ui_state, item_info) │ + else │ + draw_item(state, ui_state, item_info, pt) │ + end │ + end │ + ::next_pt:: │ + end │ +end │ + │ +local function patient_to_needs_img_id(patient_info) │ + local needs_to_img_id_map = { │ + [core.NEEDS_LOW_FLUIDS] = 'hospital_ui_patient_needs_low_fluids', │ + [core.NEEDS_LOW_OXYGEN] = 'hospital_ui_patient_needs_low_oxygen', │ + [core.NEEDS_NO_HEARTBEAT] = 'hospital_ui_patient_needs_no_heartbeat', │ + [core.NEEDS_BROKEN_BONE] = 'hospital_ui_patient_needs_broken_bone', │ + } │ + if not patient_info.needs_revealed then │ + return 'hospital_ui_patient_needs_attention' │ + else │ + return needs_to_img_id_map[patient_info.needs_type] │ + end │ + │ +end │ + │ +local function get_time_left_colour(portion) │ + if portion > 0.7 then │ + return TIME_LEFT_FG_GOOD_COLOUR │ + elseif portion > 0.4 then │ + return TIME_LEFT_FG_MED_COLOUR │ + else │ + -- blinking animation │ + local time_ms = alexgames.get_time_ms() │ + if math.floor(time_ms/200) % 2 == 1 then │ + return TIME_LEFT_FG_BAD_COLOUR │ + else │ + return TIME_LEFT_FG_BAD_COLOUR2 │ + end │ + end │ +end │ + │ +local function draw_ui_layer_patient(state, ui_state, player, patient) │ + if patient.requires_help then │ + local pos_pt = patient │ + if patient.held_by ~= nil then │ + pos_pt = patient.held_by │ + end │ + local gfx_pt = game_pt_to_gfx_pt(pos_pt, ui_state) │ + gfx_pt.y = math.floor(gfx_pt.y - 4.0*TILE_SIZE) │ + gfx_pt.x = math.floor(gfx_pt.x) │ + local size = { x = math.floor(TILE_SIZE*2.0), y = math.floor(TILE_SIZE*2.5) } │ + draw_more.draw_graphic_ul('hospital_ui_patient_needs_bg', │ + gfx_pt.y, gfx_pt.x, │ + size.x, size.y) │ + local needs_img_id = patient_to_needs_img_id(patient) │ + draw_more.draw_graphic_ul(needs_img_id, │ + gfx_pt.y, gfx_pt.x, │ + size.x, size.y) │ + if patient.needs_revealed then │ + local portion = patient.time_left / patient.orig_time_left │ + alexgames.draw_rect(TIME_LEFT_BG_COLOUR, │ + gfx_pt.y, │ + gfx_pt.x - TIME_LEFT_ICON_WIDTH - PADDING, │ + gfx_pt.y + size.y, │ + gfx_pt.x - PADDING) │ + │ + alexgames.draw_rect(get_time_left_colour(portion), │ + gfx_pt.y + math.floor((1-portion) * size.y), │ + gfx_pt.x - TIME_LEFT_ICON_WIDTH - PADDING, │ + gfx_pt.y + size.y, │ + gfx_pt.x - PADDING) │ + end │ + │ + if patient.fix_time ~= nil then │ + -- TODO draw a little green cross icon │ + local cross_size = { │ + y = 10, │ + x = 10, │ + } │ + │ + local fix_bar_pos = { │ + y = gfx_pt.y, │ + x = gfx_pt.x - 2*TIME_LEFT_ICON_WIDTH - 2*PADDING, │ + } │ + local fix_bar_size = { │ + y = size.y, │ + x = TIME_LEFT_ICON_WIDTH, │ + } │ + draw_more.draw_graphic_ul('hospital_ui_green_cross', │ + math.floor(fix_bar_pos.y - cross_size.y - PADDING), │ + math.floor(fix_bar_pos.x), │ + math.floor(cross_size.y), │ + math.floor(cross_size.x)) │ + local portion = patient.fix_time / patient.orig_fix_time │ + alexgames.draw_rect(FIX_TIME_PROGRSS_BAR_BG_COLOUR, │ + fix_bar_pos.y, │ + fix_bar_pos.x, │ + fix_bar_pos.y + fix_bar_size.y, │ + fix_bar_pos.x + fix_bar_size.x) │ + alexgames.draw_rect(FIX_TIME_PROGRSS_BAR_FG_COLOUR, │ + fix_bar_pos.y + math.floor(portion*size.y), │ + fix_bar_pos.x, │ + fix_bar_pos.y + fix_bar_size.y, │ + fix_bar_pos.x + fix_bar_size.x) │ + end │ + end │ +end │ + │ +local function draw_ui_layer(state, ui_state, player) │ + local highlight_needs_types = {} │ + for _, patient in ipairs(state.patients) do │ + if patient.requires_help and patient.needs_revealed then │ + highlight_needs_types[patient.needs_type] = true │ + end │ + end │ + │ + for y=0, state.y_size-1 do │ + for x=0, state.x_size-1 do │ + for _, item in ipairs(state.cells[y][x]) do │ + local items_needs_type = core.get_item_needs_type(item.id) │ + if highlight_needs_types[item_needs_type] then │ + -- TODO draw fixer icon │ + end │ + end │ + end │ + end │ + │ + for _, patient in ipairs(state.patients) do │ + draw_ui_layer_patient(state, ui_state, player, patient) │ + end │ + │ +end │ + │ +local function draw_highlight_floor_cell(ui_state, colour, y, x) │ + local padding = 0.1 │ + local ia = game_pt_to_gfx_pt(point(y - padding,x - padding), ui_state) │ + local ib = game_pt_to_gfx_pt(point(y+1+padding,x+0-padding), ui_state) │ + local ic = game_pt_to_gfx_pt(point(y+1+padding,x+1+padding), ui_state) │ + local id = game_pt_to_gfx_pt(point(y+0-padding,x+1+padding), ui_state) │ + alexgames.draw_line(colour, highlight_line_size, │ + math.floor(ia.y), math.floor(ia.x), │ + math.floor(ib.y), math.floor(ib.x)) │ + alexgames.draw_line(colour, highlight_line_size, │ + math.floor(ib.y), math.floor(ib.x), │ + math.floor(ic.y), math.floor(ic.x)) │ + alexgames.draw_line(colour, highlight_line_size, │ + math.floor(ic.y), math.floor(ic.x), │ + math.floor(id.y), math.floor(id.x)) │ + alexgames.draw_line(colour, highlight_line_size, │ + math.floor(id.y), math.floor(id.x), │ + math.floor(ia.y), math.floor(ia.x)) │ +end │ + │ +local function draw_touch_input() │ + draw_more.draw_graphic_ul('hospital_ui_dirpad', │ + dirpad_pos_y, dirpad_pos_x, │ + DIRPAD_SIZE_Y, DIRPAD_SIZE_X) │ + │ + draw_more.draw_graphic_ul('hospital_ui_thumb_buttons', │ + thumb_buttons_pos_y, thumb_buttons_pos_x, │ + THUMB_BUTTONS_SIZE_Y, THUMB_BUTTONS_SIZE_X) │ +end │ + │ +local function draw_keyboard_input() │ + alexgames.draw_text('[Z]: Pick up / use', CONTROLS_TEXT_COLOUR, │ + screen_height - 50, 10, CONTROLS_TEXT_SIZE, 1) │ + alexgames.draw_text('[X]: Drop', CONTROLS_TEXT_COLOUR, │ + screen_height - 20, 10, CONTROLS_TEXT_SIZE, 1) │ + alexgames.draw_text('[Arrows]: Move', CONTROLS_TEXT_COLOUR, │ + screen_height - 20, screen_width - 10, CONTROLS_TEXT_SIZE, -1) │ +end │ + │ +local function draw_unknown_input() │ + alexgames.draw_text('Touch screen or use keyboard to select input', CONTROLS_TEXT_COLOUR, │ + screen_height - 20, math.floor(screen_width/2), CONTROLS_TEXT_SIZE, 0) │ +end │ + │ +local function draw_animations(animations) │ + for _, anim in ipairs(animations) do │ + if anim.anim_type == ANIM_TYPE_FLOAT_TEXT then │ + alexgames.draw_text(anim.text, anim.text_colour, │ + math.floor(anim.y), math.floor(anim.x), │ + anim.font_size, 0) │ + else │ + error("unhandled anim type", anim.anim_type) │ + end │ + end │ +end │ + │ +function draw.draw_state(state, ui_state, player) │ + alexgames.draw_clear() │ + │ + if state == nil then │ + return │ + end │ + │ + local player_state = state.players[player] │ + │ + ui_state.offset_y = -player_state.y │ + ui_state.offset_x = -player_state.x │ + │ + for y, row in pairs(state.cells) do │ + for x, cell in pairs(row) do │ + │ + local ia = game_pt_to_gfx_pt(point(y,x), ui_state) │ + draw_more.draw_graphic_ul('hospital_floor_tile', │ + math.floor(ia.y), math.floor(ia.x - TILE_SIZE), │ + 2*TILE_SIZE, TILE_SIZE); │ + end │ + end │ + │ + for _, cell in ipairs(core.get_cells_to_highlight(state, player)) do │ + if cell.y == nil or cell.x == nil then │ + error("cell has nil coords") │ + end │ + draw_highlight_floor_cell(ui_state, HIGHLIGHT_COLOUR, │ + cell.y, cell.x) │ + end │ + │ + for player_idx, _ in ipairs(state.players) do │ + local highlight_cell = core.get_closest_item_cell(state, player_idx) │ + if highlight_cell ~= nil then │ + draw_highlight_floor_cell(ui_state, PLAYER_HIGHLIGHT_COLOURS[player_idx].stroke, │ + highlight_cell.y, highlight_cell.x) │ + end │ + end │ + │ + draw_items(state, ui_state, player) │ + draw_ui_layer(state, ui_state, player) │ + draw_animations(animations) │ + │ + if ui_state.input_type == draw.INPUT_TYPE_TOUCH then │ + draw_touch_input() │ + elseif ui_state.input_type == draw.INPUT_TYPE_KEYBOARD then │ + draw_keyboard_input() │ + else │ + draw_unknown_input() │ + end │ + │ + alexgames.draw_refresh() │ +end │ + │ +local function sign(x) │ + if x >= 0 then return 1 │ + else return -1 end │ +end │ + │ +local function get_dirpad_vec(touch) │ + local centre_y = math.floor(dirpad_pos_y + DIRPAD_SIZE_Y/2) │ + local centre_x = math.floor(dirpad_pos_x + DIRPAD_SIZE_X/2) │ + │ + local vec_y = ((touch.y - centre_y)*1.0/(DIRPAD_SIZE/2)) │ + local vec_x = ((touch.x - centre_x)*1.0/(DIRPAD_SIZE/2)) │ + │ + local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ + │ + if mag > 1.0 then │ + vec_y = vec_y / mag │ + vec_x = vec_x / mag │ + end │ + │ + local mag = math.sqrt(vec_y*vec_y + vec_x*vec_x) │ + │ + return { y = vec_y, x = vec_x} │ +end │ + │ +local function touch_in_dirpad(pos) │ + local centre_y = math.floor(dirpad_pos_y + DIRPAD_SIZE_Y/2) │ + local centre_x = math.floor(dirpad_pos_x + DIRPAD_SIZE_X/2) │ + │ + local dy = (pos.y - centre_y) │ + local dx = (pos.x - centre_x) │ + │ + return (math.abs(dy) <= DIRPAD_SIZE_Y/2 and │ + math.abs(dx) <= DIRPAD_SIZE_X/2) │ +end │ + │ +local function touch_in_use_btn(pos) │ + local top = thumb_buttons_pos_y │ + local bottom = thumb_buttons_pos_y + THUMB_BUTTONS_SIZE_Y │ + local left = thumb_buttons_pos_x │ + local right = thumb_buttons_pos_x + THUMB_BUTTONS_SIZE_X │ + │ + return top <= pos.y and pos.y <= bottom and │ + left <= pos.x and pos.x <= right and │ + (pos.y - top) >= (pos.x - left) │ +end │ + │ +local function touch_in_drop_btn(pos) │ + local top = thumb_buttons_pos_y │ + local bottom = thumb_buttons_pos_y + THUMB_BUTTONS_SIZE_Y │ + local left = thumb_buttons_pos_x │ + local right = thumb_buttons_pos_x + THUMB_BUTTONS_SIZE_X │ + │ + return top <= pos.y and pos.y <= bottom and │ + left <= pos.x and pos.x <= right and │ + (pos.y - top) < (pos.x - left) │ +end │ + │ +function draw.touches_to_actions(state, ui_state, evt_id, touches) │ + local actions = {} │ + for _, touch in ipairs(touches) do │ + if evt_id == 'touchstart' and ui_state.dirpad_touch_id == nil and touch_in_dirpad(touch) then │ + ui_state.dirpad_touch_id = touch.id │ + elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.dirpad_touch_id == touch.id then │ + ui_state.dirpad_touch_id = nil │ + local action = { │ + action = core.ACTION_DIR_PAD_POS_CHANGE, │ + vec_y = 0, │ + vec_x = 0, │ + } │ + table.insert(actions, action) │ + end │ + if ui_state.dirpad_touch_id == touch.id then │ + local vec = get_dirpad_vec(touch) │ + local action = { │ + action = core.ACTION_DIR_PAD_POS_CHANGE, │ + vec_y = vec.y, │ + vec_x = vec.x │ + } │ + table.insert(actions, action) │ + end │ + │ + if evt_id == 'touchstart' and ui_state.use_btn_touch_id == nil and touch_in_use_btn(touch) then │ + ui_state.use_btn_touch_id = touch.id │ + table.insert(actions, { action = core.ACTION_USE_BTN_DOWN }) │ + elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.use_btn_touch_id == touch.id then │ + ui_state.use_btn_touch_id = nil │ + table.insert(actions, { action = core.ACTION_USE_BTN_RELEASE }) │ + end │ + │ + if evt_id == 'touchstart' and ui_state.drop_btn_touch_id == nil and touch_in_drop_btn(touch) then │ + ui_state.drop_btn_touch_id = touch.id │ + table.insert(actions, { action = core.ACTION_DROP_BTN_DOWN }) │ + elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and ui_state.drop_btn_touch_id == touch.id then │ + ui_state.drop_btn_touch_id = nil │ + table.insert(actions, { action = core.ACTION_DROP_BTN_RELEASE }) │ + end │ + end │ + return actions │ +end │ + │ +function draw.add_animations_for_events(state, ui_state, events) │ + for _, event in ipairs(events) do │ + if event.event == core.EVT_PATIENT_NEED_EXPIRED then │ + local pt = event.patient │ + local gfx_pt = game_pt_to_gfx_pt(event.patient, ui_state) │ + table.insert(animations, { │ + anim_type = ANIM_TYPE_FLOAT_TEXT, │ + text = '-100', │ + text_colour = '#ff0000ff', │ + font_size = 16, │ + orig_y = gfx_pt.y, │ + orig_x = gfx_pt.x, │ + │ + y = gfx_pt.y, │ + x = gfx_pt.x, │ + │ + dst_y = gfx_pt.y - 70, │ + dst_x = gfx_pt.x, │ + │ + orig_time_left = 3000, │ + time_left = 3000, │ + }) │ + elseif event.event == core.EVT_PATIENT_CURED then │ + local pt = event.patient │ + local gfx_pt = game_pt_to_gfx_pt(event.patient, ui_state) │ + table.insert(animations, { │ + anim_type = ANIM_TYPE_FLOAT_TEXT, │ + text = '+10', │ + text_colour = '#008800cc', │ + font_size = 16, │ + │ + orig_y = gfx_pt.y, │ + orig_x = gfx_pt.x, │ + │ + y = gfx_pt.y, │ + x = gfx_pt.x, │ + │ + dst_y = gfx_pt.y - 70, │ + dst_x = gfx_pt.x, │ + │ + orig_time_left = 3000, │ + time_left = 3000, │ + }) │ + else │ + error("unhandled event", event.event) │ + end │ + end │ +end │ + │ +function draw.update_animations(state, dt) │ + for _, anim in ipairs(animations) do │ + local dy = (anim.dst_y - anim.orig_y)*1.0/anim.orig_time_left │ + local dx = (anim.dst_x - anim.orig_x)*1.0/anim.orig_time_left │ + │ + anim.y = anim.y + dy * dt │ + anim.x = anim.x + dx * dt │ + anim.time_left = anim.time_left - dt │ + end │ + │ + local i=1 │ + while i <= #animations do │ + if animations[i].time_left <= 0 then │ + table.remove(animations, i) │ + else │ + i = i + 1 │ + end │ + end │ +end │ + │ + │ +return draw │ │ local core = require("games/hospital/hospital_core") │ local draw = require("games/hospital/hospital_draw") │ local serialize = require("games/hospital/hospital_serialize") │ │ local wait_for_players = require("libs/multiplayer/wait_for_players") │ │ @@ -16086,14 +18286,542 @@ │ function start_game() │ alexgames.enable_evt('touch') │ alexgames.enable_evt('key') │ alexgames.set_timer_update_ms(math.floor(dt)) │ │ wait_for_players.init(players, player, start_host_game, start_client_game) │ end │ + │ +local alexgames = require("alexgames") │ + │ +local touch_count = 0 │ +local touches = {} │ + │ +local colours = { │ + '#ff0000', │ + '#0000ff', │ + '#00ff00', │ + '#00ffff', │ + '#ffff00', │ + '#ff00ff', │ + '#000000', │ +} │ + │ +local board_height = 480 │ +local board_width = 480 │ + │ +local touch_line_width = 2 │ +local circle_radius = 20 │ + │ +local text_size = 12 │ +local padding = 5 │ + │ +local last_touch_str = nil │ + │ +function update() │ + alexgames.draw_clear() │ + │ + if touch_count == 0 then │ + local text_size = 18 │ + local line1 = 'Touch (and optionally drag) the screen' │ + local line2 = 'to see info about touches' │ + alexgames.draw_text(line1, │ + text_colour, │ + board_height/2 - text_size - padding/2, board_width/2, │ + text_size, 0) │ + alexgames.draw_text(line2, │ + text_colour, │ + board_height/2 + text_size + padding/2, board_width/2, │ + text_size, 0) │ + end │ + local touch_idx = 1 │ + for i, touch in pairs(touches) do │ + │ + local text = string.format('%2d: id=%d [%3d] ', touch_idx, i, #touch) │ + for _, pos in ipairs(touch) do │ + text = text .. string.format('{y=%d,x=%d}, ', pos.y, pos.x) │ + end │ + alexgames.draw_text(text, '#000000', touch_idx*(text_size+padding), padding, text_size, 1) │ + last_touch_str = text │ + │ + local colour = colours[ (i-1) % #colours + 1] │ + print('draw: ', touch[1].y, touch[1].x) │ + alexgames.draw_circle(colour, colour, touch[1].y, touch[1].x, circle_radius) │ + for i=2,#touch do │ + local pt1 = touch[i-1] │ + local pt2 = touch[i] │ + alexgames.draw_line(colour, touch_line_width, pt1.y, pt1.x, pt2.y, pt2.x) │ + end │ + touch_idx = touch_idx + 1 │ + end │ + │ + if last_touch_str ~= nil then │ + alexgames.draw_text('last: ' .. last_touch_str, '#000000', board_height - text_size - padding, padding, text_size, 1) │ + end │ +end │ + │ +function handle_touch_evt(evt_id, changed_touches) │ + for _, touch in ipairs(changed_touches) do │ + if evt_id == 'touchstart' then │ + touch_count = touch_count + 1 │ + touches[touch.id] = {} │ + end │ + if evt_id == 'touchstart' or │ + evt_id == 'touchmove' then │ + print(evt_id, touch.y, touch.x) │ + table.insert(touches[touch.id], { y = math.floor(touch.y), x = math.floor(touch.x) }) │ + end │ + │ + if evt_id == 'touchend' or │ + evt_id == 'touchcancel' then │ + touch_count = touch_count - 1 │ + touches[touch.id] = nil │ + end │ + end │ + update() │ +end │ + │ +alexgames.enable_evt('touch') │ +local two_player = require("libs/multiplayer/two_player") │ +local utils = require("libs/utils") │ +local show_buttons_popup = require("libs/ui/show_buttons_popup") │ + │ +local go = require("games/go/go_core") │ +local go_ui = require("games/go/go_ui") │ +local go_ctrl = require("games/go/go_ctrl") │ + │ +local alexgames = require("alexgames"); │ + │ +-- e.g. either 9x9, 13x13, or 19x19 │ +local go_game_size = 19 │ +local local_multiplayer = nil │ +local session_id = alexgames.get_new_session_id() │ +local state = go.new_game(go_game_size) │ + │ +-- state was received either from another player or │ +-- explicitly loaded │ +local state_init = false │ + │ +-- if this is true, then the user explicitly loaded saved state from │ +-- URL or history browser, don't prompt them to start a new game │ +local state_loaded = false │ + │ +local ctrl_state = go_ctrl.new_state() │ +-- TODO have a C API to get height/width of canvas, or maybe │ +-- set it? │ +local height = 480 │ +local width = 480 │ +go_ui.init_ui(session_id, go_game_size, width, height) │ +alexgames.send_message("all", "get_state:") │ +alexgames.set_status_msg("Choose piece colour") │ + │ +local PLAYER_CHOICE_POPUP_ID = "choose_player_colour" │ +local PLAYER_CHOICE_BTNS = { │ + "Black", │ + "White", │ +} │ +local PLAYER_CHOICE_BTNS_MAP = { │ + [0] = go.PLAYER1, │ + [1] = go.PLAYER2, │ +} │ + │ +local POPUP_ID_GAME_SIZE_SELECTION = "game_size_sel" │ +local POPUP_GAME_SIZE_SEL_BTNS = { │ + "9x9", │ + "13x13", │ + "19x19", │ +} │ +local POPUP_GAME_SIZE_SEL_BTNS_TO_SIZE = { │ + 9, 13, 19 │ +} │ + │ + │ +local POPUP_ID_START_NEW_GAME_PROMPT = "new_game_prompt" │ +local POPUP_GAME_SIZE_NEW_GAME_PROMPT = { │ + "Start new game", │ + "Continue saved game", │ +} │ + │ +local function get_player() │ + if local_multiplayer then │ + return state.player_turn │ + else │ + return go_ctrl.get_player(ctrl_state) │ + end │ +end │ + │ +local PLAYER_IDX_TO_BTN_IDX_MAP = utils.reverse_map(PLAYER_CHOICE_BTNS_MAP) │ + │ +local OPTION_ID_NEW_GAME = "opt_new_game" │ + │ +-- maps player IP/name to player ID │ +local player_name_to_id = { │ +} │ + │ +-- adding test for ko │ +--[[ │ +state.board = { │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ + { 0, 0, 0, 0, 1, 2, 0, 0, 0}, │ + { 0, 0, 0, 1, 0, 1, 2, 0, 0}, │ + { 0, 0, 0, 0, 1, 2, 0, 0, 0}, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ + { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ +} │ +--]] │ + │ +function handle_user_string_input(row_col) │ + local m = row_col:gmatch"(%a+)%s*(%d+)" │ + -- todo raise error if inputs like "aaa5" are given (currently this is interpreted as "a5") │ + local row │ + local col │ + row, col = m() │ + if row == nil or col == nil then │ + return nil │ + end │ + col = tonumber(col) │ + row = string.byte(row:upper()) - string.byte('A') + 1 │ + local rc = go.player_move(state, get_player(), row, col) │ + return rc │ +end │ + │ +function update() │ + if state ~= nil then │ + go_ui.update(session_id, state.board, state.last_move_y, state.last_move_x) │ + end │ +end │ + │ +function get_user_input() │ + io.write(string.format("Move player %d (%s), enter row letter and column number (e.g. \"E5\")>> ", │ + state.player_turn, go.player_num_to_char(state.player_turn))) │ + local s = io.read("*l") │ + return s │ +end │ + │ +local function save_state() │ + alexgames.save_state(session_id, go.serialize_state(state)) │ +end │ + │ +function get_state() │ + return go.serialize_state(state) │ +end │ + │ +function handle_user_clicked(pos_y, pos_x) │ + local pos = go_ui.user_pos_to_piece_idx(pos_y, pos_x) │ + local player = get_player() │ + local rc = go.player_move(state, player, pos.y, pos.x) │ + if rc == go.SUCCESS then │ + if not local_multiplayer then │ + alexgames.send_message("all", string.format("move:%d,%d,%d", player, pos.y, pos.x)); │ + alexgames.set_status_err("") │ + end │ + save_state() │ + else │ + alexgames.set_status_err(go.err_code_to_str(rc)) │ + end │ + update() │ + update_status_msg_turn(state, ctrl_state) │ +end │ + │ +local function broadcast_state() │ + alexgames.send_message("all", "state:"..go.serialize_state(state)) │ +end │ + │ +local function set_state(state_arg) │ + print("set_state called") │ + state_init = true │ + state = state_arg │ +end │ + │ +function handle_msg_received(src, msg) │ + print("handle_msg_received (from src:" .. src .. "): " .. msg); │ + │ + if local_multiplayer then │ + return │ + end │ + │ + if two_player.handle_msg_received(src, msg) then │ + return │ + end │ + │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ + │ + if header == "move" then │ + local m = payload:gmatch"(%d+),(%d+),(%d+)" │ + local player, row, col │ + player, row, col = m() │ + player = tonumber(player) │ + row = tonumber(row) │ + col = tonumber(col) │ + print(string.format("Received player=%s, row=%s, col=%d", player, row, col)) │ + │ + if player == go_ctrl.get_player(ctrl_state) then │ + -- TODO make UI visible message for this case? │ + print(string.format("Received message for move from wrong player")) │ + return │ + end │ + go.player_move(state, player, row, col) │ + alexgames.set_status_err("") │ + update() │ + update_status_msg_turn(state, ctrl_state) │ + save_state() │ + elseif header == "get_state" then │ + broadcast_state() │ + elseif header == "state" then │ + local new_state = go.deserialize_state(payload) │ + -- TODO check with user if they want to overwrite their state with │ + -- this (possibly unsolicited!!) state from the other player │ + set_state(new_state) │ + if go_ui.get_board_piece_size() ~= #new_state.board then │ + go_ui.set_board_piece_size(#new_state.board) │ + end │ + update() │ + alexgames.set_status_err("") │ + update_status_msg_turn(state, ctrl_state) │ + elseif header == "player_left" and src == "ctrl" then │ + -- do nothing │ + else │ + print("Unexpected message header: \""..header.."\"") │ + end │ +end │ + │ +local function load_saved_state_offset(move_id_offset) │ + local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ + if serialized_state == nil then │ + error(string.format("adjust_saved_state_offset(offset=%d) returned nil", move_id_offset)) │ + end │ + internal_load_state(session_id, serialized_state) │ + update() │ +end │ + │ +local function handle_pass(player) │ + local rc = go.player_pass(state, player) │ + if rc ~= go.SUCCESS then │ + alexgames.set_status_err(go.err_code_to_str(rc)) │ + else │ + update() │ + save_state() │ + update_status_msg_turn(state, ctrl_state) │ + │ + -- TODO This is lazy, I should implement a string to indicate this move │ + broadcast_state() │ + end │ +end │ + │ +function handle_btn_clicked(btn_id) │ + print("handle_btn_clicked: "..btn_id) │ + if btn_id == go_ui.BTN_ID_UNDO then │ + load_saved_state_offset(-1) │ + broadcast_state() │ + elseif btn_id == go_ui.BTN_ID_REDO then │ + load_saved_state_offset(1) │ + broadcast_state() │ + elseif btn_id == go_ui.BTN_ID_PASS then │ + local player = get_player() │ + handle_pass(player) │ + else │ + error(string.format("Unhandled button pressed \"%s\"", btn_id)) │ + end │ +end │ + │ +local function get_player_name(player_arg) │ + for name, player_idx in pairs(player_name_to_id) do │ + if player_arg == player_idx then return name end │ + end │ + return "nil" │ +end │ + │ +function update_status_msg_turn(state, ctrl_state) │ + if state == nil then return end │ + │ + local display_name = go.player_idx_to_colour_name(state.player_turn) │ + if not local_multiplayer then │ + display_name = string.format("%s (%s)", display_name, get_player_name(state.player_turn)) │ + end │ + alexgames.set_status_msg(string.format("Waiting for %s to move", display_name)) │ + print(string.format("State is now: %s", utils.binstr_to_hr_str(go.serialize_state(state)))) │ +end │ + │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ + -- handled, no action here │ + elseif popup_id == POPUP_ID_GAME_SIZE_SELECTION then │ + local desired_game_size = POPUP_GAME_SIZE_SEL_BTNS_TO_SIZE[btn_idx+1] │ + alexgames.hide_popup() │ + alexgames.set_status_msg(string.format("Setting board size to %s", desired_game_size)) │ + set_state(go.new_game(desired_game_size)) │ + go_ui.set_board_piece_size(desired_game_size) │ + print(string.format("state.board: %s", state.board)) │ + update() │ + broadcast_state() │ + elseif popup_id == POPUP_ID_START_NEW_GAME_PROMPT then │ + if btn_idx == 0 then │ + state_init = false │ + prompt_game_size() │ + elseif btn_idx == 1 then │ + alexgames.hide_popup() │ + else │ + error(string.format("popup btn_idx %s not handled for start new game prompt", btn_idx)) │ + end │ + else │ + print(string.format("Unexpected popup_id \"%s\"", popup_id)); │ + alexgames.hide_popup() │ + end │ +end │ + │ +-- "internal" means "not called by game engine", it should │ +-- only be called by other functions within this file. │ +-- Originally I had a "load_state" function as part of the API, │ +-- but I combined it with start_game. So I'm changing this name to │ +-- avoid confusing myself when grepping to see if I updated all the games. │ +function internal_load_state(session_id_arg, serialized_state) │ + session_id = session_id_arg │ + local loaded_state = go.deserialize_state(serialized_state) │ + go_ui.set_board_piece_size(#loaded_state.board) │ + state_loaded = true │ + set_state(loaded_state) │ +end │ + │ +local function prompt_new_game() │ + show_buttons_popup.show_popup(POPUP_ID_START_NEW_GAME_PROMPT, "Start new game", │ + "Start a new game, or load saved state?", │ + POPUP_GAME_SIZE_NEW_GAME_PROMPT) │ +end │ + │ +local function prompt_game_size() │ + -- if previous state was already loaded, then don't prompt game size and overwrite │ + -- the loaded game │ + if state_init and state_loaded then │ + return │ + end │ + │ + if not state_init then │ + show_buttons_popup.show_popup(POPUP_ID_GAME_SIZE_SELECTION, "Choose game size", │ + "Choose one of the below game sizes.", │ + POPUP_GAME_SIZE_SEL_BTNS) │ + end │ +end │ + │ +function two_player_init() │ + local args = { │ + title = "Choose piece colour", │ + supports_local_multiplayer = true, │ + player_choices = PLAYER_CHOICE_BTNS, │ + handle_multiplayer_type_choice = function (multiplayer_type) │ + if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ + local_multiplayer = true │ + prompt_game_size() │ + elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ + local_multiplayer = false │ + end │ + end, │ + choice_id_to_player_id = function (btn_id) │ + return PLAYER_CHOICE_BTNS_MAP[btn_id] │ + end, │ + player_name_to_id = player_name_to_id, │ + player_id_to_nice_name = function (player_id) │ + local player_colour = go.player_idx_to_colour_name(player_id) │ + return utils.make_first_char_uppercase(player_colour) │ + end, │ + get_msg = function () │ + local msg = "Black moves first." │ + --local other_player = go_ctrl.get_other_player(ctrl_state) │ + if utils.table_len(player_name_to_id) == 0 then │ + msg = msg .. "\nThe other player has not yet chosen." │ + else │ + --msg = msg .. string.format("The other player has chosen %s", │ + -- go.player_idx_to_colour_name(other_player)) │ + for player_name, player_id in pairs(player_name_to_id) do │ + local player_colour = go.player_idx_to_colour_name(player_id) │ + msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ + end │ + end │ + return msg │ + end, │ + handle_player_choice = function (player_name, player_id) │ + local choice_str = go.player_idx_to_colour_name(player_id) │ + print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ + if player_name == two_player.LOCAL_PLAYER then │ + go_ctrl.player_chosen(ctrl_state, player_id) │ + update_status_msg_turn(state, ctrl_state) │ + else │ + go_ctrl.other_player_chosen(ctrl_state, player_id) │ + │ + end │ + │ + if player_name == two_player.LOCAL_PLAYER and go_ctrl.get_other_player(ctrl_state) == nil then │ + prompt_game_size() │ + end │ + print(string.format("we are %q, other player is %q", │ + go_ctrl.get_player(ctrl_state), go_ctrl.get_other_player(ctrl_state))) │ + end, │ + │ + need_reselect = function () │ + local this_player = go_ctrl.get_player(ctrl_state) │ + local other_player = go_ctrl.get_other_player(ctrl_state) │ + │ + -- print(string.format("needs_reselect { this_player = %q, other_player = %q }", this_player, this_player == other_player)) │ + return this_player == nil or this_player == other_player │ + end, │ + │ + get_local_player_choice = function () │ + return go_ctrl.get_player(ctrl_state) │ + end │ + } │ + │ + two_player.init(args) │ +end │ + │ +function handle_game_option_evt(option_id) │ + if option_id == OPTION_ID_NEW_GAME then │ + -- TODO remove these bools, this is ugly. At least do the check outside of │ + -- where the function is called │ + state_init = false │ + state_loaded = false │ + prompt_game_size() │ + else │ + error(string.format("Unhandled option_id %s", option_id)) │ + end │ +end │ + │ +function start_game(session_id, state_serialized) │ + if state_serialized ~= nil then │ + internal_load_state(session_id, state_serialized) │ + else │ + local session_id = alexgames.get_last_session_id() │ + if session_id ~= nil then │ + state_serialized = alexgames.adjust_saved_state_offset(session_id, 0) │ + internal_load_state(session_id, state_serialized) │ + end │ + end │ + │ + -- Note that this sets who the player on this device is, │ + -- and without it, the player arg is nil and the game can't progress │ + two_player_init() │ + │ + alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ +end │ + │ +function lua_main() │ + while true do │ + print_board() │ + ::read_input:: │ + local user_input = get_user_input() │ + local rc = handle_user_string_input(user_input) │ + if rc ~= go.SUCCESS then │ + print('Error: '.. go.err_code_to_str(rc)) │ + goto read_input │ + end │ + end │ +end │ local go = {} │ │ -- todo rename to go.EMPTY? │ local EMPTY = 0 │ -- Player1 is black (since black goes first) │ go.PLAYER1 = 1 │ -- Player2 is white (since white goes second) │ @@ -16103,1932 +18831,4969 @@ │ local map = { │ [go.PLAYER1] = "black", │ [go.PLAYER2] = "white", │ } │ return map[idx] │ end │ │ -local Point = {x = 0, y = 0} │ +local Point = {x = 0, y = 0} │ + │ + │ +function Point:str(self) │ + return string.format("(%d,%d)",self.y, self.x) │ +end │ + │ +function Point:create (o) │ + o.parent = self │ + return o │ +end │ + │ +function Point:add(arg1, arg2) │ + return Point:create{ y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ +end │ + │ +local function in_range(game_state, y, x) │ + return (1 <= x and x <= game_state.x_max and │ + 1 <= y and y <= game_state.y_max) │ +end │ + │ + │ +local dirs = { │ + Point:create{y = 0, x = 1}, │ + Point:create{y = 0, x =-1}, │ + Point:create{y = 1, x = 0}, │ + Point:create{y =-1, x = 0}, │ +} │ + │ +local function make_2d_array(y_len,x_len, val) │ + local visited = {} │ + for y=1,y_len do │ + table.insert(visited, {}) │ + for x=1,x_len do │ + table.insert(visited[y], val) │ + end │ + end │ + return visited │ +end │ + │ +local function copy_2d_array(ary) │ + local to_return = {} │ + for y=1, #ary do │ + table.insert(to_return, {}) │ + for x=1, #ary[y] do │ + table.insert(to_return[y], ary[y][x]) │ + end │ + end │ + return to_return │ +end │ + │ +local function has_liberties(game_state, y, x) │ + if game_state.board[y][x] == EMPTY then │ + error(string.format("has_liberties called on empty point y=%d, x=%d", y, x)) │ + end │ + │ + local this_player = game_state.board[y][x] │ + local visited = make_2d_array(game_state.y_max, game_state.x_max, false) │ + local to_visit = { Point:create{y=y, x=x}} │ + while #to_visit > 0 do │ + local pt = table.remove(to_visit) │ + if not in_range(game_state, pt.y, pt.x) then │ + --continue │ + goto next_iter │ + elseif game_state.board[pt.y][pt.x] == EMPTY then │ + return true │ + elseif visited[pt.y][pt.x] then │ + -- continue │ + goto next_iter │ + elseif game_state.board[pt.y][pt.x] ~= this_player then │ + --continue │ + goto next_iter │ + elseif game_state.board[pt.y][pt.x] == this_player then │ + visited[pt.y][pt.x] = true │ + for _, dir in ipairs(dirs) do │ + local pt2 = Point:add(pt, dir) │ + if in_range(game_state, pt2.y, pt2.x) then │ + table.insert(to_visit, Point:add(pt, dir)) │ + end │ + end │ + end │ + ::next_iter:: │ + end │ + return false │ +end │ + │ +local function clear_piece_group(board, y, x) │ + local this_player = board[y][x] │ + local visited = make_2d_array(#board, #board[1], false) │ + local to_visit = { Point:create{y=y, x=x}} │ + while #to_visit > 0 do │ + local pt = table.remove(to_visit) │ + if not in_range(game_state, pt.y, pt.x) then │ + --continue │ + elseif board[pt.y][pt.x] == EMPTY then │ + -- continue │ + elseif visited[pt.y][pt.x] then │ + -- continue │ + elseif board[pt.y][pt.x] ~= this_player then │ + --continue │ + elseif board[pt.y][pt.x] == this_player then │ + board[pt.y][pt.x] = EMPTY │ + visited[pt.y][pt.x] = true │ + for _, dir in ipairs(dirs) do │ + local pt2 = Point:add(pt, dir) │ + if in_range(game_state, pt2.y, pt2.x) then │ + table.insert(to_visit, pt2) │ + end │ + end │ + end │ + end │ +end │ + │ +local val_to_char = { │ + [0] = ' ', │ + --[1] = 'x', │ + --[2] = 'o', │ + [1] = '\x1b[32mx\x1b[0m', │ + [2] = '\x1b[33mo\x1b[0m', │ +} │ + │ +function go.print_board(board) │ + if #board[1] > 9 then │ + io.write(' ') │ + for x =1, #board[1] do │ + local c = ' ' │ + if x >= 10 then c = string.format('%d', math.floor(x/10)) end │ + io.write(string.format('%s ', c)) │ + end │ + io.write('\n') │ + end │ + io.write(' ') │ + for x =1, #board[1] do │ + io.write(string.format('%d ', x%10)) │ + end │ + io.write('\n +') │ + for x =1, #board[1] do │ + io.write('-+') │ + end │ + io.write('\n') │ + for y = 1, #board do │ + io.write(string.format('%s|', string.char(string.byte('A')+(y-1)))) │ + for x = 1, #board[y] do │ + local c = board[y][x] │ + io.write( val_to_char[c] ) │ + io.write('|') │ + end │ + io.write('\n +') │ + for x =1, #board[y] do │ + io.write('-+') │ + end │ + io.write('\n') │ + end │ +end │ + │ +function go.player_num_to_char(num) │ + return val_to_char[num] │ +end │ + │ +function go.new_game(size) │ + game_state = { │ + player_turn = 1, │ + y_max = size, │ + x_max = size, │ + board = make_2d_array(size, size, EMPTY), │ + prev_board = nil, │ + last_move_y = nil, │ + last_move_x = nil, │ + } │ + return game_state │ +end │ + │ +function if_nil_rt_zero(val) │ + if val == nil then │ + return 0 │ + else │ + return val │ + end │ +end │ + │ +function go.serialize_state(state) │ + if state == nil then return nil end │ + local bytes = { } │ + bytes[#bytes+1] = string.char(state.player_turn) │ + bytes[#bytes+1] = string.char(state.y_max) │ + bytes[#bytes+1] = string.char(state.x_max) │ + bytes[#bytes+1] = string.char(if_nil_rt_zero(state.last_move_y)) │ + bytes[#bytes+1] = string.char(if_nil_rt_zero(state.last_move_x)) │ + for y=1,state.y_max do │ + for x=1,state.x_max do │ + bytes[#bytes+1] = string.char(state.board[y][x]) │ + end │ + end │ + │ + if state.prev_board == nil then │ + bytes[#bytes+1] = "x" │ + else │ + for y=1,state.y_max do │ + for x=1,state.x_max do │ + if state.prev_board ~= nil then │ + bytes[#bytes+1] = string.char(state.prev_board[y][x]) │ + end │ + end │ + end │ + end │ + --print(string.format("Serialized state into %d bytes", #bytes)) │ + return table.concat(bytes, "") │ +end │ + │ +function go.deserialize_state(data) │ + local state = {} │ + if #data < 3 then │ + print(string.format("Bad serialized state received, less than 3 bytes: %d", #data)) │ + return nil │ + end │ + print(string.format("len data = %d, data[1] = %q, data[2] = %q, data[3] = %q", #data, data:sub(1,1), data:sub(2,2), data:sub(3,3))) │ + state.player_turn = string.byte(data:sub(1,1)) │ + state.y_max = string.byte(data:sub(2,2)) │ + state.x_max = string.byte(data:sub(3,3)) │ + state.last_move_y = string.byte(data:sub(4,4)) │ + state.last_move_x = string.byte(data:sub(5,5)) │ + local prev_bytes = 5 │ + if #data ~= prev_bytes + state.y_max * state.x_max + 1 and │ + #data ~= prev_bytes + state.y_max * state.x_max * 2 then │ + print(string.format("Bad serialized state, recvd %d bytes, y_max = %d, x_max = %d", │ + #data, state.y_max, state.x_max)) │ + return nil │ + end │ + state.board = make_2d_array(state.y_max, state.x_max, EMPTY) │ + local idx = prev_bytes + 1 │ + for y=1,state.y_max do │ + for x=1,state.x_max do │ + state.board[y][x] = string.byte(data:sub(idx,idx)) │ + idx = idx + 1 │ + end │ + end │ + │ + if #data < prev_bytes + state.y_max * state.x_max * 2 then │ + state.prev_board = nil │ + else │ + print(string.format("first byte is %q", data:sub(idx,idx))) │ + state.prev_board = make_2d_array(state.y_max, state.x_max, EMPTY) │ + for y=1,state.y_max do │ + for x=1,state.x_max do │ + state.prev_board[y][x] = string.byte(data:sub(idx,idx)) │ + idx = idx + 1 │ + end │ + end │ + end │ + return state │ +end │ + │ +go.SUCCESS = 0 │ +go.NOT_YOUR_TURN = -1 │ +go.OUT_OF_RANGE = -2 │ +go.OCCUPIED = -3 │ +go.SUICIDE = -4 │ +go.NOT_ALLOWED_KO = -5 │ + │ +local code_to_str = { │ + [go.SUCCESS] = "Success", │ + [go.NOT_YOUR_TURN] = "Not your turn", │ + [go.OUT_OF_RANGE] = "Position out of range", │ + [go.OCCUPIED] = "Position occupied", │ + [go.SUICIDE] = "Position would be suicidal", │ + [go.NOT_ALLOWED_KO] = "Ko rule forbids game returning to this state after two turns", │ +} │ + │ +function go.err_code_to_str(code) │ + return code_to_str[code] │ +end │ + │ + │ +local function boards_eq(board1, board2) │ + if board2 == nil and board1 ~= nil then │ + return false │ + end │ + for y=1,#board1 do │ + for x=1, #board1[1] do │ + if board1[y][x] ~= board2[y][x] then │ + return false │ + end │ + end │ + end │ + return true │ +end │ + │ +local function next_turn(game_state) │ + if game_state.player_turn == 1 then │ + game_state.player_turn = 2 │ + elseif game_state.player_turn == 2 then │ + game_state.player_turn = 1 │ + else │ + error("invalid player turn") │ + end │ +end │ + │ +function go.player_move(game_state, player, y, x) │ + if game_state == nil or player == nil or y == nil or x == nil then │ + error(string.format("go.player_move called with nil args: %s %s %s %s", game_state, player, y, x)) │ + end │ + print(string.format("Attempting to move player %d to y=%d, x=%d", player, y, x)) │ + local old_board = copy_2d_array(game_state.board) │ + if player ~= game_state.player_turn then │ + return go.NOT_YOUR_TURN │ + end │ + │ + if not (1 <= x and x <= game_state.x_max) or │ + not (1 <= y and y <= game_state.y_max) then │ + return go.OUT_OF_RANGE │ + end │ + │ + if game_state.board[y][x] ~= EMPTY then │ + return go.OCCUPIED │ + end │ + │ + game_state.board[y][x] = player │ + │ + -- can't check for liberties here, because │ + -- it's okay to move to a position where you have no liberties │ + -- if you are taking a piece (which results in liberties) │ + --if not has_liberties(game_state, y, x) then │ + -- game_state.board[y][x] = EMPTY │ + -- return go.SUICIDE │ + --end │ + │ + pt = Point:create{y=y, x=x} │ + for _, dir in ipairs(dirs) do │ + local pt2 = Point:add(pt, dir) │ + if not in_range(game_state, pt2.y, pt2.x) then │ + goto next_dir │ + end │ + local dst = game_state.board[pt2.y][pt2.x] │ + if dst == EMPTY or dst == player then │ + goto next_dir │ + end │ + │ + if not has_liberties(game_state, pt2.y, pt2.x) then │ + clear_piece_group(game_state.board, pt2.y, pt2.x) │ + end │ + ::next_dir:: │ + end │ + │ + -- is it just the previous state? │ + if boards_eq(game_state.board, game_state.prev_board) then │ + game_state.board = old_board │ + return go.NOT_ALLOWED_KO │ + end │ + │ + if not has_liberties(game_state, y, x) then │ + game_state.board[y][x] = EMPTY │ + return go.SUICIDE │ + end │ + │ + next_turn(game_state) │ + │ + game_state.prev_board = old_board │ + game_state.last_move_y = pt.y │ + game_state.last_move_x = pt.x │ + return go.SUCCESS │ +end │ + │ +function go.player_pass(game_state, player) │ + if player ~= game_state.player_turn then │ + return go.NOT_YOUR_TURN │ + end │ + │ + next_turn(game_state) │ + return go.SUCCESS │ +end │ + │ +return go │ +local go_ui = {} │ +local go = require("games/go/go_core") │ +local draw_more = require("libs/draw/draw_more") │ +local alexgames = require("alexgames"); │ + │ +local board_line_size = 2 │ + │ +local board_size = nil │ +local height = nil │ +local width = nil │ +local piece_space_size = nil │ +local board_piece_size = nil │ + │ +go_ui.BTN_ID_UNDO = "undo" │ +go_ui.BTN_ID_REDO = "redo" │ +go_ui.BTN_ID_PASS = "pass" │ + │ +local function update_undo_redo_btns(session_id) │ + alexgames.set_btn_enabled(go_ui.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ + alexgames.set_btn_enabled(go_ui.BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ +end │ + │ +function go_ui.get_board_piece_size() │ + return board_piece_size │ +end │ + │ +function go_ui.set_board_piece_size(board_piece_size_arg) │ + board_piece_size = board_piece_size_arg │ + piece_space_size = board_size*1.0/(board_piece_size+1) │ +end │ + │ +function go_ui.init_ui(session_id, board_piece_size_arg, screen_width, screen_height) │ + board_size = math.min(screen_width, screen_height) │ + height = screen_height │ + width = screen_width │ + go_ui.set_board_piece_size(board_piece_size_arg) │ + │ + alexgames.create_btn(go_ui.BTN_ID_UNDO, "Undo", 1) │ + alexgames.create_btn(go_ui.BTN_ID_REDO, "Redo", 1) │ + alexgames.create_btn(go_ui.BTN_ID_PASS, "Pass", 2) │ + alexgames.set_btn_enabled(go_ui.BTN_ID_UNDO, false) │ + alexgames.set_btn_enabled(go_ui.BTN_ID_REDO, false) │ + │ + update_undo_redo_btns(session_id) │ +end │ + │ +function go_ui.update(session_id, board, last_y, last_x) │ + │ + alexgames.draw_clear() │ + │ + draw_more.draw_graphic_ul("board", 0, 0, board_size, board_size) │ + │ + local piece_size = piece_space_size*0.90 │ + piece_size = math.floor(piece_size) │ + │ + for i=0, board_piece_size-1 do │ + local y1 = piece_space_size │ + local y2 = board_size - piece_space_size │ + local x1 = piece_space_size*(i+1) │ + local x2 = x1 │ + alexgames.draw_line("#000000", board_line_size, y1, x1, y2, x2) │ + end │ + │ + for i=0, board_piece_size-1 do │ + local x1 = piece_space_size │ + local x2 = board_size - piece_space_size │ + local y1 = piece_space_size*(i+1) │ + local y2 = y1 │ + alexgames.draw_line("#000000", board_line_size, y1, x1, y2, x2) │ + end │ + │ + for y_idx=0, board_piece_size-1 do │ + for x_idx=0, board_piece_size-1 do │ + local y_pos = piece_space_size/2 + y_idx * piece_space_size │ + local x_pos = piece_space_size/2 + x_idx * piece_space_size │ + local img_id = nil │ + if y_idx > #board or x_idx > #board[1] then │ + error(string.format("update: {y=%d, x=%d} out of range of board size {y=%d,x=%d}", y_idx+1, x_idx+1, #board, #board[1])) │ + end │ + local piece_type = board[y_idx+1][x_idx+1] │ + -- TODO replace 1 and 2 with go.PLAYER1 and go.PLAYER2 │ + if piece_type == go.PLAYER1 then │ + img_id = "piece_black" │ + elseif piece_type == go.PLAYER2 then │ + img_id = "piece_white" │ + end │ + if img_id ~= nil then │ + draw_more.draw_graphic_ul(img_id, y_pos, x_pos, math.floor(piece_size), math.floor(piece_size)) │ + end │ + │ + │ + if y_idx+1 == last_y and x_idx+1 == last_x then │ + draw_more.draw_graphic_ul("piece_highlight", y_pos, x_pos, math.floor(piece_size), math.floor(piece_size)) │ + end │ + end │ + end │ + │ + alexgames.draw_refresh() │ + update_undo_redo_btns(session_id) │ +end │ + │ +function go_ui.user_pos_to_piece_idx(pos_y, pos_x) │ + local y_idx = math.floor((pos_y - piece_space_size/2)/piece_space_size) + 1 │ + local x_idx = math.floor((pos_x - piece_space_size/2)/piece_space_size) + 1 │ + local to_return = { │ + y = y_idx, │ + x = x_idx │ + } │ + return to_return │ +end │ + │ +return go_ui │ +local go_ctrl = {} │ +-- This file should contain the state for things like deciding │ +-- if players have been chosen yet (whether the player choice UI should be shown), │ +-- and what player you are │ + │ +function go_ctrl.new_state() │ + return { │ + player_choice = nil, │ + other_player_choice = nil, │ + } │ +end │ + │ +function go_ctrl.player_chosen(ctrl_state, player_idx) │ + print(string.format("Storing player choice of %q", player_idx)) │ + ctrl_state.player_choice = player_idx │ +end │ + │ +function go_ctrl.other_player_chosen(ctrl_state, player_idx) │ + ctrl_state.other_player_choice = player_idx │ +end │ + │ +function go_ctrl.get_player(ctrl_state) │ + return ctrl_state.player_choice │ +end │ + │ +function go_ctrl.get_other_player(ctrl_state) │ + return ctrl_state.other_player_choice │ +end │ + │ +return go_ctrl │ +local draw = {} │ + │ +local core = require("games/endless_runner/endless_runner_core") │ + │ +local buttons = require("libs/ui/buttons") │ + │ +local alexgames = require("alexgames") │ + │ +local PLAYER_FILL_COLOUR = '#ff0000' │ +local PLAYER_OUTLINE_COLOUR = '#000000' │ +local PLAYER_RADIUS = 20 │ + │ + │ +local WALL_COLOUR = '#0000ff' │ +local WALL_THICKNESS = 10 │ + │ +local BTN_BACKGROUND_COLOUR = '#888' │ + │ +local board_width = 480 │ +local board_height = 480 │ + │ +local player_pos_y = board_height/2 │ +local player_pos_x = board_height/4 │ + │ +local SCORE_TEXT_SIZE = 24 │ +local padding = 5 │ + │ +local buttons_state = buttons.new_state() │ +local BTN_ID_NEW_GAME = "btn_new_game" │ + │ +buttons.new_button(buttons_state, { │ + id = BTN_ID_NEW_GAME, │ + text = "New Game", │ + -- TODO add defaults for all of these │ + bg_colour = "#888", │ + fg_colour = "#000", │ + outline_colour = "#000", │ + outline_width = 3, │ + text_size = 24, │ + │ + y_start = padding, │ + y_end = padding + 75, │ + │ + x_start = board_width - padding - 200, │ + x_end = board_width - padding, │ +}) │ + │ + │ +local WALL_TO_PIXEL_SCALE = 480/10 │ + │ +local function game_pos_to_screen_pos(state, pt) │ + local screen_pt = {} │ + screen_pt.y = board_height - (pt.y * WALL_TO_PIXEL_SCALE) │ + screen_pt.x = (pt.x - state.player_x) * WALL_TO_PIXEL_SCALE + player_pos_x │ + │ + return screen_pt │ +end │ + │ +function draw.update(state, dt_ms) │ + alexgames.draw_clear() │ + │ + for _, wall in ipairs(state.walls) do │ + local pt1 = game_pos_to_screen_pos(state, { y = wall.y_outer, x = wall.x - core.WALL_SIZE_X/2 }) │ + local pt2 = game_pos_to_screen_pos(state, { y = wall.y_inner, x = wall.x + core.WALL_SIZE_X/2 }) │ + --alexgames.draw_line(WALL_COLOUR, WALL_THICKNESS, │ + -- pt1.y, pt1.x, │ + -- pt2.y, pt2.x) │ + alexgames.draw_rect(WALL_COLOUR, │ + pt1.y, pt1.x, │ + pt2.y, pt2.x) │ + end │ + │ + local player_ul = { y = state.player_y + core.PLAYER_SIZE_Y/2, x = state.player_x - core.PLAYER_SIZE_X/2 } │ + local player_lr = { y = state.player_y - core.PLAYER_SIZE_Y/2, x = state.player_x + core.PLAYER_SIZE_X/2 } │ + player_ul = game_pos_to_screen_pos(state, player_ul) │ + player_lr = game_pos_to_screen_pos(state, player_lr) │ + --alexgames.draw_circle(PLAYER_FILL_COLOUR, PLAYER_OUTLINE_COLOUR, │ + -- player_pos.y, player_pos.x, PLAYER_RADIUS) │ + alexgames.draw_rect(PLAYER_FILL_COLOUR, │ + player_ul.y, player_ul.x, │ + player_lr.y, player_lr.x) │ + │ + local score_text = string.format("%d", core.score(state)) │ + alexgames.draw_text(score_text, '#880000', │ + SCORE_TEXT_SIZE + padding, │ + board_width/2, │ + SCORE_TEXT_SIZE, alexgames.TEXT_ALIGN_CENTRE) │ + │ + buttons.set_visible(buttons_state, BTN_ID_NEW_GAME, state.game_over) │ + │ + buttons.draw(buttons_state) │ + │ + alexgames.draw_refresh() │ +end │ + │ + │ +function draw.in_new_game_btn(state, pos_y, pos_x) │ + if buttons.on_user_click(buttons_state, pos_y, pos_x) then │ + return true │ + end │ + │ + return false │ +end │ + │ +return draw │ +local core = {} │ + │ +-- TODO remove, only for debugging │ +local alexgames = require("alexgames") │ + │ +local Y_MIN = 0 │ +local Y_MAX = 10 │ + │ +core.PLAYER_SIZE_Y = 0.5 │ +core.PLAYER_SIZE_X = 0.75 │ + │ +core.WALL_SIZE_X = 1 │ + │ +core.JUMP_TYPE_KEY = 1 │ +core.JUMP_TYPE_TOUCH = 2 │ + │ +local DIST_BETWEEN_WALLS = 4 │ +local GRAVITY = 15 │ +--local JUMP_SPEED_INC_KEY = 8 │ +--local JUMP_SPEED_INC_TOUCH = 6.5 │ + │ +local Y_VEL_ON_JUMP = 5 │ + │ +local Y_POS_INIT = 5 │ +--local WALL_GAP_SIZE = 3.5 -- this doesn't seem hard enough, even on mobile │ +--local WALL_GAP_SIZE = 3.25 -- this seems a bit harder, but not much │ +--local WALL_GAP_SIZE = 3 -- this seems about right │ +--local WALL_GAP_SIZE = 2.75 │ +--local WALL_GAP_SIZE = 2.5 │ +local WALL_GAP_SIZE = 2.0 │ + │ +local FIRST_WALL_X = 8 │ + │ + │ +local WALL_GAP_POS_MIN = 2 │ +local WALL_GAP_POS_MAX = 8 │ + │ +local WALL_INIT_SEGMENTS = 5 │ + │ +local PLAYER_X_VEL = DIST_BETWEEN_WALLS │ + │ +-- Once a wall is this far away behind the player, │ +-- remove it │ +local REMOVE_WALLS_BEHIND_DIST = 5 │ + │ +local function clip(val, min_val, max_val) │ + if val <= min_val then │ + return min_val │ + end │ + │ + if val >= max_val then │ + return max_val │ + end │ + │ + return val │ +end │ + │ +local function random_range(min_val, max_val) │ + return min_val + math.random() * (max_val - min_val) │ +end │ + │ +local function generate_new_wall_segs(prev_gap_y_pos, x_pos) │ + local new_gap_pos = prev_gap_y_pos + math.random(-3,3) │ + --local new_gap_pos = prev_gap_y_pos + math.random(-1,1) * 3 │ + new_gap_pos = clip(new_gap_pos, WALL_GAP_POS_MIN, WALL_GAP_POS_MAX) │ + -- TODO consider decreasing gap size gradually from say 4 to 3 or so │ + -- from wall 0 to 100. │ + -- TODO change x_pos to index │ + --local wall_gap_size = random_range(2,4) │ + local wall_gap_size = 2.75 │ + local wall1_y = new_gap_pos - wall_gap_size/2 │ + local wall2_y = new_gap_pos + wall_gap_size/2 │ + local wall1 = { │ + x = x_pos, │ + y_outer = Y_MIN, │ + y_inner = wall1_y │ + } │ + local wall2 = { │ + x = x_pos, │ + y_outer = Y_MAX, │ + y_inner = wall2_y │ + } │ + │ + return { │ + wall1 = wall1, │ + wall2 = wall2, │ + gap_pos = new_gap_pos │ + } │ +end │ + │ +local function get_last_gap_pos(state) │ + assert(#state.walls >= 2) │ + local wall1 = state.walls[#state.walls-1] │ + local wall2 = state.walls[#state.walls-0] │ + │ + return (wall1.y_inner + wall2.y_inner)/2 │ +end │ + │ +function core.update_state(state, dt_ms) │ + if state.game_over then │ + return │ + end │ + │ + local dt = dt_ms / 1000 │ + │ + local prev_player_x = state.player_x │ + │ + state.player_x = state.player_x + PLAYER_X_VEL * dt │ + state.player_y_vel = state.player_y_vel - GRAVITY * dt │ + state.player_y = state.player_y + state.player_y_vel * dt │ + │ + if state.player_y - core.PLAYER_SIZE_Y/2 < Y_MIN then │ + state.game_over = true │ + end │ + if state.player_y + core.PLAYER_SIZE_Y/2 >= Y_MAX then │ + state.game_over = true │ + end │ + │ + for _, wall in ipairs(state.walls) do │ + if prev_player_x - core.PLAYER_SIZE_X/2 <= wall.x + core.WALL_SIZE_X/2 and │ + wall.x - core.WALL_SIZE_X/2 <= state.player_x + core.PLAYER_SIZE_X/2 then │ + -- TODO this is a bit ugly │ + if wall.y_outer == Y_MAX and state.player_y + core.PLAYER_SIZE_Y/2 > wall.y_inner or │ + wall.y_outer == Y_MIN and state.player_y - core.PLAYER_SIZE_Y/2 < wall.y_inner then │ + local debug_str = string.format("wall { y_outer: %s, y_inner: %s, x: %s }, player = { y: %s, x: %s }", │ + wall.y_outer, wall.y_inner, wall.x, state.player_y, state.player_x) │ + -- TODO remove │ + alexgames.set_status_msg("Wall collision! Debug info: " .. debug_str) │ + state.game_over = true │ + break │ + end │ + │ + end │ + end │ + │ + while #state.walls > 0 and state.walls[1].x < state.player_x - REMOVE_WALLS_BEHIND_DIST do │ + table.remove(state.walls, 1) │ + end │ + │ + local prev_gap_pos = get_last_gap_pos(state) │ + local prev_x_pos = state.walls[#state.walls].x │ + while #state.walls < 2*WALL_INIT_SEGMENTS do │ + local x_pos = prev_x_pos + DIST_BETWEEN_WALLS │ + local wall_info = generate_new_wall_segs(prev_gap_pos, x_pos) │ + table.insert(state.walls, wall_info.wall1) │ + table.insert(state.walls, wall_info.wall2) │ + prev_gap_pos = wall_info.gap_pos │ + prev_x_pos = x_pos │ + end │ + │ + --print(string.format("walls count: %d; first x: %5d, last x: %5d", #state.walls, state.walls[1].x, state.walls[#state.walls].x)) │ +end │ + │ +function core.jump(state, jump_type) │ + if state.game_over then │ + return │ + end │ + │ + │ + --[[ │ + local jump_inc = nil │ + │ + if jump_type == core.JUMP_TYPE_KEY then │ + jump_inc = JUMP_SPEED_INC_KEY │ + elseif jump_type == core.JUMP_TYPE_TOUCH then │ + jump_inc = JUMP_SPEED_INC_TOUCH │ + end │ + │ + state.player_y_vel = state.player_y_vel + jump_inc │ + --]] │ + state.player_y_vel = Y_VEL_ON_JUMP │ +end │ + │ +function core.score(state) │ + local score = math.ceil( (state.player_x - FIRST_WALL_X) / DIST_BETWEEN_WALLS ) │ + if score < 0 then │ + return 0 │ + else │ + return score │ + end │ +end │ + │ +function core.new_state() │ + local state = { │ + player_y = Y_POS_INIT, │ + player_x = 0, │ + player_y_vel = 0, │ + │ + walls = {}, │ + │ + game_over = false, │ + } │ + │ + local prev_gap_pos = Y_POS_INIT │ + for i=1,WALL_INIT_SEGMENTS do │ + if #state.walls >= 2 then │ + assert(get_last_gap_pos(state) == prev_gap_pos) │ + end │ + local x_pos = FIRST_WALL_X + (i-1)*DIST_BETWEEN_WALLS │ + local wall_info = generate_new_wall_segs(prev_gap_pos, x_pos) │ + table.insert(state.walls, wall_info.wall1) │ + table.insert(state.walls, wall_info.wall2) │ + prev_gap_pos = wall_info.gap_pos │ + end │ + return state │ +end │ + │ +return core │ +local core = require("games/endless_runner/endless_runner_core") │ +local draw = require("games/endless_runner/endless_runner_draw") │ + │ +local alexgames = require("alexgames") │ + │ +local FPS = 60 │ + │ +local g_state = nil │ + │ +function update(dt_ms) │ + if dt_ms and dt_ms > 0 then │ + core.update_state(g_state, dt_ms) │ + end │ + draw.update(g_state) │ +end │ + │ +local jump_keys = { │ + ["Space"] = true, │ + ["Enter"] = true, │ + ["ArrowUp"] = true, │ + ["KeyK"] = true, │ + ["KeyW"] = true │ +} │ + │ +local function new_game() │ + g_state = core.new_state() │ +end │ + │ +function handle_key_evt(key_evt, key_id) │ + print(string.format("evt=%s, id=%s", key_evt, key_id)) │ + if jump_keys[key_id] then │ + if key_evt == "keydown" then │ + core.jump(g_state, core.JUMP_TYPE_KEY) │ + end │ + return true │ + end │ + return false │ +end │ + │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + if evt_id == alexgames.MOUSE_EVT_DOWN then │ + core.jump(g_state, core.JUMP_TYPE_KEY) │ + if draw.in_new_game_btn(state, pos_y, pos_x) then │ + new_game() │ + end │ + end │ + │ +end │ + │ +function handle_touch_evt(evt_id, touches) │ + for _, touch in ipairs(touches) do │ + if evt_id == "touchstart" then │ + core.jump(g_state, core.JUMP_TYPE_TOUCH) │ + if draw.in_new_game_btn(state, touch.y, touch.x) then │ + new_game() │ + end │ + end │ + end │ + │ +end │ + │ +function start_game(session_id_arg, serialized_state_arg) │ + new_game() │ + │ + alexgames.set_timer_update_ms(1000/FPS) │ + alexgames.enable_evt("key") │ + alexgames.enable_evt("mouse_updown") │ + alexgames.enable_evt("touch") │ +end │ +-- Author: Alex Barry (github.com/alexbarry) │ +local ui = {} │ + │ +local alexgames = require("alexgames") │ +local ui_pane_bet_input = require("games/poker_chips/ui/bet_input") │ +local ui_pane_control = require("games/poker_chips/ui/control") │ +local ui_pane_view_others = require("games/poker_chips/ui/view_others") │ +local core = require("games/poker_chips/poker_chips_core") │ + │ +local ui_params = { │ + board_height = 480, │ + board_width = 480, │ + margin = 20, │ + padding = 5, │ + big_padding = 15, │ + BTN_TEXT_SIZE = 24, │ + BTN_BG_COLOUR = '#ccccffaa', │ + BTN_FG_COLOUR = '#000000', │ + BTN_FG_COLOUR_FADED = '#aaaaaa', │ + BTN_OUTLINE_COLOUR = '#000000', │ + BTN_OUTLINE_WIDTH = 1, │ + BTN_TEXT_SIZE = 24, │ + info_text_size = 18, │ + │ +} │ + │ +local function add_action(ui_state, action) │ + table.insert(ui_state.actions, action) │ +end │ + │ +local function init_control_menu() │ +end │ + │ +function ui.init() │ + local ui_state = { │ + panes = {}, │ + actions = {}, │ + } │ + │ + ui_state.panes.view_others = ui_pane_view_others.init(ui_params, { │ + move_to_control_state = function () │ + ui_state.active_state = ui_state.panes.control │ + end, │ + }) │ + │ + ui_state.panes.bet_input = ui_pane_bet_input.init(ui_params, { │ + move_to_control_state = function () │ + ui_state.active_state = ui_state.panes.control │ + end, │ + move_to_view_others_state = function () │ + ui_state.active_state = ui_state.panes.view_others │ + end, │ + │ + add_action = function (action) │ + add_action(ui_state, action) │ + end, │ + }) │ + │ + ui_state.panes.control = ui_pane_control.init(ui_params, { │ + move_to_raise_state = function () │ + ui_state.active_state = ui_state.panes.bet_input │ + end, │ + move_to_view_others_state = function () │ + ui_state.active_state = ui_state.panes.view_others │ + end, │ + add_action = function (action) │ + add_action(ui_state, action) │ + end, │ + }) │ + ui_state.active_state = ui_state.panes.view_others │ + return ui_state │ +end │ + │ +function ui.draw(ui_state) │ + alexgames.draw_clear() │ + ui_state.active_state.draw(ui_state.active_state) │ +end │ + │ +function ui.update(ui_state, game_state, player_idx) │ + print("ui.update called") │ + for _, pane in pairs(ui_state.panes) do │ + pane.update(pane, game_state, player_idx) │ + end │ +end │ + │ +function ui.handle_user_clicked(ui_state, y_pos, x_pos) │ + ui_state.active_state.handle_user_clicked(ui_state.active_state, y_pos, x_pos) │ + local actions = ui_state.actions │ + ui_state.actions = {} │ + return actions │ +end │ + │ +return ui │ +local core = {} │ + │ +core.ACTION_CHECK = "check" │ +core.ACTION_CALL = "call" │ +core.ACTION_RAISE = "raise" │ +core.ACTION_FOLD = "fold" │ + │ +core.RC_SUCCESS = 0 │ +core.RC_BET_TOO_SMALL = -1 │ + │ +function core.action_to_string(action) │ + if action.action == core.ACTION_RAISE then │ + return string.format("(%s: %d)", action.action, action.param) │ + else │ + return string.format("(%s)", action.action) │ + end │ +end │ + │ +function core.rc_to_string(rc) │ + local rc_strings = { │ + [core.RC_SUCCESS] = "Success", │ + [core.RC_BET_TOO_SMALL] = "Bet too small", │ + } │ + return rc_strings[rc] │ +end │ + │ +function core.add_player(state, name, chips) │ + local player_state = { │ + name = name, │ + chips = chips, │ + bet = 0, │ + folded = false, │ + │ + -- To be displayed in UI │ + last_action = nil, │ + last_bet = nil, │ + } │ + table.insert(state.players, player_state) │ +end │ + │ +function core.get_pot_string(pots) │ + if #pots == 0 then return "0" │ + else │ + -- TODO This is a placeholder. │ + -- I don't think it will actually be a list of integers like this, │ + -- but I don't know what it will look like yet. │ + -- I assume each side pot would need a list of players eligible to receive it. │ + -- I don't actually know the rules... if someone goes all-in and creates a side pot, and wins, │ + -- who gets the other pots? Are they returned? │ + local s = "" │ + if #pots > 1 then s = s .. "{" end │ + for pot_idx, pot in ipairs(pots) do │ + if pot_idx ~= 1 then │ + s = s .. ', ' │ + end │ + s = s .. pot │ + end │ + if #pots > 1 then s = s .. "}" end │ + return s │ + end │ +end │ + │ +function core.new_state() │ + local state = { │ + pots = {0}, │ + players = {}, │ + min_bet = 0, │ + player_turn = 1, │ + last_player_min_bet = nil, │ + } │ + │ + return state │ +end │ + │ +function core.print_state(state) │ + print(string.format("players (len: %d) = {", #state.players)) │ + for player_idx, player_state in ipairs(state.players) do │ + print(string.format("[%d] = { name: \"%s\", chips: %d, bet: %d, folded: %s }", │ + player_idx, player_state.name, │ + player_state.chips, player_state.bet, player_state.folded)) │ + end │ + print("}") │ +end │ + │ +local function get_player_name(state, player_idx) │ + if state.players[player_idx] == nil then │ + error(string.format("Player %s not found", player_idx), 2) │ + end │ + │ + return string.format("%d (\"%s\")", player_idx, state.players[player_idx].name) │ +end │ + │ +local function handle_player_bet(state, player_idx, bet) │ + print(string.format("Player %s making bet %d", get_player_name(state, player_idx), bet)) │ + │ + local action │ + if bet < state.min_bet then │ + return core.RC_BET_TOO_SMALL │ + elseif bet == 0 then │ + action = core.ACTION_CHECK │ + elseif bet == state.min_bet then │ + action = core.ACTION_CALL │ + elseif bet > state.min_bet then │ + action = core.ACTION_RAISE │ + else │ + -- I don't think this is possible unless bet is negative or something │ + error(string.format("could not handle bet=%s, state.min_bet=%s", bet, state.min_bet)) │ + end │ + │ + local player_state = state.players[player_idx] │ + local bet_increase = bet -- TODO should change this to "bet_increase"? │ + player_state.bet = player_state.bet + bet │ + player_state.chips = player_state.chips - bet │ + player_state.last_action = action │ + player_state.last_bet = bet │ + │ + state.min_bet = bet │ + -- TODO figure out how to handle side pots │ + print(string.format("pots: %d, %s", #state.pots, state.pots)) │ + state.pots[1] = state.pots[1] + bet_increase │ + if action == core.ACTION_RAISE then │ + state.last_player_min_bet = player_idx │ + end │ + │ + return core.RC_SUCCESS │ +end │ + │ +local function next_player(state) │ + print(string.format("Advancing to next player, after player %s", get_player_name(state, state.player_turn))) │ + │ + for _=1,#state.players do │ + state.player_turn = (state.player_turn % #state.players) + 1 │ + │ + if state.players[state.player_turn].folded then │ + print(string.format("Skipping player %d (%s), as they folded", │ + state.player_turn, state.players[state.player_turn].name)) │ + goto next_player │ + else │ + break │ + end │ + │ + ::next_player:: │ + end │ + if state.players[state.player_turn].folded then │ + -- TODO handle case where everyone has folded │ + end │ + print(string.format("Now it is player's turn: %s", get_player_name(state, state.player_turn))) │ + │ + -- TODO need something to call attention to the case where everyone has bet, │ + -- to tell dealer to draw another card │ +end │ + │ +function core.handle_action(state, action) │ + if action.action == core.ACTION_CHECK then │ + local rc = handle_player_bet(state, state.player_turn, 0) │ + if rc ~= core.RC_SUCCESS then │ + return rc │ + end │ + next_player(state) │ + elseif action.action == core.ACTION_CALL then │ + local rc = handle_player_bet(state, state.player_turn, state.min_bet) │ + if rc ~= core.RC_SUCCESS then │ + return rc │ + end │ + next_player(state) │ + elseif action.action == core.ACTION_RAISE then │ + local bet = action.param │ + local rc = handle_player_bet(state, state.player_turn, bet) │ + if rc ~= core.RC_SUCCESS then │ + return rc │ + end │ + next_player(state) │ + elseif action.action == core.ACTION_FOLD then │ + print(string.format("Player %s has folded", get_player_name(state, state.player_turn))) │ + state.players[state.player_turn].folded = true │ + state.players[state.player_turn].last_action = core.ACTION_FOLD │ + state.players[state.player_turn].last_bet = 0 │ + next_player(state) │ + else │ + error(string.format("Unhandled action type %s", action.action)) │ + -- TODO notify remote player (client) │ + end │ + │ + return core.RC_SUCCESS │ +end │ + │ +return core │ +-- Author: Alex Barry (github.com/alexbarry) │ +-- │ +--[[ │ + │ +Should support both: │ +* "local" multiplayer (where a single user is using this app to track all players' bets/pots), or │ +* network multiplayer (where all players are using this app on their phones/computers and entering their own bets) │ + │ + │ +Expected sequence for network multiplayer: │ +* new player starts app, acts as host │ +* sends message to all, asking for state if anyone is host │ +* if receives a message from someone claiming to be a host, change to client, and load received state │ + │ +TODO: │ +* need to show raising as relative to min bet │ + * when raising, need to set "min bet" in keypad UI │ +* show dashed line above person who last raised │ + │ +--]] │ +local alexgames = require("alexgames") │ +local ui = require("games/poker_chips/poker_chips_ui") │ +local core = require("games/poker_chips/poker_chips_core") │ +local serialize = require("games/poker_chips/poker_chips_serialize") │ + │ +local wait_for_players = require("libs/multiplayer/wait_for_players") │ +--local two_player = require("libs/multiplayer/two_player") │ + │ + │ +local player = 1 │ + │ +local players = { │ + [1] = "You", │ +} │ + │ + │ +local SHOW_TEST_DATA = true │ + │ + │ +local state = { │ + game = nil, │ + ui = nil, │ +} │ +state.game = core.new_state() │ + │ +function get_player() │ + -- TODO handle network multiplayer │ + return state.game.player_turn │ +end │ + │ +if SHOW_TEST_DATA then │ + core.add_player(state.game, "Alex", 135) │ + core.add_player(state.game, "Conor", 205) │ + core.add_player(state.game, "Justin", 55) │ + core.add_player(state.game, "Nick", 175) │ + core.add_player(state.game, "Marc", 100) │ + core.add_player(state.game, "Liam", 335) │ + core.add_player(state.game, "Pranav", 220) │ + core.add_player(state.game, "Shubham", 95) │ +end │ + │ +core.print_state(state.game) │ + │ +state.ui = ui.init() │ +ui.update(state.ui, state.game, get_player()) │ + │ +function update() │ + ui.draw(state.ui) │ +end │ + │ +local function update_state() │ + for _, player in pairs(players) do │ + if player == "You" then goto next_player end │ + local serialized_state = serialize.serialize_state(state.game) │ + print(string.format("Broadcasting state to player \"%s\", bytes %d", player, #serialized_state)) │ + alexgames.send_message(player, "state:" .. serialized_state) │ + ::next_player:: │ + end │ + │ +end │ + │ +function handle_user_string_input(str_input, is_cancelled) │ + print(string.format("handle_user_string_input(str_input=\"%s\", is_cancelled=%q)", str_input, is_cancelled)) │ + alexgames.set_status_msg(string.format("handle_user_string_input(str_input=\"%s\", is_cancelled=%q)", str_input, is_cancelled)) │ +end │ + │ +function handle_user_clicked(y_pos, x_pos) │ + local actions = ui.handle_user_clicked(state.ui, y_pos, x_pos) │ + for _, action in ipairs(actions) do │ + alexgames.set_status_msg(string.format("Received action %s", core.action_to_string(action))) │ + local rc = core.handle_action(state.game, action) │ + if rc ~= core.RC_SUCCESS then │ + if rc == core.RC_BET_TOO_SMALL then │ + alexgames.set_status_err(string.format("Your bet (%d) is lower than the minimum bet (%d)", action.param, state.game.min_bet)) │ + else │ + alexgames.set_status_err(core.rc_to_string(rc)) │ + end │ + else │ + update_state() │ + if action.on_success_callback ~= nil then │ + action.on_success_callback() │ + end │ + end │ + end │ + ui.update(state.ui, state.game, get_player()) │ + ui.draw(state.ui) │ +end │ + │ + │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + if wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) then │ + -- handled │ + else │ + error(string.format("Unhandled popup_id=%s, btn_idx=%s", popup_id, btn_idx)) │ + end │ +end │ + │ + │ +function handle_msg_received(src, msg) │ + if wait_for_players.handle_msg_received(src, msg) then │ + return │ + end │ + │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ + │ + if header == "state" then │ + print(string.format("Received state from \"%s\", bytes %d", src, #payload)) │ + local received_state = serialize.deserialize_state(payload) │ + state.game = received_state │ + ui.update(state.ui, state.game, get_player()) │ + update() │ + else │ + error(string.format("Unhandled message: %s", header)) │ + end │ + │ +end │ + │ +function start_host_game() │ + -- TODO │ +end │ + │ +function start_client_game() │ + -- TODO │ +end │ + │ +function start_game() │ + wait_for_players.init(players, player, start_host_game, start_client_game) │ +end │ +local serialize = {} │ + │ +local serialize_lib = require("libs/serialize/serialize") │ + │ +local function serialize_player_state(player_state) │ + local output = "" │ + output = output .. serialize_lib.serialize_string(player_state.name) │ + output = output .. serialize_lib.serialize_s32(player_state.chips) │ + output = output .. serialize_lib.serialize_s32(player_state.bet) │ + output = output .. serialize_lib.serialize_bool(player_state.folded) │ + output = output .. serialize_lib.serialize_string(player_state.last_action) │ + output = output .. serialize_lib.serialize_s32_nilable(player_state.last_bet) │ + │ + return output │ +end │ + │ +local function deserialize_player_state(bytes) │ + local player_state = {} │ + player_state.name = serialize_lib.deserialize_string(bytes) │ + player_state.chips = serialize_lib.deserialize_s32(bytes) │ + player_state.bet = serialize_lib.deserialize_s32(bytes) │ + player_state.folded = serialize_lib.deserialize_bool(bytes) │ + player_state.last_action = serialize_lib.deserialize_string(bytes) │ + player_state.last_bet = serialize_lib.deserialize_s32_nilable(bytes) │ + │ + return player_state │ +end │ + │ +local function serialize_pots(pots) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(#pots) │ + for _, pot in ipairs(pots) do │ + output = output .. serialize_lib.serialize_s32(pot) │ + end │ + return output │ +end │ + │ +local function deserialize_pots(bytes) │ + local pots = {} │ + local pot_count = serialize_lib.deserialize_byte(bytes) │ + for i=1,pot_count do │ + pots[i] = serialize_lib.deserialize_s32(bytes) │ + end │ + return pots │ +end │ + │ +function serialize.deserialize_state(bytes_str) │ + local bytes = serialize_lib.bytestr_to_byteary(bytes_str) │ + print("deserializing " .. #bytes .. " bytes") │ + local state = {} │ + state.pots = deserialize_pots(bytes) │ + local player_count = serialize_lib.deserialize_byte(bytes) │ + state.players = {} │ + for i=1,player_count do │ + state.players[i] = deserialize_player_state(bytes) │ + end │ + state.min_bet = serialize_lib.deserialize_s32(bytes) │ + state.player_turn = serialize_lib.deserialize_byte(bytes) │ + │ + if #bytes ~= 0 then │ + error(string.format("%d bytes leftover after deserializing", #bytes)) │ + end │ + │ + │ + return state │ +end │ + │ +function serialize.serialize_state(state) │ + local output = "" │ + output = output .. serialize_pots(state.pots) │ + output = output .. serialize_lib.serialize_byte(#state.players) │ + for _, player_state in ipairs(state.players) do │ + output = output .. serialize_player_state(player_state) │ + end │ + output = output .. serialize_lib.serialize_s32(state.min_bet) │ + output = output .. serialize_lib.serialize_byte(state.player_turn) │ + │ + return output │ +end │ + │ +return serialize │ +-- Author: Alex Barry (github.com/alexbarry) │ +local bet_input = {} │ + │ +local soft_numpad = require("libs/ui/soft_numpad") │ +local buttons = require("libs/ui/buttons") │ + │ +local core = require("games/poker_chips/poker_chips_core") │ + │ +local alexgames = require("alexgames") │ + │ + │ +local g_ui_params = nil │ + │ +local BTN_ID_ADJ_MINUS_5 = "adjust_minus5" │ +local BTN_ID_ADJ_MINUS_1 = "adjust_minus1" │ +local BTN_ID_ADJ_PLUS_1 = "adjust_plus1" │ +local BTN_ID_ADJ_PLUS_5 = "adjust_plus5" │ + │ +local BTN_ID_SUBMIT_BET = "submit_bet" │ +local BTN_ID_BACK = "back" │ + │ +BTN_ADJ_ID_TO_AMOUNT = { │ + [BTN_ID_ADJ_MINUS_5] = -5, │ + [BTN_ID_ADJ_MINUS_1] = -1, │ + [BTN_ID_ADJ_PLUS_1] = 1, │ + [BTN_ID_ADJ_PLUS_5] = 5, │ +} │ + │ +local function get_numpad_val(numpad_val) │ + if #numpad_val == 0 then return 0 │ + else │ + return tonumber(numpad_val) │ + end │ +end │ + │ +local function adjust_bet(bet_input_state, inc) │ + local bet_val = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)) │ + bet_val = tonumber(bet_val) + inc │ + -- TODO need to get numpad val, or update numpad val here │ + if bet_val < 0 then │ + bet_val = 0 │ + elseif bet_val > bet_input_state.max_bet then │ + bet_val = bet_input_state.max_bet │ + end │ + │ + soft_numpad.set_val(bet_input_state.numpad, bet_val) │ +end │ + │ +local function new_button(buttons_state, params) │ + if params.callback == nil then │ + error(string.format("missing callback"), 2) │ + end │ + buttons.new_button(buttons_state, { │ + id = params.id, │ + text = params.text, │ + bg_colour = g_ui_params.BTN_BG_COLOUR, │ + fg_colour = g_ui_params.BTN_FG_COLOUR, │ + outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ + outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ + btn_shape = params.btn_shape, │ + shape_param = params.shape_param, │ + text_size = g_ui_params.BTN_TEXT_SIZE, │ + padding = g_ui_params.padding, │ + y_start = params.y_start, │ + x_start = params.x_start, │ + y_end = params.y_end, │ + x_end = params.x_end, │ + callback = params.callback, │ + │ + }) │ +end │ + │ + │ +local function bet_input_button_pressed(bet_input_state, btn_id) │ + if BTN_ADJ_ID_TO_AMOUNT[btn_id] then │ + local inc = BTN_ADJ_ID_TO_AMOUNT[btn_id] │ + adjust_bet(bet_input_state, inc) │ + elseif btn_id == BTN_ID_SUBMIT_BET then │ + bet_input_state.add_action({ │ + action = core.ACTION_RAISE, │ + param = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)), │ + on_success_callback = function () │ + soft_numpad.set_val(bet_input_state.numpad, "") │ + bet_input_state.move_to_view_others_state() │ + end, │ + }) │ + elseif btn_id == BTN_ID_BACK then │ + bet_input_state.move_to_control_state() │ + end │ + bet_input_state.draw(bet_input_state) │ +end │ + │ +function bet_input.init(ui_params, bet_input_params) │ + g_ui_params = ui_params │ + top_info_height = 50 │ + num_button_rows = 7 │ + local button_y_size = math.floor((g_ui_params.board_height - 2*g_ui_params.margin - top_info_height - g_ui_params.big_padding)/num_button_rows) │ + │ + local BACK_BUTTON_WIDTH = 135 │ + │ + local ADJUST_BUTTON_Y_START = g_ui_params.margin + top_info_height │ + local CENTRE_MONEY_INDICATOR_WIDTH = 150 │ + local CENTRE_MONEY_INDICATOR_X_MIDDLE = math.floor(g_ui_params.board_width/2) │ + local ADJUST_BUTTON_HEIGHT = 75 │ + local ADJUST_BUTTON_HEIGHT = button_y_size │ + │ + local BET_BUTTON_HEIGHT = button_y_size │ + │ + │ + local NUMPAD_Y_START = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT + g_ui_params.big_padding │ + local NUMPAD_Y_END = g_ui_params.board_height - g_ui_params.margin - BET_BUTTON_HEIGHT │ + │ + │ + local BTN_SUBMIT_BET_Y_START = NUMPAD_Y_END + g_ui_params.padding │ + local BTN_SUBMIT_BET_Y_END = g_ui_params.board_height - g_ui_params.margin │ + │ + local bet_input_state = { │ + -- TODO │ + max_bet = 100, │ + chips = 135, │ + pots = {30}, │ + move_to_control_state = bet_input_params.move_to_control_state, │ + move_to_view_others_state = bet_input_params.move_to_view_others_state, │ + add_action = bet_input_params.add_action, │ + } │ + bet_input_state.numpad = soft_numpad.init({ │ + y_start = NUMPAD_Y_START, │ + y_end = NUMPAD_Y_END, │ + │ + x_start = g_ui_params.margin, │ + x_end = g_ui_params.board_width - g_ui_params.margin, │ + │ + btn_bg_colour = g_ui_params.BTN_BG_COLOUR, │ + btn_fg_colour = g_ui_params.BTN_FG_COLOUR, │ + outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ + outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ + }) │ + │ + local callback = function (btn_id) │ + bet_input_button_pressed(bet_input_state, btn_id) │ + end │ + │ + local adjust_button_width = math.floor((g_ui_params.board_width-2*g_ui_params.margin - CENTRE_MONEY_INDICATOR_WIDTH)/4) │ + bet_input_state.buttons = buttons.new_state() │ + │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_BACK, │ + text = 'Back', │ + y_start = g_ui_params.margin, │ + y_end = g_ui_params.margin + top_info_height - g_ui_params.padding, │ + x_start = g_ui_params.margin, │ + x_end = g_ui_params.margin + BACK_BUTTON_WIDTH, │ + │ + callback = callback, │ + }) │ + │ + --buttons.new_button(bet_input_state.buttons, { │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_ADJ_MINUS_5, │ + text = '-5', │ + y_start = ADJUST_BUTTON_Y_START, │ + y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ + x_start = g_ui_params.margin, │ + x_end = g_ui_params.margin + adjust_button_width, │ + │ + btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ + shape_param = true, │ + callback = callback, │ + }) │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_ADJ_MINUS_1, │ + text = '-1', │ + y_start = ADJUST_BUTTON_Y_START, │ + y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ + x_start = g_ui_params.margin + adjust_button_width + g_ui_params.padding, │ + x_end = g_ui_params.margin + 2*adjust_button_width + g_ui_params.padding, │ + │ + btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ + shape_param = true, │ + callback = callback, │ + }) │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_ADJ_PLUS_1, │ + text = '+1', │ + y_start = ADJUST_BUTTON_Y_START, │ + y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ + x_start = g_ui_params.board_width - g_ui_params.margin - 2*adjust_button_width - 2*g_ui_params.padding, │ + x_end = g_ui_params.board_width - g_ui_params.margin - adjust_button_width - 2*g_ui_params.padding, │ + │ + btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ + shape_param = false, │ + callback = callback, │ + }) │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_ADJ_PLUS_5, │ + text = '+5', │ + y_start = ADJUST_BUTTON_Y_START, │ + y_end = ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT, │ + x_start = g_ui_params.board_width - g_ui_params.margin - adjust_button_width - g_ui_params.padding, │ + x_end = g_ui_params.board_width - g_ui_params.margin - 0*adjust_button_width - g_ui_params.padding, │ + │ + btn_shape = buttons.BTN_SHAPE_TRIANGLE, │ + shape_param = false, │ + callback = callback, │ + }) │ + │ + new_button(bet_input_state.buttons, { │ + id = BTN_ID_SUBMIT_BET, │ + text = 'Submit bet', │ + y_start = BTN_SUBMIT_BET_Y_START, │ + y_end = BTN_SUBMIT_BET_Y_END, │ + x_start = g_ui_params.margin, │ + x_end = g_ui_params.board_width - g_ui_params.margin, │ + callback = callback, │ + }) │ + bet_input_state.draw = function (bet_input_state) │ + soft_numpad.draw(bet_input_state.numpad) │ + buttons.draw(bet_input_state.buttons) │ + local numpad_val = get_numpad_val(soft_numpad.get_val(bet_input_state.numpad)) │ + local bet_val_str = string.format("$%s", numpad_val) │ + local text_size = 18 │ + local text_y_start = math.floor(ADJUST_BUTTON_Y_START + ADJUST_BUTTON_HEIGHT/2 + text_size/2) │ + alexgames.draw_text(bet_val_str, '#000000', text_y_start, CENTRE_MONEY_INDICATOR_X_MIDDLE, text_size, 0) │ + alexgames.draw_text(string.format("Your chips: $%d", bet_input_state.chips), '#000000', │ + g_ui_params.margin + text_size, g_ui_params.margin + BACK_BUTTON_WIDTH + g_ui_params.padding, text_size, 1) │ + alexgames.draw_text(string.format("Pot: %s", core.get_pot_string(bet_input_state.pots)), '#000000', │ + g_ui_params.margin + text_size, g_ui_params.board_width - g_ui_params.margin, text_size, -1) │ + end │ + bet_input_state.handle_user_clicked = function(bet_input_state, y_pos, x_pos) │ + soft_numpad.on_user_click(bet_input_state.numpad, y_pos, x_pos) │ + buttons.on_user_click(bet_input_state.buttons, y_pos, x_pos) │ + end │ + │ + bet_input_state.update = function (bet_input_state, game_state, player_idx) │ + print(string.format("bet_input_state(player_idx=%d)", player_idx)) │ + bet_input_state.max_bet = game_state.players[player_idx].chips │ + bet_input_state.chips = game_state.players[player_idx].chips │ + bet_input_state.pots = game_state.pots │ + end │ + return bet_input_state │ +end │ + │ +return bet_input │ +-- Author: Alex Barry (github.com/alexbarry) │ +local view_others = {} │ + │ +local buttons = require("libs/ui/buttons") │ +local draw_more = require("libs/draw/draw_more") │ +local alexgames = require("alexgames") │ + │ +local core = require("games/poker_chips/poker_chips_core") │ + │ +local g_ui_params = nil │ + │ +local BTN_ID_CHOOSE_BET = "choose_bet" │ + │ +local CURRENT_PLAYER_TEXT_ICON = ">" │ + │ +local CURRENT_PLAYER_ICON_WIDTH = 20 │ +local PLAYER_NAME_WIDTH = 175 │ +local PLAYER_ACTION_WIDTH = 195 │ +local PLAYER_CHIPS_WIDTH = 50 │ + │ +local function btn_pressed(view_others_state, btn_id) │ + if btn_id == BTN_ID_CHOOSE_BET then │ + view_others_state.move_to_control_state() │ + end │ +end │ + │ +local function get_player_status(player_info) │ + if player_info.last_action == nil then return "" │ + elseif player_info.last_action == core.ACTION_CHECK then return "Check" │ + elseif player_info.last_action == core.ACTION_CALL then return "Call" │ + elseif player_info.last_action == core.ACTION_RAISE then return string.format("Raise (+$%s)", player_info.last_bet) │ + elseif player_info.last_action == core.ACTION_FOLD then return "Folded" │ + else │ + return string.format("Unknown action \"%s\"", player_info.last_action) │ + end │ + │ +end │ + │ +function view_others.init(ui_params, view_others_params) │ + g_ui_params = ui_params │ + local view_others_state = { │ + buttons = buttons.new_state(), │ + move_to_control_state = view_others_params.move_to_control_state, │ + players = { │ +--[[ │ + { name = "Alex", action = "Checked", chips = 135 }, │ + { name = "Conor", action = "Checked", chips = 205 }, │ + { name = "Justin", action = "Raised +$30", chips = 55 }, │ + { name = "Nick", action = "Called +$30", chips = 175 }, │ + { name = "Marc", action = "Folded", chips = 100 }, │ + { name = "Liam", action = "", chips = 335 }, │ + { name = "Pranav", action = "", chips = 220 }, │ + { name = "Shubham", action = "", chips = 95 }, │ +--]] │ + }, │ + player_turn = 6, │ + } │ + │ + local button_height = 75 │ + │ + buttons.new_button(view_others_state.buttons, { │ + id = BTN_ID_CHOOSE_BET, │ + text = "Choose Bet", │ + bg_colour = g_ui_params.BTN_BG_COLOUR, │ + fg_colour = g_ui_params.BTN_FG_COLOUR, │ + outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ + outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ + text_size = g_ui_params.BTN_TEXT_SIZE, │ + padding = g_ui_params.padding, │ + y_start = g_ui_params.board_height - g_ui_params.margin - button_height, │ + x_start = g_ui_params.margin, │ + y_end = g_ui_params.board_height - g_ui_params.margin, │ + x_end = g_ui_params.board_width - g_ui_params.margin, │ + callback = function (btn_id) btn_pressed(view_others_state, btn_id) end, │ + }) │ + │ + view_others_state.draw = function (view_others_state) │ + local init_info_offset = g_ui_params.margin + g_ui_params.info_text_size │ + local text_size = g_ui_params.info_text_size │ + │ + │ + local min_bet_txt = string.format("Minimum Bet: %3d", view_others_state.min_bet) │ + alexgames.draw_text(min_bet_txt, g_ui_params.BTN_FG_COLOUR, │ + init_info_offset, g_ui_params.margin, │ + text_size, 1) │ + │ + local pots_strs = string.format("Pot: %3s", core.get_pot_string(view_others_state.pots)) │ + alexgames.draw_text(pots_strs, g_ui_params.BTN_FG_COLOUR, │ + init_info_offset, g_ui_params.board_width - g_ui_params.margin, │ + text_size, -1) │ + │ + if #view_others_state.players == 0 then │ + init_info_offset = init_info_offset + text_size + g_ui_params.margin │ + │ + alexgames.draw_text(string.format("Player count: %d", #view_others_state.players), │ + g_ui_params.BTN_FG_COLOUR, │ + init_info_offset, g_ui_params.margin, │ + text_size, 1) │ + end │ + │ + buttons.draw(view_others_state.buttons) │ + local y_pos = g_ui_params.margin + text_size + init_info_offset │ + for i, player_info in ipairs(view_others_state.players) do │ + if view_others_state.last_player_min_bet == i then │ + local line_y_pos = y_pos - math.floor(g_ui_params.padding/2) - text_size │ + draw_more.draw_dashed_line(g_ui_params.BTN_FG_COLOUR, 1, nil, nil, │ + line_y_pos, g_ui_params.margin, │ + line_y_pos, g_ui_params.board_width - g_ui_params.margin) │ + end │ + local text_colour │ + if player_info.folded then │ + text_colour = g_ui_params.BTN_FG_COLOUR_FADED │ + else │ + text_colour = g_ui_params.BTN_FG_COLOUR │ + end │ + local x_pos = g_ui_params.margin │ + if i == view_others_state.player_turn then │ + alexgames.draw_text(CURRENT_PLAYER_TEXT_ICON, text_colour, │ + y_pos, x_pos, text_size, 1) │ + end │ + x_pos = x_pos + CURRENT_PLAYER_ICON_WIDTH │ + │ + alexgames.draw_text(player_info.name, text_colour, │ + y_pos, x_pos, text_size, 1) │ + x_pos = x_pos + PLAYER_NAME_WIDTH │ + │ + if player_info.last_action ~= nil then │ + local status = get_player_status(player_info) │ + alexgames.draw_text(status, text_colour, │ + y_pos, x_pos, text_size, 1) │ + end │ + x_pos = x_pos + PLAYER_ACTION_WIDTH │ + │ + x_pos = x_pos + PLAYER_CHIPS_WIDTH │ + alexgames.draw_text(string.format("%4d", player_info.chips), text_colour, │ + y_pos, x_pos, text_size, -1) │ + │ + y_pos = y_pos + text_size + g_ui_params.padding │ + end │ + end │ + │ + view_others_state.handle_user_clicked = function (view_others_state, pos_y, pos_x) │ + buttons.on_user_click(view_others_state.buttons, pos_y, pos_x) │ + end │ + │ + view_others_state.update = function (view_others_state, game_state) │ + print("Updating view others state...") │ + view_others_state.min_bet = game_state.min_bet │ + view_others_state.pots = game_state.pots │ + view_others_state.players = game_state.players │ + view_others_state.player_turn = game_state.player_turn │ + view_others_state.last_player_min_bet = game_state.last_player_min_bet │ + │ + end │ + │ + return view_others_state │ +end │ + │ +return view_others │ +-- Author: Alex Barry (github.com/alexbarry) │ +local control = {} │ + │ +local buttons = require("libs/ui/buttons") │ +local alexgames = require("alexgames") │ + │ +local core = require("games/poker_chips/poker_chips_core") │ + │ +local BTN_ID_VIEW_OTHERS_CHIPS = "view_others_chips" │ +local BTN_ID_CHECK = "check" │ +local BTN_ID_CALL = "call" │ +local BTN_ID_RAISE = "raise" │ +local BTN_ID_FOLD = "fold" │ + │ +local g_ui_params = nil │ + │ +local function new_button(buttons_state, params) │ + if params.callback == nil then │ + error(string.format("missing callback"), 2) │ + end │ + buttons.new_button(buttons_state, { │ + id = params.id, │ + text = params.text, │ + bg_colour = g_ui_params.BTN_BG_COLOUR, │ + fg_colour = g_ui_params.BTN_FG_COLOUR, │ + outline_colour = g_ui_params.BTN_OUTLINE_COLOUR, │ + outline_width = g_ui_params.BTN_OUTLINE_WIDTH, │ + btn_shape = params.btn_shape, │ + shape_param = params.shape_param, │ + text_size = g_ui_params.BTN_TEXT_SIZE, │ + padding = padding, │ + y_start = params.y_start, │ + x_start = params.x_start, │ + y_end = params.y_end, │ + x_end = params.x_end, │ + callback = params.callback, │ + │ + }) │ +end │ + │ +local function btn_pressed(control_state, btn_id) │ + if btn_id == BTN_ID_VIEW_OTHERS_CHIPS then │ + control_state.move_to_view_others_state() │ + elseif btn_id == BTN_ID_CHECK then │ + control_state.move_to_view_others_state() │ + control_state.add_action({ action = core.ACTION_CHECK }) │ + elseif btn_id == BTN_ID_CALL then │ + control_state.move_to_view_others_state() │ + control_state.add_action({ action = core.ACTION_CALL }) │ + elseif btn_id == BTN_ID_RAISE then │ + control_state.move_to_raise_state() │ + elseif btn_id == BTN_ID_FOLD then │ + control_state.move_to_view_others_state() │ + control_state.add_action({ action = core.ACTION_FOLD }) │ + end │ +end │ + │ +local function set_game_state(control_state, game_state, player_idx) │ + buttons.set_enabled(control_state.buttons, BTN_ID_CHECK, game_state.min_bet == 0) │ + buttons.set_enabled(control_state.buttons, BTN_ID_CALL, game_state.min_bet > 0) │ + local call_text = "Call" │ + if game_state.min_bet > 0 then │ + call_text = call_text .. string.format(" (+$%d)", game_state.min_bet) │ + end │ + buttons.set_text(control_state.buttons, BTN_ID_CALL, call_text) │ +end │ + │ +function control.init(ui_params, control_params) │ + g_ui_params = ui_params │ + local control_state = {} │ + control_state.buttons = buttons.new_state() │ + control_state.move_to_raise_state = control_params.move_to_raise_state │ + control_state.move_to_view_others_state = control_params.move_to_view_others_state │ + control_state.add_action = control_params.add_action │ + │ + local callback = function (btn_id) btn_pressed(control_state, btn_id) end │ + local btn_infos = { │ + { id = BTN_ID_VIEW_OTHERS_CHIPS, text = 'View others\' chips', extra_space = g_ui_params.big_padding }, │ + { id = BTN_ID_CHECK, text = 'Check' }, │ + { id = BTN_ID_CALL, text = 'Call' }, │ + { id = BTN_ID_RAISE, text = 'Raise' }, │ + { id = BTN_ID_FOLD, text = 'Fold' }, │ + } │ + local y_pos = 100 │ + local button_height = math.floor((g_ui_params.board_height - y_pos - g_ui_params.big_padding) / 5) - g_ui_params.padding │ + for btn_idx, btn_info in ipairs(btn_infos) do │ + new_button(control_state.buttons, { │ + id = btn_info.id, │ + text = btn_info.text, │ + y_start = y_pos, │ + y_end = y_pos + button_height, │ + x_start = g_ui_params.margin, │ + x_end = g_ui_params.board_width - g_ui_params.margin, │ + callback = callback, │ + }) │ + y_pos = y_pos + button_height + g_ui_params.padding │ + if btn_info.extra_space ~= nil then │ + y_pos = y_pos + btn_info.extra_space │ + end │ + end │ + │ + control_state.draw = function (control_state) │ + buttons.draw(control_state.buttons) │ + end │ + │ + control_state.handle_user_clicked = function (control_state, y_pos, x_pos) │ + buttons.on_user_click(control_state.buttons, y_pos, x_pos) │ + end │ + │ + control_state.update = function (control_state, game_state, player_idx) │ + set_game_state(control_state, game_state, player_idx) │ + end │ + │ + return control_state │ +end │ + │ +return control │ +local core = {} │ + │ +local cards = require("libs/cards/cards") │ + │ +core.NUM_PLAY_COLUMNS = 7 │ +core.NUM_GOAL_STACKS = cards.NUM_SUITS │ + │ + │ +core.ACTION_MOVE = 1 │ +core.ACTION_DECK_NEXT = 2 │ + │ +core.SECTION_PLAY_COLUMN_UNREVEALED = 1 │ +core.SECTION_PLAY_COLUMN_STAGING = 2 │ +core.SECTION_DECK_UNREVEALED = 3 │ +core.SECTION_DECK_DRAW = 4 │ +core.SECTION_DECK_DISCARD = 5 │ +core.SECTION_GOAL_STACKS = 6 │ +core.SECTION_LAST = core.SECTION_GOAL_STACKS │ + │ +core.DRAW_TYPE_ONE = 1 │ +core.DRAW_TYPE_THREE = 3 │ + │ +-- height and width of a square that the user is allowed to move │ +-- their touch/mouse inside before their gesture is interpreted as │ +-- moving, rather than just a single click. │ +local MAX_MOVE_FOR_CLICK = 2 │ + │ +function core.new_state_from_board_state(num_players, board_state) │ + local state = board_state │ + state.player_count = num_players │ + state.players = {} │ + │ + for i=1,num_players do │ + state.players[i] = { │ + y = 0, │ + x = 0, │ + │ + y_card_offset = 0, │ + x_card_offset = 0, │ + holding = {}, │ + holding_src = nil, │ + holding_src_col = nil, │ + │ + moved = false, │ + } │ + end │ + return state │ +end │ + │ +function core.new_board_state(draw_type, params) │ + local deck_unrevealed = cards.new_deck() │ + │ + local seed_x, seed_y │ + if params.seed_x and params.seed_y then │ + seed_x, seed_y = math.randomseed(params.seed_x, params.seed_y) │ + else │ + seed_x, seed_y = math.randomseed() │ + end │ + cards.shuffle(deck_unrevealed) │ + │ + local board_state = { │ + draw_type = draw_type, │ + deck_unrevealed = deck_unrevealed, │ + deck_discard = {}, │ + │ + -- Cards taken from the deck, shown to the user. │ + -- In draw one, this is only ever zero or one card. │ + -- In draw three, this can be zero to three cards. │ + -- The card at the end of the list is the one that is on "top" │ + -- and the user can try to move. │ + deck_draw = {}, │ + │ + play_columns_unrevealed = {}, │ + play_columns_staging = {}, │ + goal_stacks = {}, │ + players = {}, │ + │ + seed_x = seed_x, │ + seed_y = seed_y, │ + } │ + │ + for i=1,core.NUM_GOAL_STACKS do │ + board_state.goal_stacks[i] = {} │ + end │ + │ + for i=1,core.NUM_PLAY_COLUMNS do │ + board_state.play_columns_unrevealed[i] = {} │ + board_state.play_columns_staging[i] = {} │ + for j=2,i do │ + local card = table.remove(board_state.deck_unrevealed) │ + table.insert(board_state.play_columns_unrevealed[i], card) │ + end │ + local card = table.remove(board_state.deck_unrevealed) │ + table.insert(board_state.play_columns_staging[i], card) │ + end │ + │ + board_state.move_count = 0 │ + board_state.time_elapsed = 0 │ + │ + return board_state │ +end │ + │ +function core.game_won(state) │ + if state == nil then return false end │ + │ + if #state.goal_stacks ~= core.NUM_GOAL_STACKS then │ + error(string.format("Expected num goal stacks (%d) to be equal to %d", #state.goal_stacks, core.NUM_GOAL_STACKS)) │ + end │ + │ + for _, goal_stack in ipairs(state.goal_stacks) do │ + if #goal_stack ~= cards.NUM_VALS then │ + return false │ + end │ + end │ + │ + return true │ +end │ + │ +function core.new_game(num_players, draw_type, params) │ + local board_state = core.new_board_state(draw_type, params) │ + return core.new_state_from_board_state(num_players, board_state) │ +end │ + │ +function core.print_state(state) │ + print('{') │ + for i=1,#state.goal_stacks do │ + print(string.format('goal_stack[%d] = %s,', i, cards.card_ary_to_string(state.goal_stacks[i]))) │ + end │ + print(string.format('deck_unrevealed = %s,', cards.card_ary_to_string(state.deck_unrevealed))) │ + print(string.format('deck_draw = %s,', cards.card_ary_to_string(state.deck_draw))) │ + print(string.format('deck_discard = %s,', cards.card_ary_to_string(state.deck_discard))) │ + for i=1,core.NUM_PLAY_COLUMNS do │ + print(string.format('play_unrevealed[%d] = %s,', i, cards.card_ary_to_string(state.play_columns_unrevealed[i]))) │ + print(string.format('play_revealed[%d] = %s,', i, cards.card_ary_to_string(state.play_columns_staging[i]))) │ + end │ + print('}') │ +end │ + │ +function core.copy_state(state_orig) │ + local state_copy = {} │ + state_copy.draw_type = state_orig.draw_type │ + state_copy.player_count = state_orig.player_count │ + state_copy.move_count = state_orig.move_count │ + state_copy.time_elapsed = state_orig.time_elapsed │ + state_copy.deck_unrevealed = cards.copy_card_ary(state_orig.deck_unrevealed) │ + state_copy.deck_draw = cards.copy_card_ary(state_orig.deck_draw) │ + state_copy.deck_discard = cards.copy_card_ary(state_orig.deck_discard) │ + state_copy.play_columns_unrevealed = cards.copy_card_ary_ary(state_orig.play_columns_unrevealed) │ + state_copy.play_columns_staging = cards.copy_card_ary_ary(state_orig.play_columns_staging) │ + state_copy.goal_stacks = cards.copy_card_ary_ary(state_orig.goal_stacks) │ + state_copy.players = {} │ + for i, player_state in ipairs(state_orig.players) do │ + state_copy.players[i] = {} │ + state_copy.players[i].y = player_state.y │ + state_copy.players[i].x = player_state.x │ + state_copy.players[i].holding = cards.copy_card_ary(player_state.holding) │ + state_copy.players[i].holding_src = player_state.holding_src │ + state_copy.players[i].holding_src_col = player_state.holding_src_col │ + state_copy.players[i].moved = moved │ + end │ + return state_copy │ +end │ + │ +function core.get_held_cards(state, player) │ + return state.players[player].holding │ +end │ + │ +-- pos_info = { │ +-- section_type = core.SECTION_PLAY_*, │ +-- col = int, │ +-- } │ +function core.can_place_card(state, held_cards, pos_info) │ + if pos_info == nil then │ + return false │ + end │ + │ + local held_card_top = nil │ + if #held_cards == 0 then │ + return false │ + else │ + held_card_top = held_cards[1] │ + end │ + │ + if pos_info.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ + if #state.play_columns_staging[pos_info.col] > 0 then │ + local dst_card_top = state.play_columns_staging[pos_info.col][#state.play_columns_staging[pos_info.col]] │ + return (cards.suit_is_red(dst_card_top.suit) ~= cards.suit_is_red(held_card_top.suit) and │ + held_card_top.val == dst_card_top.val - 1) │ + else │ + return held_card_top.val == cards.KING │ + end │ + elseif pos_info.section_type == core.SECTION_GOAL_STACKS then │ + if #held_cards > 1 then │ + return false │ + end │ + if #state.goal_stacks[pos_info.col] == 0 then │ + return held_card_top.val == cards.ACE │ + else │ + local dst_card_top = state.goal_stacks[pos_info.col][#state.goal_stacks[pos_info.col]] │ + return (held_card_top.suit == dst_card_top.suit and held_card_top.val == dst_card_top.val + 1) │ + end │ + else │ + print("can_place_card: unhandled section_type", pos_info.section_type) │ + return false │ + end │ +end │ + │ +function core.handle_mousemove(state, player, pos_y, pos_x) │ + local player = state.players[player] │ + player.y = pos_y │ + player.x = pos_x │ + │ + if player.y_start ~= nil and math.abs(player.y_start - pos_y) > MAX_MOVE_FOR_CLICK or │ + player.x_start ~= nil and math.abs(player.x_start - pos_x) > MAX_MOVE_FOR_CLICK then │ + player.moved = true │ + end │ +end │ + │ +function core.get_card_ary(state, section_type, col) │ + -- TODO: change all references to this enum │ + if section_type == core.SECTION_DECK_DRAW then │ + return state.deck_draw │ + elseif section_type == core.SECTION_PLAY_COLUMN_STAGING then │ + return state.play_columns_staging[col] │ + elseif section_type == core.SECTION_GOAL_STACKS then │ + return state.goal_stacks[col] │ + else │ + error(string.format("get_card_ary section_type %s unexpected", section_type)) │ + end │ +end │ + │ +function core.next_in_deck(state) │ + -- This can be confusing: for most lists of cards, we always draw from the end. │ + -- For the case where the user clicks the deck, remove from end of deck_unrevealed, and insert at end of deck_draw │ + -- When moving cards from deck_draw to deck_discard, remove from beginning of deck_draw, but insert at end of deck_discard. │ + -- If the player runs out of deck_discard cards, draw from end of deck_discard. │ + if #state.deck_unrevealed > 0 then │ + while #state.deck_draw > 0 do │ + table.insert(state.deck_discard, table.remove(state.deck_draw, 1)) │ + end │ + for _=1,state.draw_type do │ + if #state.deck_unrevealed == 0 then │ + goto draw_from_deck -- continue │ + end │ + local card = table.remove(state.deck_unrevealed) │ + table.insert(state.deck_draw, card) │ + ::draw_from_deck:: │ + end │ + else │ + while #state.deck_draw > 0 do │ + table.insert(state.deck_discard, table.remove(state.deck_draw, 1)) │ + --table.insert(state.deck_discard, table.remove(state.deck_draw)) │ + end │ + │ + while #state.deck_discard > 0 do │ + table.insert(state.deck_unrevealed, table.remove(state.deck_discard)) │ + end │ + end │ + core.inc_move_count(state) │ +end │ + │ +function core.handle_mouse_down(player, state, pos_info) │ + local rc = false │ + if pos_info ~= nil then │ + state.players[player].y = pos_info.y │ + state.players[player].x = pos_info.x │ + state.players[player].y_start = pos_info.y │ + state.players[player].x_start = pos_info.x │ + end │ + │ + state.players[player].moved = false │ + │ + if pos_info == nil then │ + -- pass │ + elseif pos_info.section_type == core.SECTION_DECK_UNREVEALED then │ + core.next_in_deck(state) │ + rc = true │ + elseif #state.players[player].holding == 0 then │ + if pos_info.section_type == core.SECTION_PLAY_COLUMN_UNREVEALED then │ + if #state.play_columns_staging[pos_info.col] == 0 and │ + #state.play_columns_unrevealed[pos_info.col] > 0 then │ + local card = table.remove(state.play_columns_unrevealed[pos_info.col]) │ + table.insert(state.play_columns_staging[pos_info.col], card) │ + end │ + elseif pos_info.section_type == core.SECTION_DECK_DRAW then │ + if #state.deck_draw > 0 then │ + local card = table.remove(state.deck_draw) │ + state.players[player].holding = {card} │ + state.players[player].holding_src = pos_info.section_type │ + print(string.format("player picked up cards %s", cards.card_ary_to_string(state.players[player].holding))) │ + end │ + elseif pos_info.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ + local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ + if #stack > 0 then │ + state.players[player].holding = {} │ + while #stack >= pos_info.idx do │ + table.insert(state.players[player].holding, table.remove(stack, pos_info.idx)) │ + end │ + state.players[player].holding_src = pos_info.section_type │ + state.players[player].holding_src_col = pos_info.col │ + end │ + elseif pos_info.section_type == core.SECTION_GOAL_STACKS then │ + local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ + if #stack > 0 then │ + state.players[player].holding = {table.remove(stack)} │ + state.players[player].holding_src = pos_info.section_type │ + state.players[player].holding_src_col = pos_info.col │ + end │ + end │ + end │ + │ + if pos_info ~= nil and pos_info.card_src_y ~= nil and pos_info.card_src_x ~= nil then │ + state.players[player].y_card_offset = pos_info.y - pos_info.card_src_y │ + state.players[player].x_card_offset = pos_info.x - pos_info.card_src_x │ + end │ + return rc │ +end │ + │ +local function restore_card(state, player) │ + local player_state = state.players[player] │ + local stack = core.get_card_ary(state, player_state.holding_src, player_state.holding_src_col) │ + while #player_state.holding > 0 do │ + local card = table.remove(player_state.holding, 1) │ + table.insert(stack, card) │ + end │ +end │ + │ +function core.move_held_cards_to_dst(state, player, pos_info) │ + local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ + local player_state = state.players[player] │ + while #player_state.holding > 0 do │ + local card = table.remove(player_state.holding, 1) │ + table.insert(stack, card) │ + end │ +end │ + │ +function core.inc_move_count(state) │ + if state.move_count ~= nil then │ + state.move_count = state.move_count + 1 │ + end │ +end │ + │ +function core.update_time_elapsed(state, dt_ms) │ + if state == nil then return end │ + if state.time_elapsed == nil then │ + return │ + end │ + │ + if core.game_won(state) then │ + return │ + end │ + │ + if state.last_time_elapsed_update == nil then │ + state.last_time_elapsed_update = 0 │ + end │ + state.last_time_elapsed_update = state.last_time_elapsed_update + dt_ms │ + if state.last_time_elapsed_update >= 1000 then │ + state.last_time_elapsed_update = state.last_time_elapsed_update - 1000 │ + state.time_elapsed = state.time_elapsed + 1 │ + end │ +end │ + │ +function core.handle_mouse_up(player, state, pos_info) │ + local rc = false │ + local player_state = state.players[player] │ + if #player_state.holding == 0 then │ + --print("player not holding anything") │ + goto done │ + end │ + │ + if not player_state.moved then │ + --print("player not moved") │ + if pos_info == nil then │ + print("hitting this case") │ + restore_card(state, player) │ + goto done │ + end │ + │ + -- TODO clean this up... need to put the card back before we attempt an auto move. │ + local stack = core.get_card_ary(state, player_state.holding_src, player_state.holding_src_col) │ + while #player_state.holding > 0 do │ + local card = table.remove(player_state.holding, 1) │ + table.insert(stack, card) │ + end │ + player_state.holding = {} │ + player_state.holding_src = nil │ + │ + if pos_info.section_type == core.SECTION_PLAY_COLUMN_UNREVEALED then │ + pos_info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ + end │ + │ + -- print("trying to auto move card") │ + rc = core.auto_move_card(player, state, pos_info) │ + goto done │ + end │ + │ + if core.can_place_card(state, core.get_held_cards(state, player), pos_info) then │ + --print("can place card...") │ + core.move_held_cards_to_dst(state, player, pos_info) │ + if #state.deck_draw == 0 and #state.deck_discard > 0 then │ + local card = table.remove(state.deck_discard) │ + table.insert(state.deck_draw, card) │ + end │ + rc = true │ + else │ + --print("can not place card, restoring...") │ + restore_card(state, player) │ + end │ + player_state.holding = {} │ + player_state.holding_src = nil │ + │ + │ + ::done:: │ + │ + if rc then │ + core.inc_move_count(state) │ + end │ + state.players[player].y_card_offset = 0 │ + state.players[player].x_card_offset = 0 │ + return rc │ + │ +end │ + │ +function core.copy_pos_info(pos_info) │ + local new_pos_info = { │ + section_type = pos_info.section_type, │ + col = pos_info.col, │ + idx = pos_info.idx, │ + cards = pos_info.cards, │ + } │ + return new_pos_info │ +end │ + │ +function core.copy_move(move) │ + local new_move = { │ + src = core.copy_pos_info(move.src), │ + dst = core.copy_pos_info(move.dst), │ + } │ + return new_move │ +end │ + │ +function core.handle_move(state, player, move) │ + assert(#state.players[player].holding == 0) │ + core.handle_mouse_down(player, state, move.src) │ + assert(#state.players[player].holding >= 1) │ + │ + if move.src.cards ~= nil then │ + assert(cards.cards_eq(state.players[player].holding[1], move.src.cards[1])) │ + end │ + state.players[player].moved = true -- TODO CLEAN UP │ + local rc = core.handle_mouse_up(player, state, move.dst) │ + assert(#state.players[player].holding == 0) │ + │ + -- Click to reveal any cards that can now be revealed in the play columns │ + if move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + #state.play_columns_staging[move.src.col] == 0 and │ + #state.play_columns_unrevealed[move.src.col] > 0 then │ + local new_src = { section_type = core.SECTION_PLAY_COLUMN_UNREVEALED, col = move.src.col } │ + core.handle_mouse_down(player, state, new_src ) │ + core.handle_mouse_up(player, state, new_src ) │ + assert(#state.players[player].holding == 0) │ + end │ + │ + return rc │ +end │ + │ +local function get_card_from_pos_info(state, pos_info) │ + local ary = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ + if #ary == 0 then │ + return nil │ + end │ + │ + return ary[#ary] │ +end │ + │ +local function find_auto_move_card_spot(state, pos_info) │ + local card = get_card_from_pos_info(state, pos_info) │ + │ + if card == nil then │ + return │ + end │ + │ + for i, stack in ipairs(state.goal_stacks) do │ + if card.val == cards.ACE then │ + if #stack == 0 then │ + return i │ + end │ + elseif #stack > 0 and stack[#stack].suit == card.suit then │ + if stack[#stack].val == card.val - 1 then │ + return i │ + else │ + return nil │ + end │ + end │ + end │ + return nil │ +end │ + │ +function core.auto_move_card(player, state, pos_info) │ + local rc = false │ + local idx = find_auto_move_card_spot(state, pos_info) │ + if idx ~= nil then │ + local card = table.remove(core.get_card_ary(state, pos_info.section_type, pos_info.col)) │ + table.insert(state.goal_stacks[idx], card) │ + rc = true │ + end │ + │ + -- If card moved was the last draw card, put one from the discard pile on the draw pile. │ + if pos_info.section_type == core.SECTION_DECK_DRAW and #state.deck_draw == 0 and #state.deck_discard > 0 then │ + local card = table.remove(state.deck_discard) │ + table.insert(state.deck_draw, card) │ + end │ + return rc │ +end │ + │ +function core.autocomplete_available(state) │ + return core.play_cols_unrevealed_empty(state) │ +end │ + │ +function core.play_cols_unrevealed_empty(state) │ + for i=1,core.NUM_PLAY_COLUMNS do │ + if #state.play_columns_unrevealed[i] > 0 then │ + return false │ + end │ + end │ + return true │ +end │ + │ +function core.get_autocomplete_move_list(state_orig) │ + -- TODO there is a bug here where it doesn't check the last card │ + -- if the deck only has one card in it? Something like that │ + -- I tried the autocomplete feature and it got all the way to the end, │ + -- but there was a single king left in the deck that it couldn't find │ + │ + -- TODO uncomment below │ + if false then │ + -- if not core.autocomplete_available(state_orig) then │ + print("autocomplete not available") │ + return │ + end │ + │ + local move_list = {} │ + │ + local state_copy = core.copy_state(state_orig) │ + │ + local changed = true │ + while changed do │ + ::play_columns_loop:: │ + changed = false │ + for i,_ in ipairs(state_copy.play_columns_staging) do │ + local src_pos_info = { │ + section_type = core.SECTION_PLAY_COLUMN_STAGING, │ + col = i, │ + } │ + local idx = find_auto_move_card_spot(state_copy, src_pos_info) │ + if idx ~= nil then │ + local dst_pos_info = { │ + section_type = core.SECTION_GOAL_STACKS, │ + col = idx, │ + } │ + table.insert(move_list, { move = core.ACTION_MOVE, src = src_pos_info, dst = dst_pos_info }) │ + local card = table.remove(core.get_card_ary(state_copy, src_pos_info.section_type, src_pos_info.col)) │ + table.insert(state_copy.goal_stacks[idx], card) │ + changed = true │ + end │ + end │ + if changed then │ + goto play_columns_loop │ + end │ + │ + │ + --local deck_size_start = #state_copy.deck_unrevealed + #state_copy.deck_draw + #state_copy.deck_discard │ + --local deck_pos_start = #state_copy.deck_discard │ + --local deck_pos_end = nil │ + --if deck_size_start > 0 then │ + -- deck_pos_end = (deck_pos_start - 1) % deck_size_start │ + --else │ + -- deck_pos_end = 0 │ + --end │ + local deck_pos_counter = 0 │ + local deck_pos_counter_end = math.ceil((#state_copy.deck_unrevealed + #state_copy.deck_draw + #state_copy.deck_discard)/state_copy.draw_type) │ + │ + while true do │ + ::next_deck:: │ + local src_pos_info = { │ + section_type = core.SECTION_DECK_DRAW, │ + col = 1, │ + } │ + local idx = find_auto_move_card_spot(state_copy, src_pos_info) │ + │ + if idx == nil then │ + deck_pos_counter = deck_pos_counter + 1 │ + -- TODO loop forever here to test error handling on OOM │ + if deck_pos_counter <= deck_pos_counter_end then │ + table.insert(move_list, { move = core.ACTION_DECK_NEXT }) │ + core.next_in_deck(state_copy) │ + goto next_deck │ + end │ + else │ + local dst_pos_info = { │ + section_type = core.SECTION_GOAL_STACKS, │ + col = idx, │ + } │ + table.insert(move_list, { move = core.ACTION_MOVE, src = src_pos_info, dst = dst_pos_info }) │ + local card = table.remove(core.get_card_ary(state_copy, src_pos_info.section_type, src_pos_info.col)) │ + table.insert(state_copy.goal_stacks[idx], card) │ + changed = true │ + goto play_columns_loop │ + end │ + break │ + end │ + end │ + return move_list │ +end │ + │ +function core.autocomplete(state, handle_move_list) │ + local move_list = core.get_autocomplete_move_list(state) │ + if #move_list > 0 then │ + print("autocomplete moves", #move_list) │ + handle_move_list(move_list) │ + else │ + print("can't autocomplete, no moves found") │ + end │ +end │ + │ +function core.remove_card_from_move(state, pos_info) │ + local ary = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ + return table.remove(ary, #ary) │ +end │ + │ +return core │ +local solve = {} │ + │ +local cards = require("libs/cards/cards") │ +local cards_set = require("libs/cards/cards_set") │ +local utils = require("libs/utils") │ +local core = require("games/solitaire/solitaire_core") │ +local solitaire_serialize = require("games/solitaire/solitaire_serialize") │ + │ +--[[ │ +-- TODO: need to try traversing these trees in real time to see what │ +-- they manage to do in so much wasted time. │ +-- Implement logic to favour moves that I would in real life. │ +-- Also keep an eye out for bad moves that should never be allowed, │ +-- or should be heavily deprioritized. │ +-- To do figure out the most effective ways to fix all this: │ +-- * make nodes reference each other, and │ +-- * make a nicely readable state to ASCII function, likely using the ascii symbols │ +-- for heart/diamond/clubs/spades │ +-- * at each state, print a list of all possible moves, and all the moves that each one led to. │ +-- This should help estimate how much time is being wasted. │ +-- * Allow easily traversing the graph with keyboard shortcuts. │ +--]] │ + │ + │ +local MOVE_POS_DECK = 1 │ +local MOVE_POS_GOAL = 3 │ + │ + │ +--[[ │ +-- These priorities seem to get pretty good results │ +local PRI_MOVE_TO_GOAL_STACK = 1 │ +local PRI_MOVE_KING_TO_EMPTY_COL = 2 │ +local PRI_MOVE_LAST_CARDS_IN_STAGING = 3 │ +local PRI_NORMAL = 3 │ +local PRI_MOVE_FROM_DECK = nil │ +local PRI_MOVE_AROUND_STAGING = nil │ +local PRI_MOVE_FROM_GOAL_STACK = 6 │ +local NUM_PRIORITIES = 6 │ +--]] │ + │ +local PRI_MOVE_TO_GOAL_STACK = 1 │ +local PRI_MOVE_KING_TO_EMPTY_COL = 2 │ +local PRI_MOVE_LAST_CARDS_IN_STAGING = 3 -- TODO increasing this above normal doesn't seem to help │ +local PRI_NORMAL = 3 │ +local PRI_MOVE_FROM_DECK = nil │ +local PRI_MOVE_AROUND_STAGING = nil │ +local PRI_MOVE_FROM_GOAL_STACK = 6 │ +local NUM_PRIORITIES = 6 │ + │ +local SECTION_DECK_POS_INDEPENDENT = core.SECTION_LAST + 1 │ │ +local player = 1 -- TODO │ │ -function Point:str(self) │ - return string.format("(%d,%d)",self.y, self.x) │ -end │ +-- converts suit to an index from 1 to 4. │ +-- Used to choose which goal stack to put cards in, │ +-- to avoid a bunch of duplicate positions │ +local suit_idx_map = {} │ │ -function Point:create (o) │ - o.parent = self │ - return o │ +for i, suit in ipairs(cards.suits) do │ + suit_idx_map[suit] = i │ end │ │ -function Point:add(arg1, arg2) │ - return Point:create{ y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ -end │ +-- TODO: print each move, so I can figure out what is going on. │ +-- keep track of prev move │ │ -local function in_range(game_state, y, x) │ - return (1 <= x and x <= game_state.x_max and │ - 1 <= y and y <= game_state.y_max) │ -end │ │ +--[[ │ +-- Here is my plan for a solitaire solving algorithm: │ +-- make a "state to hash" api that returns a string that represents a unique │ +-- game state-- but returning the same hash for trivial variations of the same state, │ +-- such as: │ +-- * cycling through the deck, and │ +-- * moving a king (or its stack) from one empty column to another │ +-- I think I can simply: │ +-- * always hash the deck as if it were not opened, and │ +-- * have a separate set of columns for kings on an empty column? │ +-- │ +-- │ +-- Then I'd guess that it would be as simple as: │ +-- * loop through all possible moves, recurse...? │ +-- │ +-- Since I'm taking shortcuts, I couldn't consider "reveal next card in deck" as a move. │ +-- So I'd have to loop through every possible move for every possible card in the deck. │ +-- That's not too hard either. │ +-- │ +-- Then that's it? Return true once it's possible to reach a state where all the unrevealed │ +-- cards are revealed? │ +--]] │ │ -local dirs = { │ - Point:create{y = 0, x = 1}, │ - Point:create{y = 0, x =-1}, │ - Point:create{y = 1, x = 0}, │ - Point:create{y =-1, x = 0}, │ -} │ +local function section_type_to_string(section_type) │ + local type_to_str = { │ + [core.SECTION_PLAY_COLUMN_UNREVEALED] = 'PLAY_COL_U', │ + [core.SECTION_PLAY_COLUMN_STAGING] = 'PLAY_COL', │ + [core.SECTION_GOAL_STACKS] = 'GOAL', │ + [SECTION_DECK_POS_INDEPENDENT] = 'DECK_PI', │ + } │ + return type_to_str[section_type] │ +end │ │ -local function make_2d_array(y_len,x_len, val) │ - local visited = {} │ - for y=1,y_len do │ - table.insert(visited, {}) │ - for x=1,x_len do │ - table.insert(visited[y], val) │ - end │ +local function format_int(val, chars) │ + if val == nil then │ + --return string.format("%-*s", chars, val) │ + return string.format("%-" .. chars .. "s", val) │ + else │ + return string.format("%" .. chars .. "d", val) │ end │ - return visited │ end │ │ -local function copy_2d_array(ary) │ - local to_return = {} │ - for y=1, #ary do │ - table.insert(to_return, {}) │ - for x=1, #ary[y] do │ - table.insert(to_return[y], ary[y][x]) │ - end │ +local function pos_to_str(pos) │ + local s = string.format("{%-8s, %s, %s;", │ + section_type_to_string(pos.section_type), format_int(pos.col, 3), format_int(pos.idx, 3)) │ + if pos.card ~= nil then │ + s = s .. string.format(" (%-12s)", cards.card_to_string(pos.card)) │ end │ - return to_return │ + s = s .. "}" │ + return s │ end │ │ -local function has_liberties(game_state, y, x) │ - if game_state.board[y][x] == EMPTY then │ - error(string.format("has_liberties called on empty point y=%d, x=%d", y, x)) │ +local function print_move(prev_state_id, move, next_state_id, is_duplicate_state, info) │ + local dup_string = "" │ + if is_duplicate_state then │ + dup_string = "(visited)" │ end │ + print(string.format("from state id=%3d, src%s -> dst%s to state id %3d%s; %s", │ + prev_state_id, │ + pos_to_str(move.src), │ + pos_to_str(move.dst), │ + next_state_id, dup_string, info)) │ +end │ + │ │ - local this_player = game_state.board[y][x] │ - local visited = make_2d_array(game_state.y_max, game_state.x_max, false) │ - local to_visit = { Point:create{y=y, x=x}} │ - while #to_visit > 0 do │ - local pt = table.remove(to_visit) │ - if not in_range(game_state, pt.y, pt.x) then │ - --continue │ - goto next_iter │ - elseif game_state.board[pt.y][pt.x] == EMPTY then │ - return true │ - elseif visited[pt.y][pt.x] then │ - -- continue │ - goto next_iter │ - elseif game_state.board[pt.y][pt.x] ~= this_player then │ - --continue │ - goto next_iter │ - elseif game_state.board[pt.y][pt.x] == this_player then │ - visited[pt.y][pt.x] = true │ - for _, dir in ipairs(dirs) do │ - local pt2 = Point:add(pt, dir) │ - if in_range(game_state, pt2.y, pt2.x) then │ - table.insert(to_visit, Point:add(pt, dir)) │ - end │ - end │ - end │ - ::next_iter:: │ +local function get_deck_pos_independent(state) │ + local deck = {} │ + for _, card in ipairs(state.deck_revealed) do │ + table.insert(deck, card) │ end │ - return false │ + --for _, card in ipairs(state.deck_unrevealed) do │ + for i=#state.deck_unrevealed,1,-1 do │ + local card = state.deck_unrevealed[i] │ + table.insert(deck, card) │ + end │ + │ + return deck │ end │ │ -local function clear_piece_group(board, y, x) │ - local this_player = board[y][x] │ - local visited = make_2d_array(#board, #board[1], false) │ - local to_visit = { Point:create{y=y, x=x}} │ - while #to_visit > 0 do │ - local pt = table.remove(to_visit) │ - if not in_range(game_state, pt.y, pt.x) then │ - --continue │ - elseif board[pt.y][pt.x] == EMPTY then │ - -- continue │ - elseif visited[pt.y][pt.x] then │ - -- continue │ - elseif board[pt.y][pt.x] ~= this_player then │ - --continue │ - elseif board[pt.y][pt.x] == this_player then │ - board[pt.y][pt.x] = EMPTY │ - visited[pt.y][pt.x] = true │ - for _, dir in ipairs(dirs) do │ - local pt2 = Point:add(pt, dir) │ - if in_range(game_state, pt2.y, pt2.x) then │ - table.insert(to_visit, pt2) │ - end │ + │ +-- Returns the serialized card array for each goal stack │ +-- in the order of cards.suits │ +-- │ +-- The purpose is so that a whole new game isn't simulated │ +-- if the player chose to put the hearts in goal stack 1 or 2 │ +function solve.get_goal_stacks_hash(state) │ + local hash = '' │ + for _, suit in ipairs(cards.suits) do │ + local stack = {} │ + for i=1,#state.goal_stacks do │ + if #state.goal_stacks[i] > 0 and state.goal_stacks[i][1].suit == suit then │ + stack = state.goal_stacks[i] │ end │ end │ + hash = hash .. cards.serialize_card_array(stack) │ end │ + return hash │ end │ │ -local val_to_char = { │ - [0] = ' ', │ - --[1] = 'x', │ - --[2] = 'o', │ - [1] = '\x1b[32mx\x1b[0m', │ - [2] = '\x1b[33mo\x1b[0m', │ -} │ +function solve.state_to_hash(state) │ │ -function go.print_board(board) │ - if #board[1] > 9 then │ - io.write(' ') │ - for x =1, #board[1] do │ - local c = ' ' │ - if x >= 10 then c = string.format('%d', math.floor(x/10)) end │ - io.write(string.format('%s ', c)) │ + local hash = '' │ + │ + hash = hash .. cards.serialize_card_array(get_deck_pos_independent(state)) │ + hash = hash .. solve.get_goal_stacks_hash(state) │ + │ + local empty_stacks = {} │ + │ + local group_empty_stacks = true │ + │ + for i=1,core.NUM_PLAY_COLUMNS do │ + local unrevealed = state.play_columns_unrevealed[i] │ + local staging = state.play_columns_staging[i] │ + if group_empty_stacks and #unrevealed == 0 then │ + table.insert(empty_stacks, staging) │ + staging = {} │ end │ - io.write('\n') │ - end │ - io.write(' ') │ - for x =1, #board[1] do │ - io.write(string.format('%d ', x%10)) │ - end │ - io.write('\n +') │ - for x =1, #board[1] do │ - io.write('-+') │ + hash = hash .. cards.serialize_card_array(unrevealed) │ + hash = hash .. cards.serialize_card_array(staging) │ end │ - io.write('\n') │ - for y = 1, #board do │ - io.write(string.format('%s|', string.char(string.byte('A')+(y-1)))) │ - for x = 1, #board[y] do │ - local c = board[y][x] │ - io.write( val_to_char[c] ) │ - io.write('|') │ - end │ - io.write('\n +') │ - for x =1, #board[y] do │ - io.write('-+') │ + │ + if group_empty_stacks then │ + for _, suit in ipairs(cards.suits) do │ + local suit_stack = {} │ + for _, stack in ipairs(empty_stacks) do │ + if #stack > 0 and stack[1].suit == suit then │ + suit_stack = stack │ + end │ end │ - io.write('\n') │ + hash = hash .. cards.serialize_card_array(suit_stack) │ + end │ end │ -end │ - │ -function go.player_num_to_char(num) │ - return val_to_char[num] │ -end │ │ -function go.new_game(size) │ - game_state = { │ - player_turn = 1, │ - y_max = size, │ - x_max = size, │ - board = make_2d_array(size, size, EMPTY), │ - prev_board = nil, │ - last_move_y = nil, │ - last_move_x = nil, │ - } │ - return game_state │ + return hash │ end │ │ -function if_nil_rt_zero(val) │ - if val == nil then │ - return 0 │ +local function get_card_stack_positions_quick_order(num) │ + if num == 0 then return { } │ + elseif num == 1 then return { 1 } │ else │ - return val │ - end │ -end │ - │ -function go.serialize_state(state) │ - if state == nil then return nil end │ - local bytes = { } │ - bytes[#bytes+1] = string.char(state.player_turn) │ - bytes[#bytes+1] = string.char(state.y_max) │ - bytes[#bytes+1] = string.char(state.x_max) │ - bytes[#bytes+1] = string.char(if_nil_rt_zero(state.last_move_y)) │ - bytes[#bytes+1] = string.char(if_nil_rt_zero(state.last_move_x)) │ - for y=1,state.y_max do │ - for x=1,state.x_max do │ - bytes[#bytes+1] = string.char(state.board[y][x]) │ + local list = { 1, num } │ + for i=2,num-1 do │ + table.insert(list, i) │ end │ + return list │ end │ +end │ │ - if state.prev_board == nil then │ - bytes[#bytes+1] = "x" │ - else │ - for y=1,state.y_max do │ - for x=1,state.x_max do │ - if state.prev_board ~= nil then │ - bytes[#bytes+1] = string.char(state.prev_board[y][x]) │ - end │ +function solve.get_possib_src_cards(state) │ + local src_cards = {} │ + for i=1,core.NUM_PLAY_COLUMNS do │ + local play_col = state.play_columns_staging[i] │ + -- for j=#play_col,1,-1 do │ + for _, j in ipairs(get_card_stack_positions_quick_order(#play_col)) do │ + local card_stack = {} │ + for k=j,#play_col do │ + table.insert(card_stack, play_col[k]) │ end │ + table.insert(src_cards, { │ + section_type = core.SECTION_PLAY_COLUMN_STAGING, │ + col = i, │ + idx = j, │ + cards = card_stack, │ + --card = play_col[j], -- TODO replace with card stack │ + }) │ end │ end │ - --print(string.format("Serialized state into %d bytes", #bytes)) │ - return table.concat(bytes, "") │ -end │ │ -function go.deserialize_state(data) │ - local state = {} │ - if #data < 3 then │ - print(string.format("Bad serialized state received, less than 3 bytes: %d", #data)) │ - return nil │ - end │ - print(string.format("len data = %d, data[1] = %q, data[2] = %q, data[3] = %q", #data, data:sub(1,1), data:sub(2,2), data:sub(3,3))) │ - state.player_turn = string.byte(data:sub(1,1)) │ - state.y_max = string.byte(data:sub(2,2)) │ - state.x_max = string.byte(data:sub(3,3)) │ - state.last_move_y = string.byte(data:sub(4,4)) │ - state.last_move_x = string.byte(data:sub(5,5)) │ - local prev_bytes = 5 │ - if #data ~= prev_bytes + state.y_max * state.x_max + 1 and │ - #data ~= prev_bytes + state.y_max * state.x_max * 2 then │ - print(string.format("Bad serialized state, recvd %d bytes, y_max = %d, x_max = %d", │ - #data, state.y_max, state.x_max)) │ - return nil │ - end │ - state.board = make_2d_array(state.y_max, state.x_max, EMPTY) │ - local idx = prev_bytes + 1 │ - for y=1,state.y_max do │ - for x=1,state.x_max do │ - state.board[y][x] = string.byte(data:sub(idx,idx)) │ - idx = idx + 1 │ + for i=1,core.NUM_GOAL_STACKS do │ + local stack = state.goal_stacks[i] │ + if #stack > 0 then │ + table.insert(src_cards, { │ + section_type = core.SECTION_GOAL_STACKS, │ + col = i, │ + idx = #stack, │ + cards = {stack[#stack]}, │ + }) │ end │ end │ │ - if #data < prev_bytes + state.y_max * state.x_max * 2 then │ - state.prev_board = nil │ - else │ - print(string.format("first byte is %q", data:sub(idx,idx))) │ - state.prev_board = make_2d_array(state.y_max, state.x_max, EMPTY) │ - for y=1,state.y_max do │ - for x=1,state.x_max do │ - state.prev_board[y][x] = string.byte(data:sub(idx,idx)) │ - idx = idx + 1 │ - end │ - end │ + local deck = get_deck_pos_independent(state) │ + for i=1,#deck do │ + table.insert(src_cards, { │ + section_type = SECTION_DECK_POS_INDEPENDENT, │ + col = i, │ + cards = {deck[i]}, │ + }) │ end │ - return state │ + │ + -- return cards_set.card_list_to_set(src_cards) │ + return src_cards │ end │ │ -go.SUCCESS = 0 │ -go.NOT_YOUR_TURN = -1 │ -go.OUT_OF_RANGE = -2 │ -go.OCCUPIED = -3 │ -go.SUICIDE = -4 │ -go.NOT_ALLOWED_KO = -5 │ +function solve.get_possib_dsts(state) │ + local dsts = {} │ │ -local code_to_str = { │ - [go.SUCCESS] = "Success", │ - [go.NOT_YOUR_TURN] = "Not your turn", │ - [go.OUT_OF_RANGE] = "Position out of range", │ - [go.OCCUPIED] = "Position occupied", │ - [go.SUICIDE] = "Position would be suicidal", │ - [go.NOT_ALLOWED_KO] = "Ko rule forbids game returning to this state after two turns", │ -} │ + for i=1,core.NUM_GOAL_STACKS do │ + table.insert(dsts, { │ + section_type = core.SECTION_GOAL_STACKS, │ + col = i │ + }) │ + end │ │ -function go.err_code_to_str(code) │ - return code_to_str[code] │ -end │ + for i=1,core.NUM_PLAY_COLUMNS do │ + table.insert(dsts, { │ + section_type = core.SECTION_PLAY_COLUMN_STAGING, │ + col = i, │ + }) │ + end │ │ + return dsts │ +end │ │ -local function boards_eq(board1, board2) │ - if board2 == nil and board1 ~= nil then │ +function is_useful_move(state, src_info, dst_info) │ + --assert(#src_info.cards > 0) │ + --print(cards.card_array_to_string(src_info.cards)) │ + if src_info.section_type == core.SECTION_GOAL_STACKS and │ + dst_info.section_type == core.SECTION_GOAL_STACKS then │ + return false │ + elseif dst_info.section_type == core.SECTION_GOAL_STACKS and │ + suit_idx_map[src_info.cards[1].suit] ~= dst_info.col then │ + return false │ + -- moving kings around empty columns is not useful │ + elseif src_info.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + dst_info.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + src_info.cards[1].val == cards.KING and │ + #state.play_columns_unrevealed[src_info.col] == 0 then │ return false │ end │ - for y=1,#board1 do │ - for x=1, #board1[1] do │ - if board1[y][x] ~= board2[y][x] then │ - return false │ - end │ - end │ + if dst_info.section_type ~= core.SECTION_GOAL_STACKS then │ + --print("WARNING: SKIPPING DST NON GOAL STACKS MOVE FOR TESTING") │ + --return false │ end │ + │ return true │ end │ │ -local function next_turn(game_state) │ - if game_state.player_turn == 1 then │ - game_state.player_turn = 2 │ - elseif game_state.player_turn == 2 then │ - game_state.player_turn = 1 │ - else │ - error("invalid player turn") │ +function new_move_priority_queue(priorities) │ + local moves = {} │ + for i=1,priorities do │ + table.insert(moves, {}) │ end │ + return moves │ end │ │ -function go.player_move(game_state, player, y, x) │ - if game_state == nil or player == nil or y == nil or x == nil then │ - error(string.format("go.player_move called with nil args: %s %s %s %s", game_state, player, y, x)) │ - end │ - print(string.format("Attempting to move player %d to y=%d, x=%d", player, y, x)) │ - local old_board = copy_2d_array(game_state.board) │ - if player ~= game_state.player_turn then │ - return go.NOT_YOUR_TURN │ +function add_move(moves, priority, move_info) │ + table.insert(moves[priority], move_info) │ +end │ + │ + │ +function has_moves(moves) │ + for _, priority_list in ipairs(moves) do │ + if #priority_list > 0 then return true end │ end │ + return false │ +end │ │ - if not (1 <= x and x <= game_state.x_max) or │ - not (1 <= y and y <= game_state.y_max) then │ - return go.OUT_OF_RANGE │ +function moves_count(moves) │ + local count = 0 │ + for _, queue in ipairs(moves) do │ + count = count + #queue │ end │ + return count │ +end │ │ - if game_state.board[y][x] ~= EMPTY then │ - return go.OCCUPIED │ +function get_move_count_str(moves) │ + s = '{' │ + for i, queue in ipairs(moves) do │ + if i ~= 1 then s = s .. ', ' end │ + s = s .. string.format('%d', #queue) │ end │ + return s .. '}' │ +end │ │ - game_state.board[y][x] = player │ +function get_move_priority(state, move) │ + if move.src.section_type == core.SECTION_GOAL_STACKS then │ + return PRI_MOVE_FROM_GOAL_STACK │ + elseif move.dst.section_type == core.SECTION_GOAL_STACKS then │ + return PRI_MOVE_TO_GOAL_STACK │ │ - -- can't check for liberties here, because │ - -- it's okay to move to a position where you have no liberties │ - -- if you are taking a piece (which results in liberties) │ - --if not has_liberties(game_state, y, x) then │ - -- game_state.board[y][x] = EMPTY │ - -- return go.SUICIDE │ - --end │ + elseif move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + -- interestingly, changing this from #col == 1 to #col == #cards_held │ + -- results in the first few tests going from 250 ms to ~10 ms, │ + -- but test 4 goes up from 420 ms to 3480 s. │ + #state.play_columns_staging[move.src.col] == #move.src.cards then │ + -- #state.play_columns_staging[move.src.col] == 1 then │ + return PRI_MOVE_LAST_CARDS_IN_STAGING │ + elseif PRI_MOVE_KING_TO_EMPTY_COL ~= nil and │ + move.src.cards[1].val == cards.KING and │ + move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + move.dst.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + #state.play_columns_staging[move.dst.col] == 0 then │ + return PRI_MOVE_KING_TO_EMPTY_COL │ + elseif PRI_MOVE_FROM_DECK ~= nil and │ + move.src.section_type == SECTION_DECK_POS_INDEPENDENT then │ + return PRI_MOVE_FROM_DECK │ + elseif PRI_MOVE_AROUND_STAGING ~= nil and │ + move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ + move.dst.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ + return PRI_MOVE_AROUND_STAGING │ + else │ + return PRI_NORMAL │ + end │ +end │ │ - pt = Point:create{y=y, x=x} │ - for _, dir in ipairs(dirs) do │ - local pt2 = Point:add(pt, dir) │ - if not in_range(game_state, pt2.y, pt2.x) then │ - goto next_dir │ - end │ - local dst = game_state.board[pt2.y][pt2.x] │ - if dst == EMPTY or dst == player then │ - goto next_dir │ +function pop_move(moves) │ + for _, queue in ipairs(moves) do │ + if #queue > 0 then │ + return table.remove(queue) │ end │ + end │ + error("popped on empty queue", 2) │ +end │ │ - if not has_liberties(game_state, pt2.y, pt2.x) then │ - clear_piece_group(game_state.board, pt2.y, pt2.x) │ +function merge_moves(moves, new_moves) │ + for priority, queue in ipairs(new_moves) do │ + for _, move_info in ipairs(queue) do │ + table.insert(moves[priority], move_info) │ end │ - ::next_dir:: │ end │ +end │ │ - -- is it just the previous state? │ - if boards_eq(game_state.board, game_state.prev_board) then │ - game_state.board = old_board │ - return go.NOT_ALLOWED_KO │ - end │ │ - if not has_liberties(game_state, y, x) then │ - game_state.board[y][x] = EMPTY │ - return go.SUICIDE │ +function solve.get_possib_moves(state, prev_state_id, state) │ + local moves = new_move_priority_queue(NUM_PRIORITIES) │ + -- print("deck: ", #state.deck_unrevealed, #state.deck_revealed, #get_deck_pos_independent(state)) │ + local srcs = solve.get_possib_src_cards(state) │ + local dsts = solve.get_possib_dsts(state) │ + --print(string.format("found %d possib srcs, %d possib dsts", #srcs, #dsts)) │ + for _, src_info in ipairs(srcs) do │ + for _, dst_info in ipairs(dsts) do │ + local useful_move = false │ + if core.can_place_card(state, src_info.cards, dst_info) and │ + is_useful_move(state, src_info, dst_info) then │ + --table.insert(moves, {src = src_info, dst = dst_info}) │ + local move = {src = src_info, dst = dst_info} │ + local priority = get_move_priority(state, move) │ + local move_info = { │ + prev_state_id = prev_state_id, │ + state = state, -- TODO remove this copy │ + move = move, │ + } │ + add_move(moves, priority, move_info) │ + useful_move = true │ + end │ + --[[ │ + print(string.format("checking if src=%s card=%-13s can be moved to dst=%s: %s, %s", │ + section_type_to_string(src_info.section_type), │ + cards.card_to_string(src_info.card), │ + section_type_to_string(dst_info.section_type), │ + core.can_place_card(state, src_info.card, dst_info), │ + core.can_place_card(state, src_info.card, dst_info) and is_useful_move(state, src_info, dst_info))) │ + ]] │ + end │ end │ - │ - next_turn(game_state) │ - │ - game_state.prev_board = old_board │ - game_state.last_move_y = pt.y │ - game_state.last_move_x = pt.x │ - return go.SUCCESS │ + return moves │ end │ │ -function go.player_pass(game_state, player) │ - if player ~= game_state.player_turn then │ - return go.NOT_YOUR_TURN │ +local function make_move(state, move) │ + move = core.copy_move(move) │ + --core.print_state(state) │ + --print(string.format("attempting to move from %s to %s", pos_to_str(move.src), pos_to_str(move.dst))) │ + if move.src.section_type == SECTION_DECK_POS_INDEPENDENT then │ + while #state.deck_revealed ~= move.src.col do │ + core.handle_mouse_down(player, state, {section_type = core.SECTION_DECK_UNREVEALED }) │ + end │ + --print(cards.card_to_string(state.deck_revealed[#state.deck_revealed]), cards.card_to_string(move.src.card)) │ + assert(cards.cards_eq(state.deck_revealed[#state.deck_revealed], move.src.cards[1])) │ + move.src = {section_type = core.SECTION_DECK_REVEALED} │ end │ │ - next_turn(game_state) │ - return go.SUCCESS │ -end │ - │ -return go │ -local go_ctrl = {} │ --- This file should contain the state for things like deciding │ --- if players have been chosen yet (whether the player choice UI should be shown), │ --- and what player you are │ + core.handle_move(state, player, move) │ │ -function go_ctrl.new_state() │ - return { │ - player_choice = nil, │ - other_player_choice = nil, │ - } │ + for i=1,core.NUM_PLAY_COLUMNS do │ + if #state.play_columns_staging[i] == 0 then │ + assert(#state.play_columns_unrevealed[i] == 0) │ + end │ + end │ end │ │ -function go_ctrl.player_chosen(ctrl_state, player_idx) │ - print(string.format("Storing player choice of %q", player_idx)) │ - ctrl_state.player_choice = player_idx │ +local function get_cards_in_goals(state) │ + local count = 0 │ + for _, goal_stack in ipairs(state.goal_stacks) do │ + count = count + #goal_stack │ + end │ + return count │ end │ │ -function go_ctrl.other_player_chosen(ctrl_state, player_idx) │ - ctrl_state.other_player_choice = player_idx │ +local function get_hidden_cards(state) │ + local count = 0 │ + for _, hidden_stack in ipairs(state.play_columns_unrevealed) do │ + count = count + #hidden_stack │ + end │ + return count │ end │ │ -function go_ctrl.get_player(ctrl_state) │ - return ctrl_state.player_choice │ -end │ │ -function go_ctrl.get_other_player(ctrl_state) │ - return ctrl_state.other_player_choice │ +function solve.new_solve_state(params) │ + local new_solve_state = { │ + params = params, │ + max_goal_cards = 0, │ + min_hidden_cards = nil, │ + best_cards_state = nil, │ + } │ + return new_solve_state │ end │ │ -return go_ctrl │ -local go_ui = {} │ -local go = require("games/go/go_core") │ -local draw_more = require("libs/draw/draw_more") │ -local alexgames = require("alexgames"); │ - │ -local board_line_size = 2 │ +function solve.is_solvable(state, solve_state) │ + if solve_state == nil then │ + solve_state = solve.new_solve_state() │ + end │ + solve_state.start_time = os.time() │ + local seen_states = {} │ + local moves_to_try = new_move_priority_queue(NUM_PRIORITIES) │ │ -local board_size = nil │ -local height = nil │ -local width = nil │ -local piece_space_size = nil │ -local board_piece_size = nil │ + -- TODO I need to think about this. │ + -- * Keep track of the current state. │ + -- * for every possible move from the current state, try │ + -- making each move and see what happens to the state. │ + -- * Then recurse. But stop if you already encountered this state before. │ + -- Return true if all play_columns_unrevealed are empty │ │ -go_ui.BTN_ID_UNDO = "undo" │ -go_ui.BTN_ID_REDO = "redo" │ -go_ui.BTN_ID_PASS = "pass" │ + -- So: │ + -- * store current state in a node, │ + -- * for each possible move, copy state, apply move, check hash. │ + -- * if hash is already in map, skip-- duplicate result. │ + -- * if hash is not in map, then create a new node and repeat │ │ -local function update_undo_redo_btns(session_id) │ - alexgames.set_btn_enabled(go_ui.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ - alexgames.set_btn_enabled(go_ui.BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ -end │ + local new_moves = solve.get_possib_moves(state, 0, state) │ + --print("new_moves init: ", has_moves(new_moves)) │ + merge_moves(moves_to_try, new_moves) │ │ -function go_ui.get_board_piece_size() │ - return board_piece_size │ -end │ + solve_state.counter = 0 │ + solve_state.unique_states_counter = 0 │ + while has_moves(moves_to_try) do │ + --print(string.format("count=%d, unique_states=%d, moves_to_try=%d", counter, unique_states_counter, moves_count(moves_to_try))) │ + solve_state.counter = solve_state.counter + 1 │ + --local move_to_try = table.remove(moves_to_try) │ + local move_to_try = pop_move(moves_to_try) │ + --local move_to_try = table.remove(moves_to_try, 1) │ + local state2 = core.copy_state(move_to_try.state) │ │ -function go_ui.set_board_piece_size(board_piece_size_arg) │ - board_piece_size = board_piece_size_arg │ - piece_space_size = board_size*1.0/(board_piece_size+1) │ -end │ + make_move(state2, move_to_try.move) │ │ -function go_ui.init_ui(session_id, board_piece_size_arg, screen_width, screen_height) │ - board_size = math.min(screen_width, screen_height) │ - height = screen_height │ - width = screen_width │ - go_ui.set_board_piece_size(board_piece_size_arg) │ + if core.play_cols_unrevealed_empty(state2) then │ + return true │ + end │ │ - alexgames.create_btn(go_ui.BTN_ID_UNDO, "Undo", 1) │ - alexgames.create_btn(go_ui.BTN_ID_REDO, "Redo", 1) │ - alexgames.create_btn(go_ui.BTN_ID_PASS, "Pass", 2) │ - alexgames.set_btn_enabled(go_ui.BTN_ID_UNDO, false) │ - alexgames.set_btn_enabled(go_ui.BTN_ID_REDO, false) │ │ - update_undo_redo_btns(session_id) │ -end │ + local state2_hash = solve.state_to_hash(state2) │ │ -function go_ui.update(session_id, board, last_y, last_x) │ │ - alexgames.draw_clear() │ + local is_duplicate_state │ + if seen_states[state2_hash] == nil then │ + solve_state.unique_states_counter = solve_state.unique_states_counter + 1 │ + seen_states[state2_hash] = solve_state.unique_states_counter │ + is_duplicate_state = false │ + else │ + is_duplicate_state = true │ + end │ │ - draw_more.draw_graphic_ul("board", 0, 0, board_size, board_size) │ + local goal_cards = get_cards_in_goals(state2) │ + local hidden_cards = get_hidden_cards(state2) │ + --if goal_cards >= max_goal_cards then │ + if solve_state.min_hidden_cards == nil or hidden_cards <= solve_state.min_hidden_cards then │ + solve_state.max_goal_cards = goal_cards │ + solve_state.min_hidden_cards = hidden_cards │ + solve_state.best_cards_state = core.copy_state(state2) │ + end │ │ - local piece_size = piece_space_size*0.90 │ - piece_size = math.floor(piece_size) │ + assert(#state.players[player].holding == 0) │ + local next_state_id = seen_states[state2_hash] │ + --print(string.format("%3d: %s", next_state_id, utils.binstr_to_hr_str(state2_hash))) │ + --print(string.format("%3d state ser: %s", next_state_id, utils.binstr_to_hr_str(solitaire_serialize.serialize_state(state2)))) │ │ - for i=0, board_piece_size-1 do │ - local y1 = piece_space_size │ - local y2 = board_size - piece_space_size │ - local x1 = piece_space_size*(i+1) │ - local x2 = x1 │ - alexgames.draw_line("#000000", board_line_size, y1, x1, y2, x2) │ - end │ │ - for i=0, board_piece_size-1 do │ - local x1 = piece_space_size │ - local x2 = board_size - piece_space_size │ - local y1 = piece_space_size*(i+1) │ - local y2 = y1 │ - alexgames.draw_line("#000000", board_line_size, y1, x1, y2, x2) │ - end │ + if true or not is_duplicate_state then │ + --print_move(move_to_try.prev_state_id, move_to_try.move, next_state_id, is_duplicate_state, get_cards_in_goals(state2)) │ + end │ │ - for y_idx=0, board_piece_size-1 do │ - for x_idx=0, board_piece_size-1 do │ - local y_pos = piece_space_size/2 + y_idx * piece_space_size │ - local x_pos = piece_space_size/2 + x_idx * piece_space_size │ - local img_id = nil │ - if y_idx > #board or x_idx > #board[1] then │ - error(string.format("update: {y=%d, x=%d} out of range of board size {y=%d,x=%d}", y_idx+1, x_idx+1, #board, #board[1])) │ - end │ - local piece_type = board[y_idx+1][x_idx+1] │ - -- TODO replace 1 and 2 with go.PLAYER1 and go.PLAYER2 │ - if piece_type == go.PLAYER1 then │ - img_id = "piece_black" │ - elseif piece_type == go.PLAYER2 then │ - img_id = "piece_white" │ - end │ - if img_id ~= nil then │ - draw_more.draw_graphic_ul(img_id, y_pos, x_pos, math.floor(piece_size), math.floor(piece_size)) │ + if solve_state.params.update_period ~= nil and │ + solve_state.counter % solve_state.params.update_period == 0 then │ + if solve_state.params.id ~= nil then │ + print(solve_state.params.id) │ end │ + print(string.format("counter %d, min_hidden_cards = %d, max_goal_cards = %d", solve_state.counter, solve_state.min_hidden_cards, solve_state.max_goal_cards)) │ + print(string.format("count=%d, unique_states=%d, moves_to_try=%s", solve_state.counter, solve_state.unique_states_counter, get_move_count_str(moves_to_try))) │ + core.print_state(solve_state.best_cards_state) │ + print(string.format("board_state_ser: %s", utils.binstr_to_hr_str(solitaire_serialize.serialize_board_state(state2)))) │ + collectgarbage("collect") │ + end │ │ + local time_s = os.time() │ + if solve_state.params.timeout_s ~= nil and │ + time_s - solve_state.start_time >= solve_state.params.timeout_s then │ + error("solvable check timed out") │ + end │ │ - if y_idx+1 == last_y and x_idx+1 == last_x then │ - draw_more.draw_graphic_ul("piece_highlight", y_pos, x_pos, math.floor(piece_size), math.floor(piece_size)) │ - end │ + if is_duplicate_state then │ + goto next_move │ end │ + │ + local new_moves = solve.get_possib_moves(state, seen_states[state2_hash], state2) │ + merge_moves(moves_to_try, new_moves) │ + │ + │ + ::next_move:: │ end │ │ - alexgames.draw_refresh() │ - update_undo_redo_btns(session_id) │ + return false │ end │ │ -function go_ui.user_pos_to_piece_idx(pos_y, pos_x) │ - local y_idx = math.floor((pos_y - piece_space_size/2)/piece_space_size) + 1 │ - local x_idx = math.floor((pos_x - piece_space_size/2)/piece_space_size) + 1 │ - local to_return = { │ - y = y_idx, │ - x = x_idx │ - } │ - return to_return │ -end │ │ -return go_ui │ -local two_player = require("libs/multiplayer/two_player") │ -local utils = require("libs/utils") │ -local show_buttons_popup = require("libs/ui/show_buttons_popup") │ +return solve │ │ -local go = require("games/go/go_core") │ -local go_ui = require("games/go/go_ui") │ -local go_ctrl = require("games/go/go_ctrl") │ +local alexgames = require("alexgames") │ │ -local alexgames = require("alexgames"); │ +local core = require("games/solitaire/solitaire_core") │ +local draw = require("games/solitaire/solitaire_draw") │ +local serialize = require("games/solitaire/solitaire_serialize") │ +local utils = require("libs/utils") │ +local storage_helpers = require("libs/serialize/storage_helpers") │ │ --- e.g. either 9x9, 13x13, or 19x19 │ -local go_game_size = 19 │ -local local_multiplayer = nil │ -local session_id = alexgames.get_new_session_id() │ -local state = go.new_game(go_game_size) │ +-- Here is a winnable game state, for testing: │ +-- from the beginning │ +-- http://localhost:1234/?game=solitaire&state=AQEYKy0fJRwWDxUiAzEOIB0wCAkRBBkjGBoTAAAAARABDQEkAgsuAQIDKSEBASwELwAeFwEGBQUqKDMbAQwGByYSFCcyAQoAAAAAgPyBuwD%2f%2fv%2f+AAAAAGVH8nMAAAAAAANT1A%3d%3d │ +-- almost won: │ +-- http://localhost:1234/?game=solitaire&id=tczscg&state=AQEAAAAAAhkyAAIMJQACMwsAAAABJgAAAAALGhscHR4fICEiIyQMDQ4PEBESExQVFhcYCycoKSorLC0uLzAxCwABAgMEBQYHCAkKgK2B1AD%2f%2foAEAAAAAGVH8nMAAAAAAANT1A%3d%3d │ +-- 01 01 00 00 00 00 01 19 00 00 00 00 00 00 00 00 00 00 00 00 0d 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 0d 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 0d 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 80 c9 80 4f 00 ff fe 80 01 00 00 00 00 65 47 f2 73 00 00 00 00 00 03 53 d4 │ │ --- state was received either from another player or │ --- explicitly loaded │ -local state_init = false │ +-- autocomplete testing │ +-- http://localhost:1234/?game=solitaire&id=tczscg&state=AQECKy0BHwEDAAsZMhcwCC4GLAQqAgAGDCUKIxUhAAczCyQJIhQgAAEpAAUmGDEWLwACBR4AAQcEGhscHQcNDg8QERITAicoAgABgPSB1QD%2f%2foADAAAAAGVH8nMAAAAAAANT1A%3d%3d │ │ --- if this is true, then the user explicitly loaded saved state from │ --- URL or history browser, don't prompt them to start a new game │ -local state_loaded = false │ │ -local ctrl_state = go_ctrl.new_state() │ --- TODO have a C API to get height/width of canvas, or maybe │ --- set it? │ -local height = 480 │ -local width = 480 │ -go_ui.init_ui(session_id, go_game_size, width, height) │ -alexgames.send_message("all", "get_state:") │ -alexgames.set_status_msg("Choose piece colour") │ +-- TODO: │ +-- * (WIP) auto complete button for when all hidden cards are revealed │ +-- * (DONE) tap on a card and have it move to goal stacks if possible │ +-- * (not started) (and maybe an option to move it to play columns... some games have this, │ +-- it's nifty but I find I hit it accidentally and feel like I "cheated") │ +-- * (DONE) undo button │ +-- * (DONE, but not working on Sabrina's iPhone??) maybe fix the "pick up cards" offset, so that when │ +-- you press a card its centre isn't │ +-- drawn where your finger is │ +-- * timer, move count, score/points │ +-- * fix bug where auto complete doesn't keep going if deck is closed (all cards are face down) │ +-- * (DONE) disable user input while animation is playing (including pressing animation button a second time!) │ +-- * make animations only "try" to move, not forcefully move the cards │ +-- * use card_offset for dropping cards. Right now, if you drag from the bottom right, if that little piece isn't │ +-- over the destination (even though the centre of the card is), it won't get dropped │ +-- │ +-- Eventually: │ +-- * show if game is winnable or not (should be an option) after every move? │ +-- * have option to only generate winnable games (maybe hardcode a couple hundred at first) │ +-- * the ability to export state to a base 64 string, so you can copy it from your │ +-- phone to computer and vice versa? (Is there any way to leverage the server for this?) │ +-- * high scores / records (fewest moves, fastest time, most points?) │ +-- │ +-- TODO for draw three: │ +-- * need to preserve popup state, save in persistent state: user should not have to switch from default (draw one) to draw three every time │ +-- * allow undo many times, use history browse API? │ +-- * don't save state again on new button presses, only on changes. And not when a card is revealed │ +-- * constantly seeing "invalid session id", need to fix │ +-- * need to disable set_timer_update_ms outside of animations? The game is using a ton of CPU usage when idle... │ │ -local PLAYER_CHOICE_POPUP_ID = "choose_player_colour" │ -local PLAYER_CHOICE_BTNS = { │ - "Black", │ - "White", │ -} │ -local PLAYER_CHOICE_BTNS_MAP = { │ - [0] = go.PLAYER1, │ - [1] = go.PLAYER2, │ -} │ │ -local POPUP_ID_GAME_SIZE_SELECTION = "game_size_sel" │ -local POPUP_GAME_SIZE_SEL_BTNS = { │ - "9x9", │ - "13x13", │ - "19x19", │ -} │ -local POPUP_GAME_SIZE_SEL_BTNS_TO_SIZE = { │ - 9, 13, 19 │ -} │ │ │ -local POPUP_ID_START_NEW_GAME_PROMPT = "new_game_prompt" │ -local POPUP_GAME_SIZE_NEW_GAME_PROMPT = { │ - "Start new game", │ - "Continue saved game", │ -} │ +local session_id = nil │ +local state = nil │ +local g_shown_victory_animation = false │ +local g_anim_timer_handle = nil │ │ -local function get_player() │ - if local_multiplayer then │ - return state.player_turn │ - else │ - return go_ctrl.get_player(ctrl_state) │ - end │ -end │ +local FPS = 60 │ │ -local PLAYER_IDX_TO_BTN_IDX_MAP = utils.reverse_map(PLAYER_CHOICE_BTNS_MAP) │ +-- TODO remove these in favour of the autosaved / history browser state │ +local DATA_ID_STATE = "game_state" │ +local DATA_ID_PREV_STATE = "prev_game_state" │ │ -local OPTION_ID_NEW_GAME = "opt_new_game" │ +local DATA_ID_SHOW_TIME_AND_MOVE_COUNT = "show_time_and_move_count" │ │ --- maps player IP/name to player ID │ -local player_name_to_id = { │ -} │ +local GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT = "opt_show_time_and_move_count" │ │ --- adding test for ko │ +draw.show_move_count_and_elapsed_time = storage_helpers.read_bool(DATA_ID_SHOW_TIME_AND_MOVE_COUNT, true) │ + │ +local POPUP_ID_NEW_GAME = "new_game" │ +local POPUP_ITEM_ID_BTN_START_GAME = 1 │ +local POPUP_ITEM_ID_BTN_CANCEL = 2 │ +local POPUP_ITEM_ID_DRAW_TYPE = 3 │ + │ +-- This is to test what it looks like if the cards are stacked in the highest combination │ +-- right now it's cut off a bit, but might just barely work │ +-- if the number of the card is drawn on the corner of the card │ --[[ │ -state.board = { │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ - { 0, 0, 0, 0, 1, 2, 0, 0, 0}, │ - { 0, 0, 0, 1, 0, 1, 2, 0, 0}, │ - { 0, 0, 0, 0, 1, 2, 0, 0, 0}, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0}, │ +state.play_columns_staging[7][1] = { suit = "spades", val = 13 } │ +state.deck_unrevealed = { │ + { suit = "diamonds", val = 12 }, │ + { suit = "spades", val = 11 }, │ + { suit = "diamonds", val = 10 }, │ + { suit = "spades", val = 9 }, │ + { suit = "diamonds", val = 8 }, │ + { suit = "spades", val = 7 }, │ + { suit = "diamonds", val = 6 }, │ + { suit = "spades", val = 5 }, │ + { suit = "diamonds", val = 4 }, │ + { suit = "spades", val = 3 }, │ + { suit = "diamonds", val = 2 }, │ + { suit = "spades", val = 1 }, │ } │ ---]] │ +]] │ │ -function handle_user_string_input(row_col) │ - local m = row_col:gmatch"(%a+)%s*(%d+)" │ - -- todo raise error if inputs like "aaa5" are given (currently this is interpreted as "a5") │ - local row │ - local col │ - row, col = m() │ - if row == nil or col == nil then │ - return nil │ +local player = 1 │ +local player_count = 1 │ +local touches = {} │ +local active_touch = nil │ + │ +local function draw_board_internal() │ + │ + if core.game_won(state) and not g_shown_victory_animation then │ + print("Player won, showing victory animation") │ + draw.victory_animation(FPS) │ + g_shown_victory_animation = true │ end │ - col = tonumber(col) │ - row = string.byte(row:upper()) - string.byte('A') + 1 │ - local rc = go.player_move(state, get_player(), row, col) │ - return rc │ + draw.draw_state(session_id, state) │ end │ │ -function update() │ - if state ~= nil then │ - go_ui.update(session_id, state.board, state.last_move_y, state.last_move_x) │ +-- TODO should never call the update_animations from anywhere but here, │ +-- and should call draw_board_internal in this file only, never `update` directly │ +function update(dt_ms) │ + if dt_ms == nil then │ + dt_ms = 0 │ end │ + --print(string.format("update(dt_ms=%s)", dt_ms)) │ + core.update_time_elapsed(state, dt_ms) │ + draw.update_animations(state, dt_ms) │ + draw_board_internal() │ end │ │ -function get_user_input() │ - io.write(string.format("Move player %d (%s), enter row letter and column number (e.g. \"E5\")>> ", │ - state.player_turn, go.player_num_to_char(state.player_turn))) │ - local s = io.read("*l") │ - return s │ +function handle_user_clicked(pos_y, pos_x) │ +end │ + │ +function handle_mousemove(pos_y, pos_x) │ + if state == nil then return end │ + draw.set_is_touch_controlled(false) │ + core.handle_mousemove(state, player, pos_y, pos_x) │ + draw_board_internal() │ end │ │ local function save_state() │ - alexgames.save_state(session_id, go.serialize_state(state)) │ + local prev_state_serialized = alexgames.read_stored_data(DATA_ID_STATE) │ + if prev_state_serialized ~= nil then │ + alexgames.store_data(DATA_ID_PREV_STATE, prev_state_serialized) │ + end │ + local state_serialized = serialize.serialize_state(state) │ + alexgames.store_data(DATA_ID_STATE, state_serialized) │ + -- TODO this is now kind of redundant, consider how to remove the old way of saving state │ + alexgames.save_state(session_id, state_serialized) │ end │ │ -function get_state() │ - return go.serialize_state(state) │ +local function load_prev_state() │ +--[[ │ + local prev_state_serialized = alexgames.read_stored_data(DATA_ID_PREV_STATE) │ +--]] │ + print(string.format("loading prev state for session %s", session_id)) │ + -- If the player presses undo, we want all the previous state │ + -- except we want the time elapsed to stay the same. │ + local time_elapsed = state.time_elapsed │ + local prev_state_serialized = alexgames.adjust_saved_state_offset(session_id, -1) │ + if prev_state_serialized ~= nil then │ + draw.stop_move_animations() │ + state = serialize.deserialize_state(prev_state_serialized) │ + state.time_elapsed = time_elapsed │ + update() │ + alexgames.set_status_msg("Loaded previous state") │ + else │ + alexgames.set_status_err("Can not load previous state, not found") │ + end │ end │ │ -function handle_user_clicked(pos_y, pos_x) │ - local pos = go_ui.user_pos_to_piece_idx(pos_y, pos_x) │ - local player = get_player() │ - local rc = go.player_move(state, player, pos.y, pos.x) │ - if rc == go.SUCCESS then │ - if not local_multiplayer then │ - alexgames.send_message("all", string.format("move:%d,%d,%d", player, pos.y, pos.x)); │ - alexgames.set_status_err("") │ +local function add_offset(info) │ + if info ~= nil then │ + local card_pos = draw.get_pos(state, info.section_type, info.col, info.idx) │ + if card_pos ~= nil then │ + info.card_src_y = card_pos.y │ + info.card_src_x = card_pos.x │ end │ - save_state() │ - else │ - alexgames.set_status_err(go.err_code_to_str(rc)) │ end │ - update() │ - update_status_msg_turn(state, ctrl_state) │ end │ │ -local function broadcast_state() │ - alexgames.send_message("all", "state:"..go.serialize_state(state)) │ +local function mouse_evt_id_to_touch_evt(evt_id) │ + if evt_id == 2 then │ + return 'touchstart' │ + elseif evt_id == 1 then │ + return 'touchend' │ + elseif evt_id == 3 then │ + return 'touchcancel' │ + else │ + error("unexpected evt_id ", evt_id) │ + end │ end │ │ -local function set_state(state_arg) │ - print("set_state called") │ - state_init = true │ - state = state_arg │ +local function new_game() │ + alexgames.show_popup(POPUP_ID_NEW_GAME, { │ + title = "New Game", │ + items = { │ + { │ + id = POPUP_ITEM_ID_DRAW_TYPE, │ + item_type = alexgames.POPUP_ITEM_TYPE_DROPDOWN, │ + label = "Draw", │ + options = { "One", "Three" }, │ + }, │ + { │ + id = POPUP_ITEM_ID_BTN_START_GAME, │ + item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ + text = "Start game", │ + }, │ + { │ + id = POPUP_ITEM_ID_BTN_CANCEL, │ + item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ + text = "Cancel", │ + }, │ + }, │ + }) │ end │ │ -function handle_msg_received(src, msg) │ - print("handle_msg_received (from src:" .. src .. "): " .. msg); │ │ - if local_multiplayer then │ - return │ - end │ +local function handle_nil_state_click() │ + new_game() │ +end │ │ - if two_player.handle_msg_received(src, msg) then │ +function handle_mouse_evt(evt_id, pos_y, pos_x) │ + if state == nil then │ + if evt_id == alexgames.MOUSE_EVT_DOWN or evt_id == alexgames.MOUSE_EVT_UP then │ + handle_nil_state_click() │ + end │ return │ end │ - │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ - │ - if header == "move" then │ - local m = payload:gmatch"(%d+),(%d+),(%d+)" │ - local player, row, col │ - player, row, col = m() │ - player = tonumber(player) │ - row = tonumber(row) │ - col = tonumber(col) │ - print(string.format("Received player=%s, row=%s, col=%d", player, row, col)) │ - │ - if player == go_ctrl.get_player(ctrl_state) then │ - -- TODO make UI visible message for this case? │ - print(string.format("Received message for move from wrong player")) │ - return │ + local info = draw.pos_to_action(state, player, pos_y, pos_x, mouse_evt_id_to_touch_evt(evt_id)) │ + add_offset(info) │ + if evt_id == 2 then │ + local rc = core.handle_mouse_down(player, state, info) │ + if rc then │ + save_state() │ end │ - go.player_move(state, player, row, col) │ - alexgames.set_status_err("") │ - update() │ - update_status_msg_turn(state, ctrl_state) │ - save_state() │ - elseif header == "get_state" then │ - broadcast_state() │ - elseif header == "state" then │ - local new_state = go.deserialize_state(payload) │ - -- TODO check with user if they want to overwrite their state with │ - -- this (possibly unsolicited!!) state from the other player │ - set_state(new_state) │ - if go_ui.get_board_piece_size() ~= #new_state.board then │ - go_ui.set_board_piece_size(#new_state.board) │ + elseif evt_id == 1 then │ + local rc = core.handle_mouse_up(player, state, info) │ + if rc then │ + save_state() │ end │ - update() │ - alexgames.set_status_err("") │ - update_status_msg_turn(state, ctrl_state) │ - elseif header == "player_left" and src == "ctrl" then │ - -- do nothing │ - else │ - print("Unexpected message header: \""..header.."\"") │ + elseif evt_id == 3 then │ + -- TODO ideally this should cancel rather than release normally │ + core.handle_mouse_up(player, state, info) │ end │ -end │ │ -local function load_saved_state_offset(move_id_offset) │ - local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ - if serialized_state == nil then │ - error(string.format("adjust_saved_state_offset(offset=%d) returned nil", move_id_offset)) │ - end │ - internal_load_state(session_id, serialized_state) │ - update() │ + draw_board_internal() │ end │ │ -local function handle_pass(player) │ - local rc = go.player_pass(state, player) │ - if rc ~= go.SUCCESS then │ - alexgames.set_status_err(go.err_code_to_str(rc)) │ - else │ - update() │ - save_state() │ - update_status_msg_turn(state, ctrl_state) │ +function handle_touch_evt(evt_id, changed_touches) │ + if state == nil then return handle_nil_state_click() end │ + draw.set_is_touch_controlled(true) │ + local rc = false │ + for _, touch in ipairs(changed_touches) do │ + local y = math.floor(touch.y) │ + local x = math.floor(touch.x) │ + if active_touch == touch.id then │ + if evt_id == 'touchmove' then │ + core.handle_mousemove(state, player, y, x) │ + elseif evt_id == 'touchend' then │ + local info = draw.pos_to_action(state, player, y, x, evt_id) │ + rc = core.handle_mouse_up(player, state, info) │ + active_touch = nil │ + elseif evt_id == 'touchcancel' then │ + rc = core.handle_mouse_up(player, state, nil) │ + active_touch = nil │ + end │ + end │ │ - -- TODO This is lazy, I should implement a string to indicate this move │ - broadcast_state() │ + if evt_id == 'touchstart' then │ + if active_touch == nil then │ + active_touch = touch.id │ + local info = draw.pos_to_action(state, player, y, x, evt_id) │ + add_offset(info) │ + core.handle_mouse_down(player, state, info) │ + end │ + end │ + end │ + draw_board_internal() │ + if rc then │ + save_state() │ end │ end │ │ -function handle_btn_clicked(btn_id) │ - print("handle_btn_clicked: "..btn_id) │ - if btn_id == go_ui.BTN_ID_UNDO then │ - load_saved_state_offset(-1) │ - broadcast_state() │ - elseif btn_id == go_ui.BTN_ID_REDO then │ - load_saved_state_offset(1) │ - broadcast_state() │ - elseif btn_id == go_ui.BTN_ID_PASS then │ - local player = get_player() │ - handle_pass(player) │ +local function on_anim_finished() │ + save_state() │ + if g_anim_timer_handle == nil then │ + print("on_anim_finished: g_anim_timer_handle is nil") │ else │ - error(string.format("Unhandled button pressed \"%s\"", btn_id)) │ + alexgames.delete_timer(g_anim_timer_handle) │ + g_anim_timer_handle = nil │ end │ end │ │ -local function get_player_name(player_arg) │ - for name, player_idx in pairs(player_name_to_id) do │ - if player_arg == player_idx then return name end │ +local function handle_move_list_animation(move_list) │ + │ + if g_anim_timer_handle ~= nil then │ + alexgames.set_status_err("warning: g_anim_timer_handle was not nil on auto complete btn pressed") │ + alexgames.delete_timer(g_anim_timer_handle) │ + g_anim_timer_handle = nil │ end │ - return "nil" │ + g_anim_timer_handle = alexgames.set_timer_update_ms(1000/FPS) │ + │ + draw.animate_moves(state, move_list, on_anim_finished) │ end │ │ -function update_status_msg_turn(state, ctrl_state) │ - if state == nil then return end │ +local function start_new_game(draw_type) │ + g_shown_victory_animation = false │ + session_id = alexgames.get_new_session_id() │ + local params = {} │ + state = core.new_game(player_count, draw_type, params) │ + print(string.format("Starting new game (session=%d) (seed %016x %016x) with state: %s", │ + session_id, state.seed_x, state.seed_y, │ + utils.binstr_to_hr_str(serialize.serialize_board_state(state)))) │ + alexgames.set_status_msg(string.format("Generated new grame with seed %x %x", state.seed_x, state.seed_y)) │ + draw.stop_move_animations() │ + save_state() │ + draw_board_internal() │ +end │ │ - local display_name = go.player_idx_to_colour_name(state.player_turn) │ - if not local_multiplayer then │ - display_name = string.format("%s (%s)", display_name, get_player_name(state.player_turn)) │ +-- TODO do this in C API instead │ +local function key_val_list_to_map(list) │ + local map = {} │ + for _, item in ipairs(list) do │ + print(string.format("key=%s, vale=%s", item.id, item.selected)) │ + map[item.id] = item.selected │ end │ - alexgames.set_status_msg(string.format("Waiting for %s to move", display_name)) │ - print(string.format("State is now: %s", utils.binstr_to_hr_str(go.serialize_state(state)))) │ + return map │ end │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ - -- handled, no action here │ - elseif popup_id == POPUP_ID_GAME_SIZE_SELECTION then │ - local desired_game_size = POPUP_GAME_SIZE_SEL_BTNS_TO_SIZE[btn_idx+1] │ - alexgames.hide_popup() │ - alexgames.set_status_msg(string.format("Setting board size to %s", desired_game_size)) │ - set_state(go.new_game(desired_game_size)) │ - go_ui.set_board_piece_size(desired_game_size) │ - print(string.format("state.board: %s", state.board)) │ - update() │ - broadcast_state() │ - elseif popup_id == POPUP_ID_START_NEW_GAME_PROMPT then │ - if btn_idx == 0 then │ - state_init = false │ - prompt_game_size() │ - elseif btn_idx == 1 then │ +function handle_popup_btn_clicked(popup_id, btn_id, popup_state) │ + if popup_id == POPUP_ID_NEW_GAME then │ + if btn_id == POPUP_ITEM_ID_BTN_START_GAME then │ + local popup_state_map = key_val_list_to_map(popup_state) │ + local draw_type_dropdown_selected = popup_state_map[POPUP_ITEM_ID_DRAW_TYPE] │ + local draw_type = nil │ + if draw_type_dropdown_selected == 0 then │ + draw_type = core.DRAW_TYPE_ONE │ + elseif draw_type_dropdown_selected == 1 then │ + draw_type = core.DRAW_TYPE_THREE │ + else │ + error(string.format("Unhandled new game popup dropdown sel %s", draw_type_dropdown_selected)) │ + end │ + start_new_game(draw_type) │ + alexgames.hide_popup() │ + elseif btn_id == POPUP_ITEM_ID_BTN_CANCEL then │ alexgames.hide_popup() │ else │ - error(string.format("popup btn_idx %s not handled for start new game prompt", btn_idx)) │ + error(string.format("Unhandled new game popup btn id %s", btn_id)) │ end │ else │ - print(string.format("Unexpected popup_id \"%s\"", popup_id)); │ - alexgames.hide_popup() │ + error(string.format("Unhandled popup \"%s\"", popup_id)) │ end │ end │ │ --- "internal" means "not called by game engine", it should │ --- only be called by other functions within this file. │ --- Originally I had a "load_state" function as part of the API, │ --- but I combined it with start_game. So I'm changing this name to │ --- avoid confusing myself when grepping to see if I updated all the games. │ -function internal_load_state(session_id_arg, serialized_state) │ - session_id = session_id_arg │ - local loaded_state = go.deserialize_state(serialized_state) │ - go_ui.set_board_piece_size(#loaded_state.board) │ - state_loaded = true │ - set_state(loaded_state) │ -end │ - │ -local function prompt_new_game() │ - show_buttons_popup.show_popup(POPUP_ID_START_NEW_GAME_PROMPT, "Start new game", │ - "Start a new game, or load saved state?", │ - POPUP_GAME_SIZE_NEW_GAME_PROMPT) │ -end │ - │ -local function prompt_game_size() │ - -- if previous state was already loaded, then don't prompt game size and overwrite │ - -- the loaded game │ - if state_init and state_loaded then │ - return │ - end │ - │ - if not state_init then │ - show_buttons_popup.show_popup(POPUP_ID_GAME_SIZE_SELECTION, "Choose game size", │ - "Choose one of the below game sizes.", │ - POPUP_GAME_SIZE_SEL_BTNS) │ +function handle_btn_clicked(btn_id) │ + if btn_id == draw.BTN_ID_AUTO_COMPLETE then │ + core.autocomplete(state, handle_move_list_animation) │ + elseif btn_id == draw.BTN_ID_NEW_GAME then │ + --alexgames.set_status_msg("Starting new game") │ + new_game() │ + elseif btn_id == draw.BTN_ID_UNDO then │ + load_prev_state() │ + else │ + error(string.format("Unhandled btn_id \"%s\"", btn_id)) │ end │ end │ │ -function two_player_init() │ - local args = { │ - title = "Choose piece colour", │ - supports_local_multiplayer = true, │ - player_choices = PLAYER_CHOICE_BTNS, │ - handle_multiplayer_type_choice = function (multiplayer_type) │ - if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ - local_multiplayer = true │ - prompt_game_size() │ - elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ - local_multiplayer = false │ - end │ - end, │ - choice_id_to_player_id = function (btn_id) │ - return PLAYER_CHOICE_BTNS_MAP[btn_id] │ - end, │ - player_name_to_id = player_name_to_id, │ - player_id_to_nice_name = function (player_id) │ - local player_colour = go.player_idx_to_colour_name(player_id) │ - return utils.make_first_char_uppercase(player_colour) │ - end, │ - get_msg = function () │ - local msg = "Black moves first." │ - --local other_player = go_ctrl.get_other_player(ctrl_state) │ - if utils.table_len(player_name_to_id) == 0 then │ - msg = msg .. "\nThe other player has not yet chosen." │ - else │ - --msg = msg .. string.format("The other player has chosen %s", │ - -- go.player_idx_to_colour_name(other_player)) │ - for player_name, player_id in pairs(player_name_to_id) do │ - local player_colour = go.player_idx_to_colour_name(player_id) │ - msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ - end │ - end │ - return msg │ - end, │ - handle_player_choice = function (player_name, player_id) │ - local choice_str = go.player_idx_to_colour_name(player_id) │ - print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ - if player_name == two_player.LOCAL_PLAYER then │ - go_ctrl.player_chosen(ctrl_state, player_id) │ - update_status_msg_turn(state, ctrl_state) │ - else │ - go_ctrl.other_player_chosen(ctrl_state, player_id) │ - │ - end │ - │ - if player_name == two_player.LOCAL_PLAYER and go_ctrl.get_other_player(ctrl_state) == nil then │ - prompt_game_size() │ - end │ - print(string.format("we are %q, other player is %q", │ - go_ctrl.get_player(ctrl_state), go_ctrl.get_other_player(ctrl_state))) │ - end, │ - │ - need_reselect = function () │ - local this_player = go_ctrl.get_player(ctrl_state) │ - local other_player = go_ctrl.get_other_player(ctrl_state) │ - │ - -- print(string.format("needs_reselect { this_player = %q, other_player = %q }", this_player, this_player == other_player)) │ - return this_player == nil or this_player == other_player │ - end, │ │ - get_local_player_choice = function () │ - return go_ctrl.get_player(ctrl_state) │ - end │ - } │ +function load_hr_binstr_state(version, hr_binstr_state) │ + local state_board_serialized = utils.hr_binstr_to_binstr(hr_binstr_state) │ + local board_state = serialize.deserialize_board_state(version, state_board_serialized) │ + state = core.new_state_from_board_state(player_count, board_state) │ + update() │ +end │ │ - two_player.init(args) │ +function load_saved_state(session_id_arg, state_serialized) │ + alexgames.set_status_msg(string.format("Loading saved state: %d bytes", #state_serialized)) -- TODO show date of last played? │ + local hr_state_serialized = utils.binstr_to_hr_str(state_serialized) │ + print("Serialized state: " .. hr_state_serialized) │ + session_id = session_id_arg │ + state = serialize.deserialize_state(state_serialized) │ + g_shown_victory_animation = false │ end │ │ -function handle_game_option_evt(option_id) │ - if option_id == OPTION_ID_NEW_GAME then │ - -- TODO remove these bools, this is ugly. At least do the check outside of │ - -- where the function is called │ - state_init = false │ - state_loaded = false │ - prompt_game_size() │ - else │ - error(string.format("Unhandled option_id %s", option_id)) │ - end │ +function get_state() │ + if state == nil then return nil end │ + return serialize.serialize_state(state) │ end │ │ -function start_game(session_id, state_serialized) │ - if state_serialized ~= nil then │ - internal_load_state(session_id, state_serialized) │ +function get_init_state() │ + -- TODO I didn't look into this, but it's possible that the Lua random number seed │ + -- stuff is not guaranteed to be consistent across versions of Lua. │ + -- So this isn't super robust. I think that's fine for now. │ + -- If you generate a state link via `get_state` and send it to a friend, and they're in │ + -- a different version of Lua, then they might not be able to get the initial state │ + -- themselves. │ + -- │ + -- Partway through implementing this, I realized that all the states are saved in the │ + -- history browser anyway, so I should just add a new API to load the oldest state. │ + -- But that has two problems: │ + -- 1. if you share a link, it won't contain the original state. (Though I could add it, │ + -- I suppose, doubling the size of the state) │ + -- 2. I will probably start pruning old saved states at some point, since I think │ + -- the browser limits you to ~5 MB. (When I do that, I should add the option to mark │ + -- some saved states as "more important". │ + if state and state.seed_x and state.seed_y then │ + local params = { │ + seed_x = state.seed_x, │ + seed_y = state.seed_y, │ + } │ + local init_state = core.new_game(player_count, state.draw_type, params) │ + print(string.format("Generated initial state from seeds %016x %016x:", state.seed_x, state.seed_y)) │ + core.print_state(init_state) │ + return serialize.serialize_state(init_state) │ else │ - local session_id = alexgames.get_last_session_id() │ - if session_id ~= nil then │ - state_serialized = alexgames.adjust_saved_state_offset(session_id, 0) │ - internal_load_state(session_id, state_serialized) │ - end │ + return "" │ end │ - │ - -- Note that this sets who the player on this device is, │ - -- and without it, the player arg is nil and the game can't progress │ - two_player_init() │ - │ - alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ end │ │ -function lua_main() │ - while true do │ - print_board() │ - ::read_input:: │ - local user_input = get_user_input() │ - local rc = handle_user_string_input(user_input) │ - if rc ~= go.SUCCESS then │ - print('Error: '.. go.err_code_to_str(rc)) │ - goto read_input │ - end │ +function handle_game_option_evt(option_id, value) │ + print(string.format("handle_game_option(option_id=%s, value=%s)", option_id, value)) │ + if option_id == GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT then │ + draw.show_move_count_and_elapsed_time = value │ + storage_helpers.store_bool(DATA_ID_SHOW_TIME_AND_MOVE_COUNT, value) │ + draw_board_internal() │ end │ end │ --- Game: Backgammon │ --- author: Alex Barry (github.com/alexbarry) │ -local core = {} │ - │ -local utils = require("libs/utils") │ -local dice = require("libs/dice/dice") │ -local combinations = require("libs/combinations") │ - │ - │ ---[[ │ --- Board: │ --- │ --- 1 1 1 │ --- 2 1 0 9 8 7 6 5 4 3 2 1 │ --- b - - - w - || b - - - - b │ --- b - - - w - || b - - - - b <-- (black start) │ --- b - - - w - || b - - - - - │ --- b - - - - - || b - - - - - │ --- b - - - - - || b - - - - - │ --- || │ --- w - - - - - || w - - - - - │ --- w - - - - - || w - - - - - │ --- w - - - b - || w - - - - - │ --- w - - - b - || w - - - - w <-- (white start) │ --- w - - - b - || w - - - - w │ --- 1 1 1 1 1 1 1 2 2 2 2 2 │ --- 3 4 5 6 7 8 9 0 1 2 3 4 │ --- │ ---]] │ - │ -core.BACKGAMMON_ROWS = 2 │ -core.BACKGAMMON_COLS = 12 │ │ +draw.init(480, 480) │ │ -core.NUM_DICE = 2 -- 2 dice │ -core.DICE_MAX = 6 -- 6 sided dice │ +function start_game(session_id_arg, state_serialized) │ + print(string.format("start_game(session_id=%d, state_serialized=%s)", session_id_arg, state_serialized)) │ │ -core.PLAYER_BLACK = 1 │ -core.PLAYER_WHITE = 2 │ -core.NUM_PLAYERS = 2 │ + alexgames.enable_evt('mouse_move') │ + alexgames.enable_evt('mouse_updown') │ + alexgames.enable_evt('touch') │ + │ + if state_serialized ~= nil then │ + print(string.format("start_game: loading from state param")) │ + session_id = session_id_arg │ + load_saved_state(session_id_arg, state_serialized) │ + print(string.format("start_game: done loading from state param")) │ + else │ + -- this shouldn't be happening anymore, right? │ + --print(string.format("start_game: no state param provided, checking if saved game stored in persistent storage")) │ + --local state_serialized = alexgames.read_stored_data(DATA_ID_STATE) │ + local last_session_id = alexgames.get_last_session_id() │ + if last_session_id ~= nil then │ + state_serialized = alexgames.adjust_saved_state_offset(last_session_id, 0) │ + end │ │ --- top right of the board, where BLACK starts │ -core.BOARD_IDX_START = 1 │ + -- this shouldn't usually be possible, but I think it happens if I manage to increment the session ID │ + -- without storing a valid state. │ + if state_serialized ~= nil then │ + load_saved_state(last_session_id, state_serialized) │ + else │ + alexgames.set_status_msg("No saved state found, starting new game") │ + new_game() │ + end │ + end │ │ --- bottom right of the board, where WHITE starts │ -core.BOARD_IDX_END = core.BACKGAMMON_COLS*2 │ + alexgames.add_game_option(GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT, { │ + type = alexgames.OPTION_TYPE_TOGGLE, │ + label = "Show elapsed time and move count", │ + value = draw.show_move_count_and_elapsed_time, │ + } ) │ + │ + -- Set a timer for every second, to update the "time elapsed" in the corner │ + alexgames.set_timer_update_ms(1000) │ +end │ +local serialize = {} │ │ -core.SUCCESS = 0 │ -core.NOT_YOUR_TURN = 1 │ -core.PIECE_CAN_NOT_MOVE = 2 │ -core.INVALID_DST = 3 │ -core.NO_PIECE_IN_SRC = 4 │ -core.NOT_YOUR_PIECE = 5 │ -core.MUST_MOVE_MIDDLE = 6 │ -core.INVALID_MOVE = 7 │ +local cards = require("libs/cards/cards") │ +local serialize_lib = require("libs/serialize/serialize") │ │ -local ERR_MSGS = { │ - [core.SUCCESS] = "Success", │ - [core.NOT_YOUR_TURN] = "Not your turn", │ - [core.PIECE_CAN_NOT_MOVE] = "This piece can not move", │ - [core.INVALID_DST] = "Invalid destination", │ - [core.NO_PIECE_IN_SRC] = "No piece to select", │ - [core.NOT_YOUR_PIECE] = "Not your piece", │ - [core.MUST_MOVE_MIDDLE] = "Must move piece in middle", │ - [core.INVALID_MOVE] = "Invalid move", │ -} │ +local core = require("games/solitaire/solitaire_core") │ │ -local STATE_WAITING_FOR_INIT_ROLLS = 1 │ -local STATE_WAITING_FOR_INIT_ACK = 2 │ -local STATE_WAITING_FOR_ROLL_NO_DBL = 3 │ -local STATE_WAITING_FOR_ROLL_AFTER_DBL= 4 │ -local STATE_WAITING_FOR_MOVE_COMPLETE = 5 │ +serialize.VERSION = 2 │ │ -core.PLAYERS = { │ - core.PLAYER_BLACK, │ - core.PLAYER_WHITE, │ -} │ +function serialize.serialize_board_state(state) │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(state.draw_type) │ + output = output .. cards.serialize_card_array(state.deck_unrevealed) │ + output = output .. cards.serialize_card_array(state.deck_draw) │ + output = output .. cards.serialize_card_array(state.deck_discard) │ + for i=1,core.NUM_PLAY_COLUMNS do │ + output = output .. cards.serialize_card_array(state.play_columns_unrevealed[i]) │ + output = output .. cards.serialize_card_array(state.play_columns_staging[i]) │ + end │ + for i=1,core.NUM_GOAL_STACKS do │ + output = output .. cards.serialize_card_array(state.goal_stacks[i]) │ + end │ │ -function core.get_err_msg(rc) │ - return ERR_MSGS[rc] │ -end │ + if state.move_count ~= nil then │ + output = output .. serialize_lib.serialize_16bit(state.move_count) │ + else │ + output = output .. serialize_lib.serialize_16bit(0) │ + end │ │ -function core.get_player_name(player) │ - if player == core.PLAYER_BLACK then return "Black" │ - elseif player == core.PLAYER_WHITE then return "White" │ - else error(string.format("unexpected player id=%s", player)) end │ + if state.time_elapsed ~= nil then │ + output = output .. serialize_lib.serialize_16bit(state.time_elapsed) │ + else │ + output = output .. serialize_lib.serialize_16bit(0) │ + end │ + return output │ end │ │ -function core.all_init_roll_complete(state) │ - for player, init_roll in ipairs(state.player_init_rolls) do │ - if init_roll == 0 then │ - return false │ - end │ +function serialize.serialize_state(state) │ + if state == nil then │ + error("arg is nil", 2) │ end │ │ - return true │ -end │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ + output = output .. serialize_lib.serialize_byte(state.player_count) │ + output = output .. serialize.serialize_board_state(state) │ │ -local function get_next_init_roll_player(state) │ - for player, init_roll in ipairs(state.player_init_rolls) do │ - if init_roll == 0 then │ - return player │ - end │ + -- TODO I don't like the player state being serialized │ + for _, player_state in ipairs(state.players) do │ + output = output .. serialize_lib.serialize_16bit(player_state.y) │ + output = output .. serialize_lib.serialize_16bit(player_state.x) │ + output = output .. cards.serialize_card_array(player_state.holding) │ + output = output .. serialize_lib.serialize_16bit(player_state.holding_src) │ + output = output .. serialize_lib.serialize_16bit(player_state.holding_src_col) │ end │ + output = output .. serialize_lib.serialize_u64(state.seed_x) │ + output = output .. serialize_lib.serialize_u64(state.seed_y) │ + return output │ end │ │ -local function dice_sum(dice) │ - local sum_val = 0 │ - for _, die in ipairs(dice) do │ - sum_val = sum_val + die │ - end │ - return sum_val │ -end │ │ -local function get_init_first_player(state) │ - local max_dice = nil │ - local max_dice_val = 0 │ - local max_player = nil │ - for player, init_dice in ipairs(state.player_init_rolls) do │ - if init_dice > max_dice_val then │ - max_dice_val = init_dice │ - max_dice = init_dice │ - max_player = player │ - end │ +local function deserialize_board_state_internal(version, bytes, state) │ + state.draw_type = serialize_lib.deserialize_byte(bytes) │ + state.deck_unrevealed = cards.deserialize_card_array(bytes) │ + state.deck_draw = cards.deserialize_card_array(bytes) │ + state.deck_discard = cards.deserialize_card_array(bytes) state.play_columns_unrevealed = {} │ + state.play_columns_staging = {} │ + for i=1,core.NUM_PLAY_COLUMNS do │ + state.play_columns_unrevealed[i] = cards.deserialize_card_array(bytes) │ + state.play_columns_staging[i] = cards.deserialize_card_array(bytes) │ + end │ + state.goal_stacks = {} │ + for i=1,core.NUM_GOAL_STACKS do │ + state.goal_stacks[i] = cards.deserialize_card_array(bytes) │ end │ │ - return { player = max_player, dice = max_dice, dice_val = max_dice_val } │ + print(string.format('Deserializing board state version %d', version)) │ + if version == 1 then │ + -- do nothing │ + elseif version == serialize.VERSION then │ + state.move_count = serialize_lib.deserialize_16bit(bytes) │ + state.time_elapsed = serialize_lib.deserialize_16bit(bytes) │ + else │ + error(string.format("Unhandled solitaire serialized state version " .. │ + "%d, expected <= %d", │ + version, │ + serialize.VERSION)) │ + end │ end │ │ -function get_init_prev_status_msg(state) │ - local last_player = nil │ - for player, init_dice in ipairs(state.player_init_rolls) do │ - if init_dice == 0 then │ - break │ - end │ - last_player = player │ - end │ +function serialize.deserialize_board_state(bytes) │ + local state = {} │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + deserialize_board_state_internal(version, bytes, state) │ │ - if last_player ~= nil then │ - local last_player_name = core.get_player_name(last_player) │ - local last_roll = state.player_init_rolls[last_player] │ - return string.format("%s rolled %d. ", last_player_name, last_roll) │ + if #bytes ~= 0 then │ + error(string.format("%d bytes remaining after deserializing", #bytes)) │ end │ │ - return "" │ + return state │ end │ │ -function core.get_status_msg(state) │ - --print(string.format("get_status_msg(state=%s)", state.game_state)) │ - if state.game_state == STATE_WAITING_FOR_INIT_ROLLS then │ - local player = get_next_init_roll_player(state) │ - local player_name = core.get_player_name(player) │ - │ - local prev_status_msg = get_init_prev_status_msg(state) │ - return string.format("%s%s, please roll to see who goes first", prev_status_msg, player_name) │ - end │ - if state.game_state == STATE_WAITING_FOR_INIT_ACK then │ - if state.player_init_rolls[1] == state.player_init_rolls[2] then │ - return string.format("Both players rolled a %s, press 'Ack' to start over.", state.player_init_rolls[1]) │ - else │ - local first_player = get_init_first_player(state).player │ - local first_player_name = core.get_player_name(first_player) │ - local prev_status_msg = get_init_prev_status_msg(state) │ - return string.format("%s%s goes first, press 'Acknowledge' to continue", prev_status_msg, first_player_name) │ +function serialize.deserialize_state(bytes) │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + local state = {} │ + local first_byte = serialize_lib.deserialize_byte(bytes) │ + local version │ + -- in the first version, I didn't have a byte for version. │ + -- But I did have a player count that was always 1 │ + if first_byte == 1 then │ + state.player_count = 1 │ + version = 1 │ + else │ + version = first_byte │ + if version ~= serialize.VERSION then │ + error(string.format("Received solitaire serialized state for " .. │ + "version %d, but can only handle <= %d", │ + version, serialize.VERSION)) │ end │ + state.player_count = serialize_lib.deserialize_byte(bytes) │ end │ - local action │ - if state.player_selected == nil then │ - action = "select a piece" │ - else │ - action = "select a destination" │ + │ + deserialize_board_state_internal(version, bytes, state) │ + │ + state.players = {} │ + for i=1, state.player_count do │ + state.players[i] = {} │ + state.players[i].y = serialize_lib.deserialize_16bit(bytes) │ + state.players[i].x = serialize_lib.deserialize_16bit(bytes) │ + state.players[i].holding = cards.deserialize_card_array(bytes) │ + state.players[i].holding_src = serialize_lib.deserialize_16bit(bytes) │ + state.players[i].holding_src_col = serialize_lib.deserialize_16bit(bytes) │ end │ - return string.format("%s, please %s", core.get_player_name(state.player_turn), action) │ -end │ + state.seed_x = serialize_lib.deserialize_u64(bytes) │ + state.seed_y = serialize_lib.deserialize_u64(bytes) │ │ -function core.show_roll_button(state, player) │ - if state.player_turn ~= player then │ - return false │ + if #bytes ~= 0 then │ + error(string.format("%d bytes remaining after deserializing", #bytes)) │ end │ - return (state.game_state == STATE_WAITING_FOR_INIT_ROLLS or │ - state.game_state == STATE_WAITING_FOR_ROLL_NO_DBL or │ - state.game_state == STATE_WAITING_FOR_ROLL_AFTER_DBL) │ -end │ │ -function core.show_ack_button(state) │ - return state.game_state == STATE_WAITING_FOR_INIT_ACK │ + return state │ end │ │ -local function set_used_dice(state, dice_vals) │ - state.used_dice = {} │ - for i=1,#state.dice_vals do │ - state.used_dice[i] = false │ - end │ -end │ +return serialize │ +local draw = {} │ │ +local alexgames = require("alexgames") │ │ -function core.ack_init(state, player) │ - if state.game_state == STATE_WAITING_FOR_INIT_ACK then │ - if state.player_init_rolls[1] == state.player_init_rolls[2] then │ - state.game_state = STATE_WAITING_FOR_INIT_ROLLS │ - state.dice_vals = {} │ - state.player_init_rolls = { 0, 0 } │ - else │ - local first_player_info = get_init_first_player(state) │ - state.dice_vals = { state.player_init_rolls[1], state.player_init_rolls[2] } │ - set_used_dice(state, state.dice_vals) │ - state.game_state = STATE_WAITING_FOR_MOVE_COMPLETE │ - state.move_timer = 0 │ - end │ - else │ - error(string.format("ack_init called from state %s", state.game_state)) │ - end │ +local cards = require("libs/cards/cards") │ +local cards_draw = require("libs/cards/cards_draw") │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ │ - return core.SUCCESS │ -end │ +local core = require("games/solitaire/solitaire_core") │ │ -local function make_pieces(val, piece_count) │ - local ary = {} │ - for i=1,piece_count do │ - table.insert(ary, val) │ - end │ - return ary │ -end │ +local BACKGROUND_COLOUR = '#008800' │ +local CARD_SPACE_COLOUR = '#007000' │ +local BACKGROUND_COLOUR_DARK = '#002200' │ +local CARD_SPACE_COLOUR_DARK = '#001100' │ │ -function core.board_idx_to_coords(idx) │ - if idx < 1 then return core.get_bearing_off_coords() end │ - if idx > core.BACKGAMMON_COLS*2 then return core.get_bearing_off_coords() end │ +local TEXT_SIZE = 14 │ +local TEXT_COLOUR_LIGHT = '#0000cc' │ +local TEXT_COLOUR_DARK = '#8888aa' │ +local PADDING = 3 │ │ - idx = idx - 1 │ - local y = math.floor(idx/core.BACKGAMMON_COLS)+1 │ - local x = idx % core.BACKGAMMON_COLS + 1 │ - if y == 1 then │ - x = core.BACKGAMMON_COLS - x + 1 │ - end │ - return { y = y, x = x } │ -end │ +-- │ +draw.show_move_count_and_elapsed_time = nil │ │ -function core.is_last_piece(state, player, coords, piece_idx) │ - local cell = core.get_cell(state, player, coords) │ - if core.coords_are_middle(coords) then │ - return piece_idx == #cell │ +local function get_bg_colour() │ + if alexgames.get_user_colour_pref() == "dark" then │ + return BACKGROUND_COLOUR_DARK │ else │ - return #cell == piece_idx │ + return BACKGROUND_COLOUR │ end │ end │ │ -function core.coords_to_board_idx(player, coords) │ - if core.coords_are_middle(coords) then │ - if player == core.PLAYER_BLACK then │ - -- TODO maybe reverse these? │ - return core.BOARD_IDX_START - 1 │ - elseif player == core.PLAYER_WHITE then │ - return core.BOARD_IDX_END + 1 │ - else │ - error(string.format("coords_to_board_idx: invalid player %s", player), 2) │ - end │ - elseif core.coords_are_bearing_off(coords) then │ - if player == core.PLAYER_BLACK then │ - return core.BOARD_IDX_START-1 │ - elseif player == core.PLAYER_WHITE then │ - return core.BOARD_IDX_END+1 │ - else │ - error(string.format("coords_to_board_idx: invalid player %s", player), 2) │ - end │ +local function get_card_space_colour() │ + if alexgames.get_user_colour_pref() == "dark" then │ + return CARD_SPACE_COLOUR_DARK │ + else │ + return CARD_SPACE_COLOUR │ end │ │ - if coords == nil or │ - coords.x == nil or coords.y == nil or │ - not(1 <= coords.y and coords.y <= 2) or │ - not(1 <= coords.x and coords.x <= core.BACKGAMMON_COLS) then │ - error(string.format("invalid coords {y=%s, x=%s}", coords.y, coords.x), 2) │ - end │ - local idx = (coords.y-1) * core.BACKGAMMON_COLS │ - if coords.y == 1 then │ - idx = idx + (core.BACKGAMMON_COLS - coords.x) + 1 │ +end │ + │ +local function get_text_colour() │ + if alexgames.get_user_colour_pref() == "dark" then │ + return TEXT_COLOUR_DARK │ else │ - idx = idx + coords.x │ + return TEXT_COLOUR_LIGHT │ end │ - return idx │ end │ │ +--local PLAYER_HOLDING_OFFSET_Y = -7 │ +--local PLAYER_HOLDING_OFFSET_X = 7 │ +--local PLAYER_HOLDING_OFFSET_Y = 0 │ +--local PLAYER_HOLDING_OFFSET_X = 0 │ +local PLAYER_HOLDING_OFFSET_Y = -5 │ +local PLAYER_HOLDING_OFFSET_X = 5 │ +local HELD_CARD_IS_HIGHLIGHTED = true │ │ -function pt_eq(coord1, coord2) │ - return coord1.x == coord2.x and coord1.y == coord2.y │ -end │ +local is_touch_controlled = false │ │ -function core.piece_is_selected(state, coords) │ - return state.player_selected ~= nil and pt_eq(state.player_selected, coords) │ -end │ +draw.BTN_ID_AUTO_COMPLETE = "autocomplete" │ +draw.BTN_ID_NEW_GAME = "new_game" │ +draw.BTN_ID_UNDO = "undo" │ │ ---[[ │ -function test(idx, coord) │ - local coords_result = core.board_idx_to_coords(idx) │ - print(string.format("%d --> coords{y=%2d, x=%2d}", idx, coords_result.y, coords_result.x)) │ - local idx_result = core.coords_to_board_idx(player, coord) │ - print(string.format("coords{y=%2d, x=%2d} --> %d", coord.y, coord.x, idx_result)) │ - assert(pt_eq(coord, coords_result)) │ - assert(idx == idx_result) │ -end │ -test(1, { y=1, x=12}) │ -test(2, { y=1, x=11}) │ -test(3, { y=1, x=10}) │ -test(4, { y=1, x= 9}) │ -test(5, { y=1, x= 8}) │ -test(6, { y=1, x= 7}) │ -test(7, { y=1, x= 6}) │ -test(8, { y=1, x= 5}) │ -test(9, { y=1, x= 4}) │ -test(10, { y=1, x= 3}) │ -test(11, { y=1, x= 2}) │ -test(12, { y=1, x= 1}) │ -test(13, { y=2, x= 1}) │ -test(14, { y=2, x= 2}) │ -test(15, { y=2, x= 3}) │ -test(16, { y=2, x= 4}) │ -test(17, { y=2, x= 5}) │ -test(18, { y=2, x= 6}) │ -test(19, { y=2, x= 7}) │ -test(20, { y=2, x= 8}) │ -test(21, { y=2, x= 9}) │ -test(22, { y=2, x= 10}) │ -test(23, { y=2, x= 11}) │ -test(24, { y=2, x= 12}) │ ---]] │ +--local card_height = 105 │ +--local card_width = 60 │ +local card_ratio = 75/40 │ +local card_padding_ratio = 10/75 │ │ ---[ │ --- starting positions are: │ --- 1 2 3 4 5 6 7 8 9 10 11 12 │ --- B5 -- -- -- 3W -- | 5W -- -- -- -- 2B │ --- W5 -- -- -- 3B -- | 5B -- -- -- -- 2W │ --- white moves clockwise │ --- black moves counter clockwise, │ ---] │ -function core.new_game() │ - local state = { │ - player_init_rolls = {}, │ - player_turn = core.PLAYER_BLACK, │ - game_state = STATE_WAITING_FOR_INIT_ROLLS, │ +local card_height = 75 │ +local card_width = 40 │ +local card_font_size = 32 │ +local card_padding = 10 │ +local card_stack_offset = 5 │ +local card_revealed_offset = 20 │ + -- for draw 3, how much space to leave between the three cards drawn from the deck │ +local draw_pile_offset = 23 │ │ - -- there are typically two dice, unless when rolled they │ - -- have the same value, in which case there are 4 dice. │ - -- i.e. each value represents a move that can be made. │ - -- the UI may choose to render this differently │ - dice_vals = nil, │ - -- array of booleans corresponding to if values in `dice_vals` have been used │ - used_dice = nil, │ - player_selected = nil, │ +local board_width = nil │ +local board_height = nil │ │ - double_val = 1, │ +local ANIM_MOVE_MS = 150 │ +local anim_start_time_ms = nil │ +local anim_end_time_ms = nil │ +local card_anim_src_y = nil │ +local card_anim_src_x = nil │ +local card_anim_dst_y = nil │ +local card_anim_dst_x = nil │ +local card_anim = nil │ +local card_anim_pos_y = nil │ +local card_anim_pos_x = nil │ +local move_list = {} │ +local last_animation_update_time = nil │ +local anim_finished_callback = nil │ │ - move_timer = nil, │ +local anim_state = draw_celebration_anim.new_state({ │ +}) │ +-- TODO this probably should be included in the anim state? │ +-- Perhaps as an option, for games that don't otherwise require a timer │ +local g_victory_anim_timer = nil │ │ - -- set to true when the player must press a "can't move" button to acknowledge that │ - -- they can't move. Only needed when there are dice moves remaining, but they can't be │ - -- used to make a legitimate move. │ - player_cant_move = false, │ - pieces_in_middle = {}, │ - finished_pieces = {}, │ - board = {}, │ - } │ │ - for _, player in ipairs(core.PLAYERS) do │ - state.player_init_rolls[player] = 0 │ - state.pieces_in_middle[player] = {} │ - state.finished_pieces[player] = {} │ - end │ +function draw.set_is_touch_controlled(arg) │ + is_touch_controlled = arg │ +end │ │ - for y=1,core.BACKGAMMON_ROWS do │ - state.board[y] = {} │ - for x=1,core.BACKGAMMON_COLS do │ - state.board[y][x] = {} │ - end │ - end │ +function draw.init(board_width_arg, board_height_arg) │ │ - state.board[1][ 1] = make_pieces(core.PLAYER_BLACK, 5) │ - state.board[1][ 5] = make_pieces(core.PLAYER_WHITE, 3) │ - state.board[1][ 7] = make_pieces(core.PLAYER_BLACK, 5) │ - state.board[1][12] = make_pieces(core.PLAYER_BLACK, 2) │ + board_width = board_width_arg │ + board_height = board_height_arg │ │ - state.board[2][ 1] = make_pieces(core.PLAYER_WHITE, 5) │ - state.board[2][ 5] = make_pieces(core.PLAYER_BLACK, 3) │ - state.board[2][ 7] = make_pieces(core.PLAYER_WHITE, 5) │ - state.board[2][12] = make_pieces(core.PLAYER_WHITE, 2) │ + local card_width_max = math.floor(board_width/(core.NUM_PLAY_COLUMNS * (1+card_padding_ratio))) │ + local card_height_max = math.floor(card_width_max * card_ratio) │ │ - return state │ -end │ + card_width = card_width_max │ + card_height = card_height_max │ + card_padding = math.floor(card_width_max * card_padding_ratio) │ │ -function core.get_player_dir(player) │ - if player == 1 then return 1 │ - elseif player == 2 then return -1 │ - else error(string.format("unexpected player %s", player), 2) end │ -end │ │ -function core.print_state(state) │ - print("state = {") │ - print(string.format(" player_turn = %s", state.player_turn)) │ - print(string.format(" player_cant_move = %s", state.player_cant_move)) │ - print(string.format(" dice_vals = %s", utils.ary_to_str(state.dice_vals))) │ - print(string.format(" used_dice = %s", utils.ary_to_str(state.used_dice))) │ - print(string.format(" player_selected = %s", state.player_selected)) │ - print(string.format(" finished_pieces = %s", utils.ary_to_str(state.finished_pieces))) │ - for i=1,2*core.BACKGAMMON_COLS do │ - local coords = core.board_idx_to_coords(i) │ - print(string.format(" board[%2d][%2d] (board idx: %2d) = %s", │ - coords.y, coords.x, i, │ - utils.ary_to_str(state.board[coords.y][coords.x]))) │ - end │ - for player=1,core.NUM_PLAYERS do │ - print(string.format(" pieces_in_middle[%d] = %s", player, utils.ary_to_str(state.pieces_in_middle[player]))) │ - end │ - print("}") │ + alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ + alexgames.create_btn(draw.BTN_ID_NEW_GAME, "New Game", 1) │ + alexgames.create_btn(draw.BTN_ID_AUTO_COMPLETE, "Auto-Complete", 1) │ end │ │ -local function set_dice(state, dice_vals) │ - state.dice_vals = dice_vals │ - set_used_dice(state, state.dice_vals) │ -end │ │ -local function roll_dice(state, player, num_dice) │ - assert(num_dice ~= nil) │ - state.dice_vals = dice.roll_multiple_dice(num_dice, core.DICE_MAX) │ - if num_dice == 2 and │ - state.dice_vals[1] == state.dice_vals[2] then │ - for i=1,2 do │ - table.insert(state.dice_vals, state.dice_vals[1]) │ +function draw.get_pos(state, game_section, col, idx) │ + if game_section == core.SECTION_PLAY_COLUMN_UNREVEALED then │ + return { │ + y = card_height + 2*card_padding + (idx-1) * card_stack_offset, │ + x = card_padding + (col-1) * (card_padding + card_width), │ + } │ + elseif game_section == core.SECTION_PLAY_COLUMN_STAGING then │ + local stack = #state.play_columns_unrevealed[col] │ + if idx == nil then │ + idx = #state.play_columns_staging │ + end │ + return { │ + y = card_height + 2*card_padding + stack*card_stack_offset + (idx-1)*card_revealed_offset, │ + x = card_padding + (col-1) * (card_padding + card_width), │ + } │ + elseif game_section == core.SECTION_DECK_UNREVEALED then │ + return { │ + y = card_padding, │ + x = card_padding + (core.NUM_PLAY_COLUMNS-1) * (card_padding + card_width), │ + } │ + elseif game_section == core.SECTION_DECK_DRAW or │ + game_section == core.SECTION_DECK_DISCARD then │ + if game_section == core.SECTION_DECK_DISCARD then │ + if col ~= nil then │ + error("col is nil for get_pos(DISCARD)") │ + end │ + col = 1 │ + end │ + if col == nil then │ + error(string.format("get_pos col is nil"), 3) │ + end │ + -- This is the extra space that we have to divide between the draw 3 cards (if present) │ + local draw_width = card_width + card_padding │ + local draw_idx = 1 │ + if state.draw_type == core.DRAW_TYPE_THREE then │ + draw_idx = 3 - col + 1 │ end │ + return { │ + y = card_padding, │ + x = math.floor(card_padding + (core.NUM_PLAY_COLUMNS-2) * (card_padding + card_width) - (draw_idx-1)*draw_pile_offset) │ + } │ + elseif game_section == core.SECTION_GOAL_STACKS then │ + return { │ + y = card_padding, │ + x = card_padding + (col-1) * (card_padding + card_width), │ + } │ + else │ + error(string.format("get_pos: unhandled section %s", game_section)) │ end │ - set_dice(state, state.dice_vals) │ + │ end │ │ -function core.player_selecting_dst(state, player) │ - return state.player_selected ~= nil │ +local function in_section(state, pos_y, pos_x, game_section, col, idx) │ + local pos = draw.get_pos(state, game_section, col, idx) │ + return pos.y <= pos_y and pos_y <= pos.y + card_height and │ + pos.x <= pos_x and pos_x <= pos.x + card_width │ end │ │ --- indicates if a destination is free to move to (e.g. is not occupied by │ --- more than one enemy piece) │ -local function can_move_to_pos(state, y_idx, x_idx) │ - local dst = {y=y_idx, x=x_idx} │ - if core.coords_are_bearing_off(dst) then │ - return true │ +local function get_offset(player_state) │ + if not is_touch_controlled then │ + return { │ + dy = player_state.y_card_offset, │ + dx = player_state.x_card_offset, │ + } │ + else │ + return { │ + dy = math.floor(card_height/2), │ + dx = math.floor(card_width/2), │ + } │ end │ - local dst_cell = core.get_cell(state, player, dst) │ - return (#dst_cell == 0 or #dst_cell == 1 or │ - dst_cell[1] == state.player_turn) │ end │ │ --- if a (pseudo) position is outside a board in the player's │ --- forward direction, meaning that moving a place to this │ --- position will remove it from the board (i.e. bearing off) │ -local function in_bearing_off_region(player, pos_idx) │ - return (player == core.PLAYER_BLACK and pos_idx > core.BOARD_IDX_END or │ - player == core.PLAYER_WHITE and pos_idx < core.BOARD_IDX_START) │ -end │ │ --- given a move choice, see if it is a valid move based on the dice sums. │ --- TODO this generates all the sums and checks each one against the dst. │ --- it would be more efficient to generates sums, find dsts that can be highlighted, │ --- then only try to highlight those. │ -function core.valid_dst(state, player, src, dst) │ - if src == nil then return false end │ - src = core.coords_to_board_idx(player, src) │ +function draw.draw_state(session_id, state) │ + alexgames.draw_clear() │ │ - local possib_dst_idx = core.coords_to_board_idx(player, dst) │ + alexgames.draw_rect(get_bg_colour(), 0, 0, board_height, board_width) │ │ - local avail_dice_vals = core.get_avail_dice(state.used_dice, state.dice_vals) │ - local sums_info = combinations.get_distinct_sums(avail_dice_vals) │ - -- Need to sort this for the case of bearing off, where │ - -- instead of moving to a specific destination, you just │ - -- need to move to a spot greater than 24 or less than 1. │ - -- In that case, we must start with the smaller sums first, │ - -- to avoid wasting more than necessary dice moving to a spot │ - -- further than max+1 or min-1 │ - table.sort(sums_info, function (left, right) │ - return left.val < right.val │ - end) │ + for i=1,core.NUM_GOAL_STACKS do │ + local pos = draw.get_pos(state, core.SECTION_GOAL_STACKS, i) │ + alexgames.draw_rect(get_card_space_colour(), │ + pos.y, pos.x, │ + pos.y + card_height, │ + pos.x + card_width) │ + end │ │ - for _, sum_info in ipairs(sums_info) do │ - if sum_info.val == 0 then │ - goto next_sum │ - end │ - local dice_move_pos = src + core.get_player_dir(state.player_turn) * sum_info.val │ - if dice_move_pos == possib_dst_idx or │ - core.coords_are_bearing_off(dst) and in_bearing_off_region(player, dice_move_pos) then │ - local dst_coords = core.board_idx_to_coords(possib_dst_idx) │ - local is_valid = can_move_to_pos(state, dst_coords.y, dst_coords.x) │ - if is_valid then │ - local indexes_used = utils.get_val_indexes(avail_dice_vals, sum_info.parts) │ - --print("avail_dice_vals = %s", utils.ary_to_str(avail_dice_vals)) │ - --print(string.format("Used dice %s", utils.ary_to_str(indexes_used))) │ - return { is_valid = true, used_dice = indexes_used } │ - end │ - end │ - ::next_sum:: │ + if state == nil then │ + local pos = draw.get_pos(state, core.SECTION_DECK_UNREVEALED) │ + cards_draw.draw_card(cards.UNREVEALED_CARD, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ + local text_size = 24 │ + alexgames.draw_text("Press \"New Game\" button", │ + "#000000", │ + board_height/2 - text_size, │ + board_width/2, │ + text_size, │ + alexgames.TEXT_ALIGN_CENTRE) │ + return │ end │ │ - return { is_valid = false, used_dice = {} } │ -end │ │ -function valid_board_idx(board_idx) │ - return 1 <= board_idx and board_idx <= core.BACKGAMMON_COLS*2 │ -end │ + for i=1,#state.play_columns_unrevealed do │ + for j=1,#state.play_columns_unrevealed[i] do │ + local pos = draw.get_pos(state, core.SECTION_PLAY_COLUMN_UNREVEALED, i, j) │ + cards_draw.draw_card(cards.UNREVEALED_CARD, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ + end │ │ -function core.get_avail_dice(used_dice, dice_vals) │ - if used_dice == nil or dice_vals == nil then │ - error(string.format("get_avail_dice: nil args used_dice=%s, dice_vals=%s", used_dice, dice_vals), 2) │ + for j=1,#state.play_columns_staging[i] do │ + local card = state.play_columns_staging[i][j] │ + local pos = draw.get_pos(state, core.SECTION_PLAY_COLUMN_STAGING, i, j) │ + cards_draw.draw_card(card, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ + end │ end │ │ - if #used_dice ~= #dice_vals then │ - error(string.format("get_avail_dice: used_dice len: %d, dice_vals len: %d", #used_dice, #dice_vals)) │ + -- TODO if deck is empty, draw some sort of an icon in its place │ + local pos = draw.get_pos(state, core.SECTION_DECK_UNREVEALED) │ + if #state.deck_unrevealed > 0 then │ + cards_draw.draw_card(cards.UNREVEALED_CARD, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ + else │ + -- TODO draw some sort of an icon, like a green circle, │ + -- to indicate that this can be clicked? │ + alexgames.draw_rect(get_card_space_colour(), │ + pos.y, pos.x, │ + pos.y + card_height, │ + pos.x + card_width) │ end │ │ - local dice_avail = {} │ - for i, dice_val in ipairs(dice_vals) do │ - if used_dice[i] then │ - dice_val = 0 │ + │ + if #state.deck_draw > 0 then │ + -- Card at top of stack should be drawn on top │ + for i=1,#state.deck_draw do │ + local pos = draw.get_pos(state, core.SECTION_DECK_DRAW, i) │ + local deck_revealed_top = state.deck_draw[i] │ + cards_draw.draw_card(deck_revealed_top, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ end │ - table.insert(dice_avail, dice_val) │ + -- Maybe only draw this card if the player is holding one? │ + -- what is really bad is if the player isn't holding a card, and there's a bug │ + -- in the core logic that prevents one of the discard cards from being moved to │ + -- the draw pile. There's this card shown (by the below code) that can't be picked up. │ + elseif #state.deck_discard > 0 and state.draw_type == core.DRAW_TYPE_ONE then │ + -- For draw three, if there are no cards here, don't draw any from the deck_discard pile. │ + -- Rely on the core game code to put a discard card here when the user has actually │ + -- placed (stopped holding) │ + local pos = draw.get_pos(state, core.SECTION_DECK_DRAW, 1) │ + local card = state.deck_discard[#state.deck_discard] │ + if card == nil then error("card is nil in case 1234234") end │ + cards_draw.draw_card(card, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ end │ - return dice_avail │ -end │ │ -function core.player_can_move(state, player) │ - for y=1,core.BACKGAMMON_ROWS do │ - for x=1,core.BACKGAMMON_COLS do │ - if core.piece_can_move(state, player, {y=y, x=x}) then │ - return true │ - end │ + for i=1,#state.goal_stacks do │ + local card = nil │ + if #state.goal_stacks[i] > 0 then │ + card = state.goal_stacks[i][#state.goal_stacks[i]] │ + end │ + local pos = draw.get_pos(state, core.SECTION_GOAL_STACKS, i) │ + if card ~= nil then │ + cards_draw.draw_card(card, │ + pos.y, pos.x, │ + card_width, │ + card_height, │ + card_font_size, │ + false, │ + 0) │ end │ end │ - return false │ -end │ │ --- returns true if a piece is able to move. │ --- This is meant for when the player is selecting a piece to move, │ --- whether or not it should be highlighted in the UI, and if it can be │ --- selected by the player │ -function core.piece_can_move(state, player, coords) │ - if player == nil then │ - return false │ + for player=1,state.player_count do │ + local player_state = state.players[player] │ + if player_state.holding ~= nil then │ + local y = player_state.y │ + local x = player_state.x │ + │ + if player_state.y_card_offset ~= nil and │ + player_state.x_card_offset ~= nil then │ + local offset = get_offset(player_state) │ + y = y - offset.dy │ + x = x - offset.dx │ + end │ + │ + y = y + PLAYER_HOLDING_OFFSET_Y │ + x = x + PLAYER_HOLDING_OFFSET_X │ + │ + for stack_idx, card in ipairs(player_state.holding) do │ + cards_draw.draw_card(card, │ + y + (stack_idx-1)*card_revealed_offset, │ + x, │ + card_width, card_height, card_font_size, │ + HELD_CARD_IS_HIGHLIGHTED, 0) │ + end │ + end │ end │ │ - if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ - return false │ + if card_anim ~= nil then │ + cards_draw.draw_card(card_anim, │ + math.floor(card_anim_pos_y), math.floor(card_anim_pos_x), │ + card_width, card_height, card_font_size, │ + false, 0) │ end │ │ - if not core.all_init_roll_complete(state, player) then │ - return false │ + if draw.show_move_count_and_elapsed_time and state.move_count ~= nil then │ + local moves_str = string.format('Moves: %d', state.move_count) │ + alexgames.draw_text(moves_str, get_text_colour(), │ + board_height - PADDING, │ + PADDING, │ + TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ end │ - --print(string.format("piece_can_move(player=%d, coords=%s)", player, core.coords_to_str(coords))) │ - local cell = core.get_cell(state, player, coords) │ - if #cell == 0 or cell[1] ~= state.player_turn then │ - return false │ + if draw.show_move_count_and_elapsed_time and state.time_elapsed ~= nil then │ + local mins_elapsed = math.floor(state.time_elapsed / 60) │ + local secs_elapsed = state.time_elapsed % 60 │ + local time_str = string.format('%d:%02d', mins_elapsed, secs_elapsed) │ + alexgames.draw_text(time_str, get_text_colour(), │ + board_height - PADDING, │ + board_width - PADDING, │ + TEXT_SIZE, alexgames.TEXT_ALIGN_RIGHT) │ end │ │ - if #state.pieces_in_middle[player] > 0 and │ - not core.coords_are_middle(coords) then │ - return false │ + draw_celebration_anim.draw(anim_state) │ + alexgames.draw_refresh() │ + │ + │ + -- TODO uncomment once testing is done on this │ + --alexgames.set_btn_enabled(draw.BTN_ID_AUTO_COMPLETE, core.autocomplete_available(state)) │ + alexgames.set_btn_enabled(draw.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ +end │ + │ + │ +function draw.pos_to_action(state, player, pos_y, pos_x, evt_id) │ + if state == nil then │ + return nil │ end │ + if #move_list > 0 then │ + return nil │ + end │ + local info = { │ + section_type = nil, │ + col = nil, │ + idx = nil, │ │ - local src = core.coords_to_board_idx(player, coords) │ + -- only used for setting player pos │ + y = pos_y, │ + x = pos_x, │ + } │ │ - local avail_dice = core.get_avail_dice(state.used_dice, state.dice_vals) │ - --print(string.format("piece_can_move: avail_dice = %s", utils.ary_to_str(avail_dice))) │ - local sums_info = combinations.get_distinct_sums(avail_dice) │ + if evt_id == 'touchend' and │ + state.players[player].y_card_offset ~= nil and │ + state.players[player].x_card_offset ~= nil then │ + local offset = get_offset(state.players[player]) │ + offset.dy = offset.dy - math.floor(card_height/2) │ + offset.dx = offset.dx - math.floor(card_width/2) │ │ + pos_y = pos_y - offset.dy │ + pos_x = pos_x - offset.dx │ │ - local can_bear_off = core.piece_can_bear_off(state, player, coords) │ + print(string.format("offsetting mouse pos with dy=%d, dx=%d, is_touch=%s", offset.dy, offset.dx, is_touch_controlled)) │ + end │ │ - for _, sum_info in ipairs(sums_info) do │ - if sum_info.val == 0 then │ - goto next_sum │ + if in_section(state, pos_y, pos_x, core.SECTION_DECK_UNREVEALED) then │ + info.section_type = core.SECTION_DECK_UNREVEALED │ + return info │ + else │ + for draw_idx=1,state.draw_type do │ + if in_section(state, pos_y, pos_x, core.SECTION_DECK_DRAW, draw_idx) then │ + info.section_type = core.SECTION_DECK_DRAW │ + info.col = draw_idx │ + return info │ + end │ end │ - local possib_dst_idx = src + core.get_player_dir(state.player_turn) * sum_info.val │ - │ - if can_bear_off and in_bearing_off_region(player, possib_dst_idx) then │ - return true │ + for col=1,core.NUM_PLAY_COLUMNS do │ + for idx=#state.play_columns_staging[col],1,-1 do │ + if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_STAGING, col, idx) then │ + info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ + info.col = col │ + info.idx = idx │ + return info │ + end │ + end │ + -- This is the "empty column" case, where you can place kings │ + if #state.play_columns_staging[col] == 0 and │ + #state.play_columns_unrevealed[col] == 0 then │ + if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_STAGING, col, 1) then │ + info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ + info.col = col │ + return info │ + end │ + end │ end │ │ - if not valid_board_idx(possib_dst_idx) then │ - goto next_sum │ + for col=1,core.NUM_PLAY_COLUMNS do │ + │ + for idx=1,#state.play_columns_unrevealed[col] do │ + if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_UNREVEALED, col, idx) then │ + info.section_type = core.SECTION_PLAY_COLUMN_UNREVEALED │ + info.col = col │ + info.idx = idx │ + return info │ + end │ + end │ end │ - local dst_coords = core.board_idx_to_coords(possib_dst_idx) │ - if can_move_to_pos(state, dst_coords.y, dst_coords.x) then │ - return true │ + │ + for col=1,cards.NUM_SUITS do │ + if in_section(state, pos_y, pos_x, core.SECTION_GOAL_STACKS, col) then │ + info.section_type = core.SECTION_GOAL_STACKS │ + info.col = col │ + return info │ + end │ end │ - ::next_sum:: │ end │ - │ - return false │ + return nil │ end │ │ --- returns true if any dice have not been used yet │ -function core.any_dice_avail(state) │ - return utils.any_eq(state.used_dice, false) │ +local function start_anim(state, item) │ + --print("start_anim") │ + --if #move_list > 0 then │ + -- return │ + --end │ + if item.item.move == core.ACTION_MOVE then │ + card_anim = core.remove_card_from_move(state, item.item.src) │ + local src_pos = draw.get_pos(state, item.item.src.section_type, item.item.src.col) │ + card_anim_src_y = src_pos.y │ + card_anim_src_x = src_pos.x │ + local dst_pos = draw.get_pos(state, item.item.dst.section_type, item.item.dst.col) │ + card_anim_dst_y = dst_pos.y │ + card_anim_dst_x = dst_pos.x │ + anim_start_time_ms = alexgames.get_time_ms() │ + anim_end_time_ms = item.time │ + │ + card_anim_pos_y = card_anim_src_y │ + card_anim_pos_x = card_anim_src_x │ + core.inc_move_count(state) │ + elseif item.item.move == core.ACTION_DECK_NEXT then │ + core.next_in_deck(state) │ + anim_start_time_ms = alexgames.get_time_ms() │ + anim_end_time_ms = item.time │ + else │ + error(string.format("unexpected item.item.move=%s", item.item.move)) │ + end │ + │ end │ │ -local function next_turn(state) │ - --print("Moving to next player's turn") │ - state.player_turn = (state.player_turn % core.NUM_PLAYERS) + 1 │ - state.game_state = STATE_WAITING_FOR_ROLL_NO_DBL │ - state.move_timer = nil │ - state.dice_vals = {} │ - set_used_dice(state, state.dice_vals) │ +function draw.stop_move_animations() │ + anim_start_time_ms = nil │ + anim_end_time_ms = nil │ + card_anim_src_y = nil │ + card_anim_src_x = nil │ + card_anim_dst_y = nil │ + card_anim_dst_x = nil │ + card_anim = nil │ + card_anim_pos_y = nil │ + card_anim_pos_x = nil │ + move_list = {} │ + last_animation_update_time = nil │ + if anim_finished_callback ~= nil then │ + anim_finished_callback() │ + end │ + anim_finished_callback = nil │ +end │ │ - if not core.player_can_move(state, state.player_turn) then │ - state.player_cant_move = true │ +function draw.animate_moves(state, move_list_arg, on_anim_finished) │ + if #move_list > 0 then │ + return │ end │ │ + local current_time_ms = alexgames.get_time_ms() │ + for i, item in ipairs(move_list_arg) do │ + local anim_item = { │ + item = item, │ + time = current_time_ms + i * ANIM_MOVE_MS, │ + } │ + table.insert(move_list, anim_item) │ + end │ + if #move_list > 0 then │ + start_anim(state, move_list[1]) │ + end │ + anim_finished_callback = on_anim_finished │ end │ │ -local function mark_dice_used(state, dice_used_in_move) │ - for _, dice_idx in ipairs(dice_used_in_move) do │ - if state.used_dice[dice_idx] then │ - error(string.format("tried to use dice %s but they were already used, previous use state = %s", │ - utils.ary_to_str(dice_used_in_move), │ - utils.ary_to_str(orig_dice_used))) │ +-- While working on this I had added two "animations": │ +-- * the autocomplete moves, that's what `draw.animate_moves` does │ +-- * the fireworks "victory animation" / "draw_celebration_anim". │ +function draw.update_animations(state, dt_ms) │ + --print("update_animations", dt_ms, "move list len", #move_list) │ + │ + draw.animate_moves(state, move_list, on_anim_finished) │ + draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ + │ + if #move_list == 0 then │ + return │ + end │ + │ + -- TODO REMOVE? │ + if dt_ms == 0 then │ + return │ + end │ + local current_time_ms = alexgames.get_time_ms() │ + --local time_diff = last_animation_update_time - current_time_ms │ + if current_time_ms < move_list[1].time then │ + if move_list[1].item.move == core.ACTION_MOVE then │ + local time_portion = (current_time_ms - anim_start_time_ms) / (anim_end_time_ms - anim_start_time_ms) │ + if time_portion >= 1 then │ + time_portion = 1 │ + end │ + │ + card_anim_pos_y = card_anim_src_y + time_portion * (card_anim_dst_y - card_anim_src_y) │ + card_anim_pos_x = card_anim_src_x + time_portion * (card_anim_dst_x - card_anim_src_x) │ + end │ + else │ + if move_list[1].item.move == core.ACTION_MOVE then │ + local ary = core.get_card_ary(state, move_list[1].item.dst.section_type, move_list[1].item.dst.col) │ + table.insert(ary, card_anim) │ + card_anim = nil │ + end │ + table.remove(move_list, 1) │ + if #move_list > 0 then │ + start_anim(state, move_list[1]) │ + else │ + if anim_finished_callback ~= nil then │ + anim_finished_callback() │ + end │ end │ - state.used_dice[dice_idx] = true │ end │ end │ │ --- TODO make sure that middle can't be used as a destination │ -local function move_player(state, player, dst_coords, dice_used_in_move) │ - print(string.format("move_player %d, selected=%s, dst=%s, dice_used_in_move=%s", │ - player, core.coords_to_str(state.player_selected), core.coords_to_str(dst_coords), │ - utils.ary_to_str(dice_used_in_move))) │ - local src = core.get_cell(state, player, state.player_selected) │ - local dst = core.get_cell(state, player, dst_coords) │ +function draw.victory_animation(fps) │ + print("setting timer") │ + if g_victory_anim_timer ~= nil then │ + error(string.format("victory_animation: anim_timer is not nil")) │ + end │ + g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ + draw_celebration_anim.fireworks_display(anim_state, { │ + on_finish = function () │ + if g_victory_anim_timer == nil then │ + alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ + else │ + alexgames.delete_timer(g_victory_anim_timer) │ + g_victory_anim_timer = nil │ + end │ + --print("animation finished! Resuming timer") │ + --alexgames.set_timer_update_ms(0) │ + --alexgames.set_timer_update_ms(1000/60) │ + end, │ + }) │ +end │ + │ │ - print(string.format("move_player src_cell=%s, dst_cell=%s", utils.ary_to_str(src), utils.ary_to_str(dst))) │ +return draw │ +-- Game: Backgammon │ +-- author: Alex Barry (github.com/alexbarry) │ +--[[ │ +TODO: │ +* players take turns rolling dice to decide who goes first? │ +* limit number of checkers on UI in each column to 6 or so, then show "+n" │ +* change piece highlights to yellow for "select a piece to move", │ +* then highlight selected piece in blue │ +* investigate errors │ │ - -- If dst is opponent, handle "hit": place piece in middle │ - if #dst > 0 and dst[1] ~= player then │ - if #dst ~= 1 then │ - error("move_player called with dst containing more than one opponent piece") │ - end │ - local piece = table.remove(dst) │ - table.insert(state.pieces_in_middle[piece], piece) │ - end │ │ - local piece = table.remove(src) │ - assert(piece == player) │ - table.insert(dst, piece) │ +The network multiplayer sequence is mostly: │ +* local user presses the screen to make a move, │ +* local game handles the move, draws on the screen, and │ +* send move to remote player │ +* remote player handles the move and updates the screen │ │ - local orig_dice_used = utils.ary_copy(state.used_dice) │ - mark_dice_used(state, dice_used_in_move) │ - state.player_selected = nil │ +Dice rolling is handled by one player serving as "host" │ +(let's call the other player "client"), │ +currently it is the player that selected {black or white} │ +first: │ +* when the host player rolls the dice, they send the "dice" (CMD_DICE) command. │ + This causes the remote player to call core.roll(state, game, dice_vals = ). │ + The core game logic should behave the same as if the local player rolled, but │ + instead of using its own random number generator, it uses the received dice values. │ +* when a client player rolls the dice: │ + - client sends the "roll request" (CMD_ROLL_REQ) command and do nothing else locally for now │ + - host should respond with CMD_DICE, which will cause the client player to roll │ + with the provided dice value │ │ - if not core.any_dice_avail(state) then │ - print("no dice remaining, next player's turn") │ - next_turn(state) │ - elseif not core.player_can_move(state, player) then │ - print("dice remain but player can not move anywhere") │ - state.player_cant_move = true │ - end │ - -- if dice are available, but no moves can be made, then player needs to press a "can't move" button to progress │ -end │ +# Host rolls the dice │ │ -function core.player_cant_move_ack(state, player) │ - if player ~= state.player_turn then │ - return core.NOT_YOUR_TURN │ - end │ + host client │ + player 1 player 2 │ + | | │ + roll | | │ + request | | │ + | | │ + core.roll( | | │ + player=1, | | │ + vals=nil) | | │ + | | │ + (this | | │ + generates | | │ + dice vals) | | │ + | | │ + | ---> CMD_ROLL, dice vals ------>| core.roll(player=1, vals) │ + | | │ + | | (this advances game │ + | | state but uses the │ + | | provided dice vals │ + | | instead of generating │ + | | any) │ + | | │ │ - if not state.player_cant_move then │ - error("player_cant_move_ack called when state.player_cant_move is false") │ - end │ +# Client rolls the dice │ │ - state.player_cant_move = false │ - next_turn(state) │ - return core.SUCCESS │ -end │ + host client │ + player 1 player 2 │ + | | │ + | | roll │ + | | request │ + | <------- CMD_ROLL_REQ <-------- | │ + core.roll( | | │ + player=2, | | │ + vals=nil) | | │ + | | │ + (this | | │ + generates | | │ + dice vals) | | │ + | ----> CMD_DICE, dice_vals ----> | core.roll(vals) │ + | | │ + | | │ + | | │ + │ +--]] │ +local core = require("games/backgammon/backgammon_core") │ +local draw = require("games/backgammon/backgammon_draw") │ +local serialize = require("games/backgammon/backgammon_serialize") │ │ -function core.coords_are_middle(coords) │ - if coords == nil then error("arg is nil", 2) end │ - return coords.y == -1 and coords.x == -1 │ -end │ +local two_player = require("libs/multiplayer/two_player") │ +local utils = require("libs/utils") │ │ -function core.get_middle_coords() │ - return { y = -1, x = -1 } │ -end │ +local alexgames = require("alexgames") │ │ -function core.coords_are_bearing_off(coords) │ - if coords == nil then │ - error("arg is nil", 2) │ - end │ - return coords.y == -2 and coords.x == -2 │ -end │ +local session_id = alexgames.get_new_session_id() │ +local state = core.new_game() │ │ -function core.get_bearing_off_coords() │ - return { y = -2, x = -2 } │ -end │ +-- I uncomment this when testing bearing off, without having to play a full game │ +--[[ │ +state.board = { │ + { │ + {}, │ + {}, │ + {}, │ + {}, │ + {}, │ + {}, │ │ -function core.get_cell(state, player, coords) │ - if coords == nil then error("arg is nil", 2) end │ - if core.coords_are_middle(coords) then │ - return state.pieces_in_middle[player] │ - elseif core.coords_are_bearing_off(coords) then │ - return state.finished_pieces[player] │ + {}, │ + {}, │ + {}, │ + {2,2,2,2,2,2,2,2,2}, │ + {}, │ + {}, │ + }, │ + │ + { │ + {}, │ + {}, │ + {}, │ + {}, │ + {}, │ + {}, │ + │ + {}, │ + {}, │ + {}, │ + {1,1,1,1,1,1,1,1,1}, │ + {}, │ + {}, │ + }, │ +} │ +--]] │ + │ +local player = nil │ +local local_multiplayer = nil │ +local is_host = true -- TODO set this │ +local player_name_to_id = {} │ +local g_other_player = nil │ +local invalid_dst_in_a_row = 0 │ + │ +local GAME_OPTION_NEW_GAME = "option_new_game" │ + │ +local POPUP_ID_SELECT_PLAYER = "popup_select_player" │ +local PLAYER_CHOICE_BTNS = { │ + core.get_player_name(core.PLAYER_WHITE), │ + core.get_player_name(core.PLAYER_BLACK), │ +} │ +local BTN_MAP = { │ + [0] = core.PLAYER_WHITE, │ + [1] = core.PLAYER_BLACK, │ +} │ + │ +local function get_player() │ + if local_multiplayer then │ + return state.player_turn │ else │ - if state.board[coords.y] == nil or state.board[coords.y][coords.x] == nil then │ - error(string.format("core.get_cell: unexpected coords %s", core.coords_to_str(coords)), 2) │ - end │ - local cell = state.board[coords.y][coords.x] │ - return cell │ + return player │ end │ end │ │ -function core.coords_to_str(coords) │ - if coords == nil then return "nil" │ - else return string.format("{y=%s, x=%s}", coords.y, coords.x) end │ +local function save_state() │ + local serialized_state = serialize.serialize_state(state) │ + alexgames.save_state(session_id, serialized_state) │ end │ │ -function core.player_at_pos(state, coords) │ - return state.board[coords.y][coords.x][1] │ +function update() │ + core.increment_move_timer(state) │ + draw.draw_state(state, session_id, get_player()) │ + print(string.format("Game state is %d", state.game_state)) │ + --core.print_state(state) │ + --alexgames.set_status_msg(core.get_status_msg(state)) │ end │ │ -function core.get_valid_dsts(state, player, src) │ - local valid_dsts = {} │ - for y=1,core.BACKGAMMON_ROWS do │ - for x=1,core.BACKGAMMON_COLS do │ - local dst = { y = y, x = x } │ - if core.valid_dst(state, player, src, dst).is_valid then │ - table.insert(valid_dsts, dst) │ +local function handle_rc(rc) │ + print(string.format("handle_rc(rc=%s(%s))", rc, core.get_err_msg(rc))) │ + if rc ~= core.SUCCESS then │ + local err_msg = core.get_err_msg(rc) │ + if rc == core.INVALID_DST then │ + invalid_dst_in_a_row = invalid_dst_in_a_row + 1 │ + if invalid_dst_in_a_row >= 3 then │ + err_msg = err_msg .. " (To change your selected piece, press the " .. │ + "middle of the board or the currently selected piece)" │ end │ + else │ + invalid_dst_in_a_row = 0 │ + end │ + alexgames.set_status_err(err_msg) │ + else │ + invalid_dst_in_a_row = 0 │ + local msg = core.get_status_msg(state) │ + alexgames.set_status_msg(msg) │ + │ + -- TODO only do this if a move was actually made │ + if rc == core.SUCCESS then │ + save_state() │ end │ end │ +end │ │ - return valid_dsts │ +local function double_request(player) │ + alexgames.set_status_msg(string.format("%s has proposed doubling the value of winning the match.", core.get_player_name(player))) │ + local rc = core.double_request(state, get_player()) │ + draw.double_request(state) │ + return rc │ end │ │ -function core.player_touch(state, player, coords) │ - print(string.format("player %s touched %s", player, core.coords_to_str(coords))) │ - if state.player_turn ~= player then │ - return core.NOT_YOUR_TURN │ - end │ │ - -- if player selects something that isn't a piece, clear their selection │ - if coords == nil then │ - state.player_selected = nil │ - return core.SUCCESS │ - end │ +local game_msg_prefix = "backgammon" │ │ - if state.player_selected == nil then │ - -- player is choosing a piece to select │ - local cell = core.get_cell(state, player, coords) │ - if #cell == 0 then │ - return core.NO_PIECE_IN_SRC │ - elseif cell[1] ~= player then │ - return core.NOT_YOUR_PIECE │ - end │ +local CMD_TOUCH = "touch" │ +local CMD_DOUBLE_REQUEST = "double_request" │ +local CMD_ROLL = "roll" │ +local CMD_ROLL_REQ = "roll_request" │ +local CMD_ACK_INIT = "ack_init" │ +local CMD_ACK_CANT_MOVE = "ack_cant_move" -- TODO combine with the other ack │ +local CMD_UNSELECT = "unselect" │ │ - if #state.pieces_in_middle[player] > 0 and │ - not core.coords_are_middle(coords) then │ - return core.MUST_MOVE_MIDDLE │ - end │ +local CMD_DICE = "dice" │ │ - -- TODO need to make this function return false when player has pieces in middle │ - -- TODO need to handle middle highlighted as selected │ - local can_move = core.piece_can_move(state, player, coords) │ - if not can_move then │ - return core.PIECE_CAN_NOT_MOVE │ +-- This should be called when the user presses the "roll" button. │ +-- It either does the roll locally, or sends a message and shows "waiting" │ +-- to the user until the dice values are received from the host player. │ +function roll_request(state, player) │ + if local_multiplayer or two_player.am_first_player() then │ + local request_is_local = (player == get_player()) │ + local for_player_str = nil │ + if request_is_local then │ + for_player_str = string.format("for local player %s", player) │ else │ - state.player_selected = coords │ - return core.SUCCESS │ + for_player_str = string.format("on behalf of player %s", player) │ end │ - else │ - │ - -- if the player presses the piece that they just selected, │ - -- and if there is only one move available, then move there. │ - -- If more than one move is available, then do nothing? │ - -- (not sure if that's the most intuitive, but unselecting │ - -- might be worse, since it looks similar to moving) │ - if pt_eq(coords, state.player_selected) then │ - local valid_dsts = core.get_valid_dsts(state, player, state.player_selected) │ - --print(string.format("found %s valid dsts", #valid_dsts)) │ - if #valid_dsts == 1 then │ - coords = valid_dsts[1] │ - print(string.format("Player double tapped piece with only one destination, " .. │ - "attempting to move to {y=%s,x=%s}", coords.y, coords.x)) │ + print(string.format("We are player 1 of %d, rolling dice (%s) and broadcasting value", two_player.get_player_count(), for_player_str)) │ + local rc = core.roll(state, player) │ + if rc == core.SUCCESS then │ + if state.dice_vals ~= nil then │ + print(string.format("dice_vals len is %d, vals: %s", #state.dice_vals, utils.ary_to_str(state.dice_vals))) │ + else │ + print(string.format("dice_vals == nil")) │ + end │ + if request_is_local then │ + send_cmd(CMD_ROLL, player, state.dice_vals) │ + else │ + send_cmd(CMD_DICE, player, state.dice_vals) │ end │ end │ │ - --print(string.format("Player selected dst index %s", possib_dst_idx)) │ - │ - -- TODO should this "valid_dst" function check for middle? │ - -- player is choosing a destination for their selected piece │ - local valid_dst_info = core.valid_dst(state, player, state.player_selected, coords) │ - if not valid_dst_info.is_valid then │ - │ - -- if the player presses a different piece that they control, │ - -- then select that instead │ - if not core.coords_are_bearing_off(coords) and │ - not core.coords_are_middle(coords) and │ - player == core.player_at_pos(state, coords) then │ - state.player_selected = coords │ - return core.SUCCESS │ - end │ - return core.INVALID_DST │ - else │ - move_player(state, player, coords, valid_dst_info.used_dice) │ - return core.SUCCESS │ + return rc │ + else │ + -- this is a bit awkward, but we don't want to let │ + -- the remote player send the roll command if it isn't their turn │ + if state.player_turn ~= get_player() then │ + return core.NOT_YOUR_TURN │ end │ + print(string.format("We are not player 1 of %d, send a cmd to roll and hope the other player sends us the dice value", two_player.get_player_count())) │ + send_cmd(CMD_ROLL_REQ, player) │ + state.dice_vals = {} │ + state.dice_loading = true │ + -- when CMD_DICE is received, we'll call core.roll(state, player, dice_vals) │ + -- to act as if this player rolled, but providing the dice values sent by the │ + -- other player │ + return core.SUCCESS │ end │ end │ │ --- Checks if a position is in the last 6 positions │ --- leading up to the end of the board. │ --- If all a player's pieces are in this region, they may start │ --- bearing off. │ -local function is_final_region(player, coords) │ - if player == core.PLAYER_BLACK then │ - return coords.y == 2 and coords.x > 6 │ - elseif player == core.PLAYER_WHITE then │ - return coords.y == 1 and coords.x > 6 │ - else │ - error(string.format("unexpected player %s", player)) │ +function send_cmd(cmd, player, params) │ + local params_str = "" │ + if params ~= nil then │ + params_str = table.concat(params, ",") │ end │ + local msg = string.format("%s:%s,%s,%s", game_msg_prefix, cmd, player, params_str) │ + print(string.format("sending msg %s", msg)) │ + --print(string.format("pieces were: cmd (%s), player (%s), params_str(%s)", cmd, player, params_str)) │ + alexgames.send_message("all", msg) │ end │ │ -local function players_pieces_all_in_final_region(state, player) │ - for board_idx=core.BOARD_IDX_START,core.BOARD_IDX_END do │ - local coords = core.board_idx_to_coords(board_idx) │ - if not is_final_region(player, coords) and core.player_at_pos(state, coords) == player then │ - return false │ - end │ +local function str_ary_to_number_ary(str_ary) │ + local num_ary = {} │ + for _, s in ipairs(str_ary) do │ + table.insert(num_ary, tonumber(s)) │ end │ + return num_ary │ +end │ │ - return true │ +local function parse_cmd(cmd_str) │ + local cmd_pieces = utils.gmatch_to_list("([^,]+)", cmd_str) │ + local cmd, player_str = table.unpack(cmd_pieces, 1, 2) │ + local params = {table.unpack(cmd_pieces, 3)} │ + params = str_ary_to_number_ary(params) │ + --print(string.format("params type=%s, val=%s", type(params), params)) │ + │ + --print(string.format("parsed cmd to: %s %s %s (cmd_pieces was %s)", cmd, player_str, params, utils.ary_to_str(cmd_pieces))) │ + return cmd, tonumber(player_str), params │ end │ │ -function core.player_can_bear_off(state, player) │ - if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ - return false │ - end │ +local function handle_cmd(cmd, player, params) │ + print(string.format("handle_cmd(cmd=%s, player=%s, params=%s)", cmd, player, utils.ary_to_str(params))) │ + if cmd == CMD_TOUCH then │ + local coords = nil │ + if params ~= nil and #params > 0 then │ + coords = { y = params[1], x = params[2] } │ + end │ + return core.player_touch(state, player, coords) │ + elseif cmd == CMD_DOUBLE_REQUEST then │ + return double_request(player) │ + elseif cmd == CMD_ACK_INIT then │ + return core.ack_init(state, player) │ + elseif cmd == CMD_ACK_CANT_MOVE then │ + return core.player_cant_move_ack(state, player) │ + elseif cmd == CMD_UNSELECT then │ + if player ~= state.player_turn then │ + error(string.format("Player %s tried to unselect when not their turn", player)) │ + end │ + state.player_selected = nil │ + return core.SUCCESS │ + elseif cmd == CMD_DICE or │ + cmd == CMD_ROLL then │ + local dice_vals = params │ │ - if not core.all_init_roll_complete(state) then │ - return false │ + if dice_vals == nil then │ + error(string.format("Received cmd %s without dice val params", cmd)) │ + end │ + │ + │ + rc = core.roll(state, player, dice_vals) │ + state.dice_loading = false │ + print(string.format("Dice vals are now: %s", utils.ary_to_str(state.dice_vals))) │ + update() │ + return rc │ + elseif cmd == CMD_ROLL_REQ then │ + rc = roll_request(state, player) │ + handle_rc(rc) │ + update() │ + else │ + error(string.format("Unhandled cmd \"%s\"", cmd)) │ end │ - if player ~= state.player_turn then │ - return false │ +end │ + │ +local function send_and_handle_cmd(cmd, player, params) │ + if cmd == CMD_ROLL or cmd == CMD_ROLL_REQ then │ + error("send_and_handle_cmd does not handle CMD_ROLL") │ end │ │ - if not players_pieces_all_in_final_region(state, player) then │ - return false │ + local rc = handle_cmd(cmd, player, params) │ + if rc == core.SUCCESS then │ + send_cmd(cmd, player, params) │ end │ + print(string.format("cmd %s returned status %s (%s)", cmd, rc, core.get_err_msg(rc))) │ │ - return true │ + return rc │ end │ │ -function core.piece_can_bear_off(state, player, selection) │ - if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ - return false │ - end │ │ - if not core.all_init_roll_complete(state) then │ - return false │ - end │ - if not core.player_can_bear_off(state, player) then │ - return false │ - end │ +function handle_user_clicked(pos_y, pos_x) │ + local can_bear_off = core.player_can_bear_off(state, get_player()) │ + -- NOTE that this can be "middle" too │ + local sel_coords = draw.screen_coords_to_board_coords(pos_y, pos_x, can_bear_off) │ │ - if selection == nil then │ - return false │ + local btn_clicked = draw.handle_user_clicked(pos_y, pos_x) │ + │ + if not btn_clicked then │ + local params = nil │ + if sel_coords ~= nil then │ + params = {sel_coords.y, sel_coords.x} │ + end │ + local rc = send_and_handle_cmd(CMD_TOUCH, get_player(), params) │ + handle_rc(rc) │ end │ + draw.draw_state(state, session_id, get_player()) │ + --core.print_state(state) │ │ - local dst = core.get_bearing_off_coords() │ - return core.valid_dst(state, player, selection, dst).is_valid │ end │ │ -function core.increment_move_timer(state) │ - if state.move_timer == nil then │ - return │ - end │ - state.move_timer = state.move_timer + 1 │ +local function load_state(session_id_arg, serialized_state) │ + session_id = session_id_arg │ + state = serialize.deserialize_state(serialized_state) │ end │ │ -function core.can_player_double_request(state, player) │ - if state.game_state ~= STATE_WAITING_FOR_ROLL_NO_DBL then │ - return false │ +local function load_saved_state_offset(move_id_offset) │ + local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ + if serialized_state == nil then │ + error(string.format("adjust_saved_state_offset(offset=%d) returned nil", move_id_offset)) │ end │ + load_state(session_id, serialized_state) │ + update() │ +end │ │ - if player ~= state.player_turn then │ - return false │ +function handle_btn_clicked(btn_id) │ + print("handle_btn_clicked: " .. btn_id) │ + local rc │ + if btn_id == draw.BTN_ID_CANT_MOVE then │ + rc = send_and_handle_cmd(CMD_ACK_CANT_MOVE, get_player()) │ + draw.draw_state(state, session_id, get_player()) │ + elseif btn_id == draw.BTN_ID_UNDO then │ + load_saved_state_offset(-1) │ + -- TODO broadcast state │ + elseif btn_id == draw.BTN_ID_REDO then │ + load_saved_state_offset(1) │ + -- TODO broadcast state │ + elseif btn_id == draw.BTN_ID_DOUBLE_REQUEST then │ + rc = send_and_handle_cmd(CMD_DOUBLE_REQUEST, get_player()) │ + elseif btn_id == draw.BTN_ID_ROLL then │ + --rc = send_and_handle_cmd(CMD_ROLL, get_player()) │ + rc = roll_request(state, get_player()) │ + update() │ + elseif btn_id == draw.BTN_ID_ACK then │ + rc = send_and_handle_cmd(CMD_ACK_INIT, get_player()) │ + update() │ + elseif btn_id == draw.BTN_ID_UNSELECT then │ + rc = send_and_handle_cmd(CMD_UNSELECT, get_player()) │ + update() │ + else │ + error(string.format("unhandled btn_id=%s", btn_id)) │ end │ - │ - return true │ + handle_rc(rc) │ end │ │ -function core.double_request(state, player) │ - if not core.can_player_double_request(state, player) then │ - return core.INVALID_MOVE │ +function handle_popup_btn_clicked(popup_id, btn_id) │ + if two_player.handle_popup_btn_clicked(popup_id, btn_id) then │ + -- do nothing │ + elseif popup_id == draw.POPUP_ID_DOUBLE_REQUEST then │ + local accepted = nil │ + if btn_id == draw.DOUBLE_REQUEST_BTN_ACCEPT then │ + accepted = true │ + elseif btn_id == draw.DOUBLE_REQUEST_BTN_DECLINE then │ + accepted = false │ + else │ + error(string.format("Unhandled popup btn id %s, in popup id %s", btn_id, popup_id)) │ + end │ + core.double_response(state, get_player(), accepted) │ + alexgames.hide_popup() │ + update() │ + else │ + error(string.format("Unhandled popup_id = %s", popup_id)) │ end │ +end │ │ - state.game_state = STATE_WAITING_FOR_ROLL_AFTER_DBL │ - return core.SUCCESS │ +local function new_game() │ + alexgames.set_status_msg("Starting new game") │ + session_id = alexgames.get_new_session_id() │ + state = core.new_game() │ + update() │ end │ │ -function core.double_response(state, player, accepted) │ - if not accepted then │ - -- TODO need to forfeit │ +function handle_game_option_evt(option_id) │ + if option_id == GAME_OPTION_NEW_GAME then │ + new_game() │ + alexgames.send_message("all", "derp hello world test to see if this is sent to sender") │ else │ - state.double_val = state.double_val * 2 │ - state.game_state = STATE_WAITING_FOR_ROLL_AFTER_DBL │ + error(string.format("unhandled game option id %s", option_id)) │ end │ - │ end │ │ -function core.can_roll_rc(state, player) │ - if state.game_state ~= STATE_WAITING_FOR_INIT_ROLLS and │ - state.game_state ~= STATE_WAITING_FOR_ROLL_NO_DBL and │ - state.game_state ~= STATE_WAITING_FOR_ROLL_AFTER_DBL then │ - return core.INVALID_MOVE │ - end │ +function handle_msg_received(src, msg) │ + print("Recvd msg " .. msg) │ │ - if player ~= state.player_turn then │ - return core.NOT_YOUR_TURN │ + if two_player.handle_msg_received(src, msg) then │ + return │ end │ │ - return core.SUCCESS │ -end │ - │ --- dice_vals param should be nil for local multiplayer, but │ --- should be the dice value when the dice is rolled by the other │ --- player in network multiplayer │ -function core.roll(state, player, dice_vals) │ - local can_roll_rc = core.can_roll_rc(state, player) │ - if can_roll_rc ~= core.SUCCESS then │ - return can_roll_rc │ + local m = msg:gmatch("([^:]+):(.*)") │ + if m == nil then │ + print("Unable to parse header from msg " .. msg) │ + return │ end │ + local header, payload = m() │ │ - if state.game_state ~= STATE_WAITING_FOR_INIT_ROLLS then │ - if dice_vals == nil then │ - roll_dice(state, player, core.NUM_DICE) │ - else │ - set_dice(state, dice_vals) │ + if header == game_msg_prefix then │ + local params = {parse_cmd(payload)} │ + --print(string.format("params len: %d", #params)) │ + --print(string.format("Received game cmd %s", utils.ary_to_str(params))) │ + local rc = handle_cmd(table.unpack(params)) │ + handle_rc(rc) │ + update() │ + -- TODO handle "game_cmd" messages, call handle_cmd │ + elseif false then │ +--[[ │ + if header == "move" then │ + local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ + if m2 == nil then │ + error("Invalid \"move\" msg from " .. src) │ + return │ end │ - state.game_state = STATE_WAITING_FOR_MOVE_COMPLETE │ - state.move_timer = 0 │ - else │ + local player_idx, y, x = m2() │ + player_idx = tonumber(player_idx) │ + y = tonumber(y) │ + x = tonumber(x) │ + local coords = { y = y, x = x } │ + local rc = core.player_touch(state, player_idx, coords) │ + handle_rc(rc, true) │ │ - if dice_vals == nil then │ - roll_dice(state, player, --[[ num_dice = --]] 1) │ + if rc ~= core.SUCCESS then │ + alexgames.set_status_err("Other player made an invalid move") │ else │ - set_dice(state, dice_vals) │ + alexgames.set_status_msg("Your move") │ + update() │ + save_state() │ end │ - │ - if not core.all_init_roll_complete(state) then │ - if player ~= get_next_init_roll_player(state) then │ - error("game error: get_next_init_roll_player not current player") │ + │ +--]] │ + elseif header == "get_state" then │ + alexgames.send_message(src, "state:" .. serialize.serialize_state(state)) │ + elseif header == "state" then │ + local recvd_state = serialize.deserialize_state(payload) │ + print("Recieved state:") │ + --core.print_state(recvd_state) │ + state = recvd_state │ + update() │ + save_state() │ + elseif header == "player_left" and src == "ctrl" then │ + elseif header == "player_joined" then │ + else │ + error("Unhandled message: " .. header ) │ + end │ +end │ + │ +function two_player_init() │ + local args = { │ + supports_local_multiplayer = true, │ + title = "Choose piece colour", │ + player_choices = PLAYER_CHOICE_BTNS, │ + handle_multiplayer_type_choice = function (multiplayer_type) │ + if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ + local_multiplayer = true │ + elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ + local_multiplayer = false │ end │ - │ - state.player_init_rolls[player] = state.dice_vals[1] │ - │ - state.player_turn = get_next_init_roll_player(state) │ - if state.player_turn == nil then │ - state.game_state = STATE_WAITING_FOR_INIT_ACK │ - local first_player_info = get_init_first_player(state) │ - state.player_turn = first_player_info.player │ + end, │ + choice_id_to_player_id = function (btn_id) │ + return BTN_MAP[btn_id] │ + end, │ + player_name_to_id = player_name_to_id, │ + player_id_to_nice_name = function (player_id) │ + local player_colour = core.get_player_name(player_id) │ + return utils.make_first_char_uppercase(player_colour) │ + end, │ + get_msg = function () │ + local msg = "" │ + if utils.table_len(player_name_to_id) == 0 then │ + msg = msg .. "\nThe other player has not yet chosen." │ + else │ + --msg = msg .. string.format("The other player has chosen %s", │ + -- core.player_id_to_name(other_player)) │ + for player_name, player_id in pairs(player_name_to_id) do │ + local player_colour = core.get_player_name(player_id) │ + msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ + end │ + end │ + return msg │ + end, │ + handle_player_choice = function (player_name, player_id) │ + local choice_str = core.get_player_name(player_id) │ + print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ + │ + if player_name == two_player.LOCAL_PLAYER then │ + player = player_id │ + else │ + g_other_player = player_id │ end │ + end, │ + │ + need_reselect = function () │ + local this_player = player │ + local other_player = g_other_player │ + │ + return this_player == nil or this_player == other_player │ + end, │ + │ + get_local_player_choice = function () │ + return player │ end │ + } │ + │ + two_player.init(args) │ +end │ + │ +function get_state() │ + return serialize.serialize_state(state) │ +end │ + │ │ +function start_game(session_id_arg, serialized_state) │ + if serialized_state ~= nil then │ + load_state(session_id_arg, serialized_state) │ + else │ + local last_sess_id = alexgames.get_last_session_id() │ + if last_sess_id ~= nil then │ + serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ + if serialized_state ~= nil then │ + load_state(last_sess_id, serialized_state) │ + end │ + end │ end │ │ - return core.SUCCESS │ + -- TODO ideally the draw library could handle the button presses, forward a │ + -- generic event to main which could be passed to the core API │ + --draw.init(state) │ + │ + -- TODO call new game if no loaded state │ + │ + alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New game", type = alexgames.OPTION_TYPE_BTN }) │ + │ + alexgames.set_timer_update_ms(1000) │ + │ + local msg = core.get_status_msg(state) │ + alexgames.set_status_msg(msg) │ + │ + alexgames.send_message("all", "get_state:") │ + two_player_init() │ end │ │ -return core │ +-- TODO ideally the draw library could handle the button presses, forward a │ +-- generic event to main which could be passed to the core API │ +draw.init(state, { │ + handle_btn_clicked = handle_btn_clicked, │ +}) │ local serialize = {} │ │ local core = require("games/backgammon/backgammon_core") │ local serialize_lib = require("libs/serialize/serialize") │ │ serialize.CURRENT_VERSION = 2 │ │ @@ -18752,3242 +24517,2873 @@ │ return false │ end │ end │ │ return draw │ -- Game: Backgammon │ -- author: Alex Barry (github.com/alexbarry) │ ---[[ │ -TODO: │ -* players take turns rolling dice to decide who goes first? │ -* limit number of checkers on UI in each column to 6 or so, then show "+n" │ -* change piece highlights to yellow for "select a piece to move", │ -* then highlight selected piece in blue │ -* investigate errors │ - │ +local core = {} │ │ -The network multiplayer sequence is mostly: │ -* local user presses the screen to make a move, │ -* local game handles the move, draws on the screen, and │ -* send move to remote player │ -* remote player handles the move and updates the screen │ +local utils = require("libs/utils") │ +local dice = require("libs/dice/dice") │ +local combinations = require("libs/combinations") │ │ -Dice rolling is handled by one player serving as "host" │ -(let's call the other player "client"), │ -currently it is the player that selected {black or white} │ -first: │ -* when the host player rolls the dice, they send the "dice" (CMD_DICE) command. │ - This causes the remote player to call core.roll(state, game, dice_vals = ). │ - The core game logic should behave the same as if the local player rolled, but │ - instead of using its own random number generator, it uses the received dice values. │ -* when a client player rolls the dice: │ - - client sends the "roll request" (CMD_ROLL_REQ) command and do nothing else locally for now │ - - host should respond with CMD_DICE, which will cause the client player to roll │ - with the provided dice value │ │ -# Host rolls the dice │ +--[[ │ +-- Board: │ +-- │ +-- 1 1 1 │ +-- 2 1 0 9 8 7 6 5 4 3 2 1 │ +-- b - - - w - || b - - - - b │ +-- b - - - w - || b - - - - b <-- (black start) │ +-- b - - - w - || b - - - - - │ +-- b - - - - - || b - - - - - │ +-- b - - - - - || b - - - - - │ +-- || │ +-- w - - - - - || w - - - - - │ +-- w - - - - - || w - - - - - │ +-- w - - - b - || w - - - - - │ +-- w - - - b - || w - - - - w <-- (white start) │ +-- w - - - b - || w - - - - w │ +-- 1 1 1 1 1 1 1 2 2 2 2 2 │ +-- 3 4 5 6 7 8 9 0 1 2 3 4 │ +-- │ +--]] │ │ - host client │ - player 1 player 2 │ - | | │ - roll | | │ - request | | │ - | | │ - core.roll( | | │ - player=1, | | │ - vals=nil) | | │ - | | │ - (this | | │ - generates | | │ - dice vals) | | │ - | | │ - | ---> CMD_ROLL, dice vals ------>| core.roll(player=1, vals) │ - | | │ - | | (this advances game │ - | | state but uses the │ - | | provided dice vals │ - | | instead of generating │ - | | any) │ - | | │ +core.BACKGAMMON_ROWS = 2 │ +core.BACKGAMMON_COLS = 12 │ │ -# Client rolls the dice │ │ - host client │ - player 1 player 2 │ - | | │ - | | roll │ - | | request │ - | <------- CMD_ROLL_REQ <-------- | │ - core.roll( | | │ - player=2, | | │ - vals=nil) | | │ - | | │ - (this | | │ - generates | | │ - dice vals) | | │ - | ----> CMD_DICE, dice_vals ----> | core.roll(vals) │ - | | │ - | | │ - | | │ - │ ---]] │ -local core = require("games/backgammon/backgammon_core") │ -local draw = require("games/backgammon/backgammon_draw") │ -local serialize = require("games/backgammon/backgammon_serialize") │ +core.NUM_DICE = 2 -- 2 dice │ +core.DICE_MAX = 6 -- 6 sided dice │ │ -local two_player = require("libs/multiplayer/two_player") │ -local utils = require("libs/utils") │ +core.PLAYER_BLACK = 1 │ +core.PLAYER_WHITE = 2 │ +core.NUM_PLAYERS = 2 │ │ -local alexgames = require("alexgames") │ +-- top right of the board, where BLACK starts │ +core.BOARD_IDX_START = 1 │ │ -local session_id = alexgames.get_new_session_id() │ -local state = core.new_game() │ +-- bottom right of the board, where WHITE starts │ +core.BOARD_IDX_END = core.BACKGAMMON_COLS*2 │ │ --- I uncomment this when testing bearing off, without having to play a full game │ ---[[ │ -state.board = { │ - { │ - {}, │ - {}, │ - {}, │ - {}, │ - {}, │ - {}, │ +core.SUCCESS = 0 │ +core.NOT_YOUR_TURN = 1 │ +core.PIECE_CAN_NOT_MOVE = 2 │ +core.INVALID_DST = 3 │ +core.NO_PIECE_IN_SRC = 4 │ +core.NOT_YOUR_PIECE = 5 │ +core.MUST_MOVE_MIDDLE = 6 │ +core.INVALID_MOVE = 7 │ │ - {}, │ - {}, │ - {}, │ - {2,2,2,2,2,2,2,2,2}, │ - {}, │ - {}, │ - }, │ +local ERR_MSGS = { │ + [core.SUCCESS] = "Success", │ + [core.NOT_YOUR_TURN] = "Not your turn", │ + [core.PIECE_CAN_NOT_MOVE] = "This piece can not move", │ + [core.INVALID_DST] = "Invalid destination", │ + [core.NO_PIECE_IN_SRC] = "No piece to select", │ + [core.NOT_YOUR_PIECE] = "Not your piece", │ + [core.MUST_MOVE_MIDDLE] = "Must move piece in middle", │ + [core.INVALID_MOVE] = "Invalid move", │ +} │ │ - { │ - {}, │ - {}, │ - {}, │ - {}, │ - {}, │ - {}, │ +local STATE_WAITING_FOR_INIT_ROLLS = 1 │ +local STATE_WAITING_FOR_INIT_ACK = 2 │ +local STATE_WAITING_FOR_ROLL_NO_DBL = 3 │ +local STATE_WAITING_FOR_ROLL_AFTER_DBL= 4 │ +local STATE_WAITING_FOR_MOVE_COMPLETE = 5 │ │ - {}, │ - {}, │ - {}, │ - {1,1,1,1,1,1,1,1,1}, │ - {}, │ - {}, │ - }, │ +core.PLAYERS = { │ + core.PLAYER_BLACK, │ + core.PLAYER_WHITE, │ } │ ---]] │ - │ -local player = nil │ -local local_multiplayer = nil │ -local is_host = true -- TODO set this │ -local player_name_to_id = {} │ -local g_other_player = nil │ -local invalid_dst_in_a_row = 0 │ │ -local GAME_OPTION_NEW_GAME = "option_new_game" │ +function core.get_err_msg(rc) │ + return ERR_MSGS[rc] │ +end │ │ -local POPUP_ID_SELECT_PLAYER = "popup_select_player" │ -local PLAYER_CHOICE_BTNS = { │ - core.get_player_name(core.PLAYER_WHITE), │ - core.get_player_name(core.PLAYER_BLACK), │ -} │ -local BTN_MAP = { │ - [0] = core.PLAYER_WHITE, │ - [1] = core.PLAYER_BLACK, │ -} │ +function core.get_player_name(player) │ + if player == core.PLAYER_BLACK then return "Black" │ + elseif player == core.PLAYER_WHITE then return "White" │ + else error(string.format("unexpected player id=%s", player)) end │ +end │ │ -local function get_player() │ - if local_multiplayer then │ - return state.player_turn │ - else │ - return player │ +function core.all_init_roll_complete(state) │ + for player, init_roll in ipairs(state.player_init_rolls) do │ + if init_roll == 0 then │ + return false │ + end │ end │ + │ + return true │ end │ │ -local function save_state() │ - local serialized_state = serialize.serialize_state(state) │ - alexgames.save_state(session_id, serialized_state) │ +local function get_next_init_roll_player(state) │ + for player, init_roll in ipairs(state.player_init_rolls) do │ + if init_roll == 0 then │ + return player │ + end │ + end │ end │ │ -function update() │ - core.increment_move_timer(state) │ - draw.draw_state(state, session_id, get_player()) │ - print(string.format("Game state is %d", state.game_state)) │ - --core.print_state(state) │ - --alexgames.set_status_msg(core.get_status_msg(state)) │ +local function dice_sum(dice) │ + local sum_val = 0 │ + for _, die in ipairs(dice) do │ + sum_val = sum_val + die │ + end │ + return sum_val │ end │ │ -local function handle_rc(rc) │ - print(string.format("handle_rc(rc=%s(%s))", rc, core.get_err_msg(rc))) │ - if rc ~= core.SUCCESS then │ - local err_msg = core.get_err_msg(rc) │ - if rc == core.INVALID_DST then │ - invalid_dst_in_a_row = invalid_dst_in_a_row + 1 │ - if invalid_dst_in_a_row >= 3 then │ - err_msg = err_msg .. " (To change your selected piece, press the " .. │ - "middle of the board or the currently selected piece)" │ - end │ - else │ - invalid_dst_in_a_row = 0 │ +local function get_init_first_player(state) │ + local max_dice = nil │ + local max_dice_val = 0 │ + local max_player = nil │ + for player, init_dice in ipairs(state.player_init_rolls) do │ + if init_dice > max_dice_val then │ + max_dice_val = init_dice │ + max_dice = init_dice │ + max_player = player │ end │ - alexgames.set_status_err(err_msg) │ - else │ - invalid_dst_in_a_row = 0 │ - local msg = core.get_status_msg(state) │ - alexgames.set_status_msg(msg) │ + end │ │ - -- TODO only do this if a move was actually made │ - if rc == core.SUCCESS then │ - save_state() │ + return { player = max_player, dice = max_dice, dice_val = max_dice_val } │ +end │ + │ +function get_init_prev_status_msg(state) │ + local last_player = nil │ + for player, init_dice in ipairs(state.player_init_rolls) do │ + if init_dice == 0 then │ + break │ end │ + last_player = player │ + end │ + │ + if last_player ~= nil then │ + local last_player_name = core.get_player_name(last_player) │ + local last_roll = state.player_init_rolls[last_player] │ + return string.format("%s rolled %d. ", last_player_name, last_roll) │ end │ + │ + return "" │ end │ │ -local function double_request(player) │ - alexgames.set_status_msg(string.format("%s has proposed doubling the value of winning the match.", core.get_player_name(player))) │ - local rc = core.double_request(state, get_player()) │ - draw.double_request(state) │ - return rc │ +function core.get_status_msg(state) │ + --print(string.format("get_status_msg(state=%s)", state.game_state)) │ + if state.game_state == STATE_WAITING_FOR_INIT_ROLLS then │ + local player = get_next_init_roll_player(state) │ + local player_name = core.get_player_name(player) │ + │ + local prev_status_msg = get_init_prev_status_msg(state) │ + return string.format("%s%s, please roll to see who goes first", prev_status_msg, player_name) │ + end │ + if state.game_state == STATE_WAITING_FOR_INIT_ACK then │ + if state.player_init_rolls[1] == state.player_init_rolls[2] then │ + return string.format("Both players rolled a %s, press 'Ack' to start over.", state.player_init_rolls[1]) │ + else │ + local first_player = get_init_first_player(state).player │ + local first_player_name = core.get_player_name(first_player) │ + local prev_status_msg = get_init_prev_status_msg(state) │ + return string.format("%s%s goes first, press 'Acknowledge' to continue", prev_status_msg, first_player_name) │ + end │ + end │ + local action │ + if state.player_selected == nil then │ + action = "select a piece" │ + else │ + action = "select a destination" │ + end │ + return string.format("%s, please %s", core.get_player_name(state.player_turn), action) │ end │ │ +function core.show_roll_button(state, player) │ + if state.player_turn ~= player then │ + return false │ + end │ + return (state.game_state == STATE_WAITING_FOR_INIT_ROLLS or │ + state.game_state == STATE_WAITING_FOR_ROLL_NO_DBL or │ + state.game_state == STATE_WAITING_FOR_ROLL_AFTER_DBL) │ +end │ │ -local game_msg_prefix = "backgammon" │ +function core.show_ack_button(state) │ + return state.game_state == STATE_WAITING_FOR_INIT_ACK │ +end │ │ -local CMD_TOUCH = "touch" │ -local CMD_DOUBLE_REQUEST = "double_request" │ -local CMD_ROLL = "roll" │ -local CMD_ROLL_REQ = "roll_request" │ -local CMD_ACK_INIT = "ack_init" │ -local CMD_ACK_CANT_MOVE = "ack_cant_move" -- TODO combine with the other ack │ -local CMD_UNSELECT = "unselect" │ +local function set_used_dice(state, dice_vals) │ + state.used_dice = {} │ + for i=1,#state.dice_vals do │ + state.used_dice[i] = false │ + end │ +end │ │ -local CMD_DICE = "dice" │ │ --- This should be called when the user presses the "roll" button. │ --- It either does the roll locally, or sends a message and shows "waiting" │ --- to the user until the dice values are received from the host player. │ -function roll_request(state, player) │ - if local_multiplayer or two_player.am_first_player() then │ - local request_is_local = (player == get_player()) │ - local for_player_str = nil │ - if request_is_local then │ - for_player_str = string.format("for local player %s", player) │ +function core.ack_init(state, player) │ + if state.game_state == STATE_WAITING_FOR_INIT_ACK then │ + if state.player_init_rolls[1] == state.player_init_rolls[2] then │ + state.game_state = STATE_WAITING_FOR_INIT_ROLLS │ + state.dice_vals = {} │ + state.player_init_rolls = { 0, 0 } │ else │ - for_player_str = string.format("on behalf of player %s", player) │ - end │ - print(string.format("We are player 1 of %d, rolling dice (%s) and broadcasting value", two_player.get_player_count(), for_player_str)) │ - local rc = core.roll(state, player) │ - if rc == core.SUCCESS then │ - if state.dice_vals ~= nil then │ - print(string.format("dice_vals len is %d, vals: %s", #state.dice_vals, utils.ary_to_str(state.dice_vals))) │ - else │ - print(string.format("dice_vals == nil")) │ - end │ - if request_is_local then │ - send_cmd(CMD_ROLL, player, state.dice_vals) │ - else │ - send_cmd(CMD_DICE, player, state.dice_vals) │ - end │ + local first_player_info = get_init_first_player(state) │ + state.dice_vals = { state.player_init_rolls[1], state.player_init_rolls[2] } │ + set_used_dice(state, state.dice_vals) │ + state.game_state = STATE_WAITING_FOR_MOVE_COMPLETE │ + state.move_timer = 0 │ end │ - │ - return rc │ else │ - -- this is a bit awkward, but we don't want to let │ - -- the remote player send the roll command if it isn't their turn │ - if state.player_turn ~= get_player() then │ - return core.NOT_YOUR_TURN │ - end │ - print(string.format("We are not player 1 of %d, send a cmd to roll and hope the other player sends us the dice value", two_player.get_player_count())) │ - send_cmd(CMD_ROLL_REQ, player) │ - state.dice_vals = {} │ - state.dice_loading = true │ - -- when CMD_DICE is received, we'll call core.roll(state, player, dice_vals) │ - -- to act as if this player rolled, but providing the dice values sent by the │ - -- other player │ - return core.SUCCESS │ + error(string.format("ack_init called from state %s", state.game_state)) │ end │ + │ + return core.SUCCESS │ end │ │ -function send_cmd(cmd, player, params) │ - local params_str = "" │ - if params ~= nil then │ - params_str = table.concat(params, ",") │ +local function make_pieces(val, piece_count) │ + local ary = {} │ + for i=1,piece_count do │ + table.insert(ary, val) │ end │ - local msg = string.format("%s:%s,%s,%s", game_msg_prefix, cmd, player, params_str) │ - print(string.format("sending msg %s", msg)) │ - --print(string.format("pieces were: cmd (%s), player (%s), params_str(%s)", cmd, player, params_str)) │ - alexgames.send_message("all", msg) │ + return ary │ end │ │ -local function str_ary_to_number_ary(str_ary) │ - local num_ary = {} │ - for _, s in ipairs(str_ary) do │ - table.insert(num_ary, tonumber(s)) │ +function core.board_idx_to_coords(idx) │ + if idx < 1 then return core.get_bearing_off_coords() end │ + if idx > core.BACKGAMMON_COLS*2 then return core.get_bearing_off_coords() end │ + │ + idx = idx - 1 │ + local y = math.floor(idx/core.BACKGAMMON_COLS)+1 │ + local x = idx % core.BACKGAMMON_COLS + 1 │ + if y == 1 then │ + x = core.BACKGAMMON_COLS - x + 1 │ end │ - return num_ary │ + return { y = y, x = x } │ end │ │ -local function parse_cmd(cmd_str) │ - local cmd_pieces = utils.gmatch_to_list("([^,]+)", cmd_str) │ - local cmd, player_str = table.unpack(cmd_pieces, 1, 2) │ - local params = {table.unpack(cmd_pieces, 3)} │ - params = str_ary_to_number_ary(params) │ - --print(string.format("params type=%s, val=%s", type(params), params)) │ - │ - --print(string.format("parsed cmd to: %s %s %s (cmd_pieces was %s)", cmd, player_str, params, utils.ary_to_str(cmd_pieces))) │ - return cmd, tonumber(player_str), params │ +function core.is_last_piece(state, player, coords, piece_idx) │ + local cell = core.get_cell(state, player, coords) │ + if core.coords_are_middle(coords) then │ + return piece_idx == #cell │ + else │ + return #cell == piece_idx │ + end │ end │ │ -local function handle_cmd(cmd, player, params) │ - print(string.format("handle_cmd(cmd=%s, player=%s, params=%s)", cmd, player, utils.ary_to_str(params))) │ - if cmd == CMD_TOUCH then │ - local coords = nil │ - if params ~= nil and #params > 0 then │ - coords = { y = params[1], x = params[2] } │ +function core.coords_to_board_idx(player, coords) │ + if core.coords_are_middle(coords) then │ + if player == core.PLAYER_BLACK then │ + -- TODO maybe reverse these? │ + return core.BOARD_IDX_START - 1 │ + elseif player == core.PLAYER_WHITE then │ + return core.BOARD_IDX_END + 1 │ + else │ + error(string.format("coords_to_board_idx: invalid player %s", player), 2) │ end │ - return core.player_touch(state, player, coords) │ - elseif cmd == CMD_DOUBLE_REQUEST then │ - return double_request(player) │ - elseif cmd == CMD_ACK_INIT then │ - return core.ack_init(state, player) │ - elseif cmd == CMD_ACK_CANT_MOVE then │ - return core.player_cant_move_ack(state, player) │ - elseif cmd == CMD_UNSELECT then │ - if player ~= state.player_turn then │ - error(string.format("Player %s tried to unselect when not their turn", player)) │ + elseif core.coords_are_bearing_off(coords) then │ + if player == core.PLAYER_BLACK then │ + return core.BOARD_IDX_START-1 │ + elseif player == core.PLAYER_WHITE then │ + return core.BOARD_IDX_END+1 │ + else │ + error(string.format("coords_to_board_idx: invalid player %s", player), 2) │ end │ - state.player_selected = nil │ - return core.SUCCESS │ - elseif cmd == CMD_DICE or │ - cmd == CMD_ROLL then │ - local dice_vals = params │ + end │ │ - if dice_vals == nil then │ - error(string.format("Received cmd %s without dice val params", cmd)) │ + if coords == nil or │ + coords.x == nil or coords.y == nil or │ + not(1 <= coords.y and coords.y <= 2) or │ + not(1 <= coords.x and coords.x <= core.BACKGAMMON_COLS) then │ + error(string.format("invalid coords {y=%s, x=%s}", coords.y, coords.x), 2) │ + end │ + local idx = (coords.y-1) * core.BACKGAMMON_COLS │ + if coords.y == 1 then │ + idx = idx + (core.BACKGAMMON_COLS - coords.x) + 1 │ + else │ + idx = idx + coords.x │ + end │ + return idx │ +end │ + │ + │ +function pt_eq(coord1, coord2) │ + return coord1.x == coord2.x and coord1.y == coord2.y │ +end │ + │ +function core.piece_is_selected(state, coords) │ + return state.player_selected ~= nil and pt_eq(state.player_selected, coords) │ +end │ + │ +--[[ │ +function test(idx, coord) │ + local coords_result = core.board_idx_to_coords(idx) │ + print(string.format("%d --> coords{y=%2d, x=%2d}", idx, coords_result.y, coords_result.x)) │ + local idx_result = core.coords_to_board_idx(player, coord) │ + print(string.format("coords{y=%2d, x=%2d} --> %d", coord.y, coord.x, idx_result)) │ + assert(pt_eq(coord, coords_result)) │ + assert(idx == idx_result) │ +end │ +test(1, { y=1, x=12}) │ +test(2, { y=1, x=11}) │ +test(3, { y=1, x=10}) │ +test(4, { y=1, x= 9}) │ +test(5, { y=1, x= 8}) │ +test(6, { y=1, x= 7}) │ +test(7, { y=1, x= 6}) │ +test(8, { y=1, x= 5}) │ +test(9, { y=1, x= 4}) │ +test(10, { y=1, x= 3}) │ +test(11, { y=1, x= 2}) │ +test(12, { y=1, x= 1}) │ +test(13, { y=2, x= 1}) │ +test(14, { y=2, x= 2}) │ +test(15, { y=2, x= 3}) │ +test(16, { y=2, x= 4}) │ +test(17, { y=2, x= 5}) │ +test(18, { y=2, x= 6}) │ +test(19, { y=2, x= 7}) │ +test(20, { y=2, x= 8}) │ +test(21, { y=2, x= 9}) │ +test(22, { y=2, x= 10}) │ +test(23, { y=2, x= 11}) │ +test(24, { y=2, x= 12}) │ +--]] │ + │ +--[ │ +-- starting positions are: │ +-- 1 2 3 4 5 6 7 8 9 10 11 12 │ +-- B5 -- -- -- 3W -- | 5W -- -- -- -- 2B │ +-- W5 -- -- -- 3B -- | 5B -- -- -- -- 2W │ +-- white moves clockwise │ +-- black moves counter clockwise, │ +--] │ +function core.new_game() │ + local state = { │ + player_init_rolls = {}, │ + player_turn = core.PLAYER_BLACK, │ + game_state = STATE_WAITING_FOR_INIT_ROLLS, │ + │ + -- there are typically two dice, unless when rolled they │ + -- have the same value, in which case there are 4 dice. │ + -- i.e. each value represents a move that can be made. │ + -- the UI may choose to render this differently │ + dice_vals = nil, │ + -- array of booleans corresponding to if values in `dice_vals` have been used │ + used_dice = nil, │ + player_selected = nil, │ + │ + double_val = 1, │ + │ + move_timer = nil, │ + │ + -- set to true when the player must press a "can't move" button to acknowledge that │ + -- they can't move. Only needed when there are dice moves remaining, but they can't be │ + -- used to make a legitimate move. │ + player_cant_move = false, │ + pieces_in_middle = {}, │ + finished_pieces = {}, │ + board = {}, │ + } │ + │ + for _, player in ipairs(core.PLAYERS) do │ + state.player_init_rolls[player] = 0 │ + state.pieces_in_middle[player] = {} │ + state.finished_pieces[player] = {} │ + end │ + │ + for y=1,core.BACKGAMMON_ROWS do │ + state.board[y] = {} │ + for x=1,core.BACKGAMMON_COLS do │ + state.board[y][x] = {} │ end │ + end │ │ + state.board[1][ 1] = make_pieces(core.PLAYER_BLACK, 5) │ + state.board[1][ 5] = make_pieces(core.PLAYER_WHITE, 3) │ + state.board[1][ 7] = make_pieces(core.PLAYER_BLACK, 5) │ + state.board[1][12] = make_pieces(core.PLAYER_BLACK, 2) │ │ - rc = core.roll(state, player, dice_vals) │ - state.dice_loading = false │ - print(string.format("Dice vals are now: %s", utils.ary_to_str(state.dice_vals))) │ - update() │ - return rc │ - elseif cmd == CMD_ROLL_REQ then │ - rc = roll_request(state, player) │ - handle_rc(rc) │ - update() │ - else │ - error(string.format("Unhandled cmd \"%s\"", cmd)) │ + state.board[2][ 1] = make_pieces(core.PLAYER_WHITE, 5) │ + state.board[2][ 5] = make_pieces(core.PLAYER_BLACK, 3) │ + state.board[2][ 7] = make_pieces(core.PLAYER_WHITE, 5) │ + state.board[2][12] = make_pieces(core.PLAYER_WHITE, 2) │ + │ + return state │ +end │ + │ +function core.get_player_dir(player) │ + if player == 1 then return 1 │ + elseif player == 2 then return -1 │ + else error(string.format("unexpected player %s", player), 2) end │ +end │ + │ +function core.print_state(state) │ + print("state = {") │ + print(string.format(" player_turn = %s", state.player_turn)) │ + print(string.format(" player_cant_move = %s", state.player_cant_move)) │ + print(string.format(" dice_vals = %s", utils.ary_to_str(state.dice_vals))) │ + print(string.format(" used_dice = %s", utils.ary_to_str(state.used_dice))) │ + print(string.format(" player_selected = %s", state.player_selected)) │ + print(string.format(" finished_pieces = %s", utils.ary_to_str(state.finished_pieces))) │ + for i=1,2*core.BACKGAMMON_COLS do │ + local coords = core.board_idx_to_coords(i) │ + print(string.format(" board[%2d][%2d] (board idx: %2d) = %s", │ + coords.y, coords.x, i, │ + utils.ary_to_str(state.board[coords.y][coords.x]))) │ + end │ + for player=1,core.NUM_PLAYERS do │ + print(string.format(" pieces_in_middle[%d] = %s", player, utils.ary_to_str(state.pieces_in_middle[player]))) │ end │ + print("}") │ end │ │ -local function send_and_handle_cmd(cmd, player, params) │ - if cmd == CMD_ROLL or cmd == CMD_ROLL_REQ then │ - error("send_and_handle_cmd does not handle CMD_ROLL") │ +local function set_dice(state, dice_vals) │ + state.dice_vals = dice_vals │ + set_used_dice(state, state.dice_vals) │ +end │ + │ +local function roll_dice(state, player, num_dice) │ + assert(num_dice ~= nil) │ + state.dice_vals = dice.roll_multiple_dice(num_dice, core.DICE_MAX) │ + if num_dice == 2 and │ + state.dice_vals[1] == state.dice_vals[2] then │ + for i=1,2 do │ + table.insert(state.dice_vals, state.dice_vals[1]) │ + end │ end │ + set_dice(state, state.dice_vals) │ +end │ │ - local rc = handle_cmd(cmd, player, params) │ - if rc == core.SUCCESS then │ - send_cmd(cmd, player, params) │ +function core.player_selecting_dst(state, player) │ + return state.player_selected ~= nil │ +end │ + │ +-- indicates if a destination is free to move to (e.g. is not occupied by │ +-- more than one enemy piece) │ +local function can_move_to_pos(state, y_idx, x_idx) │ + local dst = {y=y_idx, x=x_idx} │ + if core.coords_are_bearing_off(dst) then │ + return true │ end │ - print(string.format("cmd %s returned status %s (%s)", cmd, rc, core.get_err_msg(rc))) │ + local dst_cell = core.get_cell(state, player, dst) │ + return (#dst_cell == 0 or #dst_cell == 1 or │ + dst_cell[1] == state.player_turn) │ +end │ │ - return rc │ +-- if a (pseudo) position is outside a board in the player's │ +-- forward direction, meaning that moving a place to this │ +-- position will remove it from the board (i.e. bearing off) │ +local function in_bearing_off_region(player, pos_idx) │ + return (player == core.PLAYER_BLACK and pos_idx > core.BOARD_IDX_END or │ + player == core.PLAYER_WHITE and pos_idx < core.BOARD_IDX_START) │ end │ │ +-- given a move choice, see if it is a valid move based on the dice sums. │ +-- TODO this generates all the sums and checks each one against the dst. │ +-- it would be more efficient to generates sums, find dsts that can be highlighted, │ +-- then only try to highlight those. │ +function core.valid_dst(state, player, src, dst) │ + if src == nil then return false end │ + src = core.coords_to_board_idx(player, src) │ │ -function handle_user_clicked(pos_y, pos_x) │ - local can_bear_off = core.player_can_bear_off(state, get_player()) │ - -- NOTE that this can be "middle" too │ - local sel_coords = draw.screen_coords_to_board_coords(pos_y, pos_x, can_bear_off) │ + local possib_dst_idx = core.coords_to_board_idx(player, dst) │ │ - local btn_clicked = draw.handle_user_clicked(pos_y, pos_x) │ + local avail_dice_vals = core.get_avail_dice(state.used_dice, state.dice_vals) │ + local sums_info = combinations.get_distinct_sums(avail_dice_vals) │ + -- Need to sort this for the case of bearing off, where │ + -- instead of moving to a specific destination, you just │ + -- need to move to a spot greater than 24 or less than 1. │ + -- In that case, we must start with the smaller sums first, │ + -- to avoid wasting more than necessary dice moving to a spot │ + -- further than max+1 or min-1 │ + table.sort(sums_info, function (left, right) │ + return left.val < right.val │ + end) │ │ - if not btn_clicked then │ - local params = nil │ - if sel_coords ~= nil then │ - params = {sel_coords.y, sel_coords.x} │ + for _, sum_info in ipairs(sums_info) do │ + if sum_info.val == 0 then │ + goto next_sum │ end │ - local rc = send_and_handle_cmd(CMD_TOUCH, get_player(), params) │ - handle_rc(rc) │ + local dice_move_pos = src + core.get_player_dir(state.player_turn) * sum_info.val │ + if dice_move_pos == possib_dst_idx or │ + core.coords_are_bearing_off(dst) and in_bearing_off_region(player, dice_move_pos) then │ + local dst_coords = core.board_idx_to_coords(possib_dst_idx) │ + local is_valid = can_move_to_pos(state, dst_coords.y, dst_coords.x) │ + if is_valid then │ + local indexes_used = utils.get_val_indexes(avail_dice_vals, sum_info.parts) │ + --print("avail_dice_vals = %s", utils.ary_to_str(avail_dice_vals)) │ + --print(string.format("Used dice %s", utils.ary_to_str(indexes_used))) │ + return { is_valid = true, used_dice = indexes_used } │ + end │ + end │ + ::next_sum:: │ end │ - draw.draw_state(state, session_id, get_player()) │ - --core.print_state(state) │ │ + return { is_valid = false, used_dice = {} } │ end │ │ -local function load_state(session_id_arg, serialized_state) │ - session_id = session_id_arg │ - state = serialize.deserialize_state(serialized_state) │ +function valid_board_idx(board_idx) │ + return 1 <= board_idx and board_idx <= core.BACKGAMMON_COLS*2 │ end │ │ -local function load_saved_state_offset(move_id_offset) │ - local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ - if serialized_state == nil then │ - error(string.format("adjust_saved_state_offset(offset=%d) returned nil", move_id_offset)) │ +function core.get_avail_dice(used_dice, dice_vals) │ + if used_dice == nil or dice_vals == nil then │ + error(string.format("get_avail_dice: nil args used_dice=%s, dice_vals=%s", used_dice, dice_vals), 2) │ end │ - load_state(session_id, serialized_state) │ - update() │ -end │ │ -function handle_btn_clicked(btn_id) │ - print("handle_btn_clicked: " .. btn_id) │ - local rc │ - if btn_id == draw.BTN_ID_CANT_MOVE then │ - rc = send_and_handle_cmd(CMD_ACK_CANT_MOVE, get_player()) │ - draw.draw_state(state, session_id, get_player()) │ - elseif btn_id == draw.BTN_ID_UNDO then │ - load_saved_state_offset(-1) │ - -- TODO broadcast state │ - elseif btn_id == draw.BTN_ID_REDO then │ - load_saved_state_offset(1) │ - -- TODO broadcast state │ - elseif btn_id == draw.BTN_ID_DOUBLE_REQUEST then │ - rc = send_and_handle_cmd(CMD_DOUBLE_REQUEST, get_player()) │ - elseif btn_id == draw.BTN_ID_ROLL then │ - --rc = send_and_handle_cmd(CMD_ROLL, get_player()) │ - rc = roll_request(state, get_player()) │ - update() │ - elseif btn_id == draw.BTN_ID_ACK then │ - rc = send_and_handle_cmd(CMD_ACK_INIT, get_player()) │ - update() │ - elseif btn_id == draw.BTN_ID_UNSELECT then │ - rc = send_and_handle_cmd(CMD_UNSELECT, get_player()) │ - update() │ - else │ - error(string.format("unhandled btn_id=%s", btn_id)) │ + if #used_dice ~= #dice_vals then │ + error(string.format("get_avail_dice: used_dice len: %d, dice_vals len: %d", #used_dice, #dice_vals)) │ end │ - handle_rc(rc) │ -end │ │ -function handle_popup_btn_clicked(popup_id, btn_id) │ - if two_player.handle_popup_btn_clicked(popup_id, btn_id) then │ - -- do nothing │ - elseif popup_id == draw.POPUP_ID_DOUBLE_REQUEST then │ - local accepted = nil │ - if btn_id == draw.DOUBLE_REQUEST_BTN_ACCEPT then │ - accepted = true │ - elseif btn_id == draw.DOUBLE_REQUEST_BTN_DECLINE then │ - accepted = false │ - else │ - error(string.format("Unhandled popup btn id %s, in popup id %s", btn_id, popup_id)) │ + local dice_avail = {} │ + for i, dice_val in ipairs(dice_vals) do │ + if used_dice[i] then │ + dice_val = 0 │ end │ - core.double_response(state, get_player(), accepted) │ - alexgames.hide_popup() │ - update() │ - else │ - error(string.format("Unhandled popup_id = %s", popup_id)) │ + table.insert(dice_avail, dice_val) │ end │ + return dice_avail │ end │ │ -local function new_game() │ - alexgames.set_status_msg("Starting new game") │ - session_id = alexgames.get_new_session_id() │ - state = core.new_game() │ - update() │ -end │ - │ -function handle_game_option_evt(option_id) │ - if option_id == GAME_OPTION_NEW_GAME then │ - new_game() │ - alexgames.send_message("all", "derp hello world test to see if this is sent to sender") │ - else │ - error(string.format("unhandled game option id %s", option_id)) │ +function core.player_can_move(state, player) │ + for y=1,core.BACKGAMMON_ROWS do │ + for x=1,core.BACKGAMMON_COLS do │ + if core.piece_can_move(state, player, {y=y, x=x}) then │ + return true │ + end │ + end │ end │ + return false │ end │ │ -function handle_msg_received(src, msg) │ - print("Recvd msg " .. msg) │ +-- returns true if a piece is able to move. │ +-- This is meant for when the player is selecting a piece to move, │ +-- whether or not it should be highlighted in the UI, and if it can be │ +-- selected by the player │ +function core.piece_can_move(state, player, coords) │ + if player == nil then │ + return false │ + end │ │ - if two_player.handle_msg_received(src, msg) then │ - return │ + if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ + return false │ end │ │ - local m = msg:gmatch("([^:]+):(.*)") │ - if m == nil then │ - print("Unable to parse header from msg " .. msg) │ - return │ + if not core.all_init_roll_complete(state, player) then │ + return false │ + end │ + --print(string.format("piece_can_move(player=%d, coords=%s)", player, core.coords_to_str(coords))) │ + local cell = core.get_cell(state, player, coords) │ + if #cell == 0 or cell[1] ~= state.player_turn then │ + return false │ end │ - local header, payload = m() │ │ - if header == game_msg_prefix then │ - local params = {parse_cmd(payload)} │ - --print(string.format("params len: %d", #params)) │ - --print(string.format("Received game cmd %s", utils.ary_to_str(params))) │ - local rc = handle_cmd(table.unpack(params)) │ - handle_rc(rc) │ - update() │ - -- TODO handle "game_cmd" messages, call handle_cmd │ - elseif false then │ ---[[ │ - if header == "move" then │ - local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ - if m2 == nil then │ - error("Invalid \"move\" msg from " .. src) │ - return │ - end │ - local player_idx, y, x = m2() │ - player_idx = tonumber(player_idx) │ - y = tonumber(y) │ - x = tonumber(x) │ - local coords = { y = y, x = x } │ - local rc = core.player_touch(state, player_idx, coords) │ - handle_rc(rc, true) │ + if #state.pieces_in_middle[player] > 0 and │ + not core.coords_are_middle(coords) then │ + return false │ + end │ │ - if rc ~= core.SUCCESS then │ - alexgames.set_status_err("Other player made an invalid move") │ - else │ - alexgames.set_status_msg("Your move") │ - update() │ - save_state() │ - end │ + local src = core.coords_to_board_idx(player, coords) │ │ ---]] │ - elseif header == "get_state" then │ - alexgames.send_message(src, "state:" .. serialize.serialize_state(state)) │ - elseif header == "state" then │ - local recvd_state = serialize.deserialize_state(payload) │ - print("Recieved state:") │ - --core.print_state(recvd_state) │ - state = recvd_state │ - update() │ - save_state() │ - elseif header == "player_left" and src == "ctrl" then │ - elseif header == "player_joined" then │ - else │ - error("Unhandled message: " .. header ) │ - end │ -end │ + local avail_dice = core.get_avail_dice(state.used_dice, state.dice_vals) │ + --print(string.format("piece_can_move: avail_dice = %s", utils.ary_to_str(avail_dice))) │ + local sums_info = combinations.get_distinct_sums(avail_dice) │ │ -function two_player_init() │ - local args = { │ - supports_local_multiplayer = true, │ - title = "Choose piece colour", │ - player_choices = PLAYER_CHOICE_BTNS, │ - handle_multiplayer_type_choice = function (multiplayer_type) │ - if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ - local_multiplayer = true │ - elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ - local_multiplayer = false │ - end │ - end, │ - choice_id_to_player_id = function (btn_id) │ - return BTN_MAP[btn_id] │ - end, │ - player_name_to_id = player_name_to_id, │ - player_id_to_nice_name = function (player_id) │ - local player_colour = core.get_player_name(player_id) │ - return utils.make_first_char_uppercase(player_colour) │ - end, │ - get_msg = function () │ - local msg = "" │ - if utils.table_len(player_name_to_id) == 0 then │ - msg = msg .. "\nThe other player has not yet chosen." │ - else │ - --msg = msg .. string.format("The other player has chosen %s", │ - -- core.player_id_to_name(other_player)) │ - for player_name, player_id in pairs(player_name_to_id) do │ - local player_colour = core.get_player_name(player_id) │ - msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ - end │ - end │ - return msg │ - end, │ - handle_player_choice = function (player_name, player_id) │ - local choice_str = core.get_player_name(player_id) │ - print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ │ - if player_name == two_player.LOCAL_PLAYER then │ - player = player_id │ - else │ - g_other_player = player_id │ - end │ - end, │ + local can_bear_off = core.piece_can_bear_off(state, player, coords) │ │ - need_reselect = function () │ - local this_player = player │ - local other_player = g_other_player │ + for _, sum_info in ipairs(sums_info) do │ + if sum_info.val == 0 then │ + goto next_sum │ + end │ + local possib_dst_idx = src + core.get_player_dir(state.player_turn) * sum_info.val │ │ - return this_player == nil or this_player == other_player │ - end, │ + if can_bear_off and in_bearing_off_region(player, possib_dst_idx) then │ + return true │ + end │ │ - get_local_player_choice = function () │ - return player │ + if not valid_board_idx(possib_dst_idx) then │ + goto next_sum │ end │ - } │ + local dst_coords = core.board_idx_to_coords(possib_dst_idx) │ + if can_move_to_pos(state, dst_coords.y, dst_coords.x) then │ + return true │ + end │ + ::next_sum:: │ + end │ │ - two_player.init(args) │ + return false │ end │ │ -function get_state() │ - return serialize.serialize_state(state) │ +-- returns true if any dice have not been used yet │ +function core.any_dice_avail(state) │ + return utils.any_eq(state.used_dice, false) │ end │ │ +local function next_turn(state) │ + --print("Moving to next player's turn") │ + state.player_turn = (state.player_turn % core.NUM_PLAYERS) + 1 │ + state.game_state = STATE_WAITING_FOR_ROLL_NO_DBL │ + state.move_timer = nil │ + state.dice_vals = {} │ + set_used_dice(state, state.dice_vals) │ │ -function start_game(session_id_arg, serialized_state) │ - if serialized_state ~= nil then │ - load_state(session_id_arg, serialized_state) │ - else │ - local last_sess_id = alexgames.get_last_session_id() │ - if last_sess_id ~= nil then │ - serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ - if serialized_state ~= nil then │ - load_state(last_sess_id, serialized_state) │ - end │ - end │ + if not core.player_can_move(state, state.player_turn) then │ + state.player_cant_move = true │ end │ │ - -- TODO ideally the draw library could handle the button presses, forward a │ - -- generic event to main which could be passed to the core API │ - --draw.init(state) │ - │ - -- TODO call new game if no loaded state │ +end │ │ - alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New game", type = alexgames.OPTION_TYPE_BTN }) │ +local function mark_dice_used(state, dice_used_in_move) │ + for _, dice_idx in ipairs(dice_used_in_move) do │ + if state.used_dice[dice_idx] then │ + error(string.format("tried to use dice %s but they were already used, previous use state = %s", │ + utils.ary_to_str(dice_used_in_move), │ + utils.ary_to_str(orig_dice_used))) │ + end │ + state.used_dice[dice_idx] = true │ + end │ +end │ │ - alexgames.set_timer_update_ms(1000) │ +-- TODO make sure that middle can't be used as a destination │ +local function move_player(state, player, dst_coords, dice_used_in_move) │ + print(string.format("move_player %d, selected=%s, dst=%s, dice_used_in_move=%s", │ + player, core.coords_to_str(state.player_selected), core.coords_to_str(dst_coords), │ + utils.ary_to_str(dice_used_in_move))) │ + local src = core.get_cell(state, player, state.player_selected) │ + local dst = core.get_cell(state, player, dst_coords) │ │ - local msg = core.get_status_msg(state) │ - alexgames.set_status_msg(msg) │ + print(string.format("move_player src_cell=%s, dst_cell=%s", utils.ary_to_str(src), utils.ary_to_str(dst))) │ │ - alexgames.send_message("all", "get_state:") │ - two_player_init() │ -end │ + -- If dst is opponent, handle "hit": place piece in middle │ + if #dst > 0 and dst[1] ~= player then │ + if #dst ~= 1 then │ + error("move_player called with dst containing more than one opponent piece") │ + end │ + local piece = table.remove(dst) │ + table.insert(state.pieces_in_middle[piece], piece) │ + end │ │ --- TODO ideally the draw library could handle the button presses, forward a │ --- generic event to main which could be passed to the core API │ -draw.init(state, { │ - handle_btn_clicked = handle_btn_clicked, │ -}) │ -local alexgames = require("alexgames") │ -local cards = require("libs/cards/cards") │ -local card_draw = require("libs/cards/cards_draw") │ + local piece = table.remove(src) │ + assert(piece == player) │ + table.insert(dst, piece) │ │ -local draw = {} │ + local orig_dice_used = utils.ary_copy(state.used_dice) │ + mark_dice_used(state, dice_used_in_move) │ + state.player_selected = nil │ │ -local card_height = nil │ -local card_width = nil │ -local card_font_size = nil │ + if not core.any_dice_avail(state) then │ + print("no dice remaining, next player's turn") │ + next_turn(state) │ + elseif not core.player_can_move(state, player) then │ + print("dice remain but player can not move anywhere") │ + state.player_cant_move = true │ + end │ + -- if dice are available, but no moves can be made, then player needs to press a "can't move" button to progress │ +end │ │ -local REVEAL_AREA_COLOUR = '#8888ff33' │ -local REVEAL_AREA_TEXT = 'Revealed' │ -local REVEAL_AREA_TEXT_COLOUR = '#0000ff88' │ -local REVEAL_AREA_TEXT_SIZE = 18 │ -local text_y_size = 25 │ +function core.player_cant_move_ack(state, player) │ + if player ~= state.player_turn then │ + return core.NOT_YOUR_TURN │ + end │ │ -local width = nil │ -local height = nil │ -local reveal_area = nil │ + if not state.player_cant_move then │ + error("player_cant_move_ack called when state.player_cant_move is false") │ + end │ │ -local PLAYER_CURSOR_RADIUS = 5 │ -local PLAYER_COLOURS = { │ - { fill = '#ff000088', outline = '#ff0000' }, │ - { fill = '#0000ff88', outline = '#0000ff' }, │ - { fill = '#00ff0088', outline = '#00ff00' }, │ - { fill = '#00888888', outline = '#00ffff' }, │ -} │ + state.player_cant_move = false │ + next_turn(state) │ + return core.SUCCESS │ +end │ │ -function draw.init(args) │ - width = args.width │ - height = args.height │ - reveal_area = args.reveal_area │ - card_height = args.card_height │ - card_width = args.card_width │ - card_font_size = args.card_font_size │ +function core.coords_are_middle(coords) │ + if coords == nil then error("arg is nil", 2) end │ + return coords.y == -1 and coords.x == -1 │ end │ │ -function draw.draw(state, player) │ - alexgames.draw_clear() │ +function core.get_middle_coords() │ + return { y = -1, x = -1 } │ +end │ │ - if state == nil then │ - return │ +function core.coords_are_bearing_off(coords) │ + if coords == nil then │ + error("arg is nil", 2) │ end │ + return coords.y == -2 and coords.x == -2 │ +end │ │ - alexgames.draw_rect(REVEAL_AREA_COLOUR, │ - 0, 0, reveal_area, width) │ - alexgames.draw_text(REVEAL_AREA_TEXT, REVEAL_AREA_TEXT_COLOUR, │ - text_y_size, 0, REVEAL_AREA_TEXT_SIZE, 1, 0) │ - │ - alexgames.draw_rect(REVEAL_AREA_COLOUR, │ - height - reveal_area, 0, height, width) │ - alexgames.draw_text(REVEAL_AREA_TEXT, REVEAL_AREA_TEXT_COLOUR, │ - height - reveal_area + text_y_size, 0, REVEAL_AREA_TEXT_SIZE, 1, 0) │ - for _, card_info in ipairs(state.cards) do │ - local card = nil │ - if card_info.recvd or card_info.revealed_all or card_info.revealed_to_player == player then │ - card = card_info.card │ - else │ - card = cards.UNREVEALED_CARD │ - end │ - card_draw.draw_card(card, │ - math.floor(card_info.y - card_height/2), │ - math.floor(card_info.x - card_width/2), │ - card_width, card_height, card_font_size, false, 0) │ - end │ +function core.get_bearing_off_coords() │ + return { y = -2, x = -2 } │ +end │ │ - for i=1,#state.player_states do │ - if state.player_states[i].y == nil or │ - state.player_states[i].x == nil then │ - goto next_player_cursor │ +function core.get_cell(state, player, coords) │ + if coords == nil then error("arg is nil", 2) end │ + if core.coords_are_middle(coords) then │ + return state.pieces_in_middle[player] │ + elseif core.coords_are_bearing_off(coords) then │ + return state.finished_pieces[player] │ + else │ + if state.board[coords.y] == nil or state.board[coords.y][coords.x] == nil then │ + error(string.format("core.get_cell: unexpected coords %s", core.coords_to_str(coords)), 2) │ end │ - alexgames.draw_circle(PLAYER_COLOURS[i].fill, PLAYER_COLOURS[i].outline, │ - state.player_states[i].y, │ - state.player_states[i].x, │ - PLAYER_CURSOR_RADIUS) │ - ::next_player_cursor:: │ + local cell = state.board[coords.y][coords.x] │ + return cell │ end │ +end │ │ - alexgames.draw_refresh() │ +function core.coords_to_str(coords) │ + if coords == nil then return "nil" │ + else return string.format("{y=%s, x=%s}", coords.y, coords.x) end │ end │ │ -return draw │ -local wait_for_players = require("libs/multiplayer/wait_for_players") │ -local alexgames = require("alexgames") │ +function core.player_at_pos(state, coords) │ + return state.board[coords.y][coords.x][1] │ +end │ │ -local core = require("games/card_sim/card_generic_core") │ -local draw = require("games/card_sim/card_generic_draw") │ -local serialize = require("games/card_sim/card_generic_serialize") │ +function core.get_valid_dsts(state, player, src) │ + local valid_dsts = {} │ + for y=1,core.BACKGAMMON_ROWS do │ + for x=1,core.BACKGAMMON_COLS do │ + local dst = { y = y, x = x } │ + if core.valid_dst(state, player, src, dst).is_valid then │ + table.insert(valid_dsts, dst) │ + end │ + end │ + end │ │ --- TODO if two players click the same card, then there is a big bug. │ --- Need to remember two things when a player picks up a card: │ --- * who is holding the card, │ --- * what touch ID (either 'mouse', or the ID from the touch event) │ --- Also need to handle something when someone picks up a card... update the card_idx │ --- of other players if they were holding that card? │ --- │ --- Also will likely need to implement throttling. │ --- │ --- Ideally would also implement client side control of the cards, so that I could just send │ --- the held card index and coordinates, instead of sending all the state │ --- │ --- TODO I think there is a bug if you pick up a card, move the mouse off screen, then │ --- click to pick up the card again, if another player has picked up a card since then? │ --- When re-ordering cards, need to update all the player's card_idx. │ --- Maybe remember cards by value, not position in array │ --- │ --- TODO there is still an issue if two players pick up a card at the same time │ --- │ + return valid_dsts │ +end │ │ -local width = 480 │ -local height = 480 │ +function core.player_touch(state, player, coords) │ + print(string.format("player %s touched %s", player, core.coords_to_str(coords))) │ + if state.player_turn ~= player then │ + return core.NOT_YOUR_TURN │ + end │ │ -local MAX_MOVE_PERIOD_MS = 50 │ -local throttled_count = 0 │ + -- if player selects something that isn't a piece, clear their selection │ + if coords == nil then │ + state.player_selected = nil │ + return core.SUCCESS │ + end │ │ + if state.player_selected == nil then │ + -- player is choosing a piece to select │ + local cell = core.get_cell(state, player, coords) │ + if #cell == 0 then │ + return core.NO_PIECE_IN_SRC │ + elseif cell[1] ~= player then │ + return core.NOT_YOUR_PIECE │ + end │ │ -local args = { │ - width = width, │ - height = height, │ + if #state.pieces_in_middle[player] > 0 and │ + not core.coords_are_middle(coords) then │ + return core.MUST_MOVE_MIDDLE │ + end │ │ - player_count = 2, │ + -- TODO need to make this function return false when player has pieces in middle │ + -- TODO need to handle middle highlighted as selected │ + local can_move = core.piece_can_move(state, player, coords) │ + if not can_move then │ + return core.PIECE_CAN_NOT_MOVE │ + else │ + state.player_selected = coords │ + return core.SUCCESS │ + end │ + else │ │ - card_height = 70, │ - card_width = 40, │ - card_font_size = 16, │ + -- if the player presses the piece that they just selected, │ + -- and if there is only one move available, then move there. │ + -- If more than one move is available, then do nothing? │ + -- (not sure if that's the most intuitive, but unselecting │ + -- might be worse, since it looks similar to moving) │ + if pt_eq(coords, state.player_selected) then │ + local valid_dsts = core.get_valid_dsts(state, player, state.player_selected) │ + --print(string.format("found %s valid dsts", #valid_dsts)) │ + if #valid_dsts == 1 then │ + coords = valid_dsts[1] │ + print(string.format("Player double tapped piece with only one destination, " .. │ + "attempting to move to {y=%s,x=%s}", coords.y, coords.x)) │ + end │ + end │ │ - reveal_area = math.floor(height/5), │ -} │ + --print(string.format("Player selected dst index %s", possib_dst_idx)) │ │ -local players = { │ - [1] = "You", │ -} │ -local player_name_to_idx = {} │ -local player = 1 │ -local state = nil │ -local is_client = false │ + -- TODO should this "valid_dst" function check for middle? │ + -- player is choosing a destination for their selected piece │ + local valid_dst_info = core.valid_dst(state, player, state.player_selected, coords) │ + if not valid_dst_info.is_valid then │ │ + -- if the player presses a different piece that they control, │ + -- then select that instead │ + if not core.coords_are_bearing_off(coords) and │ + not core.coords_are_middle(coords) and │ + player == core.player_at_pos(state, coords) then │ + state.player_selected = coords │ + return core.SUCCESS │ + end │ + return core.INVALID_DST │ + else │ + move_player(state, player, coords, valid_dst_info.used_dice) │ + return core.SUCCESS │ + end │ + end │ +end │ │ -local function send_state_updates_if_host() │ - if is_client then │ - return │ +-- Checks if a position is in the last 6 positions │ +-- leading up to the end of the board. │ +-- If all a player's pieces are in this region, they may start │ +-- bearing off. │ +local function is_final_region(player, coords) │ + if player == core.PLAYER_BLACK then │ + return coords.y == 2 and coords.x > 6 │ + elseif player == core.PLAYER_WHITE then │ + return coords.y == 1 and coords.x > 6 │ + else │ + error(string.format("unexpected player %s", player)) │ end │ +end │ │ - for i=1,#state.player_states do │ - if i == player then │ - goto next_player │ +local function players_pieces_all_in_final_region(state, player) │ + for board_idx=core.BOARD_IDX_START,core.BOARD_IDX_END do │ + local coords = core.board_idx_to_coords(board_idx) │ + if not is_final_region(player, coords) and core.player_at_pos(state, coords) == player then │ + return false │ end │ - local serialized_state = serialize.serialize_state_for_client(state, i) │ - alexgames.send_message(players[i], "state:" .. serialized_state) │ - ::next_player:: │ end │ + │ + return true │ end │ │ +function core.player_can_bear_off(state, player) │ + if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ + return false │ + end │ │ -function update() │ - draw.draw(state, player) │ -end │ + if not core.all_init_roll_complete(state) then │ + return false │ + end │ + if player ~= state.player_turn then │ + return false │ + end │ │ -alexgames.enable_evt("mouse_move") │ -alexgames.enable_evt("mouse_updown") │ + if not players_pieces_all_in_final_region(state, player) then │ + return false │ + end │ │ -function handle_user_clicked(pos_y, pos_x) │ + return true │ end │ │ -local last_move_time = nil │ -function handle_mousemove(pos_y, pos_x) │ - local time = alexgames.get_time_ms() │ - if last_move_time ~= nil and time - last_move_time < MAX_MOVE_PERIOD_MS then │ - throttled_count = throttled_count + 1 │ - return │ +function core.piece_can_bear_off(state, player, selection) │ + if state.game_state ~= STATE_WAITING_FOR_MOVE_COMPLETE then │ + return false │ end │ - last_move_time = time │ - if not is_client then │ - core.handle_mousemove(state, player, pos_y, pos_x) │ - else │ - alexgames.send_message("all", string.format("move:%d,%d,%s,%d,%d", player, 3, 'mouse', pos_y, pos_x)) │ + │ + if not core.all_init_roll_complete(state) then │ + return false │ + end │ + if not core.player_can_bear_off(state, player) then │ + return false │ end │ - send_state_updates_if_host() │ - update() │ -end │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - if not is_client then │ - core.handle_mouse_evt(state, player, evt_id, pos_y, pos_x) │ - else │ - alexgames.send_message("all", string.format("move:%d,%d,%s,%d,%d", player, evt_id, 'mouse', pos_y, pos_x)) │ + if selection == nil then │ + return false │ end │ - send_state_updates_if_host() │ - update() │ + │ + local dst = core.get_bearing_off_coords() │ + return core.valid_dst(state, player, selection, dst).is_valid │ end │ │ -local function handle_recvd_move(state, msg_player, msg_evt, msg_y, msg_x) │ - if msg_evt == 1 or msg_evt == 2 then │ - core.handle_mouse_evt(state, msg_player, msg_evt, msg_y, msg_x) │ - elseif msg_evt == 3 then │ - core.handle_mousemove(state, msg_player, msg_y, msg_x) │ - else │ - error("Unhandled evt_id " .. msg_evt) │ +function core.increment_move_timer(state) │ + if state.move_timer == nil then │ + return │ end │ - send_state_updates_if_host() │ - update() │ + state.move_timer = state.move_timer + 1 │ end │ │ -function handle_msg_received(src, msg) │ - --print("handle_msg_received (from src:" .. src .. "): " .. msg); │ +function core.can_player_double_request(state, player) │ + if state.game_state ~= STATE_WAITING_FOR_ROLL_NO_DBL then │ + return false │ + end │ │ - local handled = wait_for_players.handle_msg_received(src, msg) │ - if handled then │ - return │ + if player ~= state.player_turn then │ + return false │ end │ │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ + return true │ +end │ │ - if header == "state" then │ - local recvd_state = serialize.deserialize_client_state(payload) │ - state = recvd_state │ - elseif header == "move" then │ - local other_player = player_name_to_idx[src] │ - local m2 = payload:gmatch("(%d+),(%d+),([^,]+),(%d+),(%d+)") │ - if m2 == nil then │ - error("Invalid recvd payload " .. payload) │ - end │ - local msg_player, msg_evt, msg_input_src, msg_y, msg_x = m2() │ - msg_player = tonumber(msg_player) │ - msg_evt = tonumber(msg_evt) │ - msg_y = tonumber(msg_y) │ - msg_x = tonumber(msg_x) │ - handle_recvd_move(state, msg_player, msg_evt, msg_y, msg_x) │ - elseif header == "player_joined" or │ - header == "player_left" then │ - -- ignore I guess? │ - else │ - error("Unhandled msg: " .. msg) │ +function core.double_request(state, player) │ + if not core.can_player_double_request(state, player) then │ + return core.INVALID_MOVE │ end │ - update() │ + │ + state.game_state = STATE_WAITING_FOR_ROLL_AFTER_DBL │ + return core.SUCCESS │ end │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ - if handled then │ - return │ +function core.double_response(state, player, accepted) │ + if not accepted then │ + -- TODO need to forfeit │ + else │ + state.double_val = state.double_val * 2 │ + state.game_state = STATE_WAITING_FOR_ROLL_AFTER_DBL │ end │ │ - error("Unhandled popup_btn_clicked") │ end │ │ +function core.can_roll_rc(state, player) │ + if state.game_state ~= STATE_WAITING_FOR_INIT_ROLLS and │ + state.game_state ~= STATE_WAITING_FOR_ROLL_NO_DBL and │ + state.game_state ~= STATE_WAITING_FOR_ROLL_AFTER_DBL then │ + return core.INVALID_MOVE │ + end │ │ -local function new_game(player_count) │ - state = core.init(args) │ - draw.init(args) │ -end │ + if player ~= state.player_turn then │ + return core.NOT_YOUR_TURN │ + end │ │ -local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as host") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = false │ - new_game(#players) │ - send_state_updates_if_host() │ - update() │ + return core.SUCCESS │ end │ │ -local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as client") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = true │ - -- no need to draw board here, a state update should soon follow │ -end │ +-- dice_vals param should be nil for local multiplayer, but │ +-- should be the dice value when the dice is rolled by the other │ +-- player in network multiplayer │ +function core.roll(state, player, dice_vals) │ + local can_roll_rc = core.can_roll_rc(state, player) │ + if can_roll_rc ~= core.SUCCESS then │ + return can_roll_rc │ + end │ │ --- TODO I really don't want to have to serialize all of this... │ -function handle_touch_evt(evt_id, changed_touches) │ - if evt_id == "touchmove" then │ - local time = alexgames.get_time_ms() │ - if last_move_time ~= nil and time - last_move_time < MAX_MOVE_PERIOD_MS then │ - throttled_count = throttled_count + 1 │ - return │ + if state.game_state ~= STATE_WAITING_FOR_INIT_ROLLS then │ + if dice_vals == nil then │ + roll_dice(state, player, core.NUM_DICE) │ + else │ + set_dice(state, dice_vals) │ end │ - last_move_time = time │ - end │ - if not is_client then │ - core.handle_touch_evt(state, player, evt_id, changed_touches) │ + state.game_state = STATE_WAITING_FOR_MOVE_COMPLETE │ + state.move_timer = 0 │ else │ - local moves = core.touches_to_moves(state, player, evt_id, changed_touches) │ - for _, move in ipairs(moves) do │ - local move_msg = string.format("move:%d,%d,%s,%d,%d", │ - move.player, move.move_type, move.input_src, move.y, move.x) │ - alexgames.send_message("all", move_msg) │ + │ + if dice_vals == nil then │ + roll_dice(state, player, --[[ num_dice = --]] 1) │ + else │ + set_dice(state, dice_vals) │ + end │ + │ + if not core.all_init_roll_complete(state) then │ + if player ~= get_next_init_roll_player(state) then │ + error("game error: get_next_init_roll_player not current player") │ + end │ + │ + state.player_init_rolls[player] = state.dice_vals[1] │ + │ + state.player_turn = get_next_init_roll_player(state) │ + if state.player_turn == nil then │ + state.game_state = STATE_WAITING_FOR_INIT_ACK │ + local first_player_info = get_init_first_player(state) │ + state.player_turn = first_player_info.player │ + end │ end │ + │ end │ - send_state_updates_if_host() │ - update() │ + │ + return core.SUCCESS │ end │ │ +return core │ +local life_core = require("games/life/life_core") │ +local life_draw = require("games/life/life_draw") │ +local alexgames = require("alexgames") │ │ -alexgames.enable_evt('touch') │ +local BTN_ID_TOGGLE_PLAY_PAUSE = "toggle_play_pause" │ +local BTN_ID_STEP = "step" │ +local BTN_ID_RANDOM = "random" │ +local BTN_ID_CLEAR = "clear" │ │ -wait_for_players.init(players, player, start_host_game, start_client_game) │ -draw.init(args) │ -local cards = require("libs/cards/cards") │ +local cell_size = 10 │ +local board_width = 480 │ +local board_height = 480 │ +--local cells_y = 40 │ +--local cells_x = 30 │ +local cells_y = math.floor(board_height/cell_size) │ +local cells_x = math.floor(board_width/cell_size) │ │ -local serialize = {} │ +local state = nil │ +local is_drawing = true │ │ --- TODO put it a library │ -local function serialize_16bit(val) │ - local output = "" │ - local orig_val = val │ - if val == nil then │ - val = 0x7fff │ - else │ - val = math.floor(val) │ - end │ - val = val + 0x7fff │ - if not(0 <= val and val <= 0xffff) then │ - error(string.format("Need 16 bit val, recvd %s", orig_val)) │ - return nil │ - end │ - output = output .. string.char(math.floor((val/256))&0xff) │ - output = output .. string.char(math.floor(val%256)) │ - return output │ -end │ --- TODO put in a library │ -local function deserialize_16bit(bytes) │ - if #bytes < 2 then │ - error(string.format("Expected at least 2 bytes, recvd %d", #bytes)) │ - end │ - local msb = string.byte(table.remove(bytes,1)) │ - local lsb = string.byte(table.remove(bytes,1)) │ - local val = ((msb << 8) | lsb) - 0x7fff │ - --print(string.format("deserialize_16bit %02x %02x returning %s", msb, lsb, val)) │ - if val == 0x7fff then │ - return nil │ - else │ - return val │ - end │ +function draw_board_internal() │ + life_core.update_state(state) │ + life_draw.update(life_core.get_active_board(state)) │ end │ │ -local function bytestr_to_byteary(byte_str) │ - local byte_ary = {} │ - for i=1,#byte_str do │ - byte_ary[i] = byte_str:sub(i,i) │ +function update() │ + if is_drawing then │ + draw_board_internal() │ end │ - return byte_ary │ end │ │ +function handle_user_clicked(y_coords, x_coords) │ + local cell_pos = life_draw.coords_to_cell_idx(y_coords, x_coords) │ + life_core.toggle_cell_state(state, cell_pos) │ + life_draw.update(life_core.get_active_board(state)) │ +end │ │ - │ -function serialize.serialize_state_for_client(state, player) │ - local output = "" │ - │ - │ - output = output .. serialize_16bit(state.card_height) │ - output = output .. serialize_16bit(state.card_width) │ - output = output .. serialize_16bit(#state.player_states) │ - for _, player_state in ipairs(state.player_states) do │ - output = output .. serialize_16bit(player_state.y) │ - output = output .. serialize_16bit(player_state.x) │ - -- this could be a single byte │ - output = output .. serialize_16bit(player_state.card_idx) │ - output = output .. serialize_16bit(player_state.card_orig_y) │ - output = output .. serialize_16bit(player_state.card_orig_x) │ - end │ - │ - output = output .. serialize_16bit(#state.cards) │ - for _, card_info in ipairs(state.cards) do │ - local card_int = nil │ - if card_info.revealed_all or card_info.revealed_to_player == player then │ - card_int = cards.card_to_int(card_info.card) │ - else │ - card_int = cards.UNREVEALED_CARD │ - end │ - output = output .. serialize_16bit(card_int) │ - output = output .. serialize_16bit(card_info.y) │ - output = output .. serialize_16bit(card_info.x) │ +function handle_btn_clicked(btn_id) │ + if btn_id == BTN_ID_STEP then │ + life_core.update_state(state) │ + life_draw.update(life_core.get_active_board(state)) │ + elseif btn_id == BTN_ID_TOGGLE_PLAY_PAUSE then │ + is_drawing = not is_drawing │ + elseif btn_id == BTN_ID_RANDOM then │ + life_core.random_board(state) │ + life_draw.update(life_core.get_active_board(state)) │ + elseif btn_id == BTN_ID_CLEAR then │ + life_core.clear_board(state) │ + life_draw.update(life_core.get_active_board(state)) │ + else │ + print(string.format("Unhandled btn_id \"%s\"", btn_id)) │ end │ - return output │ end │ │ -function serialize.deserialize_client_state(bytes) │ - local state = {} │ - bytes = bytestr_to_byteary(bytes) │ - │ - state.card_height = deserialize_16bit(bytes) │ - state.card_width = deserialize_16bit(bytes) │ - │ - local player_count = deserialize_16bit(bytes) │ - state.player_states = {} │ - for i=1,player_count do │ - state.player_states[i] = {} │ - state.player_states[i].y = deserialize_16bit(bytes) │ - state.player_states[i].x = deserialize_16bit(bytes) │ - state.player_states[i].card_idx = deserialize_16bit(bytes) │ - state.player_states[i].card_orig_y = deserialize_16bit(bytes) │ - state.player_states[i].card_orig_x = deserialize_16bit(bytes) │ - end │ +function get_state() │ + -- TODO it wouldn't be unreasonable to implement importing/exporting state for this, but │ + -- since it's more of a tech demo than a game, I don't want to bother │ + -- with it right now. │ + return nil │ +end │ │ - local card_count = deserialize_16bit(bytes) │ - state.cards = {} │ - for i=1,card_count do │ - state.cards[i] = {} │ - local card_int = deserialize_16bit(bytes) │ - state.cards[i].card = cards.int_to_card(card_int) │ - state.cards[i].y = deserialize_16bit(bytes) │ - state.cards[i].x = deserialize_16bit(bytes) │ - state.cards[i].recvd = true │ - end │ +life_draw.init(cell_size) │ │ - return state │ +function start_game() │ + alexgames.create_btn(BTN_ID_TOGGLE_PLAY_PAUSE, "Play/pause", 1) │ + alexgames.create_btn(BTN_ID_STEP, "Step", 1) │ + alexgames.create_btn(BTN_ID_RANDOM, "Random", 1) │ + alexgames.create_btn(BTN_ID_CLEAR, "Clear", 1) │ + │ + state = life_core.new_state(cells_y, cells_x) │ + │ + alexgames.set_timer_update_ms(math.floor(1000/20)) │ end │ - │ -return serialize │ local alexgames = require("alexgames") │ -local cards = require("libs/cards/cards") │ │ -local core = {} │ +local lua_draw = {} │ │ -core.PICK_UP_EVT_ID = 2 │ -core.PUT_DOWN_EVT_ID = 1 │ -core.MOVE_EVT_ID = 3 │ +local cell_size_y = nil │ +local cell_size_x = nil │ │ --- when drawing a deck of cards, draw cards in `offset_count` distinct positions, │ --- evenly distributed `offset_size` pixels away from the start. │ -local offset_count = 4 │ -local offset_size = 8 │ +local present_colour = '#000000' │ +local absent_colour = '#ffffff' │ │ -function core.init(args) │ - local state = { │ - height = args.height, │ - width = args.width, │ - reveal_area = args.reveal_area, │ +if alexgames.get_user_colour_pref() == "dark" then │ + present_colour = '#888888' │ + absent_colour = '#000000' │ +end │ │ - card_height = args.card_height, │ - card_width = args.card_width, │ +function lua_draw.init(cell_size) │ + cell_size_y = cell_size │ + cell_size_x = cell_size │ +end │ │ +function lua_draw.update(board) │ + alexgames.draw_clear() │ + for y=1,#board do │ + for x=1,#board[y] do │ + local fill_colour │ + if board[y][x] ~= 0 then │ + fill_colour = present_colour │ + else │ + fill_colour = absent_colour │ + end │ + alexgames.draw_rect(fill_colour, │ + (y-1)*cell_size_y, (x-1)*cell_size_x, │ + y * cell_size_y, x * cell_size_x) │ + end │ + end │ + alexgames.draw_refresh() │ +end │ │ - player_states = {}, │ +function lua_draw.coords_to_cell_idx(coords_y, coords_x) │ + return { y = 1 + math.floor(coords_y/cell_size_y), │ + x = 1 + math.floor(coords_x/cell_size_x) } │ +end │ │ - cards = {}, │ - } │ +return lua_draw │ +local life = {} │ │ - for i=1,args.player_count do │ - state.player_states[i] = { │ - y = nil, │ - x = nil, │ +local dirs = { │ + { y = 0, x = 1}, │ + { y = 0, x = -1}, │ + { y = 1, x = 0}, │ + { y = -1, x = 0}, │ │ - card_idx = nil, │ - -- either the numeric ID of the touch, or 'mouse' for mouse │ - input_src = nil, │ - card_orig_y = nil, │ - card_orig_x = nil, │ - } │ - end │ │ - local deck = cards.new_deck() │ - cards.shuffle(deck) │ + { y = 1, x = -1}, │ + { y = 1, x = 1}, │ + { y = -1, x = -1}, │ + { y = -1, x = 1}, │ +} │ │ - for i, card in ipairs(deck) do │ - local offset = math.floor(i*offset_count/#deck) * offset_size / offset_count │ - state.cards[#state.cards+1] = { │ - recvd = false, │ - held_by = nil, │ - revealed_to_all = false, │ - revealed_to_player = nil, │ - card = card, │ - y = math.floor(args.width/2 + offset), │ - x = math.floor(args.height/2 - offset), │ - } │ - end │ - return state │ +function add_pts(arg1, arg2) │ + return { y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ end │ │ │ -function core.find_card_under_cursor(state, pos_y, pos_x) │ - for i=#state.cards,1,-1 do │ - local card_info = state.cards[i] │ - if card_info.y - state.card_height/2 <= pos_y and pos_y <= card_info.y + state.card_height/2 and │ - card_info.x - state.card_width/2 <= pos_x and pos_x <= card_info.x + state.card_width/2 then │ - return i │ +function life.new_board(y_size, x_size) │ + local board = {} │ + for y=1,y_size do │ + board[#board+1] = {} │ + for x=1,x_size do │ + board[y][#board[y]+1] = 0 │ end │ end │ - return nil │ + return board │ end │ │ -function core.in_revealed_area(state, pos_y, pos_x) │ - if (0 <= pos_y and pos_y <= state.reveal_area) then │ - return 2 │ - elseif (state.height - state.reveal_area <= pos_y and pos_y <= state.height) then │ - return 1 │ - else │ - return nil │ - end │ - │ +function life.new_state(y_size, x_size) │ + local state = { │ + boards = { │ + life.new_board(y_size, x_size), │ + life.new_board(y_size, x_size), │ + }, │ + board_idx = 1, │ + } │ + return state │ end │ │ +function life.get_active_board(state) │ + return state.boards[state.board_idx] │ +end │ │ -local function player_move(state, player_idx, input_src, pos_y, pos_x) │ - if not(1 <= player_idx and player_idx <= #state.player_states) then │ - error("Invalid player_idx " .. player_idx) │ - end │ - local player_state = state.player_states[player_idx] │ - player_state.y = pos_y │ - player_state.x = pos_x │ - if player_state.card_idx ~= nil and player_state.input_src == input_src then │ - state.cards[player_state.card_idx].y = pos_y │ - state.cards[player_state.card_idx].x = pos_x │ +function in_range(board, pt) │ + return (1 <= pt.x and pt.x <= #board[1] and │ + 1 <= pt.y and pt.y <= #board) │ +end │ │ - local reveal_player = core.in_revealed_area(state, pos_y, pos_x) │ - state.cards[player_state.card_idx].revealed_to_player = reveal_player │ - if reveal_player ~= nil then │ - state.cards[player_state.card_idx].revealed_all = false │ +function count_neighbours(board, pos) │ + local count = 0 │ + for _, dir in ipairs(dirs) do │ + local pt2 = add_pts(pos, dir) │ + if not in_range(board, pt2) then │ + goto next_dir │ end │ - end │ -end │ │ -function core.handle_mousemove(state, player_idx, pos_y, pos_x) │ - local input_src = 'mouse' │ - player_move(state, player_idx, input_src, pos_y, pos_x) │ -end │ + if board[pt2.y][pt2.x] ~= 0 then │ + count = count + 1 │ + end │ │ -local function touch_start_to_move(state, player_idx, input_src, pos_y, pos_x) │ - local player_state = state.player_states[player_idx] │ - local card_idx = core.find_card_under_cursor(state, pos_y, pos_x) │ - if card_idx == nil then │ - print(string.format("Player %d: Found no card at pos y=%f, x=%f", player_idx, pos_y, pos_x)) │ - return nil │ - end │ - if state.cards[card_idx].held_by ~= nil then │ - print(string.format("Player %d: Card is already held by player %s", player_idx, │ - state.cards[card_idx].held_by)) │ - return nil │ + ::next_dir:: │ end │ │ - return { player = player_idx, │ - input_src = input_src, │ - move_type = core.PICK_UP_EVT_ID, │ - y = math.floor(pos_y), │ - x = math.floor(pos_x) │ - } │ + return count │ end │ │ - │ -local function pick_up_card(state, player_idx, input_src, pos_y, pos_x) │ - local player_state = state.player_states[player_idx] │ - local card_idx = core.find_card_under_cursor(state, pos_y, pos_x) │ - if card_idx == nil then │ - print(string.format("Player %d: Found no card at pos y=%f, x=%f", player_idx, pos_y, pos_x)) │ - return │ - end │ - if state.cards[card_idx].held_by ~= nil then │ - print(string.format("Player %d: Card is already held by player %s", player_idx, │ - state.cards[card_idx].held_by)) │ - return │ - end │ - -- note that calling this with card_idx nil will remove the last card │ - local tmp = table.remove(state.cards, card_idx) │ - local old_card_idx = card_idx │ - tmp.held_by = player_idx │ - table.insert(state.cards, tmp) │ - player_state.card_idx = #state.cards │ - player_state.input_src = input_src │ - player_state.card_orig_y = pos_y │ - player_state.card_orig_x = pos_x │ - if player_state.card_idx ~= nil then │ - print(string.format("Player %d picked up card idx %d, input_src %s", player_idx, player_state.card_idx, input_src)) │ - end │ - for i = 1, #state.player_states do │ - if i == player_idx then │ - goto next_player │ - end │ - if state.player_states[i].card_idx ~= nil and │ - state.player_states[i].card_idx > old_card_idx then │ - state.player_states[i].card_idx = state.player_states[i].card_idx - 1 │ +function life.update_board(in_board, out_board) │ + for y=1,#in_board do │ + for x=1,#in_board[y] do │ + local neighbour_count = count_neighbours(in_board, {y=y, x=x}) │ + --if neighbour_count > 0 then │ + -- print(string.format("{y=%2d, x=%2d} found neighbour count %d", y,x,neighbour_count)) │ + --end │ + if in_board[y][x] ~= 0 and 2 <= neighbour_count and neighbour_count <= 3 then │ + out_board[y][x] = 1 │ + elseif in_board[y][x] == 0 and neighbour_count == 3 then │ + out_board[y][x] = 1 │ + else │ + out_board[y][x] = 0 │ + end │ end │ - │ - ::next_player:: │ end │ end │ │ +function life.update_state(state) │ + local src_board_idx = state.board_idx │ + local dst_board_idx │ + if src_board_idx == 1 then │ + dst_board_idx = 2 │ + else │ + dst_board_idx = 1 │ + end │ │ -local function touch_end_to_move(state, player_idx, touch_id, touch_y, touch_x) │ - local move = { │ - player = player_idx, │ - move_type = core.PUT_DOWN_EVT_ID, │ - input_src = touch_id, │ - y = math.floor(touch_y), │ - x = math.floor(touch_x) } │ - return move │ -end │ + life.update_board(state.boards[src_board_idx], state.boards[dst_board_idx]) │ │ -local function touch_move_to_move(state, player_idx, touch_id, touch_y, touch_x) │ - local move = { │ - player = player_idx, │ - move_type = core.MOVE_EVT_ID, │ - input_src = touch_id, │ - y = math.floor(touch_y), │ - x = math.floor(touch_x) } │ - return move │ + state.board_idx = dst_board_idx │ end │ │ -local function put_down_card(state, player_idx, input_src, pos_y, pos_x) │ - local player_state = state.player_states[player_idx] │ - if player_state.card_idx ~= nil then │ - print(string.format("Player %d Put down card, input_src %s", player_idx, player_state.card_idx, input_src)) │ - state.cards[player_state.card_idx].held_by = nil │ +function life.toggle_cell_board(board, y, x) │ + if not in_range(board, {y=y, x=x}) then │ + return │ end │ - │ - -- if a card is held, it has not moved, and it is not in a revealed area, │ - -- then reveal it to all if clicked │ - if player_state.card_idx ~= nil and │ - -- TODO should change this to be a flag that is cleared once it has moved. │ - -- otherwise, if you move it to exactly the same position you took it from, │ - -- it would be revealed │ - pos_y == player_state.card_orig_y and pos_x == player_state.card_orig_x and │ - core.in_revealed_area(state, pos_y, pos_x) == nil then │ │ - state.cards[player_state.card_idx].revealed_all = not state.cards[player_state.card_idx].revealed_all │ - end │ - player_state.card_idx = nil │ - player_state.input_src = nil │ -end │ - │ - │ - │ -function core.handle_mouse_evt(state, player_idx, evt_id, pos_y, pos_x) │ - local input_src = 'mouse' │ - if evt_id == 2 then │ - pick_up_card(state, player_idx, input_src, pos_y, pos_x) │ - elseif evt_id == 1 or │ - evt_id == 3 then │ - put_down_card(state, player_idx, input_src, pos_y, pos_x) │ + local val = board[y][x] │ + if val == 0 then │ + val = 1 │ else │ - error("Unhandled evt " .. evt_id) │ + val = 0 │ end │ + │ + board[y][x] = val │ end │ │ +function life.toggle_cell_state(state, cell_pos_pt) │ + local board = life.get_active_board(state) │ + life.toggle_cell_board(board, cell_pos_pt.y, cell_pos_pt.x) │ +end │ │ -function core.touches_to_moves(state, player_idx, evt_id, changed_touches) │ - local moves = {} │ - local player_state = state.player_states[player_idx] │ - if evt_id == 'touchstart' then │ - for _, touch in ipairs(changed_touches) do │ - local move = touch_start_to_move(state, player_idx, touch.id, touch.y, touch.x) │ - table.insert(moves, move) │ - end │ - elseif evt_id == 'touchmove' then │ - for _, touch in ipairs(changed_touches) do │ - local move = touch_move_to_move(state, player_idx, touch.id, touch.y, touch.x) │ - table.insert(moves, move) │ - end │ - elseif evt_id == 'touchend' or │ - evt_id == 'touchcancel' then │ - for _, touch in ipairs(changed_touches) do │ - local move = touch_end_to_move(state, player_idx, touch.id, touch.y, touch.x) │ - table.insert(moves, move) │ +function life.clear_board(state) │ + local board = life.get_active_board(state) │ + for y=1,#board do │ + for x=1,#board[y] do │ + board[y][x] = 0 │ end │ end │ - return moves │ end │ │ -function core.handle_touch_evt(state, player_idx, evt_id, changed_touches) │ - local moves = core.touches_to_moves(state, player_idx, evt_id, changed_touches) │ - for _, move in ipairs(moves) do │ - if move.move_type == core.PICK_UP_EVT_ID then │ - pick_up_card(state, move.player, move.input_src, move.y, move.x) │ - elseif move.move_type == core.PUT_DOWN_EVT_ID then │ - put_down_card(state, move.player, move.input_src, move.y, move.x) │ - elseif move.move_type == core.MOVE_EVT_ID then │ - player_move(state, move.player, move.input_src, move.y, move.x) │ - else │ - error(string.format("Unhandled move type %s", move.move_type)) │ +function bool_to_int(b) │ + if b then return 1 │ + else return 0 end │ +end │ + │ +function life.random_board(state) │ + local board = life.get_active_board(state) │ + for y=1,#board do │ + for x=1,#board[y] do │ + board[y][x] = bool_to_int(math.random(0,10) <= 3) │ end │ end │ end │ │ -return core │ +return life │ +local alexgames = require("alexgames") │ │ -local draw = {} │ +local core = require("games/crossword_builder/crossword_builder_core") │ +local draw = require("games/crossword_builder/crossword_builder_draw") │ │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ +local touch_to_mouse_evts = require("libs/touch_to_mouse_evts") │ │ -draw.BTN_ID_UNDO = "btn_undo" │ -draw.BTN_ID_REDO = "btn_redo" │ +local words_lib = require("libs/words") │ │ -local cell_size = 35 │ │ -local MINE_COUNT_TO_IMG_ID_MAP = { │ - [0] = 'minesweeper_box_empty', │ - [1] = 'minesweeper_box1', │ - [2] = 'minesweeper_box2', │ - [3] = 'minesweeper_box3', │ - [4] = 'minesweeper_box4', │ - [5] = 'minesweeper_box5', │ - [6] = 'minesweeper_box6', │ - [7] = 'minesweeper_box7', │ - [8] = 'minesweeper_box8', │ +local state = { │ + game = core.new_state(1), │ + touch_to_mouse_evts = nil, │ + draw = nil, │ } │ │ -local FLAGGED_TO_IMG_ID_MAP = { │ - [1] = 'minesweeper_box_flagged_red', │ - [2] = 'minesweeper_box_flagged_blue', │ -} │ +local player_idx = 1 │ │ -local BACKGROUND_COLOUR = '#bbbbbb' │ -local TEXT_COLOUR = '#000000' │ ---local TEXT_BACKGROUND_COLOUR = '#ffffffbb' │ -local TEXT_BACKGROUND_COLOUR = '#bbbbbbbb' │ -local TEXT_FONT_SIZE = 18 │ │ -draw.draw_flag_flash = false │ +state.draw = draw.init(state.game) │ │ -local board_width = nil │ -local board_height = nil │ +--[[ │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 5, x_idx = 6 }, letter = "T" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 6, x_idx = 6 }, letter = "R" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 7, x_idx = 6 }, letter = "A" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 8, x_idx = 6 }, letter = "I" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 9, x_idx = 6 }, letter = "N" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx =10, x_idx = 6 }, letter = "E" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx =11, x_idx = 6 }, letter = "E" } ) │ │ -local g_victory_anim_timer = nil │ -local anim_state = draw_celebration_anim.new_state({ │ -}) │ +local placed_tiles = draw.get_placed_tiles(state.draw) │ +local submit_info = core.submit(state.game, placed_tiles) │ +draw.update_state(state.draw, state.game) │ │ -local function cell_to_img_id(cell) │ - if not cell.revealed then │ - if cell.flagged_by_player == nil then │ - return 'minesweeper_box_unclicked' │ - else │ - local flag_img = FLAGGED_TO_IMG_ID_MAP[cell.flagged_by_player] │ - if flag_img == nil then │ - error(string.format("flagged_by_player %s not found in map", cell.flagged_by_player)) │ - end │ - return flag_img │ - end │ - elseif cell.has_mine then │ - return 'minesweeper_mine' │ - else │ - local img_id = MINE_COUNT_TO_IMG_ID_MAP[cell.touching_mine_count] │ - if img_id == nil then │ - error(string.format("touching_mine_count %s not found in map", cell.touching_mine_count)) │ - end │ - return img_id │ - end │ -end │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 3, x_idx = 7 }, letter = "T" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 4, x_idx = 7 }, letter = "O" } ) │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 5, x_idx = 7 }, letter = "E" } ) │ │ -function draw.init(board_width_arg, board_height_arg, cell_size_arg) │ - board_width = board_width_arg │ - board_height = board_height_arg │ - cell_size = cell_size_arg │ +local placed_tiles = draw.get_placed_tiles(state.draw) │ +local submit_info = core.submit(state.game, placed_tiles) │ +draw.update_state(state.draw, state.game) │ │ - alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ - alexgames.create_btn(draw.BTN_ID_REDO, "Redo", 1) │ -end │ +table.insert(state.draw.tiles.placed_tiles, { pos = { grid_idx = 1, y_idx = 6, x_idx = 7 }, letter = "S" } ) │ +--]] │ │ -function draw.update(dt_ms) │ - draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ +function update() │ + draw.draw(state.draw) │ end │ │ -function draw.draw_state(state, player) │ - alexgames.draw_clear() │ - if state == nil or state.game == nil then │ - return │ - end │ - alexgames.draw_rect(BACKGROUND_COLOUR, 0, 0, board_width, board_height) │ - -- TODO only draw cells that are (partially or fully) visible │ - for y, row in ipairs(state.game.board) do │ - for x, cell in ipairs(row) do │ - local offset_y = state.players[player].offset_y │ - local offset_x = state.players[player].offset_x │ - │ - local pos_y = (y-1)*cell_size - offset_y │ - local pos_x = (x-1)*cell_size - offset_x │ - │ - local zoom_fact = state.players[player].zoom_fact │ +function handle_mouse_evt(evt_id, pos_y, pos_x, params) │ + --print(string.format("handle_mouse_evt(evt_id=%s, pos_y=%d, pos_x=%d)", evt_id, pos_y, pos_x)) │ + draw.handle_mouse_evt(state.draw, evt_id, pos_y, pos_x, params) │ + update() │ +end │ │ - pos_y = math.floor(pos_y * zoom_fact) │ - pos_x = math.floor(pos_x * zoom_fact) │ +function handle_mousemove(pos_y, pos_x, params) │ + --print(string.format("handle_mousemove(pos_y=%d, pos_x=%d)", pos_y, pos_x)) │ + draw.handle_mousemove(state.draw, pos_y, pos_x, params) │ + update() │ +end │ │ - local actual_cell_size = math.floor(cell_size * zoom_fact) │ +function handle_touch_evt(evt_id, changed_touches) │ + touch_to_mouse_evts.handle_touch_evt(state.touch_to_mouse_evts, evt_id, changed_touches) │ +end │ │ - local in_range = true │ - if pos_y + actual_cell_size <= 0 or │ - pos_x + actual_cell_size <= 0 or │ - pos_y >= board_height or │ - pos_x >= board_width then │ - in_range = false │ - end │ +function handle_btn_clicked(btn_id) │ + print(string.format("handle_btn_clicked(id=%s)", btn_id)) │ + local action = draw.handle_btn_clicked(state.draw, btn_id) │ │ - if in_range then │ - draw_more.draw_graphic_ul(cell_to_img_id(cell), │ - pos_y, pos_x, │ - actual_cell_size, actual_cell_size) │ - end │ + if action == draw.ACTION_SUBMIT then │ + local placed_tiles = draw.get_placed_tiles(state.draw) │ + local submit_info = core.submit(state.game, player_idx, placed_tiles) │ + print(string.format("submit returned: %s, %d", submit_info, submit_info.rc)) │ + if submit_info.rc == core.RC_SUCCESS then │ + alexgames.set_status_msg(string.format("Successfully formed words: %s", submit_info.word)) │ + draw.update_state(state.draw, state.game) │ + draw.draw(state.draw) │ + else │ + local msg = core.submit_info_to_msg(submit_info) │ + print("rc is not success... " .. msg) │ + alexgames.set_status_err(msg) │ end │ end │ - │ - local text_height = 30 │ - local player_text_width = 165 │ - local text_padding = 10 │ - alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ - board_height - #state.players*text_height - text_padding, │ - board_width - player_text_width - text_padding, │ - board_height, board_width) │ - for i=0,#state.players-1 do │ - local player_idx = #state.players - i │ - alexgames.draw_text(string.format("Player %d: %4d", player_idx, state.players[player_idx].score), │ - TEXT_COLOUR, │ - board_height - i * text_height - text_padding, │ - board_width - text_padding, │ - TEXT_FONT_SIZE, │ - -1) │ - │ - end │ - │ - local mines_text_width = 115 │ - alexgames.draw_rect(TEXT_BACKGROUND_COLOUR, │ - board_height - text_height - text_padding, │ - 0, │ - board_height, mines_text_width + text_padding) │ - alexgames.draw_text(string.format("Mines: %3d", state.game.mines_unrevealed), │ - TEXT_COLOUR, │ - board_height - text_padding, │ - text_padding, │ - TEXT_FONT_SIZE, │ - alexgames.TEXT_ALIGN_LEFT) │ - │ - if draw.draw_flag_flash then │ - alexgames.draw_rect('#ffffff88', 0, 0, 480, 480) │ - draw.draw_flag_flash = false │ - end │ - draw_celebration_anim.draw(anim_state) │ - alexgames.draw_refresh() │ -end │ - │ -function draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - local zoom_fact = state.players[player].zoom_fact │ - return { │ - y = 1 + math.floor((state.players[player].offset_y + pos_y/zoom_fact)/cell_size), │ - x = 1 + math.floor((state.players[player].offset_x + pos_x/zoom_fact)/cell_size), │ - } │ end │ │ -function draw.victory_animation(fps) │ - print("setting timer") │ - if g_victory_anim_timer ~= nil then │ - error(string.format("victory_animation: anim_timer is not nil")) │ - end │ - g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ - draw_celebration_anim.fireworks_display(anim_state, { │ - colour_pref = "light", │ - on_finish = function () │ - if g_victory_anim_timer == nil then │ - alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ - else │ - alexgames.delete_timer(g_victory_anim_timer) │ - g_victory_anim_timer = nil │ - end │ - --print("animation finished! Resuming timer") │ - --alexgames.set_timer_update_ms(0) │ - --alexgames.set_timer_update_ms(1000/60) │ - end, │ +function start_game() │ + alexgames.enable_evt("mouse_updown") │ + alexgames.enable_evt("mouse_move") │ + state.touch_to_mouse_evts = touch_to_mouse_evts.init({ │ + handle_mouse_evt = handle_mouse_evt, │ + handle_mousemove = handle_mousemove, │ }) │ end │ +local core = {} │ │ +local words_lib = require("libs/words") │ +local shuffle = require("libs/shuffle") │ │ +local letter_tiles = require("libs/letter_tiles") │ │ -return draw │ - │ -local core = require("games/minesweeper_life/minesweeper_life_core") │ -local draw = require("games/minesweeper_life/minesweeper_draw") │ -local serialize = require("games/minesweeper_life/minesweeper_serialize") │ - │ -local wait_for_players = require("libs/multiplayer/wait_for_players") │ -local show_buttons_popup = require("libs/ui/show_buttons_popup") │ - │ -local alexgames = require("alexgames") │ - │ --- TODO add: │ --- * vibrate phone when flag has appeared? Show red circle so user knows when flag appears │ --- even if it is covered by their finger? │ --- │ --- TODO for multiplayer: │ --- * TODO add a graphic for "cell is loading". For now it is probably fine to just leave it as unclicked because │ --- of the low latency. (Actually, even on my LAN, I see a decent bit of latency when hosting on my phone and │ --- using my laptop as a client.) │ --- * animate points appearing over where you click │ - │ - │ --- maximum y or x distance that a player can move their finger/mouse before their gesture is no longer │ --- interpreted as a click │ -local MAX_CLICK_MOVE = 2 │ - │ -local game_size_y = 20 │ -local game_size_x = 20 │ +local LANGUAGE = "en" │ │ -local player = 1 │ -local player_count = 1 │ -local cell_size = core.cell_size │ --- TODO initialize player state but not game state │ -local state = core.new_state(player_count, game_size_y, game_size_x, cell_size, core.DEFAULT_MINE_PORTION) │ -local win_anim_shown = false │ -local state_set = false │ -local g_session_id = alexgames.get_new_session_id() │ -local g_multiplayer_init = false │ - │ ---local state = nil │ -local user_input_down = false │ -local user_input_down_timer_fired = false │ -local user_input_down_time = nil │ -local user_input_moved = false │ +core.LETTER_EMPTY = letter_tiles.LETTER_EMPTY │ │ --- These are only set on touchdown │ -local user_input_pos_y = nil │ -local user_input_pos_x = nil │ +core.RC_SUCCESS = 0 │ +core.RC_LETTERS_NOT_IN_A_LINE = -1 │ +core.RC_LETTERS_NOT_CONTINUOUS = -2 │ +core.RC_WORD_NOT_IN_DICTIONARY = -3 │ │ --- These are updated on touchdown and touchmove events │ -local user_input_pos_move_y = nil │ -local user_input_pos_move_x = nil │ +local RC_TO_STR_MAP = { │ + [core.RC_LETTERS_NOT_IN_A_LINE] = "Letters not in a horizontal or vertical line", │ + [core.RC_LETTERS_NOT_CONTINUOUS] = "Letters not continuous", │ + [core.RC_WORD_NOT_IN_DICTIONARY] = "Word not in dictionary", │ +} │ │ -local user_input2_pos_move_y = nil │ -local user_input2_pos_move_x = nil │ -local user_init_touch_dist = nil │ -local user_offset_y = 0 │ -local user_offset_x = 0 │ -local active_touch = nil │ -local active_touch2 = nil │ │ -local players = { │ - [1] = "You", │ -} │ -local player = 1 │ -local is_client = false │ -local player_name_to_idx = {} │ +local LETTERS_PER_PLAYER = 8 │ │ -local GAME_OPT_NEW_GAME = "game_opt_new_game" │ +local LETTER_AMOUNTS = { │ + { letter = "E", count = 14, points = 1 }, │ + { letter = "A", count = 10, points = 1 }, │ + { letter = "I", count = 8, points = 1 }, │ + { letter = "O", count = 7, points = 1 }, │ + { letter = "N", count = 8, points = 1 }, │ + { letter = "R", count = 8, points = 1 }, │ + { letter = "T", count = 6, points = 1 }, │ + { letter = "L", count = 5, points = 1 }, │ + { letter = "S", count = 4, points = 1 }, │ + { letter = "U", count = 4, points = 1 }, │ │ + { letter = "D", count = 4, points = 2 }, │ + { letter = "G", count = 3, points = 2 }, │ │ -local USER_INPUT_DOWN_TIME_THRESHOLD_MS = 300 │ + { letter = "B", count = 2, points = 2 }, │ + { letter = "C", count = 2, points = 2 }, │ + { letter = "M", count = 2, points = 3 }, │ + { letter = "P", count = 2, points = 3 }, │ │ -local POPUP_ID_LEVEL_SEL = "popup_level_sel" │ + { letter = "F", count = 2, points = 5 }, │ + { letter = "H", count = 2, points = 5 }, │ + { letter = "V", count = 2, points = 5 }, │ + { letter = "W", count = 2, points = 5 }, │ + { letter = "Y", count = 2, points = 5 }, │ │ -local DIFFICULTY_EASY = 0 │ -local DIFFICULTY_MEDIUM = 1 │ -local DIFFICULTY_HARD = 2 │ + { letter = "K", count = 1, points = 6 }, │ │ -local levels = { │ - { label = "Single moving structure", premade = 1 }, │ - { label = "Many moving structures", premade = 5 }, │ - { label = "Single High entropy shape", premade = 6 }, │ - { label = "Many high entropy shapes", premade = 2 }, │ - { label = "Five period oscillator", premade = 3 }, │ - { label = "16 period oscillator", premade = 4 }, │ + { letter = "J", count = 1, points = 8 }, │ + { letter = "X", count = 1, points = 9 }, │ │ - { label = "", portion = 0.25 }, │ - { label = "", portion = 0.30 }, │ - { label = "", portion = 0.35 }, │ - { label = "", portion = 0.45 }, │ - { label = "", portion = 0.45 }, │ - { label = "", portion = 0.55 }, │ - { label = "", portion = 0.65 }, │ - { label = "", portion = 0.75 }, │ + { letter = "Q", count = 1, points = 10 }, │ + { letter = "Z", count = 1, points = 10 }, │ } │ │ -local difficulty_btns = {} │ -for _, level in ipairs(levels) do │ - local output = "" │ - if #level.label > 0 then │ - output = level.label .. " " │ - end │ - if level.portion then │ - output = output .. string.format("Random (%.0f%% mines)", level.portion*100) │ - end │ +local LETTERS_TO_POINTS = {} │ │ - if level.premade then │ - output = output .. string.format("Premade puzzle %d", level.premade) │ - end │ - table.insert(difficulty_btns, output) │ +for _, info in ipairs(LETTER_AMOUNTS) do │ + LETTERS_TO_POINTS[info.letter] = info.points │ end │ │ -local function prompt_level() │ - show_buttons_popup.show_popup(POPUP_ID_LEVEL_SEL, │ - "Select Puzzle Type", │ - "Select a puzzle type", │ - difficulty_btns) │ +function core.get_letter_points(letter) │ + return LETTERS_TO_POINTS[letter] │ end │ │ +function core.rc_to_str(rc) │ + local s = RC_TO_STR_MAP[rc] │ │ -local function handle_move_client(state, player, move, y, x) │ - local msg = string.format("move:%d,%d,%d,%d", player, move, y, x) │ - -- TODO only message the host in the future? │ - alexgames.send_message("all", msg) │ - return core.RC_SUCCESS │ -end │ - │ -local function handle_move(state, player, move, y, x) │ - local rc = nil │ - if is_client then │ - rc = handle_move_client(state, player, move, y, x) │ - else │ - rc = core.handle_move(state, player, move, y, x) │ - end │ - local state_serialized = serialize.serialize_state(state) │ - if move == core.MOVE_FLAG_CELL then │ - draw.draw_flag_flash = true │ + if s == nil then │ + error(string.format("Could not convert rc %s to string", rc)) │ end │ - alexgames.save_state(g_session_id, state_serialized) │ │ - if core.is_game_over(state) and not win_anim_shown then │ - print('alex showing victory animation') │ - win_anim_shown = true │ - draw.victory_animation(60) │ - end │ + return s │ end │ │ -local function check_for_input_time_done() │ - if not user_input_down then │ - return │ - end │ - │ - local time_diff = alexgames.get_time_ms() - user_input_down_time │ - if user_input_down and │ - time_diff >= USER_INPUT_DOWN_TIME_THRESHOLD_MS and │ - not user_input_moved and │ - not user_input_down_timer_fired then │ - user_input_down_timer_fired = true │ - local cell_coords = draw.pos_to_cell_coords(state, player, user_input_pos_y, user_input_pos_x) │ - handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ - send_state_updates_if_host() │ - update() │ +function core.submit_info_to_msg(submit_info) │ + if submit_info.rc == core.RC_WORD_NOT_IN_DICTIONARY then │ + return string.format("Word '%s' (pos y=%d,x=%d) not in dictionary", submit_info.word, submit_info.pos.y, submit_info.pos.x) │ + else │ + return core.rc_to_str(submit_info.rc) │ end │ end │ │ --- TODO change update to some "update_evt" or something │ -function update(dt_ms) │ - if dt_ms ~= nil then │ - draw.update(dt_ms) │ - end │ - draw.draw_state(state, player) │ - check_for_input_time_done() │ -end │ +function core.new_state(player_count) │ + words_lib.init(LANGUAGE) │ + local state = { │ + letters = {}, │ + players = {}, │ + grid_size_y = 12, │ + grid_size_x = 12, │ │ -local function handle_user_input_down(pos_y, pos_x) │ - user_input_down_time = alexgames.get_time_ms() │ - user_input_down = true │ - user_input_moved = false │ - user_input_down_timer_fired = false │ - user_input_pos_y = pos_y │ - user_input_pos_x = pos_x │ - user_input_pos_move_y = pos_y │ - user_input_pos_move_x = pos_x │ - user_offset_y = state.players[player].offset_y │ - user_offset_x = state.players[player].offset_x │ -end │ + grid = {}, │ + } │ │ -local function handle_user_input_release(pos_y, pos_x, cancel) │ - if not cancel and not user_input_moved and not user_input_down_timer_fired then │ - local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - local time_diff = alexgames.get_time_ms() - user_input_down_time │ - local move_type = nil │ - if time_diff <= USER_INPUT_DOWN_TIME_THRESHOLD_MS then │ - move_type = core.MOVE_CLICK_CELL │ - else │ - move_type = core.MOVE_FLAG_CELL │ + for _, info in ipairs(LETTER_AMOUNTS) do │ + for _=1,info.count do │ + table.insert(state.letters, info.letter) │ end │ - handle_move(state, player, move_type, cell_coords.y, cell_coords.x) │ - update() │ - send_state_updates_if_host() │ end │ - user_input_down = false │ - user_input_down_timer_fired = false │ -end │ │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - if evt_id == alexgames.MOUSE_EVT_DOWN then │ - handle_user_input_down(pos_y, pos_x) │ - elseif evt_id == alexgames.MOUSE_EVT_UP then │ - handle_user_input_release(pos_y, pos_x, false) │ - elseif evt_id == alexgames.MOUSE_EVT_LEAVE then │ - handle_user_input_release(pos_y, pos_x, true) │ - elseif evt_id == alexgames.MOUSE_EVT_ALT_DOWN then │ - local cell_coords = draw.pos_to_cell_coords(state, player, pos_y, pos_x) │ - handle_move(state, player, core.MOVE_FLAG_CELL, cell_coords.y, cell_coords.x) │ - else │ - print(string.format('unhandled evt_id %s', evt_id)) │ - end │ -end │ + shuffle.shuffle(state.letters) │ │ -local function handle_user_input_move(pos_y, pos_x) │ - if user_input_down and ( │ - math.abs(user_input_pos_y - pos_y) > MAX_CLICK_MOVE or │ - math.abs(user_input_pos_x - pos_x) > MAX_CLICK_MOVE) then │ - user_input_moved = true │ - end │ - if user_input_down then │ - local offset_adj_y = user_input_pos_y - pos_y │ - local offset_adj_x = user_input_pos_x - pos_x │ - user_input_pos_move_y = pos_y │ - user_input_pos_move_x = pos_x │ - core.adjust_offset(state, player, │ - math.floor(user_offset_y + offset_adj_y), │ - math.floor(user_offset_x + offset_adj_x)) │ - update() │ + for _=1,player_count do │ + local player_letters = {} │ + for _=1,LETTERS_PER_PLAYER do │ + local letter = table.remove(state.letters) │ + table.insert(player_letters, letter) │ + end │ + table.insert(state.players, { │ + letters = player_letters │ + }) │ end │ -end │ │ -function handle_mousemove(pos_y, pos_x) │ - handle_user_input_move(pos_y, pos_x) │ -end │ + for y=1,state.grid_size_y do │ + local row = {} │ + for x = 1,state.grid_size_y do │ + table.insert(row, core.LETTER_EMPTY) │ + end │ + table.insert(state.grid, row) │ + end │ │ -function handle_user_clicked() │ + return state │ end │ │ -local function get_touch_dist() │ - local dy = user_input2_pos_move_y - user_input_pos_move_y │ - local dx = user_input2_pos_move_x - user_input_pos_move_x │ - return math.sqrt(dy*dy + dx*dx) │ +local function sign(x) │ + if x == 0 then return 0 │ + elseif x < 0 then return -1 │ + else return 1 end │ end │ │ -function handle_touch_evt(evt_id, changed_touches) │ - for _, touch in ipairs(changed_touches) do │ - if evt_id == 'touchstart' then │ - if active_touch == nil then │ - active_touch = touch.id │ - handle_user_input_down(touch.y, touch.x) │ - elseif active_touch2 == nil then │ - active_touch2 = touch.id │ - user_input_moved = true │ - user_input2_pos_move_y = touch.y │ - user_input2_pos_move_x = touch.x │ - user_init_touch_dist = get_touch_dist() │ - init_zoom = core.get_zoom_fact(state, player) │ - end │ - elseif evt_id == 'touchmove' then │ +local function letters_in_a_line(placed_letters) │ + local dy = nil │ + local dx = nil │ │ - if active_touch == touch.id then │ - handle_user_input_move(touch.y, touch.x) │ - end │ + local prev_tile_info = nil │ + for _, tile_info in ipairs(placed_letters) do │ + if prev_tile_info ~= nil then │ + local dy2 = prev_tile_info.y - tile_info.y │ + local dx2 = prev_tile_info.x - tile_info.x │ │ - if active_touch2 ~= nil then │ - if active_touch2 == touch.id then │ - user_input2_pos_move_y = touch.y │ - user_input2_pos_move_x = touch.x │ + if dy ~= nil then │ + print(string.format("{y=%d, x=%d}, dy=%s, dx=%s, dy2=%s, dx2=%s", tile_info.y, tile_info.x, dy, dx, dy2, dx2)) │ + if dy == 0 and dy2 ~= 0 then return false end │ + if dx == 0 and dx2 ~= 0 then return false end │ + │ + if dy == 0 and dx ~= 0 then │ + --if sign(dx) ~= sign(dx2) then return false end │ + elseif dx == 0 and dy ~= 0 then │ + --if sign(dy) ~= sign(dy2) then return false end │ + else │ + return false │ end │ - local touch_dist_fact = get_touch_dist() / user_init_touch_dist │ - local zoom_fact = init_zoom * touch_dist_fact │ - --alexgames.set_status_msg( │ - -- string.format("Touch dist fact is %.3f, dist=%.0f, orig=%.0f", │ - -- touch_dist_fact, get_touch_dist(), user_init_touch_dist)) │ - core.set_zoom_fact(state, player, zoom_fact) │ + else │ + dy = dy2 │ + dx = dx2 │ end │ │ - elseif evt_id == 'touchend' or │ - evt_id == 'touchcancel' then │ - local is_cancel = (evt_id == 'touchcancel') │ - if active_touch == touch.id then │ - handle_user_input_release(touch.y, touch.x, is_cancel) │ - active_touch = nil │ - elseif active_touch2 == touch.id then │ - active_touch2 = nil │ - end │ + │ end │ + prev_tile_info = tile_info │ end │ + return true │ end │ │ -function handle_wheel_changed(dy, dx) │ - print(string.format("handle_wheel(dy=%s, dx=%s)", dy, dx)) │ - │ - local zoom_fact = core.get_zoom_fact(state, player) │ +local function get_letters_bounds(state, placed_letters) │ + if #placed_letters == 0 then error("get_letters_bounds called with no placed_letters", 2) end │ + local letters_start = nil │ + local letters_end = nil │ │ - zoom_fact = zoom_fact + -dy/114 * 0.1 │ + for _, letter_info in ipairs(placed_letters) do │ + if letters_start == nil or │ + (letter_info.y <= letters_start.y and │ + letter_info.x <= letters_start.x) then │ + letters_start = letter_info │ + end │ │ - core.set_zoom_fact(state, player, zoom_fact) │ + if letters_end == nil or │ + (letter_info.y >= letters_end.y and │ + letter_info.x >= letters_end.x) then │ + letters_end = letter_info │ + end │ + end │ │ - update() │ -end │ + -- TODO check if there are already letters before or after start/end? │ │ -function send_state_updates_if_host() │ - print("send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - if is_client and not wait_for_players.is_host_tentative() then │ - print("return 1 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - return │ + if letters_start == nil or letters_end == nil then │ + error("could not find start or end of letters?") │ end │ + return { start_pos = letters_start, end_pos = letters_end } │ +end │ │ - if state == nil then │ - print("return 2 send_state_updates_if_host", is_client, wait_for_players.is_host_tentative(), state) │ - return │ +local function get_placed_letters_map(state, placed_letters) │ + local placed_letters_map = {} │ + for y=1,state.grid_size_y do │ + placed_letters_map[y] = {} │ end │ - │ - for dst_player, player_name in pairs(wait_for_players.players_tentative()) do │ - if dst_player == player then │ - goto next_player │ + for _, placed_letter_info in ipairs(placed_letters) do │ + if placed_letters_map[placed_letter_info.y][placed_letter_info.x] ~= nil then │ + error(string.format("already found letter at pos %d %d", placed_letter_info.y, placed_letter_info.x)) │ end │ - print("Sending state update") │ - local state_msg = "state:" .. serialize.serialize_client_game_state(state, dst_player) │ - alexgames.send_message(player_name, state_msg) │ - ::next_player:: │ + placed_letters_map[placed_letter_info.y][placed_letter_info.x] = placed_letter_info.letter │ end │ + return placed_letters_map │ end │ │ -function apply_shape(state, shape, y, x) │ - for dy=0,#shape-1 do │ - for dx=0,#shape[1]-1 do │ - if y+dy < state.game.height and │ - x+dx < state.game.width then │ - state.game.board[y+dy][x+dx].has_mine = (shape[1+dy][1+dx] > 0) │ - end │ - end │ +local function get_letter(state, placed_letters, pt) │ + local placed_letters_map = get_placed_letters_map(state, placed_letters) │ + if placed_letters_map[pt.y][pt.x] then │ + return placed_letters_map[pt.y][pt.x] │ + else │ + return state.grid[pt.y][pt.x] │ end │ - │ end │ │ -function new_game(player_count, level) │ - print(string.format("Starting game with %d players, level %d", player_count, level)) │ - local puzzle_info = levels[level+1] │ - if not puzzle_info.premade then │ - local mine_portion = puzzle_info.portion │ - print(string.format("Initializing game with mine portion %.0f%% (level idx %d)", mine_portion*100, level)) │ - alexgames.set_status_msg(string.format("Initializing game with mine portion %.0f%%", mine_portion*100)) │ - state = core.new_state(player_count, game_size_y, game_size_x, cell_size, mine_portion) │ - elseif puzzle_info.premade == 1 or puzzle_info.premade == 5 then │ - state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ - local shape1 = { │ - { 1, 0, 0}, │ - { 0, 1, 1}, │ - { 1, 1, 0}, │ - } │ - │ - if puzzle_info.premade == 1 then │ - apply_shape(state, shape1, 2, 2) │ - elseif puzzle_info.premade == 5 then │ - local delta = 5 │ - for i=0,8 do │ - for y=1,game_size_y,delta do │ - apply_shape(state, shape1, y + delta*i, 2 + delta*i) │ - end │ - end │ - │ - local shape2 = { │ - { 0, 1, 1}, │ - { 1, 1, 0}, │ - { 0, 0, 1}, │ - } │ - │ - local delta = 5 │ - for i=0,8 do │ - apply_shape(state, shape2, 2 + delta*i, 16 + delta*i) │ - apply_shape(state, shape2, 2 + delta*i, 11 + delta*i) │ - end │ - end │ - │ - core.reveal_cell(state, 0, game_size_y, game_size_x) │ │ - core.get_touching_mine_count(state) │ - elseif puzzle_info.premade == 2 or puzzle_info.premade == 6 then │ - state = core.new_state(player_count, 30, 30, cell_size, 0) │ - shape = { │ - { 0, 1, 1}, │ - { 1, 1, 0}, │ - { 0, 1, 0}, │ - } │ +local function get_points_between_letters(state, bounds) │ + local dy = sign(bounds.end_pos.y - bounds.start_pos.y) │ + local dx = sign(bounds.end_pos.x - bounds.start_pos.x) │ + print(string.format('get_points_between_letters, dy=%d, dx=%d', dy, dx)) │ │ - if puzzle_info.premade == 6 then │ - apply_shape(state, shape, 13, 13) │ - elseif puzzle_info.premade == 2 then │ - for y=4,state.game.height,8 do │ - for x=4,state.game.width,8 do │ - apply_shape(state, shape, y, x) │ - end │ - end │ + local pts = {} │ + if dy ~= 0 then │ + local x = bounds.start_pos.x │ + for y=bounds.start_pos.y,bounds.end_pos.y,dy do │ + table.insert(pts, { y = y, x = x }) │ + end │ + elseif dx ~= 0 then │ + local y = bounds.start_pos.y │ + for x=bounds.start_pos.x,bounds.end_pos.x,dx do │ + table.insert(pts, { y = y, x = x }) │ end │ - │ - core.reveal_cell(state, 0, 30, 1) │ - │ - core.get_touching_mine_count(state) │ - elseif puzzle_info.premade == 3 then │ - state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ - shape = { │ - { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, │ - { 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0 }, │ - { 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, │ - { 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1 }, │ - { 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0 }, │ - { 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0 }, │ - { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, │ - } │ - │ - apply_shape(state, shape, 3, 3) │ - │ - --core.reveal_cell(state, 0, game_size_y, game_size_x) │ - │ - core.get_touching_mine_count(state) │ - │ - alexgames.set_status_msg("Spoiler: See https://conwaylife.appspot.com/pattern/average for this pattern") │ - elseif puzzle_info.premade == 4 then │ - state = core.new_state(player_count, game_size_y, game_size_x, cell_size, 0) │ - shape = { │ - { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0 }, │ - { 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0 }, │ - { 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, │ - { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ - { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1 }, │ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 }, │ - { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0 }, │ - { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, │ - { 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, │ - { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, │ - } │ - │ - apply_shape(state, shape, 2, 2) │ - │ - core.reveal_cell(state, 0, game_size_y, game_size_x) │ - │ - core.get_touching_mine_count(state) │ - │ - alexgames.set_status_msg("Spoiler: see https://conwaylife.appspot.com/pattern/achimsp16 for this pattern") │ else │ - error(string.format("Unhandled premade index %s", puzzle_info.premade)) │ + table.insert(pts, { y = bounds.start_pos.y, x = bounds.start_pos.x }) │ end │ - win_anim_shown = false │ - g_session_id = alexgames.get_new_session_id() │ + return pts │ end │ │ +local function letters_continuous(state, placed_letters) │ + local bounds = get_letters_bounds(state, placed_letters) │ │ -local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as host") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = false │ + local placed_letters_map = get_placed_letters_map(state, placed_letters) │ │ - if not state_set then │ - prompt_level() │ + for _, pos in ipairs(get_points_between_letters(state, bounds)) do │ + if placed_letters_map[pos.y][pos.x] == nil and │ + state.grid[pos.y][pos.x] == core.LETTER_EMPTY then │ + return false │ + end │ end │ - send_state_updates_if_host() │ - update() │ -end │ │ -local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as client") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = true │ - -- TODO only initialize player_state here? │ - state = core.new_state(#players, 20, 20, cell_size, core.DEFAULT_MINE_PORTION) -- TODO hacky to include mine portion here, this should never be used... │ - -- no need to draw board here, a state update should soon follow │ + return true │ end │ │ -function handle_msg_received(src, msg) │ - │ - local handled = wait_for_players.handle_msg_received(src, msg) │ +local function get_word_formed(state, placed_letters) │ + -- TODO need to get letters before and after if present │ + local word = "" │ │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ + local bounds = get_letters_bounds(state, placed_letters) │ + local placed_letters_map = get_placed_letters_map(state, placed_letters) │ + for _, pt in ipairs(get_points_between_letters(state, bounds)) do │ + local letter = nil │ + if placed_letters_map[pt.y][pt.x] then │ + letter = placed_letters_map[pt.y][pt.x] │ + elseif state.grid[pt.y][pt.x] then │ + letter = state.grid[pt.y][pt.x] │ + else │ + error(string.format("no letter at pos %d %d", pt.y, pt.x)) │ + end │ │ - if handled and header ~= "joined" then │ - return │ + print(string.format("getting letter from pt %d %d: %s", pt.y, pt.x, letter)) │ + word = word .. letter │ end │ │ - if header == "state" then │ - --if not is_client and not wait_for_players.is_host_tentative() then │ - -- error("Received state as host") │ - --end │ - serialize.deserialize_client_game_state(state, payload) │ - elseif header == "joined" then │ - print("player_joined") │ - send_state_updates_if_host() │ - elseif header == "player_joined" or │ - header == "player_left" then │ - -- ignore I guess? │ - elseif header == "move" then │ - if not is_client then │ - local m2 = payload:gmatch("(%d+),(%d+),(%d+),(%d+)") │ - if m2 == nil then │ - error(string.format("invalid move payload %s", payload)) │ - end │ - local player_str, move_type_str, y_str, x_str = m2() │ - local player = tonumber(player_str) │ - local move_type = tonumber(move_type_str) │ - local y = tonumber(y_str) │ - local x = tonumber(x_str) │ + return word │ +end │ │ - if player ~= player_name_to_idx[src] then │ - error(string.format("received move for player idx %s from player_name %s (%d)", │ - player, src, player_name_to_idx[src])) │ - end │ - handle_move(state, player, move_type, y, x) │ - send_state_updates_if_host() │ +local function in_range(state, y, x) │ + return (1 <= y and y <= state.grid_size_y and │ + 1 <= x and x <= state.grid_size_x) │ +end │ + │ +local function find_end_pt(state, placed_letters, start_pt, dy, dx) │ + print(string.format("find_end_pt called with pt %d %d, dy=%d, dx=%d", start_pt.y, start_pt.x, dy, dx)) │ + if dy == 0 and dx == 0 then return { y = start_pt.y, x = start_pt.x } end │ + local y = start_pt.y │ + local x = start_pt.x │ + │ + while true do │ + if not in_range(state, y - dy, x - dx) then │ + break │ end │ - else │ - error(string.format("Unhandled message %s", header)) │ + local letter = get_letter(state, placed_letters, { y = y - dy, x = x - dx }) │ + print(string.format("checking pt %d %d, %s", y, x, letter)) │ + if letter == core.LETTER_EMPTY then │ + break │ + end │ + y = y - dy │ + x = x - dx │ end │ │ - send_state_updates_if_host() │ - update() │ + print(string.format("find_end_pt returning with %d %d", y, x)) │ + return { y = y, x = x } │ end │ │ +local function get_parallel_word_info(state, placed_letters, dy, dx) │ + print(string.format("get_parallel_word_info")) │ + local bounds = get_letters_bounds(state, placed_letters) │ + local placed_letters_map = get_placed_letters_map(state, placed_letters) │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ - if handled then │ - return │ + if dy ~= 0 and dx ~= 0 then │ + error(string.format("expected horizontal or vertical line, received diagonal")) │ + elseif dy == 0 and dx == 0 then │ + -- for the case of a single letter (resulting in dy = 0 and dx = 0), just │ + -- arbitrarily pick one to be 1, and the other to be 0. │ + -- then this function (get_parallel_word_info) and the perpendicular one │ + -- will work, even for this special case. │ + error("expected non zero dy or dx.") │ end │ │ - if popup_id == POPUP_ID_LEVEL_SEL then │ - new_game(#players, btn_idx) │ - alexgames.hide_popup() │ + local start_pt = find_end_pt(state, placed_letters, bounds.start_pos, dy, dx) │ + local end_pt = find_end_pt(state, placed_letters, bounds.start_pos, -dy, -dx) │ │ - if not g_multiplayer_init then │ - wait_for_players.init(players, player, start_host_game, start_client_game) │ + local word = "" │ + │ + print(string.format("parallel word start %d %d, end %d %d", start_pt.y, start_pt.x, end_pt.y, end_pt.x)) │ + for offset=0,math.max(end_pt.y - start_pt.y, end_pt.x - start_pt.x) do │ + local pt = { │ + y = start_pt.y + offset*dy, │ + x = start_pt.x + offset*dx │ + } │ + print(string.format("parallel word checking %d %d", pt.y, pt.x)) │ + │ + local letter │ + if placed_letters_map[pt.y][pt.x] then │ + letter = placed_letters_map[pt.y][pt.x] │ + elseif state.grid[pt.y][pt.x] then │ + letter = state.grid[pt.y][pt.x] │ + else │ + error(string.format("could not find letter at %d %d", pt.y, pt.x)) │ end │ - else │ - error(string.format("Unhandled popup id %s", popup_id)) │ - end │ -end │ │ -function handle_game_option_evt(game_opt_id, value) │ - if game_opt_id == GAME_OPT_NEW_GAME then │ - --new_game(#players) │ - prompt_level() │ - update() │ + word = word .. letter │ end │ -end │ │ -local function load_state_offset(offset) │ - local ui_states = core.copy_player_ui_states(state) │ - local state_serialized = alexgames.adjust_saved_state_offset(g_session_id, offset) │ - if state_serialized ~= nil then │ - state = serialize.deserialize_state(state_serialized) │ - core.apply_player_ui_states(state, ui_states) │ - draw.draw_state(state, player) │ - end │ + return { │ + start_pt = start_pt, │ + end_pt = end_pt, │ + word = word, │ + } │ end │ │ -function handle_btn_clicked(btn_id) │ - if btn_id == draw.BTN_ID_UNDO then │ - load_state_offset(-1) │ - elseif btn_id == draw.BTN_ID_REDO then │ - load_state_offset(1) │ +local function between_pts(start_pt, end_pt) │ + local dy = sign(end_pt.y - start_pt.y) │ + local dx = sign(end_pt.x - start_pt.x) │ + │ + local pts = {} │ + local y = start_pt.y │ + local x = start_pt.x │ + while y <= end_pt.y and x <= end_pt.x do │ + table.insert(pts, { y = y, x = x }) │ + y = y + dy │ + x = x + dx │ end │ -end │ │ -function get_state() │ - return serialize.serialize_state(state) │ + return pts │ end │ │ --- TODO need proper state saving │ +local function find_perpendicular_word(state, placed_letters, pt, dy_arg, dx_arg) │ + -- swap dy and dx: we're looking for perpendicular words │ + local dy = dx_arg │ + local dx = dy_arg │ │ -draw.init(480, 480, cell_size) │ + local start_pt = find_end_pt(state, placed_letters, pt, dy, dx) │ + local end_pt = find_end_pt(state, placed_letters, pt, -dy, -dx) │ │ -function start_game(session_id, state_serialized) │ - if state_serialized ~= nil then │ - g_session_id = session_id │ - state = serialize.deserialize_state(state_serialized) │ - state_set = true │ + if start_pt.y == end_pt.y and │ + start_pt.x == end_pt.x then │ + return nil │ else │ - local last_sess_id = alexgames.get_last_session_id() │ - if last_sess_id ~= nil then │ - state_serialized = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ - g_session_id = last_sess_id │ - state = serialize.deserialize_state(state_serialized) │ - state_set = true │ + local word = "" │ + for _, pt in ipairs(between_pts(start_pt, end_pt)) do │ + local letter = get_letter(state, placed_letters, pt) │ + word = word .. letter │ end │ + return { │ + start_pt = start_pt, │ + end_pt = end_pt, │ + word = word, │ + } │ end │ +end │ │ - if state_serialized ~= nil then │ - wait_for_players.init(players, player, start_host_game, start_client_game) │ - g_multiplayer_init = true │ - else │ - prompt_level() │ - end │ - │ - alexgames.enable_evt("mouse_move") │ - alexgames.enable_evt("mouse_updown") │ - alexgames.enable_evt("mouse_alt_updown") │ - alexgames.enable_evt("touch") │ - alexgames.enable_evt("wheel") │ - │ - alexgames.add_game_option(GAME_OPT_NEW_GAME, { │ - type = alexgames.OPTION_TYPE_BTN, │ - label = "New Game" │ - }) │ +local function get_all_new_words_formed(state, placed_letters) │ + local word_infos = {} │ + local bounds = get_letters_bounds(state, placed_letters) │ │ - -- Kind of sucks that I only need this timer for measuring touch/mouse down time. │ - -- Would be ideal if I could just set a 300 ms one off timer? │ - alexgames.set_timer_update_ms(50) │ + local dy = sign(bounds.end_pos.y - bounds.start_pos.y) │ + local dx = sign(bounds.end_pos.x - bounds.start_pos.x) │ │ -end │ -local serialize = {} │ + local skip_parallel = false │ + local skip_parallel = false │ + if #placed_letters == 1 then │ + assert(dy == 0) │ + assert(dx == 0) │ │ -local bit_pack = require("libs/serialize/bit_pack") │ -local core = require("games/minesweeper_life/minesweeper_life_core") │ + -- Arbitrarily choosing horizontal as the "parallel" direction with one letter │ + dx = 1 │ │ -serialize.VERSION = 1 │ -local serialize_lib = require("libs/serialize/serialize") │ + -- Since I chose horizontal as "parallel", check if we need to actually │ + -- look for "perpendicular" letters ( y-1 and y+1) │ + local pt1 = { y = bounds.start_pos.y, x = bounds.start_pos.x - 1 } │ + local pt2 = { y = bounds.start_pos.y, x = bounds.start_pos.x + 1 } │ │ -local function serialize_cell_for_client(cell) │ - if not cell.revealed then │ - if cell.flagged_by_player == nil then return 0 │ - else return 10 + cell.flagged_by_player end │ - else │ - if cell.has_mine then return 10 │ - else │ - if cell.touching_mine_count > 0 then │ - return cell.touching_mine_count │ - else │ - return 9 │ - end │ + local l1 = get_letter(state, placed_letters, pt1) │ + local l2 = get_letter(state, placed_letters, pt2) │ + print(string.format("l1=%s, l2=%s", l1, l2)) │ + if get_letter(state, placed_letters, pt1) == core.LETTER_EMPTY and │ + get_letter(state, placed_letters, pt2) == core.LETTER_EMPTY then │ + skip_parallel = true │ end │ end │ -end │ + │ + if not skip_parallel then │ + local parallel_word_info = get_parallel_word_info(state, placed_letters, dy, dx) │ + print(string.format("Found parallel word: %s", parallel_word_info.word)) │ + table.insert(word_infos, parallel_word_info) │ + end │ │ -local function client_deserialize_cell(bytes) │ - local byte = table.remove(bytes, 1) │ - byte = string.byte(byte) │ - local cell = { │ - revealed = false, │ - has_mine = false, │ - flagged_by_player = nil, │ - touching_mine_count = nil, │ - } │ - if byte == 0 then │ - -- pass │ - elseif 11 <= byte and byte <= 14 then │ - cell.flagged_by_player = byte - 10 │ - elseif byte == 10 then │ - cell.revealed = true │ - cell.has_mine = true │ - elseif byte == 9 then │ - cell.revealed = true │ - cell.touching_mine_count = 0 │ - elseif 1 <= byte and byte <= 8 then │ - cell.revealed = true │ - cell.touching_mine_count = byte │ - else │ - error(string.format("unexpected serialized cell byte=%s", byte)) │ + for _, pt in ipairs(get_points_between_letters(state, bounds)) do │ + local perp_info = find_perpendicular_word(state, placed_letters, pt, dy, dx) │ + if perp_info then │ + print(string.format("Found perpendicular word: %s", perp_info.word)) │ + table.insert(word_infos, perp_info) │ + end │ end │ │ - return cell │ + return word_infos │ + │ end │ │ -function serialize.serialize_client_game_state(state, player) │ - local game_state = state.game │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(#state.players) │ - output = output .. serialize_lib.serialize_16bit(game_state.width) │ - output = output .. serialize_lib.serialize_16bit(game_state.height) │ - for i=1,#state.players do │ - local player_state = state.players[i] │ - output = output .. serialize_lib.serialize_s32(player_state.score) │ - end │ - for y=1,game_state.height do │ - for x=1,game_state.width do │ - local serialized_cell = serialize_cell_for_client(game_state.board[y][x]) │ - output = output .. serialize_lib.serialize_byte(serialized_cell) │ +local function get_idx_of_letter(letter_list, letter_val) │ + for idx, val in ipairs(letter_list) do │ + if letter_val == val then │ + return idx │ end │ end │ - return output │ end │ │ -function serialize.deserialize_client_game_state(state, bytes) │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - local game_state = state.game │ - local player_count = serialize_lib.deserialize_byte(bytes) │ - game_state.width = serialize_lib.deserialize_16bit(bytes) │ - game_state.height = serialize_lib.deserialize_16bit(bytes) │ - for i=1,player_count do │ - if state.players[i] == nil then │ - error(string.format("player idx %d not in map when len %d", i, #state.players)) │ - end │ - state.players[i].score = serialize_lib.deserialize_s32(bytes) │ +local function commit_placed_letters(state, player_idx, placed_letters) │ + for _, placed_letter_info in ipairs(placed_letters) do │ + state.grid[placed_letter_info.y][placed_letter_info.x] = placed_letter_info.letter │ end │ - game_state.board = {} │ - for y=1,game_state.height do │ - game_state.board[y] = {} │ - for x=1,game_state.width do │ - game_state.board[y][x] = client_deserialize_cell(bytes) │ - end │ + │ + for _, placed_letter_info in ipairs(placed_letters) do │ + local player_letters = state.players[player_idx].letters │ + table.remove(player_letters, get_idx_of_letter(player_letters, placed_letter_info.letter)) │ end │ - return game_state │ end │ │ -local function serialize_cell_concise(cell) │ - local val = 0 │ - if cell.flagged_by_player ~= nil then val = val | 0x4 end │ - if cell.revealed then val = val | 0x2 end │ - if cell.has_mine then val = val | 0x1 end │ - │ - return val │ +local function deal_more_tiles(state, player_idx) │ + local player = state.players[player_idx] │ + while #player.letters < LETTERS_PER_PLAYER do │ + print("dealing player a new tile") │ + local letter = table.remove(state.letters) │ + table.insert(player.letters, letter) │ + end │ end │ + │ │ -local function deserialize_cell_concise(val) │ - local cell = {} │ - cell.flagged_by_player = (val & 0x4) > 0 │ - if cell.flagged_by_player then │ - cell.flagged_by_player = 1 │ - else │ - cell.flagged_by_player = nil │ +function core.submit(state, player_idx, placed_letters) │ + print(string.format("core.submit... placed_letters len: %d", #placed_letters)) │ + │ + print("checking if letters are in a line...") │ + if not letters_in_a_line(placed_letters) then │ + print("letters not in a line!") │ + return { rc = core.RC_LETTERS_NOT_IN_A_LINE } │ end │ - cell.revealed = (val & 0x2) > 0 │ - cell.has_mine = (val & 0x1) > 0 │ - return cell │ -end │ │ -local function serialize_cells_concise(cells) │ - local cells_3bits = {} │ - for y=1,#cells do │ - for x=1,#cells[1] do │ - table.insert(cells_3bits, serialize_cell_concise(cells[y][x])) │ - end │ + print("checking if letters are continuous...") │ + if not letters_continuous(state, placed_letters) then │ + print("letters not continuous!") │ + return { rc = core.RC_LETTERS_NOT_CONTINUOUS } │ end │ │ - return bit_pack.pack(cells_3bits, 3) │ -end │ + local word_infos = get_all_new_words_formed(state, placed_letters) │ + print(string.format("found %d words", #word_infos)) │ + for i, info in ipairs(word_infos) do │ + print(string.format("%2d: %3d %3d %s", i, info.start_pt.y, info.start_pt.x, info.word)) │ │ -local function deserialize_cells_concise(cells_bytes) │ - local cells = {} │ - for y=1,#cells_bytes do │ - local row = {} │ - for x=1,#cells_bytes[1] do │ - table.insert(row, deserialize_cell_concise(cells_bytes[y][x])) │ + if not words_lib.is_valid_word(LANGUAGE, info.word) then │ + return { rc = core.RC_WORD_NOT_IN_DICTIONARY, word = info.word, pos=info.start_pt } │ end │ - table.insert(cells, row) │ + │ end │ - return cells │ -end │ │ -local function unflatten(cells_flat, height, width) │ - local cells = {} │ - for y=1,height do │ - local row = {} │ - for x=1,width do │ - table.insert(row, cells_flat[(y-1)*width + x] ) │ - end │ - table.insert(cells, row) │ - end │ - return cells │ -end │ + commit_placed_letters(state, player_idx, placed_letters) │ │ + deal_more_tiles(state, player_idx) │ │ -function serialize.serialize_state(state) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ - output = output .. serialize_lib.serialize_byte(state.game.height) │ - output = output .. serialize_lib.serialize_byte(state.game.width) │ - output = output .. serialize_lib.serialize_bytes(serialize_cells_concise(state.game.board)) │ - return output │ + print(string.format("player tile count %d", #state.players[player_idx].letters)) │ + │ + return { rc = core.RC_SUCCESS, word_infos = word_infos } │ end │ │ -function serialize.deserialize_state(bytes) │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - local state = { │ - game = {}, │ - } │ - local version = serialize_lib.deserialize_byte(bytes) │ - if version ~= serialize.VERSION then │ - error(string.format("Can only deserialize state version %d, found %d", serialize.VERSION, version)) │ - end │ - state.game.height = serialize_lib.deserialize_byte(bytes) │ - state.game.width = serialize_lib.deserialize_byte(bytes) │ +-- words_lib.get_words_made_from_letters │ │ - local cells_flat_bytes_packed = serialize_lib.deserialize_bytes(bytes) │ - local cells_flat_serialized = bit_pack.unpack(cells_flat_bytes_packed, 3) │ - local cells_bytes = unflatten(cells_flat_serialized, state.game.height, state.game.width) │ - state.game.board = deserialize_cells_concise(cells_bytes) │ +return core │ +local draw = {} │ │ - core.calc_state_vals(state) │ +local alexgames = require("alexgames") │ │ - state.players = { │ - core.new_player_state(), │ - } │ +local core = require("games/crossword_builder/crossword_builder_core") │ │ - return state │ -end │ +local letter_tiles = require("libs/letter_tiles") │ │ -return serialize │ +draw.ACTION_SUBMIT = 1 │ │ -local core = {} │ +local BTN_ID_SUBMIT = "submit" │ │ -core.INIT_ZOOM_FACT = 0.5 │ +local board_height = 480 │ +local board_width = 480 │ │ -local CELL_COUNT_BORDER_PADDING = 6 │ +local GRID_BG_COLOUR = '#000000' │ +local GRID_LINE_COLOUR = '#888888' │ +local KEY_BACKGROUND_COLOUR = '#333388' │ +local COLOUR = '#888888' │ +local TEXT_SIZE = 18 │ +local TEXT_SIZE_SCORE = 8 │ │ -local dirs = { │ - {y = 0, x = 1}, │ - {y = 1, x = 1}, │ - {y = 1, x = 0}, │ - {y = 1, x =-1}, │ - {y = 0, x =-1}, │ - {y =-1, x =-1}, │ - {y =-1, x = 0}, │ - {y =-1, x = 1}, │ -} │ +if false then │ + GRID_BG_COLOUR = '#bb6644' │ + GRID_LINE_COLOUR = '#000000' │ + KEY_BACKGROUND_COLOUR = '#ee8800' │ + COLOUR = '#000000' │ +else │ + GRID_BG_COLOUR = '#bb6644' │ + GRID_LINE_COLOUR = '#000000' │ + KEY_BACKGROUND_COLOUR = '#ff8800' │ + COLOUR = '#000000' │ +end │ │ -core.DEFAULT_MINE_PORTION = 0.1 │ │ +local padding = 5 │ │ -local MIN_MAX_ZOOM_FACT = 3 │ │ -core.MOVE_FLAG_CELL = 1 │ -core.MOVE_CLICK_CELL = 2 │ +local function get_large_piece_params() │ + return { │ + size = 45, │ + main_text_size = 20, │ │ -core.RC_SUCCESS = 0 │ -core.RC_OUT_OF_RANGE = -1 │ -core.RC_INVALID_MOVE = -2 │ -core.RC_CAN_NOT_AUTO_REVEAL = -3 │ + text_colour = COLOUR, │ + outline_colour = COLOUR, │ + background_colour = KEY_BACKGROUND_COLOUR, │ + line_width = 1, │ │ -local FLAG_MINE_SUCCESS_SCORE = 10 │ -local FLAG_MINE_FAIL_SCORE = -30 │ -local REVEAL_MINE_SCORE = -100 │ -local REVEAL_CELL_SCORE = 1 │ + score_text_size = 8, │ + padding_small = 2, │ + padding = 5, │ │ + show_score = true, │ + get_letter_points = core.get_letter_points, │ + } │ +end │ │ --- TODO this should be in the draw file only │ --- apparently I wrote this game before I was used to properly separating the UI and the game logic │ -core.cell_size = 35 │ +local function get_board_piece_params() │ + return { │ + size = 23, │ + main_text_size = 18, │ │ -local function in_range(state, y, x) │ - return 1 <= y and y <= state.game.height and │ - 1 <= x and x <= state.game.width │ -end │ + outline_colour = COLOUR, │ + text_colour = COLOUR, │ + background_colour = KEY_BACKGROUND_COLOUR, │ │ --- TODO rename this to "update" │ -function core.get_touching_mine_count(state) │ + highlight_colour = '#ffff00', │ + highlight_width = 2, │ │ - for y=1,state.game.height do │ - for x=1,state.game.width do │ - local count = 0 │ - for _,dir in ipairs(dirs) do │ - local y2 = y + dir.y │ - local x2 = x + dir.x │ - if not in_range(state, y2, x2) then │ - goto next_dir │ - end │ + score_text_size = 8, │ + padding_small = 2, │ + padding = 5, │ │ - if state.game.board[y2][x2].has_mine then │ - count = count + 1 │ - end │ - ::next_dir:: │ - end │ - state.game.board[y][x].touching_mine_count = count │ - end │ - end │ - │ -end │ + line_width = 2, │ │ -function core.new_player_state() │ - local player_state = { │ - offset_y = 0, │ - offset_x = 0, │ - zoom_fact = core.INIT_ZOOM_FACT, │ - score = 0, │ + show_score = false, │ + --get_letter_points = core.get_letter_points, │ } │ - return player_state │ end │ │ -function core.copy_player_ui_states(state) │ - local ui_states = {} │ - for _, player in ipairs(state.players) do │ - table.insert(ui_states, { │ - offset_y = player.offset_y, │ - offset_x = player.offset_x, │ - zoom_fact = player.zoom_fact, │ - }) │ - end │ - return ui_states │ -end │ │ -function core.apply_player_ui_states(state, ui_states) │ - for player_idx, player in ipairs(state.players) do │ - player.offset_y = ui_states[player_idx].offset_y │ - player.offset_x = ui_states[player_idx].offset_x │ - player.zoom_fact = ui_states[player_idx].zoom_fact │ - end │ -end │ +local KEY_WIDTH = 50 │ +local KEY_HEIGHT = KEY_WIDTH │ │ -local function copy_cell(cell) │ - local new_cell = { │ - has_mine = cell.has_mine, │ - revealed = cell.revealed, │ - flagged_by_player = cell.flagged_by_player, │ - touching_mine_count = cell.touching_mine_count, │ +local KEY_POS_Y = board_height - get_large_piece_params().size + padding │ + │ +function draw.init(game_state) │ + local draw_state = { │ + tiles = nil, │ } │ - return new_cell │ + │ + draw_state.tiles = letter_tiles.new_state({ │ + --touch_cursor_offset_y = -50, │ + --touch_cursor_offset_x = 50, │ + touch_cursor_offset_y = -65, │ + --touch_cursor_offset_y = -45, │ + touch_cursor_offset_x = 0, │ + }) │ + letter_tiles.add_letter_row(draw_state.tiles, game_state.players[1].letters, { y = KEY_POS_Y, x = 480/2 }, get_large_piece_params()) │ + local y_count = game_state.grid_size_y │ + local x_count = game_state.grid_size_x │ + letter_tiles.add_grid(draw_state.tiles, { │ + y_pos = padding, │ + x_pos = math.floor(board_width - letter_tiles.get_grid_y_size(y_count, get_board_piece_params()))/2, │ + y_count = y_count, │ + x_count = x_count, │ + bg_colour = GRID_BG_COLOUR, │ + line_colour = GRID_LINE_COLOUR, │ + tile_params = get_board_piece_params(), │ + }) │ + │ + alexgames.create_btn(BTN_ID_SUBMIT, "Submit", 1) │ + print("hello world") │ + alexgames.set_btn_enabled(BTN_ID_SUBMIT, false) │ + │ + --draw_state.tiles.grids[1].tiles[2][1] = "F" │ + --draw_state.tiles.grids[1].tiles[2][2] = "A" │ + --draw_state.tiles.grids[1].tiles[2][3] = "C" │ + --draw_state.tiles.grids[1].tiles[2][4] = "E" │ + --draw_state.tiles.grids[1].tiles[2][5] = "D" │ + return draw_state │ end │ │ -function core.new_state(player_count, game_height, game_width, cell_size, mine_portion) │ - local state = { │ - game = { │ - width = game_width, │ - height = game_height, │ - board = {}, │ - cells_unrevealed = nil, │ - mines_unrevealed = nil, │ - }, │ - players = {}, │ - cell_size = cell_size, │ - } │ │ - for y=1,game_height do │ - state.game.board[y] = {} │ - for x=1,game_width do │ - state.game.board[y][x] = {} │ - state.game.board[y][x].has_mine = (math.random() <= mine_portion) │ - state.game.board[y][x].revealed = false │ - state.game.board[y][x].flagged_by_player = nil │ - state.game.board[y][x].touching_mine_count = nil │ - end │ - end │ +function draw.draw(draw_state) │ + alexgames.draw_clear() │ │ - for i=1,player_count do │ - state.players[i] = core.new_player_state() │ + local params = get_large_piece_params() │ + │ + letter_tiles.draw(draw_state.tiles) │ + │ +--[[ │ + local words = words_lib.get_words_made_from_letters(LANGUAGE, letters, 3, -1) │ + │ + for _, word in ipairs(words) do │ + local freq = words_lib.get_word_freq(LANGUAGE, word) │ + print(string.format("%-8s, %e", word, freq)) │ end │ +--]] │ │ - core.calc_state_vals(state) │ │ - return state │ -end │ + alexgames.set_btn_enabled(BTN_ID_SUBMIT, #draw_state.tiles.placed_tiles > 0) │ + alexgames.draw_refresh() │ │ -function core.calc_state_vals(state) │ - core.get_touching_mine_count(state) │ - core.calc_cells_unrevealed(state) │ - core.calc_mines_unrevealed(state) │ end │ │ -function core.calc_cells_unrevealed(state) │ - local cells_unrevealed = 0 │ - for y=1,state.game.height do │ - for x=1,state.game.width do │ - local cell = state.game.board[y][x] │ - if not cell.revealed and not cell.flagged_by_player then │ - cells_unrevealed = cells_unrevealed + 1 │ - end │ - end │ - end │ - state.game.cells_unrevealed = cells_unrevealed │ +function draw.handle_mouse_evt(draw_state, evt_id, pos_y, pos_x, params) │ + letter_tiles.handle_mouse_evt(draw_state.tiles, evt_id, pos_y, pos_x, params) │ end │ │ -function core.calc_mines_unrevealed(state) │ - local mines_unrevealed = 0 │ - for y=1,state.game.height do │ - for x=1,state.game.width do │ - local cell = state.game.board[y][x] │ - if cell.has_mine and not cell.revealed and not cell.flagged_by_player then │ - mines_unrevealed = mines_unrevealed + 1 │ - end │ - end │ - end │ - state.game.mines_unrevealed = mines_unrevealed │ +function draw.handle_mousemove(draw_state, pos_y, pos_x, params) │ + letter_tiles.handle_mousemove(draw_state.tiles, pos_y, pos_x, params) │ end │ │ - │ -function core.is_game_over(state) │ - return state.game.cells_unrevealed == 0 │ +function draw.handle_touch_evt(draw_state, evt_id, changed_touches) │ + touch_to_mouse_evts.handle_touch_evt(draw_state.touch_to_mouse_evts, evt_id, changed_touches) │ end │ - │ │ -local function clip_min_max(val, min_val, max_val) │ - if val < min_val then return min_val │ - elseif val > max_val then return max_val │ - else return val end │ +function draw.handle_btn_clicked(draw_state, btn_id) │ + if btn_id == BTN_ID_SUBMIT then │ + return draw.ACTION_SUBMIT │ + end │ end │ │ -function core.get_zoom_fact(state, player) │ - return state.players[player].zoom_fact │ -end │ -function core.set_zoom_fact(state, player, zoom_fact) │ - state.players[player].zoom_fact = clip_min_max(zoom_fact, 1/MIN_MAX_ZOOM_FACT, MIN_MAX_ZOOM_FACT) │ +function draw.get_placed_tiles(draw_state) │ + return letter_tiles.get_placed_tiles(draw_state.tiles) │ end │ │ -function add_pts(arg1, arg2) │ - return { y = (arg1.y + arg2.y), x = (arg1.x + arg2.x) } │ + │ +function draw.update_state(draw_state, game_state) │ + letter_tiles.clear_placed_tiles(draw_state.tiles) │ + letter_tiles.set_grid(draw_state.tiles, 1, game_state.grid) │ + letter_tiles.set_row(draw_state.tiles, 1, game_state.players[1].letters) │ end │ │ --- TODO there must be a minesweeper version of this already, │ --- but I copied it from my "life" game │ -function count_neighbours(state, pos) │ - local count = 0 │ - for _, dir in ipairs(dirs) do │ - local pt2 = add_pts(pos, dir) │ - if not in_range(state, pt2.y, pt2.x) then │ - goto next_dir │ - end │ +return draw │ +local serialize = {} │ │ - if state.game.board[pt2.y][pt2.x].has_mine then │ - count = count + 1 │ - end │ +local serialize_lib = require("libs/serialize/serialize") │ │ - ::next_dir:: │ - end │ +local core = require("games/word_mastermind/word_mastermind_core") │ │ - return count │ -end │ +serialize.version = 1 │ │ -local function copy_board(board) │ - local new_board = {} │ - for _, row in ipairs(board) do │ - local new_row = {} │ - for _, cell in ipairs(row) do │ - table.insert(new_row, copy_cell(cell)) │ - end │ - table.insert(new_board, new_row) │ +function serialize.serialize_state(state) │ + if state == nil then return nil end │ + local output = "" │ + │ + output = output .. serialize_lib.serialize_byte(serialize.version) │ + │ + output = output .. serialize_lib.serialize_byte(state.max_guesses) │ + output = output .. serialize_lib.serialize_string(state.word) │ + output = output .. serialize_lib.serialize_16bit(#state.guesses) │ + for _, guess in ipairs(state.guesses) do │ + output = output .. serialize_lib.serialize_string(guess.word) │ end │ - return new_board │ + │ + return output │ end │ │ -function core.life_increment(state) │ - local new_board = copy_board(state.game.board) │ - for y=1,#state.game.board do │ - for x=1,#state.game.board[y] do │ - local prev_mine_state = state.game.board[y][x].has_mine │ - local neighbour_count = count_neighbours(state, {y=y, x=x}) │ +function serialize.deserialize_state(bytes) │ + if bytes == nil then return nil end │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ │ - local new_mine_state │ - if prev_mine_state and 2 <= neighbour_count and neighbour_count <= 3 then │ - new_mine_state = true │ - elseif not prev_mine_state and neighbour_count == 3 then │ - new_mine_state = true │ - else │ - new_mine_state = false │ - end │ + local version = serialize_lib.deserialize_byte(bytes) │ │ - new_board[y][x].has_mine = new_mine_state │ - -- when a mine goes away, leave an unrevealed cell in its wake │ - -- I'm not sure if this will be too hard yet, or if │ - -- it would be better to have separate states for "explicitly revealed by player" │ - -- and "was revealed from the start", and only un-reveal the latter │ - if prev_mine_state and not new_mine_state then │ - new_board[y][x].revealed = false │ - end │ - end │ + if version ~= serialize.version then │ + error(string.format("can't deserialize state: received version %d, this implementation version is %d", version, serialize.version)) │ end │ - state.game.board = new_board │ -end │ │ --- normally this "autoreveal" happens when the user first reveals │ --- an "empty" cell (meaning it has no neighbouring mines). │ --- But in "life" mines move around, and I've found it cumbersome │ --- to require the user to click the empty cells even though they │ --- are guaranteed to be safe (i.e. no flagging/mines nearby are needed) │ -function core.autoreveal_empty_cells(state, player) │ - for y=1,state.game.height do │ - for x=1,state.game.width do │ - if state.game.board[y][x].revealed then │ - if count_neighbours(state, {y=y, x=x}) == 0 then │ - core.reveal_neighbours(state, player, y, x) │ - end │ - end │ - end │ + local partial_state = {} │ + partial_state.max_guesses = serialize_lib.deserialize_byte(bytes) │ + partial_state.word = serialize_lib.deserialize_string(bytes) │ + partial_state.guesses = {} │ + local guess_count = serialize_lib.deserialize_16bit(bytes) │ + for i=1,guess_count do │ + table.insert(partial_state.guesses, serialize_lib.deserialize_string(bytes)) │ end │ -end │ │ --- Before adding "life", minesweeper wouldn't let you flag cells that │ --- don't contain a mine (since in multiplayer, that could become a mess. │ --- in single player though, it would be reasonable) │ --- │ --- But in "life", the mines move around, and flags no longer contain mines sometimes. │ --- So remove the flags │ -function core.remove_flags_if_no_longer_valid(state) │ - for y=1,state.game.height do │ - for x=1,state.game.width do │ - local cell = state.game.board[y][x] │ - if not cell.has_mine and cell.flagged_by_player ~= nil then │ - cell.flagged_by_player = nil │ - cell.revealed = true │ - end │ - end │ + local state = core.new_game(#partial_state.word, partial_state.max_guesses, partial_state.word) │ + for guess_idx, guess in ipairs(partial_state.guesses) do │ + core.force_guess(state, guess) │ end │ -end │ │ -local function is_valid_move(move, cell_prev_state, cell_current_state, y, x) │ - if move == core.MOVE_FLAG_CELL then │ - if not cell_current_state.revealed then │ - return true │ - end │ + return state │ +end │ │ - if not cell_prev_state.has_mine and cell_current_state.has_mine then │ - return true │ - end │ +function serialize.serialize_session_id(bytes) │ + return serialize_lib.serialize_s32(bytes) │ +end │ │ - return false │ - elseif move == core.MOVE_CLICK_CELL then │ - return not cell_current_state.revealed │ - else │ - error(string.format("Unhandled move type %s", move)) │ +function serialize.deserialize_session_id(bytestr) │ + if bytestr == nil then │ + return nil │ end │ + bytes = serialize_lib.bytestr_to_byteary(bytestr) │ + return serialize_lib.deserialize_s32(bytes) │ end │ │ -function core.handle_move(state, player, move, y, x) │ - │ - local cell_prev_state = state.game.board[y][x] │ - │ - -- kind of a hack, I should modify the life_increment function to │ - -- take in a board, rather than do this │ - local state2 = { │ - game = { │ - height = state.game.height, │ - width = state.game.width, │ - board = copy_board(state.game.board), │ - }, │ - } │ - core.life_increment(state2) │ - │ - print(string.format("On copy of state, incremented life state and found cell %d %d is revealed=%s, has_mine=%s prev_has_mine=%s (move=%s)", y, x, state2.game.board[y][x].revealed, state2.game.board[y][x].has_mine, cell_prev_state.has_mine, move)) │ +return serialize │ +local draw = {} │ │ - local rc │ - -- if flagging, only support flagging cells that previously were not mines, │ - -- and have become one since the life update-- or cells that were unrevealed. │ - -- if revealing, only support unrevealed cells │ - if is_valid_move(move, cell_prev_state, state2.game.board[y][x], y, x) then │ - -- TODO maybe only do this every 10 moves or so │ - core.life_increment(state) │ +local alexgames = require("alexgames") │ │ - -- I'm not sure if this takes too much of the fun out of it. │ - --core.autoreveal_empty_cells(state, player) │ - core.get_touching_mine_count(state) │ - core.remove_flags_if_no_longer_valid(state) │ +local core = require("games/word_mastermind/word_mastermind_core") │ │ - -- Update "mine count" and etc, and check if game is now won │ - core.calc_state_vals(state) │ - if state.game.cells_unrevealed == 0 then │ - end │ +local draw_keyboard = require("libs/draw/draw_keyboard") │ +local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ +local draw_shapes = require("libs/draw/draw_shapes") │ +local show_buttons_popup = require("libs/ui/show_buttons_popup") │ │ - if move == core.MOVE_FLAG_CELL then │ - rc = core.flag_cell(state, player, y, x) │ - elseif move == core.MOVE_CLICK_CELL then │ - rc = core.clicked_cell(state, player, y, x) │ - else │ - error(string.format("unhandled move type %s", move)) │ - end │ +draw.ACTION_NEW_GAME = 1 │ +draw.ACTION_CUSTOM_PUZZLE = 2 │ │ - if rc ~= core.RC_SUCCESS then │ - error(string.format("Received rc %s?", rc)) │ - end │ +local BTN_ID_CUSTOM_PUZZLE = "custom_puzzle" │ +local BTN_ID_NEW_GAME = "new_game" │ │ - end │ +local POPUP_ID_NEW_GAME_CONFIRM = "popup_new_game_confirm" │ +local POPUP_ID_CUSTOM_PUZZLE_CONFIRM = "popup_custom_puzzle_confirm" │ │ +local OUTLINE_WIDTH = 1 │ +local CHAR_TEXT_COLOUR = '#ffffff' │ +local CHAR_TEXT_COLOUR_UNKNOWN = '#000000' │ +local CHAR_BG_COLOUR_POS_KNOWN = '#008800' │ +local CHAR_BG_COLOUR_CHAR_KNOWN = '#aaaa00' │ +local CHAR_BG_COLOUR_UNUSED = '#444444' │ +local CHAR_BG_COLOUR_UNKNOWN = '#ffffff' │ │ - return rc │ +if alexgames.get_user_colour_pref() == "dark" or │ + alexgames.get_user_colour_pref() == "very_dark" then │ + CHAR_TEXT_COLOUR = '#888888' │ + CHAR_TEXT_COLOUR_UNKNOWN = '#888888' │ + CHAR_BG_COLOUR_POS_KNOWN = '#003300' │ + CHAR_BG_COLOUR_CHAR_KNOWN = '#333300' │ + CHAR_BG_COLOUR_UNUSED = '#000000' │ + CHAR_BG_COLOUR_UNKNOWN = '#222222' │ end │ │ -local function in_ary(ary, y, x) │ - if ary[y] == nil then │ - return false │ - else │ - return ary[y][x] ~= nil │ - end │ -end │ +local BG_COLOURS = { │ + [core.LETTER_PRESENT_IN_WORD] = CHAR_BG_COLOUR_CHAR_KNOWN, │ + [core.LETTER_PRESENT_IN_POS] = CHAR_BG_COLOUR_POS_KNOWN, │ + [core.LETTER_UNUSED] = CHAR_BG_COLOUR_UNUSED, │ + [core.LETTER_UNKNOWN] = CHAR_BG_COLOUR_UNKNOWN, │ +} │ │ +local FG_COLOURS = { │ + [core.LETTER_PRESENT_IN_WORD] = CHAR_TEXT_COLOUR, │ + [core.LETTER_PRESENT_IN_POS] = CHAR_TEXT_COLOUR, │ + [core.LETTER_UNUSED] = CHAR_TEXT_COLOUR, │ + [core.LETTER_UNKNOWN] = CHAR_TEXT_COLOUR_UNKNOWN, │ +} │ │ --- I think what I need here is the width of the view-- how │ --- many mines fit in the view window │ -local function get_max_y_offset(state) │ - return (state.game.height - CELL_COUNT_BORDER_PADDING) * core.cell_size │ -end │ +local TEXT_SIZE = 32 │ +local padding = 10 │ │ -local function get_max_x_offset(state) │ - return (state.game.width - CELL_COUNT_BORDER_PADDING) * core.cell_size │ -end │ +-- TODO this might be the first game that requires me to increase the height of the canvas │ +local board_width = 480 │ +local board_height = 480 │ │ -function core.adjust_offset(state, player, offset_y, offset_x) │ - state.players[player].offset_y = clip_min_max(offset_y, │ - -core.cell_size*CELL_COUNT_BORDER_PADDING, │ - get_max_y_offset(state)) │ - state.players[player].offset_x = clip_min_max(offset_x, │ - -core.cell_size*CELL_COUNT_BORDER_PADDING, │ - get_max_x_offset(state)) │ -end │ +local text_start_x = math.floor((board_width - (TEXT_SIZE + padding) * 5)/2) │ +local big_text_size_y = (TEXT_SIZE + padding) * 6 + 2*padding │ │ -function core.reveal_cell(state, player, y, x) │ - if player == nil then │ - error("player param is nil") │ - end │ - if not in_range(state, y, x) then │ - return core.RC_OUT_OF_RANGE │ - end │ +function draw.init() │ + local draw_state = { │ + user_input = {}, │ + anim = draw_celebration_anim.new_state({ │ + on_finish = function () │ + alexgames.set_timer_update_ms(0) │ + end, │ + }) │ + } │ │ - if state.game.board[y][x].revealed then │ - return core.RC_SUCCESS │ - end │ + alexgames.create_btn(BTN_ID_CUSTOM_PUZZLE, "New Custom Puzzle", 1) │ + alexgames.create_btn(BTN_ID_NEW_GAME, "New Game", 1) │ │ - local to_visit = { │ - { y = y, x = x } │ - } │ - local visited = {} │ + return draw_state │ +end │ │ - while #to_visit > 0 do │ - local pos = table.remove(to_visit) │ +local function draw_word(game_state, pos, word, score) │ │ - if not in_range(state, pos.y, pos.x) or │ - in_ary(visited, pos.y, pos.x) then │ - goto next_cell │ - end │ + local padding = 10 │ │ + x_pos = padding │ + y_pos = padding + (TEXT_SIZE + padding) * (pos-1) │ │ - if not state.game.board[pos.y][pos.x].revealed then │ - state.game.cells_unrevealed = state.game.cells_unrevealed - 1 │ + local chars = {} │ + if word == nil then │ + for _=1,game_state.word_len do │ + table.insert(chars, " ") │ end │ - state.game.board[pos.y][pos.x].revealed = true │ - local score_change = 0 │ - if state.game.board[pos.y][pos.x].has_mine then │ - score_change = REVEAL_MINE_SCORE │ - state.game.mines_unrevealed = state.game.mines_unrevealed - 1 │ - else │ - score_change = REVEAL_CELL_SCORE │ + else │ + for i=1,#word do │ + table.insert(chars, word:sub(i,i)) │ end │ + end │ │ - -- for the case where cells are revealed initially, on puzzle creation │ - if player ~= 0 then │ - state.players[player].score = state.players[player].score + score_change │ + for char_idx, char in ipairs(chars) do │ + x_pos = text_start_x + (TEXT_SIZE + padding) * (char_idx-1 + 0.5) │ + local bg_colour = CHAR_BG_COLOUR_UNUSED │ + local bg_outline_colour = CHAR_TEXT_COLOUR │ + local fg_colour = CHAR_TEXT_COLOUR │ + if score then │ + local char_score = score[char_idx] │ + if char_score ~= nil then │ + bg_colour = BG_COLOURS[char_score] │ + end │ + │ end │ - │ - if visited[pos.y] == nil then │ - visited[pos.y] = {} │ + if bg_colour == CHAR_BG_COLOUR_UNKNOWN then │ + fg_colour = CHAR_TEXT_COLOUR_UNKNOWN │ end │ - visited[pos.y][pos.x] = true │ + local rect_y1 = y_pos + padding/2 │ + local rect_x1 = x_pos - (TEXT_SIZE + padding/2)/2 │ + local rect_y2 = y_pos + TEXT_SIZE + padding/2 │ + local rect_x2 = x_pos + (TEXT_SIZE+padding/2)/2 │ + alexgames.draw_rect(bg_colour, │ + rect_y1, rect_x1, │ + rect_y2, rect_x2) │ + draw_shapes.draw_rect_outline(bg_outline_colour, OUTLINE_WIDTH, │ + rect_y1, rect_x1, │ + rect_y2, rect_x2) │ + alexgames.draw_text(string.upper(char), fg_colour, │ + y_pos + TEXT_SIZE, x_pos, │ + math.floor(0.7*TEXT_SIZE), │ + alexgames.TEXT_ALIGN_CENTRE) │ + end │ +end │ │ - if state.game.board[pos.y][pos.x].touching_mine_count > 0 or │ - state.game.board[pos.y][pos.x].has_mine then │ - goto next_cell │ +local function get_key_bg_colours(game_state) │ + local bg_colours = {} │ + for key, key_state in pairs(game_state.letter_states) do │ + if key_state ~= nil then │ + bg_colours[key] = BG_COLOURS[key_state] │ end │ + end │ + return bg_colours │ +end │ │ - for _, dir in ipairs(dirs) do │ - local y2 = pos.y + dir.y │ - local x2 = pos.x + dir.x │ - if in_range(state, y2, x2) and │ - not in_ary(visited, y2, x2) and │ - not state.game.board[y2][x2].has_mine then │ - table.insert(to_visit, {y=y2, x=x2}) │ - end │ +local function get_key_fg_colours(game_state) │ + local bg_colours = {} │ + for key, key_state in pairs(game_state.letter_states) do │ + if key_state ~= nil then │ + bg_colours[key] = FG_COLOURS[key_state] │ end │ - ::next_cell:: │ end │ - │ - return core.RC_SUCCESS │ + return bg_colours │ end │ │ -function core.flag_cell(state, player, y, x) │ - if not in_range(state, y, x) then │ - return core.RC_OUT_OF_RANGE │ - end │ │ - --if state.game.board[y][x].revealed then │ - -- return core.RC_INVALID_MOVE │ - --end │ +local function get_keyboard_params(game_state) │ + return { │ + y_start = big_text_size_y, │ + x_start = 0, │ + y_end = board_height, │ + x_end = board_width, │ + key_bg_colours = get_key_bg_colours(game_state), │ + key_bg_colour_default = CHAR_BG_COLOUR_UNKNOWN, │ + key_fg_colours = get_key_fg_colours(game_state), │ + key_fg_colour_default = CHAR_TEXT_COLOUR_UNKNOWN, │ + } │ +end │ │ - -- in single player, remove your own flag, if desired │ - if #state.players == 1 and state.game.board[y][x].flagged_by_player == player then │ - state.game.board[y][x].flagged_by_player = nil │ - state.players[player].score = state.players[player].score - FLAG_MINE_SUCCESS_SCORE │ - state.game.cells_unrevealed = state.game.cells_unrevealed + 1 │ - state.game.mines_unrevealed = state.game.mines_unrevealed + 1 │ - -- can only flag unflagged cells │ - elseif state.game.board[y][x].flagged_by_player == nil then │ - if state.players == 1 then │ - state.game.board[y][x].flagged_by_player = player │ - else │ - local score_change │ - if state.game.board[y][x].has_mine == true then │ - state.game.board[y][x].flagged_by_player = player │ - score_change = FLAG_MINE_SUCCESS_SCORE │ - state.game.mines_unrevealed = state.game.mines_unrevealed - 1 │ - else │ - state.game.board[y][x].revealed = true │ - score_change = FLAG_MINE_FAIL_SCORE │ - -- TODO need to communicate this state to the user, so animations can be shown │ +function draw.draw_state(ui_state, game_state, dt_ms) │ + alexgames.draw_clear() │ + if game_state == nil then return end │ + for i=1,game_state.max_guesses do │ + if i <= #game_state.guesses then │ + local guess = game_state.guesses[i] │ + draw_word(game_state, i, guess.word, guess.score) │ + elseif i == 1+#game_state.guesses and #ui_state.user_input > 0 then │ + local word = "" │ + local score = {} │ + for _, c in ipairs(ui_state.user_input) do │ + word = word .. c │ + table.insert(score, core.LETTER_UNKNOWN) │ end │ - state.game.cells_unrevealed = state.game.cells_unrevealed - 1 │ - state.players[player].score = state.players[player].score + score_change │ - end │ - │ - -- Now that Conway's game of life is introduced, │ - -- it is possible to flag cells that were previously revealed, but will │ - -- contain a mine on the next life update. │ - -- TODO: it would be better to simply make the UI code render revealed and flagged │ - -- cells as flagged instead of revealed, but I don't want to │ - -- make that change just yet in case it turns out to be more complicated │ - if state.game.board[y][x].has_mine then │ - state.game.board[y][x].revealed = false │ + while #word < game_state.word_len do │ + word = word .. " " │ + table.insert(score, core.LETTER_UNUSED) │ + end │ + draw_word(game_state, i, word, score) │ else │ - -- though if the user flagged a cell with no mine, │ - -- reveal it anyway │ - state.game.board[y][x].revealed = true │ + -- otherwise, draw empty squares │ + draw_word(game_state, i, nil) │ end │ end │ + draw_keyboard.draw_keyboard(get_keyboard_params(game_state)) │ │ - return core.RC_SUCCESS │ + │ + if dt_ms ~= 0 then │ + draw_celebration_anim.update(ui_state.anim, dt_ms/1000.0) │ + end │ + draw_celebration_anim.draw(ui_state.anim) │ + alexgames.draw_refresh() │ end │ │ -function core.reveal_neighbours(state, player, y, x) │ - if not in_range(state, y, x) then │ - return core.RC_OUT_OF_RANGE │ +local function handle_enter(ui_state) │ + local word = "" │ + for _, c in ipairs(ui_state.user_input) do │ + word = word .. c │ end │ - if not state.game.board[y][x].revealed then │ + return word │ +end │ + │ +local function handle_bksp(ui_state) │ + table.remove(ui_state.user_input) │ +end │ + │ +function draw.handle_user_clicked(ui_state, game_state, pos_y, pos_x) │ + if game_state.game_over then │ + return │ + end │ + local keyboard_params = get_keyboard_params(game_state) │ + local key_pressed = draw_keyboard.get_key_pressed(keyboard_params, pos_y, pos_x) │ + if key_pressed == nil then │ return │ end │ + print(string.format("User pressed soft key %s", key_pressed)) │ + if key_pressed == draw_keyboard.SPECIAL_KEY_ENTER then │ + print("user pressed enter!!!") │ + return handle_enter(ui_state) │ + elseif key_pressed == draw_keyboard.SPECIAL_KEY_BKSP then │ + handle_bksp(ui_state) │ + elseif #ui_state.user_input < game_state.word_len then │ + table.insert(ui_state.user_input, key_pressed) │ + end │ +end │ │ - local flags_or_revealed_mines_nearby = 0 │ +function draw.clear_user_input(ui_state) │ + ui_state.user_input = {} │ +end │ │ - for _, dir in ipairs(dirs) do │ - local y2 = y + dir.y │ - local x2 = x + dir.x │ │ - if in_range(state, y2, x2) then │ - local cell = state.game.board[y2][x2] │ - if cell.revealed and cell.has_mine or │ - cell.flagged_by_player ~= nil then │ - flags_or_revealed_mines_nearby = flags_or_revealed_mines_nearby + 1 │ +function draw.handle_key_evt(ui_state, game_state, evt_id, key_code) │ + local key_status = { │ + handled = false, │ + guess_word = nil, │ + } │ + if game_state.game_over then │ + return key_status │ + end │ + if evt_id == "keydown" then │ + if key_code == "Enter" then │ + key_status.handled = true │ + key_status.guess_word = handle_enter(ui_state) │ + elseif key_code == "Backspace" then │ + key_status.handled = true │ + handle_bksp(ui_state) │ + else │ + local user_input_letter = string.match(key_code, "Key(%a)") │ + if user_input_letter then │ + key_status.handled = true │ + if #ui_state.user_input < game_state.word_len then │ + user_input_letter = string.lower(user_input_letter) │ + table.insert(ui_state.user_input, user_input_letter) │ + end │ end │ end │ end │ + return key_status │ +end │ │ - if flags_or_revealed_mines_nearby >= state.game.board[y][x].touching_mine_count then │ - local activity = false │ - for _, dir in ipairs(dirs) do │ - local y2 = y + dir.y │ - local x2 = x + dir.x │ +function draw.player_won(ui_state) │ + draw_celebration_anim.fireworks_display(ui_state.anim) │ + alexgames.set_timer_update_ms(1000/60) │ +end │ │ - if in_range(state, y2, x2) then │ - local cell = state.game.board[y2][x2] │ - print(string.format("cell{y=%d,x=%d}: revealed %s, has_mine %s, flagged_by_player %s", y2, x2, cell.revealed, cell.has_mine, cell.flagged_by_player)) │ - if not cell.revealed and │ - not cell.has_mine and │ - cell.flagged_by_player == nil then │ - core.reveal_cell(state, player, y2, x2) │ - activity = true │ - end │ - end │ +function draw.handle_btn_pressed(game_state, ui_state, btn_id) │ + if btn_id == BTN_ID_NEW_GAME then │ + if game_state and game_state.game_over then │ + return draw.ACTION_NEW_GAME │ + else │ + -- TODO now I definitely need to implement the history browser for this game │ + show_buttons_popup.show_popup(POPUP_ID_NEW_GAME_CONFIRM, "Start New Game?", │ + "Are you sure you want to start a new game?\n" .. │ + "Current progress can be resumed " .. │ + "from the \"Load Autosaved Game\" in the options.", │ + {"New Game", "Cancel"}) │ end │ - if activity then │ - return core.RC_SUCCESS │ + elseif btn_id == BTN_ID_CUSTOM_PUZZLE then │ + if game_state and game_state.game_over then │ + return draw.ACTION_CUSTOM_PUZZLE │ else │ - -- TODO remove │ - print(string.format("Can not auto reveal due to no activity")) │ + show_buttons_popup.show_popup(POPUP_ID_CUSTOM_PUZZLE_CONFIRM, "Generate custom puzzle?", │ + "Are you sure you want to generate a custom puzzle?\n" .. │ + "Current progress can be resumed " .. │ + "from the \"Load Autosaved Game\" in the options.", │ + {"Generate custom puzzle", "Cancel"}) │ end │ end │ - │ - return core.RC_CAN_NOT_AUTO_REVEAL │ - │ end │ │ -function core.clicked_cell(state, player, y, x) │ - if not in_range(state, y, x) then │ - return core.RC_OUT_OF_RANGE │ +function draw.handle_popup_btn_pressed(game_state, ui_state, popup_id, btn_id) │ + if popup_id == POPUP_ID_NEW_GAME_CONFIRM then │ + alexgames.hide_popup() │ + if btn_id == 0 then │ + return draw.ACTION_NEW_GAME │ + elseif btn_id == 1 then │ + else │ + error(string.format("Unhandled btn_id %d for popup %s", btn_id, popup_id)) │ + end │ + elseif popup_id == POPUP_ID_CUSTOM_PUZZLE_CONFIRM then │ + alexgames.hide_popup() │ + if btn_id == 0 then │ + return draw.ACTION_CUSTOM_PUZZLE │ + elseif btn_id == 1 then │ + alexgames.hide_popup() │ + else │ + error(string.format("Unhandled btn_id %d for popup %s", btn_id, popup_id)) │ + end │ + else │ + print(string.format("Popup id %s not handled", popup_id)) │ end │ +end │ │ - if state.game.board[y][x].revealed then │ - return core.reveal_neighbours(state, player, y, x) │ - elseif state.game.board[y][x].flagged_by_player == nil then │ - return core.reveal_cell(state, player, y, x) │ - end │ │ +return draw │ +-- TODO currently there's a bug where if you generate a custom puzzle via entering a │ +-- string and press "enter" with the keyboard, you see a 'Invalid guess ""' error message, │ +-- I guess the popup is being closed, and then the enter key is being processed. │ +local alexgames = require("alexgames") │ +local words_lib = require("libs/words") │ │ -end │ +local core = require("games/word_mastermind/word_mastermind_core") │ +local draw = require("games/word_mastermind/word_mastermind_draw") │ +local serialize = require("games/word_mastermind/word_mastermind_serialize") │ │ +local WORD_LEN = 5 │ +local MAX_GUESSES = 6 │ │ -return core │ -local wu_ctrl = {} │ --- This file should contain the state for things like deciding │ --- if players have been chosen yet (whether the player choice UI should be shown), │ --- and what player you are │ +local SAVED_STATE_KEY = "word_mastermind_saved_state" │ +local SESSION_ID_KEY = "word_mastermind_session_id" │ │ -function wu_ctrl.new_state() │ - return { │ - player_choice = nil, │ - other_player_choice = nil, │ - } │ -end │ +local state = { │ + session_id = nil, │ +} │ +state.ui_state = draw.init() │ │ -function wu_ctrl.player_chosen(ctrl_state, player_idx) │ - print(string.format("Storing player choice of %q", player_idx)) │ - ctrl_state.player_choice = player_idx │ +function update(dt_ms) │ + draw.draw_state(state.ui_state, state.game_state, dt_ms) │ end │ │ -function wu_ctrl.other_player_chosen(ctrl_state, player_idx) │ - print(string.format("Storing other player choice of %q", player_idx)) │ - ctrl_state.other_player_choice = player_idx │ +local function internal_draw_board(dt_ms) │ + draw.draw_state(state.ui_state, state.game_state, dt_ms) │ end │ │ -function wu_ctrl.get_player(ctrl_state) │ - return ctrl_state.player_choice │ +local function save_state(game_state) │ + local serialized_state = serialize.serialize_state(game_state) │ + alexgames.store_data(SAVED_STATE_KEY, serialized_state) │ + alexgames.store_data(SESSION_ID_KEY, serialize.serialize_session_id(state.session_id)) │ + │ + alexgames.save_state(state.session_id, serialized_state) │ end │ │ -function wu_ctrl.get_other_player(ctrl_state) │ - return ctrl_state.other_player_choice │ +local function new_game(word) │ + alexgames.set_status_msg("Starting new game") │ + state.session_id = alexgames.get_new_session_id() │ + state.game_state = core.new_game(WORD_LEN, MAX_GUESSES, word) │ + save_state(state.game_state) │ + draw.draw_state(state.ui_state, state.game_state, 0) │ end │ │ -return wu_ctrl │ -local two_player = require("libs/multiplayer/two_player") │ -local utils = require("libs/utils") │ +local function prompt_custom_puzzle() │ + local msg = "Enter your own word to generate a puzzle.\n" .. │ + "Then you can either let a friend play on your device, " .. │ + "or send them a link by pressing \"share state\" in the " .. │ + "options menu." │ + alexgames.prompt_string("Custom puzzle", msg) │ +end │ │ -local wu = require("games/wu/wu_core") │ -local wu_ui = require("games/go/go_ui") │ -local wu_ctrl = require("games/wu/wu_ctrl") │ +function get_state() │ + local serialized_state = serialize.serialize_state(state.game_state) │ + local byteary = {} │ + for i=1,#serialized_state do │ + table.insert(byteary, string.byte(serialized_state:sub(i,i))) │ + end │ + return byteary │ +end │ │ -local alexgames = require("alexgames"); │ -local show_buttons_popup = require("libs/ui/show_buttons_popup") │ │ -local OPTION_ID_NEW_GAME = "opt_new_game" │ +function get_init_state() │ + local init_state = core.new_game(#state.game_state.word, state.game_state.max_guesses, state.game_state.word) │ + local serialized_state = serialize.serialize_state(init_state) │ + local byteary = {} │ + for i=1,#serialized_state do │ + table.insert(byteary, string.byte(serialized_state:sub(i,i))) │ + end │ + return byteary │ +end │ │ --- e.g. either 9x9, 13x13, or 19x19 │ -local session_id = alexgames.get_new_session_id() │ -local wu_game_size = 15 │ -local state │ -local ctrl_state = wu_ctrl.new_state() │ -local local_multiplayer │ + │ │ -local player_name_to_id = {} │ +function handle_user_string_input(str_input, is_cancelled) │ + print(string.format("handle_user_string_input: %s, is_cancelled=%s", str_input, is_cancelled)) │ + local rc = core.validate_word(state.game_state, str_input) │ + if rc ~= core.RC_SUCCESS then │ + alexgames.set_status_err(string.format("Invalid word \"%s\": %s", str_input, core.rc_to_str(rc))) │ + return │ + end │ + new_game(str_input) │ + internal_draw_board(0) │ +end │ │ --- TODO have a C API to get height/width of canvas, or maybe │ --- set it? │ -local height = 480 │ -local width = 480 │ -wu_ui.init_ui(session_id, wu_game_size, width, height) │ +function start_game(session_id, serialized_state) │ + core.init_lib() │ + if not core.dict_ready() then │ + alexgames.set_status_msg("Waiting for dictionary to load... not starting game yet") │ + return │ + end │ │ --- Do request state initially. │ --- But on game over, whoever presses "new game" first is the one that should send state │ --- so when you receive an event that says "new game", don't request state │ --- but if you haven't yet received that message, then you should send your state │ -local request_state = true │ + -- if state wasn't passed via param, then check if it's stored in │ + -- persistent storage │ + if serialized_state == nil then │ + -- TODO now that the get_last_session_id() API was introduced, I should use that instead │ + session_id = serialize.deserialize_session_id(alexgames.read_stored_data(SESSION_ID_KEY)) │ + serialized_state = alexgames.read_stored_data(SAVED_STATE_KEY) │ + end │ │ -local function get_player() │ - if local_multiplayer then │ - return state.player_turn │ + -- if we do have some saved state, then deserialize it. │ + -- otherwise, start a new game │ + if serialized_state ~= nil then │ + state.session_id = session_id │ + state.game_state = serialize.deserialize_state(serialized_state) │ else │ - return wu_ctrl.get_player(ctrl_state) │ + new_game() │ end │ + │ + alexgames.enable_evt("key") │ end │ │ -function new_game() │ - state = wu.new_game(wu_game_size) │ - alexgames.set_status_msg("Choose piece colour") │ - if request_state then │ - alexgames.send_message("all", "get_state:") │ +local function handle_guess(guess) │ + local rc = core.guess(state.game_state, guess) │ + if rc == core.RC_SUCCESS then │ + save_state(state.game_state) │ + draw.clear_user_input(state.ui_state) │ + local msg = string.format("User guessed \"%s\"", guess) │ + if state.game_state.game_over then │ + if core.user_won(state.game_state) then │ + msg = msg .. string.format(", you win! Correct answer in %d guesses.", #state.game_state.guesses) │ + draw.player_won(state.ui_state) │ + else │ + msg = msg .. string.format(", game over! Correct answer was \"%s\"", state.game_state.word) │ + end │ + end │ + alexgames.set_status_msg(msg) │ else │ - alexgames.send_message("all", "new_game:") │ - send_state() │ + alexgames.set_status_err(string.format("Invalid guess \"%s\", %s", guess, core.rc_to_str(rc))) │ end │ - request_state = true │ - update() │ end │ │ -PLAYER_CHOICE_POPUP_ID = "choose_player_colour" │ -PLAYER_CHOICE_BTNS = { │ - "Black", │ - "White", │ -} │ -PLAYER_CHOICE_BTNS_MAP = { │ - [0] = wu.PLAYER1, │ - [1] = wu.PLAYER2, │ -} │ -PLAYER_IDX_TO_BTN_IDX_MAP = utils.reverse_map(PLAYER_CHOICE_BTNS_MAP) │ - │ -GAME_OVER_POPUP_ID = "game_over" │ - │ -function update() │ - wu_ui.update(session_id, state.board, state.last_move_y, state.last_move_x) │ +-- I guess at some point I supported this? │ +-- The user_string_input callback could really use an identifier to see what the purpose │ +-- of the string is. │ +-- For now I'm only using string input for generating custom puzzles. │ +--[[ │ +function handle_user_string_input(user_line, is_cancelled) │ + if not is_cancelled then │ + local guess = user_line │ + handle_guess(guess) │ + draw.draw_state(state.ui_state, state.game_state, 0) │ + end │ end │ +--]] │ │ -function first_char_upper(str) │ - return str:sub(1,1):upper() .. str:sub(2,#str) │ + │ +function handle_user_clicked(pos_y, pos_x) │ + local word = draw.handle_user_clicked(state.ui_state, state.game_state, pos_y, pos_x) │ + if word then │ + handle_guess(word) │ + end │ + draw.draw_state(state.ui_state, state.game_state, 0) │ end │ │ -function check_for_winner() │ - if state.winner ~= nil then │ - local winner = wu.player_idx_to_colour_name(state.winner) │ - local msg = string.format("Game over! %s wins.", first_char_upper(winner)) │ - request_state = false │ - show_buttons_popup.show_popup(GAME_OVER_POPUP_ID, │ - "Game over", │ - msg, │ - {"New game"}) │ - alexgames.set_status_msg(msg) │ +function handle_key_evt(evt_id, key_code) │ + --print(string.format("handle_key_evt(%s, %s)", evt_id, key_code)) │ + local key_info = draw.handle_key_evt(state.ui_state, state.game_state, evt_id, key_code) │ + if key_info.guess_word ~= nil then │ + handle_guess(key_info.guess_word) │ end │ + draw.draw_state(state.ui_state, state.game_state, 0) │ + return key_info.handled │ end │ │ -function handle_user_clicked(pos_y, pos_x) │ - local pos = wu_ui.user_pos_to_piece_idx(pos_y, pos_x) │ - local player = get_player() │ - local rc = wu.player_move(state, player, pos.y, pos.x) │ - if rc == wu.SUCCESS then │ - if not local_multiplayer then │ - alexgames.send_message("all", string.format("move:%d,%d,%d", player, pos.y, pos.x)); │ - end │ - alexgames.set_status_err("") │ - alexgames.save_state(session_id, wu.serialize_state(state)) │ +local function handle_action(action) │ + if action == nil then │ + -- do nothing │ + elseif action == draw.ACTION_NEW_GAME then │ + new_game() │ + internal_draw_board(0) │ + elseif action == draw.ACTION_CUSTOM_PUZZLE then │ + prompt_custom_puzzle() │ + -- TODO │ else │ - alexgames.set_status_err(wu.err_code_to_str(rc)) │ + error(string.format("Unhandled action %s", action)) │ end │ - update() │ - update_status_msg_turn(state, ctrl_state) │ - check_for_winner() │ end │ │ -function send_state() │ - alexgames.send_message("all", "state:"..wu.serialize_state(state)) │ +function handle_btn_clicked(btn_id) │ + local action = draw.handle_btn_pressed(state.game_state, state.ui_state, btn_id) │ + handle_action(action) │ end │ │ -function handle_msg_received(src, msg) │ - print("handle_msg_received (from src:" .. src .. "): " .. msg); │ +function handle_popup_btn_clicked(popup_id, btn_id) │ + local action = draw.handle_popup_btn_pressed(state.game_state, state.ui_state, popup_id, btn_id) │ + handle_action(action) │ +end │ +local core = {} │ │ - if local_multiplayer then │ - return │ - end │ +local words_lib = require("libs/words") │ │ - if two_player.handle_msg_received(src, msg) then │ - return │ - end │ +local LANGUAGE = "en" -- TODO get from state │ │ - local m = msg:gmatch("(%S+):(.*)") │ - local header, payload │ - header, payload = m() │ +core.LETTER_UNUSED = 1 │ +core.LETTER_PRESENT_IN_WORD = 2 │ +core.LETTER_PRESENT_IN_POS = 3 │ +core.LETTER_UNKNOWN = 4 │ │ - if header == "move" then │ - local m = payload:gmatch"(%d+),(%d+),(%d+)" │ - local player, row, col │ - player, row, col = m() │ - player = tonumber(player) │ - row = tonumber(row) │ - col = tonumber(col) │ - print(string.format("Received player=%s, row=%s, col=%d", player, row, col)) │ +core.RC_SUCCESS = 0 │ +core.RC_WRONG_GUESS_LEN = -1 │ +core.RC_NOT_VALID_WORD = -2 │ │ - if player == wu_ctrl.get_player(ctrl_state) then │ - -- TODO make UI visible message for this case? │ - print(string.format("Received message for move from wrong player")) │ - return │ - end │ - wu.player_move(state, player, row, col) │ - alexgames.set_status_err("") │ - update() │ - update_status_msg_turn(state, ctrl_state) │ - check_for_winner() │ - elseif header == "get_state" then │ - send_state() │ - elseif header == "state" then │ - local new_state = wu.deserialize_state(payload) │ - -- TODO check with user if they want to overwrite their state with │ - -- this (possibly unsolicited!!) state from the other player │ - state = new_state │ - update() │ - alexgames.set_status_err("") │ - update_status_msg_turn(state, ctrl_state) │ - elseif header == "new_game" then │ - request_state = true │ - else │ - print("Unexpected message header: \""..header.."\"") │ - end │ +VALID_GUESS_FREQ = 1e-8 │ +VALID_SECRET_WORD_FREQ = 1e-6 │ + │ +local ERR_MSGS = { │ + [core.RC_WRONG_GUESS_LEN] = "Guess not correct length", │ + [core.RC_NOT_VALID_WORD] = "Guess is not in dictionary", │ +} │ + │ +function core.dict_ready() │ + return words_lib.is_ready() │ end │ │ -function handle_btn_clicked(btn_id) │ - print("handle_btn_clicked: "..btn_id) │ - if btn_id == wu_ui.BTN_ID_UNDO then │ - load_state_move_offset(-1) │ - elseif btn_id == wu_ui.BTN_ID_REDO then │ - load_state_move_offset(1) │ - else │ - error(string.format("Unhandled button: \"%s\"", btn_id)) │ - end │ +function core.rc_to_str(rc) │ + return ERR_MSGS[rc] │ end │ │ -local function get_player_name(player_arg) │ - for name, player_idx in pairs(player_name_to_id) do │ - if player_arg == player_idx then return name end │ - end │ - return "nil" │ +local function get_random_word(len) │ + return words_lib.get_random_word(LANGUAGE, VALID_SECRET_WORD_FREQ, len) │ end │ │ -function update_status_msg_turn(state, ctrl_state) │ - if state == nil then return end │ +local function get_possib_word_count(len) │ + return words_lib.get_possib_word_count(LANGUAGE, VALID_SECRET_WORD_FREQ, len) │ +end │ │ - local display_name = wu.player_idx_to_colour_name(state.player_turn) │ - if not local_multiplayer then │ - display_name = string.format("%s (%s)", display_name, get_player_name(state.player_turn)) │ - end │ - alexgames.set_status_msg(string.format("Waiting for %s to move", display_name)) │ + │ +local function is_valid_word(word) │ + return words_lib.is_valid_word(LANGUAGE, word) │ end │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ - -- handled, no action here │ - elseif popup_id == GAME_OVER_POPUP_ID then │ - if btn_idx == 0 then │ - new_game() │ - alexgames.hide_popup() │ - end │ +function core.init_lib() │ + words_lib.init(LANGUAGE) │ +end │ + │ +function core.new_game(word_len, max_guesses, word) │ + local state = { │ + word_len = word_len, │ + max_guesses = max_guesses, │ + possible_words = nil, │ + word = nil, │ + guesses = {}, │ + letter_states = {}, │ + game_over = false, │ + } │ + if word == nil then │ + --print(string.format("Got random word: %q", state.word)) │ + state.word = get_random_word(word_len) │ else │ - print(string.format("Unexpected popup_id \"%s\"", popup_id)); │ - alexgames.hide_popup() │ + word = string.lower(word) │ + state.word = word │ end │ + state.possible_words = get_possib_word_count(word_len) │ + │ + print(string.format("There are %d possible words of length %d in this dictionary", │ + state.possible_words, word_len)) │ + │ + return state │ end │ │ -function two_player_init() │ - local args = { │ - supports_local_multiplayer = true, │ - handle_multiplayer_type_choice = function (multiplayer_type) │ - if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ - local_multiplayer = true │ - elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ - local_multiplayer = false │ - end │ - end, │ - title = "Choose piece colour", │ - player_choices = PLAYER_CHOICE_BTNS, │ - choice_id_to_player_id = function (btn_id) │ - return PLAYER_CHOICE_BTNS_MAP[btn_id] │ - end, │ - player_name_to_id = player_name_to_id, │ - player_id_to_nice_name = function (player_id) │ - local player_colour = wu.player_idx_to_colour_name(player_id) │ - return utils.make_first_char_uppercase(player_colour) │ - end, │ - get_msg = function () │ - local msg = "Black moves first." │ - --local other_player = wu_ctrl.get_other_player(ctrl_state) │ - if utils.table_len(player_name_to_id) == 0 then │ - msg = msg .. "\nThe other player has not yet chosen." │ - else │ - --msg = msg .. string.format("The other player has chosen %s", │ - -- wu.player_idx_to_colour_name(other_player)) │ - for player_name, player_id in pairs(player_name_to_id) do │ - local player_colour = wu.player_idx_to_colour_name(player_id) │ - msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ - end │ +local function get_word_letter_scores(answer, guess) │ + local word_len = #answer │ + if #guess ~= word_len then │ + error("answer and guess must have some number of letters", 2) │ + end │ + local letter_scores = {} │ + for _=1,word_len do │ + table.insert(letter_scores, core.LETTER_UNUSED) │ + end │ + │ + local answer_letter_counts = {} │ + for i=1,word_len do │ + if answer:sub(i,i) == guess:sub(i,i) then │ + letter_scores[i] = core.LETTER_PRESENT_IN_POS │ + else │ + if answer_letter_counts[answer:sub(i,i)] == nil then │ + answer_letter_counts[answer:sub(i,i)] = 0 │ end │ - return msg │ - end, │ - handle_player_choice = function (player_name, player_id) │ - local choice_str = wu.player_idx_to_colour_name(player_id) │ - print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ - if player_name == two_player.LOCAL_PLAYER then │ - wu_ctrl.player_chosen(ctrl_state, player_id) │ - update_status_msg_turn(state, ctrl_state) │ - else │ - wu_ctrl.other_player_chosen(ctrl_state, player_id) │ + answer_letter_counts[answer:sub(i,i)] = answer_letter_counts[answer:sub(i,i)] + 1 │ + end │ + end │ │ + for i=1,word_len do │ + if answer:sub(i,i) ~= guess:sub(i,i) then │ + local count = answer_letter_counts[guess:sub(i,i)] │ + if count ~= nil and count > 0 then │ + letter_scores[i] = core.LETTER_PRESENT_IN_WORD │ + answer_letter_counts[guess:sub(i,i)] = answer_letter_counts[guess:sub(i,i)] - 1 │ end │ - print(string.format("we are %q, other player is %q", │ - wu_ctrl.get_player(ctrl_state), wu_ctrl.get_other_player(ctrl_state))) │ - end, │ + end │ + end │ │ - need_reselect = function () │ - local this_player = wu_ctrl.get_player(ctrl_state) │ - local other_player = wu_ctrl.get_other_player(ctrl_state) │ + return letter_scores │ +end │ │ - -- print(string.format("needs_reselect { this_player = %q, other_player = %q }", this_player, this_player == other_player)) │ - return this_player == nil or this_player == other_player │ - end, │ │ - get_local_player_choice = function () │ - return wu_ctrl.get_player(ctrl_state) │ +local function update_letter_states(state, guess, letter_scores) │ + local word_len = #guess │ + for i=1,word_len do │ + local c = guess:sub(i,i) │ + local c_score = letter_scores[i] │ + if state.letter_states[c] == core.LETTER_PRESENT_IN_POS then │ + goto next_letter │ end │ - } │ - two_player.init(args) │ + │ + if c_score == core.LETTER_PRESENT_IN_POS then │ + state.letter_states[c] = core.LETTER_PRESENT_IN_POS │ + elseif c_score == core.LETTER_PRESENT_IN_WORD then │ + state.letter_states[c] = core.LETTER_PRESENT_IN_WORD │ + end │ + │ + if state.letter_states[c] ~= core.LETTER_PRESENT_IN_WORD then │ + if c_score == core.LETTER_UNUSED then │ + state.letter_states[c] = core.LETTER_UNUSED │ + end │ + end │ + ::next_letter:: │ + end │ end │ │ -function handle_game_option_evt(option_id) │ - if option_id == OPTION_ID_NEW_GAME then │ - new_game() │ - else │ - error(string.format("Unhandled option_id %s", option_id)) │ +function core.validate_word(state, word_input) │ + local word_len = #state.word │ + if #word_input ~= word_len then │ + print(string.format("Guess length is %d, need length %d", #word_input, word_len)) │ + return core.RC_WRONG_GUESS_LEN │ + end │ + │ + if not is_valid_word(word_input) then │ + return core.RC_NOT_VALID_WORD │ end │ + │ + return core.RC_SUCCESS │ end │ │ +-- like the normal "guess" call that a player would call, but │ +-- without any dictionary checks. This is for loading games from save state. │ +function core.force_guess(state, guess) │ + local letter_scores = get_word_letter_scores(state.word, guess) │ │ -function get_state() │ - return wu.serialize_state(state) │ + update_letter_states(state, guess, letter_scores) │ + │ + table.insert(state.guesses, { │ + word = guess, │ + score = letter_scores, │ + }) │ + │ + if state.word == guess or │ + #state.guesses >= state.max_guesses then │ + state.game_over = true │ + end │ end │ │ -function load_state_helper(session_id_arg, serialized_state) │ - session_id = session_id_arg │ - state = wu.deserialize_state(serialized_state) │ +-- This is what players should call when making a guess (with a full word). │ +function core.guess(state, guess) │ + │ + local rc = core.validate_word(state, guess) │ + if rc ~= core.RC_SUCCESS then │ + return rc │ + end │ + │ + -- TODO add the option to only allow words that fit │ + -- the existing knowledge? │ + │ + core.force_guess(state, guess) │ + │ + return core.RC_SUCCESS │ end │ │ +function core.user_won(state, guess) │ + return #state.guesses > 0 and state.guesses[#state.guesses].word == state.word │ +end │ │ -function load_state_move_offset(move_offset) │ - local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_offset) │ - load_state_helper(session_id, serialized_state) │ - update() │ - send_state() │ +local function print_state_pretty(state) │ + for guess_idx=1,state.max_guesses do │ + if guess_idx <= #state.guesses then │ + local guess = state.guesses[guess_idx] │ + for i=1,state.word_len do │ + if guess.score[i] == core.LETTER_PRESENT_IN_WORD then │ + io.write("\27[43;30m") │ + elseif guess.score[i] == core.LETTER_PRESENT_IN_POS then │ + io.write("\27[42;30m") │ + end │ + local c = guess.word:sub(i,i) │ + io.write(" " .. c .. " ") │ + io.write("\27[0m") │ + io.write(" ") │ + end │ + io.write("\n") │ + else │ + for i=1,state.word_len do │ + io.write("___ ") │ + end │ + io.write("\n") │ + end │ + end │ + │ + print("") │ + │ + local keyboard = { │ + "qwertyuiop", │ + "asdfghjkl", │ + "zxcvbnm", │ + } │ + │ + for row_idx, keyboard_row in ipairs(keyboard) do │ + for i=0,row_idx-2 do │ + io.write(" ") │ + end │ + for i=1,#keyboard_row do │ + local c = keyboard_row:sub(i,i) │ + local key_state = state.letter_states[c] │ + if key_state == core.LETTER_PRESENT_IN_WORD then │ + io.write("\27[43;30m") │ + elseif key_state == core.LETTER_PRESENT_IN_POS then │ + io.write("\27[42;30m") │ + elseif key_state == core.LETTER_UNUSED then │ + c = ' ' │ + end │ + io.write(c) │ + io.write("\27[0m") │ + io.write(" ") │ + end │ + io.write("\n") │ + end │ end │ │ +local function example_main_loop() │ + local word_len = 5 │ + local max_guesses = 6 │ + │ + local state = core.new_game(word_len, max_guesses) │ │ -function lua_main() │ while true do │ - print_board() │ - ::read_input:: │ - local user_input = get_user_input() │ - local rc = handle_user_string_input(user_input) │ - if rc ~= wu.SUCCESS then │ - print('Error: '.. wu.err_code_to_str(rc)) │ - goto read_input │ + ::new_guess:: │ + io.write("Enter a guess: ") │ + local guess = io.read("*l") │ + guess = guess:gsub("%s+", "") │ + io.write("\n\n") │ + │ + local rc = core.guess(state, guess) │ + if rc ~= core.RC_SUCCESS then │ + --print(string.format("Error %d", rc)) │ + print(core.rc_to_str(rc)) │ + goto new_guess │ end │ - end │ -end │ - │ │ -function start_game(session_id_arg, serialized_state) │ - local last_sess_id = alexgames.get_last_session_id() │ + print_state_pretty(state) │ │ - if serialized_state ~= nil then │ - print("Loading state from URL param") │ - load_state_helper(session_id_arg, serialized_state) │ - elseif last_sess_id ~= nil then │ - print("Loading autosaved state") │ - serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ - load_state_helper(last_sess_id, serialized_state) │ - else │ - print("Starting new game, no URL param or autosaved state found") │ - new_game() │ + if state.game_over then │ + if state.guesses[#state.guesses].word ~= state.word then │ + print(string.format("Game over! The word was \"%s\"", state.word)) │ + else │ + print(string.format("You guessed the word in %d guesses.", #state.guesses)) │ + end │ + break │ + end │ end │ - two_player_init() │ - alexgames.send_message("all", "get_state:") │ │ - alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ + │ end │ + │ +-- example_main_loop() │ + │ +--local scores = get_word_letter_scores("crane", "creep") │ +--for i, score in ipairs(scores) do │ +-- print(string.format("%d: %s", i, score)) │ +--end │ + │ +return core │ local wu = {} │ │ wu.EMPTY = 0 │ -- Player1 is black (since black goes first) │ wu.PLAYER1 = 1 │ -- Player2 is white (since white goes second) │ wu.PLAYER2 = 2 │ @@ -22252,2778 +27648,372 @@ │ game_state.last_move_y = pt.y │ game_state.last_move_x = pt.x │ return wu.SUCCESS │ end │ │ │ return wu │ +local two_player = require("libs/multiplayer/two_player") │ +local utils = require("libs/utils") │ │ -local alexgames = require("alexgames") │ - │ -local core = require("games/solitaire/solitaire_core") │ -local draw = require("games/solitaire/solitaire_draw") │ -local serialize = require("games/solitaire/solitaire_serialize") │ -local utils = require("libs/utils") │ -local storage_helpers = require("libs/serialize/storage_helpers") │ - │ --- Here is a winnable game state, for testing: │ --- from the beginning │ --- http://localhost:1234/?game=solitaire&state=AQEYKy0fJRwWDxUiAzEOIB0wCAkRBBkjGBoTAAAAARABDQEkAgsuAQIDKSEBASwELwAeFwEGBQUqKDMbAQwGByYSFCcyAQoAAAAAgPyBuwD%2f%2fv%2f+AAAAAGVH8nMAAAAAAANT1A%3d%3d │ --- almost won: │ --- http://localhost:1234/?game=solitaire&id=tczscg&state=AQEAAAAAAhkyAAIMJQACMwsAAAABJgAAAAALGhscHR4fICEiIyQMDQ4PEBESExQVFhcYCycoKSorLC0uLzAxCwABAgMEBQYHCAkKgK2B1AD%2f%2foAEAAAAAGVH8nMAAAAAAANT1A%3d%3d │ --- 01 01 00 00 00 00 01 19 00 00 00 00 00 00 00 00 00 00 00 00 0d 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 0d 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 0d 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 80 c9 80 4f 00 ff fe 80 01 00 00 00 00 65 47 f2 73 00 00 00 00 00 03 53 d4 │ - │ --- autocomplete testing │ --- http://localhost:1234/?game=solitaire&id=tczscg&state=AQECKy0BHwEDAAsZMhcwCC4GLAQqAgAGDCUKIxUhAAczCyQJIhQgAAEpAAUmGDEWLwACBR4AAQcEGhscHQcNDg8QERITAicoAgABgPSB1QD%2f%2foADAAAAAGVH8nMAAAAAAANT1A%3d%3d │ - │ - │ --- TODO: │ --- * (WIP) auto complete button for when all hidden cards are revealed │ --- * (DONE) tap on a card and have it move to goal stacks if possible │ --- * (not started) (and maybe an option to move it to play columns... some games have this, │ --- it's nifty but I find I hit it accidentally and feel like I "cheated") │ --- * (DONE) undo button │ --- * (DONE, but not working on Sabrina's iPhone??) maybe fix the "pick up cards" offset, so that when │ --- you press a card its centre isn't │ --- drawn where your finger is │ --- * timer, move count, score/points │ --- * fix bug where auto complete doesn't keep going if deck is closed (all cards are face down) │ --- * (DONE) disable user input while animation is playing (including pressing animation button a second time!) │ --- * make animations only "try" to move, not forcefully move the cards │ --- * use card_offset for dropping cards. Right now, if you drag from the bottom right, if that little piece isn't │ --- over the destination (even though the centre of the card is), it won't get dropped │ --- │ --- Eventually: │ --- * show if game is winnable or not (should be an option) after every move? │ --- * have option to only generate winnable games (maybe hardcode a couple hundred at first) │ --- * the ability to export state to a base 64 string, so you can copy it from your │ --- phone to computer and vice versa? (Is there any way to leverage the server for this?) │ --- * high scores / records (fewest moves, fastest time, most points?) │ --- │ --- TODO for draw three: │ --- * need to preserve popup state, save in persistent state: user should not have to switch from default (draw one) to draw three every time │ --- * allow undo many times, use history browse API? │ --- * don't save state again on new button presses, only on changes. And not when a card is revealed │ --- * constantly seeing "invalid session id", need to fix │ --- * need to disable set_timer_update_ms outside of animations? The game is using a ton of CPU usage when idle... │ - │ - │ - │ - │ -local session_id = nil │ -local state = nil │ -local g_shown_victory_animation = false │ -local g_anim_timer_handle = nil │ - │ -local FPS = 60 │ - │ --- TODO remove these in favour of the autosaved / history browser state │ -local DATA_ID_STATE = "game_state" │ -local DATA_ID_PREV_STATE = "prev_game_state" │ - │ -local DATA_ID_SHOW_TIME_AND_MOVE_COUNT = "show_time_and_move_count" │ - │ -local GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT = "opt_show_time_and_move_count" │ - │ -draw.show_move_count_and_elapsed_time = storage_helpers.read_bool(DATA_ID_SHOW_TIME_AND_MOVE_COUNT, true) │ - │ -local POPUP_ID_NEW_GAME = "new_game" │ -local POPUP_ITEM_ID_BTN_START_GAME = 1 │ -local POPUP_ITEM_ID_BTN_CANCEL = 2 │ -local POPUP_ITEM_ID_DRAW_TYPE = 3 │ - │ --- This is to test what it looks like if the cards are stacked in the highest combination │ --- right now it's cut off a bit, but might just barely work │ --- if the number of the card is drawn on the corner of the card │ ---[[ │ -state.play_columns_staging[7][1] = { suit = "spades", val = 13 } │ -state.deck_unrevealed = { │ - { suit = "diamonds", val = 12 }, │ - { suit = "spades", val = 11 }, │ - { suit = "diamonds", val = 10 }, │ - { suit = "spades", val = 9 }, │ - { suit = "diamonds", val = 8 }, │ - { suit = "spades", val = 7 }, │ - { suit = "diamonds", val = 6 }, │ - { suit = "spades", val = 5 }, │ - { suit = "diamonds", val = 4 }, │ - { suit = "spades", val = 3 }, │ - { suit = "diamonds", val = 2 }, │ - { suit = "spades", val = 1 }, │ -} │ -]] │ - │ -local player = 1 │ -local player_count = 1 │ -local touches = {} │ -local active_touch = nil │ - │ -local function draw_board_internal() │ - │ - if core.game_won(state) and not g_shown_victory_animation then │ - print("Player won, showing victory animation") │ - draw.victory_animation(FPS) │ - g_shown_victory_animation = true │ - end │ - draw.draw_state(session_id, state) │ -end │ - │ --- TODO should never call the update_animations from anywhere but here, │ --- and should call draw_board_internal in this file only, never `update` directly │ -function update(dt_ms) │ - if dt_ms == nil then │ - dt_ms = 0 │ - end │ - --print(string.format("update(dt_ms=%s)", dt_ms)) │ - core.update_time_elapsed(state, dt_ms) │ - draw.update_animations(state, dt_ms) │ - draw_board_internal() │ -end │ - │ -function handle_user_clicked(pos_y, pos_x) │ -end │ - │ -function handle_mousemove(pos_y, pos_x) │ - if state == nil then return end │ - draw.set_is_touch_controlled(false) │ - core.handle_mousemove(state, player, pos_y, pos_x) │ - draw_board_internal() │ -end │ - │ -local function save_state() │ - local prev_state_serialized = alexgames.read_stored_data(DATA_ID_STATE) │ - if prev_state_serialized ~= nil then │ - alexgames.store_data(DATA_ID_PREV_STATE, prev_state_serialized) │ - end │ - local state_serialized = serialize.serialize_state(state) │ - alexgames.store_data(DATA_ID_STATE, state_serialized) │ - -- TODO this is now kind of redundant, consider how to remove the old way of saving state │ - alexgames.save_state(session_id, state_serialized) │ -end │ - │ -local function load_prev_state() │ ---[[ │ - local prev_state_serialized = alexgames.read_stored_data(DATA_ID_PREV_STATE) │ ---]] │ - print(string.format("loading prev state for session %s", session_id)) │ - -- If the player presses undo, we want all the previous state │ - -- except we want the time elapsed to stay the same. │ - local time_elapsed = state.time_elapsed │ - local prev_state_serialized = alexgames.adjust_saved_state_offset(session_id, -1) │ - if prev_state_serialized ~= nil then │ - draw.stop_move_animations() │ - state = serialize.deserialize_state(prev_state_serialized) │ - state.time_elapsed = time_elapsed │ - update() │ - alexgames.set_status_msg("Loaded previous state") │ - else │ - alexgames.set_status_err("Can not load previous state, not found") │ - end │ -end │ - │ -local function add_offset(info) │ - if info ~= nil then │ - local card_pos = draw.get_pos(state, info.section_type, info.col, info.idx) │ - if card_pos ~= nil then │ - info.card_src_y = card_pos.y │ - info.card_src_x = card_pos.x │ - end │ - end │ -end │ - │ -local function mouse_evt_id_to_touch_evt(evt_id) │ - if evt_id == 2 then │ - return 'touchstart' │ - elseif evt_id == 1 then │ - return 'touchend' │ - elseif evt_id == 3 then │ - return 'touchcancel' │ - else │ - error("unexpected evt_id ", evt_id) │ - end │ -end │ - │ -local function new_game() │ - alexgames.show_popup(POPUP_ID_NEW_GAME, { │ - title = "New Game", │ - items = { │ - { │ - id = POPUP_ITEM_ID_DRAW_TYPE, │ - item_type = alexgames.POPUP_ITEM_TYPE_DROPDOWN, │ - label = "Draw", │ - options = { "One", "Three" }, │ - }, │ - { │ - id = POPUP_ITEM_ID_BTN_START_GAME, │ - item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ - text = "Start game", │ - }, │ - { │ - id = POPUP_ITEM_ID_BTN_CANCEL, │ - item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ - text = "Cancel", │ - }, │ - }, │ - }) │ -end │ - │ - │ -local function handle_nil_state_click() │ - new_game() │ -end │ - │ -function handle_mouse_evt(evt_id, pos_y, pos_x) │ - if state == nil then │ - if evt_id == alexgames.MOUSE_EVT_DOWN or evt_id == alexgames.MOUSE_EVT_UP then │ - handle_nil_state_click() │ - end │ - return │ - end │ - local info = draw.pos_to_action(state, player, pos_y, pos_x, mouse_evt_id_to_touch_evt(evt_id)) │ - add_offset(info) │ - if evt_id == 2 then │ - local rc = core.handle_mouse_down(player, state, info) │ - if rc then │ - save_state() │ - end │ - elseif evt_id == 1 then │ - local rc = core.handle_mouse_up(player, state, info) │ - if rc then │ - save_state() │ - end │ - elseif evt_id == 3 then │ - -- TODO ideally this should cancel rather than release normally │ - core.handle_mouse_up(player, state, info) │ - end │ - │ - draw_board_internal() │ -end │ - │ -function handle_touch_evt(evt_id, changed_touches) │ - if state == nil then return handle_nil_state_click() end │ - draw.set_is_touch_controlled(true) │ - local rc = false │ - for _, touch in ipairs(changed_touches) do │ - local y = math.floor(touch.y) │ - local x = math.floor(touch.x) │ - if active_touch == touch.id then │ - if evt_id == 'touchmove' then │ - core.handle_mousemove(state, player, y, x) │ - elseif evt_id == 'touchend' then │ - local info = draw.pos_to_action(state, player, y, x, evt_id) │ - rc = core.handle_mouse_up(player, state, info) │ - active_touch = nil │ - elseif evt_id == 'touchcancel' then │ - rc = core.handle_mouse_up(player, state, nil) │ - active_touch = nil │ - end │ - end │ - │ - if evt_id == 'touchstart' then │ - if active_touch == nil then │ - active_touch = touch.id │ - local info = draw.pos_to_action(state, player, y, x, evt_id) │ - add_offset(info) │ - core.handle_mouse_down(player, state, info) │ - end │ - end │ - end │ - draw_board_internal() │ - if rc then │ - save_state() │ - end │ -end │ +local wu = require("games/wu/wu_core") │ +local wu_ui = require("games/go/go_ui") │ +local wu_ctrl = require("games/wu/wu_ctrl") │ │ -local function on_anim_finished() │ - save_state() │ - if g_anim_timer_handle == nil then │ - print("on_anim_finished: g_anim_timer_handle is nil") │ - else │ - alexgames.delete_timer(g_anim_timer_handle) │ - g_anim_timer_handle = nil │ - end │ -end │ +local alexgames = require("alexgames"); │ +local show_buttons_popup = require("libs/ui/show_buttons_popup") │ │ -local function handle_move_list_animation(move_list) │ +local OPTION_ID_NEW_GAME = "opt_new_game" │ │ - if g_anim_timer_handle ~= nil then │ - alexgames.set_status_err("warning: g_anim_timer_handle was not nil on auto complete btn pressed") │ - alexgames.delete_timer(g_anim_timer_handle) │ - g_anim_timer_handle = nil │ - end │ - g_anim_timer_handle = alexgames.set_timer_update_ms(1000/FPS) │ +-- e.g. either 9x9, 13x13, or 19x19 │ +local session_id = alexgames.get_new_session_id() │ +local wu_game_size = 15 │ +local state │ +local ctrl_state = wu_ctrl.new_state() │ +local local_multiplayer │ │ - draw.animate_moves(state, move_list, on_anim_finished) │ -end │ +local player_name_to_id = {} │ │ -local function start_new_game(draw_type) │ - g_shown_victory_animation = false │ - session_id = alexgames.get_new_session_id() │ - local params = {} │ - state = core.new_game(player_count, draw_type, params) │ - print(string.format("Starting new game (session=%d) (seed %016x %016x) with state: %s", │ - session_id, state.seed_x, state.seed_y, │ - utils.binstr_to_hr_str(serialize.serialize_board_state(state)))) │ - alexgames.set_status_msg(string.format("Generated new grame with seed %x %x", state.seed_x, state.seed_y)) │ - draw.stop_move_animations() │ - save_state() │ - draw_board_internal() │ -end │ +-- TODO have a C API to get height/width of canvas, or maybe │ +-- set it? │ +local height = 480 │ +local width = 480 │ +wu_ui.init_ui(session_id, wu_game_size, width, height) │ │ --- TODO do this in C API instead │ -local function key_val_list_to_map(list) │ - local map = {} │ - for _, item in ipairs(list) do │ - print(string.format("key=%s, vale=%s", item.id, item.selected)) │ - map[item.id] = item.selected │ - end │ - return map │ -end │ +-- Do request state initially. │ +-- But on game over, whoever presses "new game" first is the one that should send state │ +-- so when you receive an event that says "new game", don't request state │ +-- but if you haven't yet received that message, then you should send your state │ +local request_state = true │ │ -function handle_popup_btn_clicked(popup_id, btn_id, popup_state) │ - if popup_id == POPUP_ID_NEW_GAME then │ - if btn_id == POPUP_ITEM_ID_BTN_START_GAME then │ - local popup_state_map = key_val_list_to_map(popup_state) │ - local draw_type_dropdown_selected = popup_state_map[POPUP_ITEM_ID_DRAW_TYPE] │ - local draw_type = nil │ - if draw_type_dropdown_selected == 0 then │ - draw_type = core.DRAW_TYPE_ONE │ - elseif draw_type_dropdown_selected == 1 then │ - draw_type = core.DRAW_TYPE_THREE │ - else │ - error(string.format("Unhandled new game popup dropdown sel %s", draw_type_dropdown_selected)) │ - end │ - start_new_game(draw_type) │ - alexgames.hide_popup() │ - elseif btn_id == POPUP_ITEM_ID_BTN_CANCEL then │ - alexgames.hide_popup() │ - else │ - error(string.format("Unhandled new game popup btn id %s", btn_id)) │ - end │ +local function get_player() │ + if local_multiplayer then │ + return state.player_turn │ else │ - error(string.format("Unhandled popup \"%s\"", popup_id)) │ + return wu_ctrl.get_player(ctrl_state) │ end │ end │ │ -function handle_btn_clicked(btn_id) │ - if btn_id == draw.BTN_ID_AUTO_COMPLETE then │ - core.autocomplete(state, handle_move_list_animation) │ - elseif btn_id == draw.BTN_ID_NEW_GAME then │ - --alexgames.set_status_msg("Starting new game") │ - new_game() │ - elseif btn_id == draw.BTN_ID_UNDO then │ - load_prev_state() │ +function new_game() │ + state = wu.new_game(wu_game_size) │ + alexgames.set_status_msg("Choose piece colour") │ + if request_state then │ + alexgames.send_message("all", "get_state:") │ else │ - error(string.format("Unhandled btn_id \"%s\"", btn_id)) │ + alexgames.send_message("all", "new_game:") │ + send_state() │ end │ -end │ - │ - │ -function load_hr_binstr_state(version, hr_binstr_state) │ - local state_board_serialized = utils.hr_binstr_to_binstr(hr_binstr_state) │ - local board_state = serialize.deserialize_board_state(version, state_board_serialized) │ - state = core.new_state_from_board_state(player_count, board_state) │ + request_state = true │ update() │ end │ │ -function load_saved_state(session_id_arg, state_serialized) │ - alexgames.set_status_msg(string.format("Loading saved state: %d bytes", #state_serialized)) -- TODO show date of last played? │ - local hr_state_serialized = utils.binstr_to_hr_str(state_serialized) │ - print("Serialized state: " .. hr_state_serialized) │ - session_id = session_id_arg │ - state = serialize.deserialize_state(state_serialized) │ - g_shown_victory_animation = false │ -end │ - │ -function get_state() │ - if state == nil then return nil end │ - return serialize.serialize_state(state) │ -end │ - │ -function get_init_state() │ - -- TODO I didn't look into this, but it's possible that the Lua random number seed │ - -- stuff is not guaranteed to be consistent across versions of Lua. │ - -- So this isn't super robust. I think that's fine for now. │ - -- If you generate a state link via `get_state` and send it to a friend, and they're in │ - -- a different version of Lua, then they might not be able to get the initial state │ - -- themselves. │ - -- │ - -- Partway through implementing this, I realized that all the states are saved in the │ - -- history browser anyway, so I should just add a new API to load the oldest state. │ - -- But that has two problems: │ - -- 1. if you share a link, it won't contain the original state. (Though I could add it, │ - -- I suppose, doubling the size of the state) │ - -- 2. I will probably start pruning old saved states at some point, since I think │ - -- the browser limits you to ~5 MB. (When I do that, I should add the option to mark │ - -- some saved states as "more important". │ - if state and state.seed_x and state.seed_y then │ - local params = { │ - seed_x = state.seed_x, │ - seed_y = state.seed_y, │ - } │ - local init_state = core.new_game(player_count, state.draw_type, params) │ - print(string.format("Generated initial state from seeds %016x %016x:", state.seed_x, state.seed_y)) │ - core.print_state(init_state) │ - return serialize.serialize_state(init_state) │ - else │ - return "" │ - end │ -end │ - │ -function handle_game_option_evt(option_id, value) │ - print(string.format("handle_game_option(option_id=%s, value=%s)", option_id, value)) │ - if option_id == GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT then │ - draw.show_move_count_and_elapsed_time = value │ - storage_helpers.store_bool(DATA_ID_SHOW_TIME_AND_MOVE_COUNT, value) │ - draw_board_internal() │ - end │ -end │ - │ -draw.init(480, 480) │ - │ -function start_game(session_id_arg, state_serialized) │ - print(string.format("start_game(session_id=%d, state_serialized=%s)", session_id_arg, state_serialized)) │ - │ - alexgames.enable_evt('mouse_move') │ - alexgames.enable_evt('mouse_updown') │ - alexgames.enable_evt('touch') │ - │ - if state_serialized ~= nil then │ - print(string.format("start_game: loading from state param")) │ - session_id = session_id_arg │ - load_saved_state(session_id_arg, state_serialized) │ - print(string.format("start_game: done loading from state param")) │ - else │ - -- this shouldn't be happening anymore, right? │ - --print(string.format("start_game: no state param provided, checking if saved game stored in persistent storage")) │ - --local state_serialized = alexgames.read_stored_data(DATA_ID_STATE) │ - local last_session_id = alexgames.get_last_session_id() │ - if last_session_id ~= nil then │ - state_serialized = alexgames.adjust_saved_state_offset(last_session_id, 0) │ - end │ - │ - -- this shouldn't usually be possible, but I think it happens if I manage to increment the session ID │ - -- without storing a valid state. │ - if state_serialized ~= nil then │ - load_saved_state(last_session_id, state_serialized) │ - else │ - alexgames.set_status_msg("No saved state found, starting new game") │ - new_game() │ - end │ - end │ - │ - alexgames.add_game_option(GAME_OPTION_SHOW_TIME_AND_MOVE_COUNT, { │ - type = alexgames.OPTION_TYPE_TOGGLE, │ - label = "Show elapsed time and move count", │ - value = draw.show_move_count_and_elapsed_time, │ - } ) │ - │ - -- Set a timer for every second, to update the "time elapsed" in the corner │ - alexgames.set_timer_update_ms(1000) │ -end │ -local draw = {} │ - │ -local alexgames = require("alexgames") │ - │ -local cards = require("libs/cards/cards") │ -local cards_draw = require("libs/cards/cards_draw") │ -local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ - │ -local core = require("games/solitaire/solitaire_core") │ - │ -local BACKGROUND_COLOUR = '#008800' │ -local CARD_SPACE_COLOUR = '#007000' │ -local BACKGROUND_COLOUR_DARK = '#002200' │ -local CARD_SPACE_COLOUR_DARK = '#001100' │ - │ -local TEXT_SIZE = 14 │ -local TEXT_COLOUR_LIGHT = '#0000cc' │ -local TEXT_COLOUR_DARK = '#8888aa' │ -local PADDING = 3 │ +PLAYER_CHOICE_POPUP_ID = "choose_player_colour" │ +PLAYER_CHOICE_BTNS = { │ + "Black", │ + "White", │ +} │ +PLAYER_CHOICE_BTNS_MAP = { │ + [0] = wu.PLAYER1, │ + [1] = wu.PLAYER2, │ +} │ +PLAYER_IDX_TO_BTN_IDX_MAP = utils.reverse_map(PLAYER_CHOICE_BTNS_MAP) │ │ --- │ -draw.show_move_count_and_elapsed_time = nil │ +GAME_OVER_POPUP_ID = "game_over" │ │ -local function get_bg_colour() │ - if alexgames.get_user_colour_pref() == "dark" then │ - return BACKGROUND_COLOUR_DARK │ - else │ - return BACKGROUND_COLOUR │ - end │ +function update() │ + wu_ui.update(session_id, state.board, state.last_move_y, state.last_move_x) │ end │ │ -local function get_card_space_colour() │ - if alexgames.get_user_colour_pref() == "dark" then │ - return CARD_SPACE_COLOUR_DARK │ - else │ - return CARD_SPACE_COLOUR │ - end │ - │ +function first_char_upper(str) │ + return str:sub(1,1):upper() .. str:sub(2,#str) │ end │ │ -local function get_text_colour() │ - if alexgames.get_user_colour_pref() == "dark" then │ - return TEXT_COLOUR_DARK │ - else │ - return TEXT_COLOUR_LIGHT │ +function check_for_winner() │ + if state.winner ~= nil then │ + local winner = wu.player_idx_to_colour_name(state.winner) │ + local msg = string.format("Game over! %s wins.", first_char_upper(winner)) │ + request_state = false │ + show_buttons_popup.show_popup(GAME_OVER_POPUP_ID, │ + "Game over", │ + msg, │ + {"New game"}) │ + alexgames.set_status_msg(msg) │ end │ end │ │ ---local PLAYER_HOLDING_OFFSET_Y = -7 │ ---local PLAYER_HOLDING_OFFSET_X = 7 │ ---local PLAYER_HOLDING_OFFSET_Y = 0 │ ---local PLAYER_HOLDING_OFFSET_X = 0 │ -local PLAYER_HOLDING_OFFSET_Y = -5 │ -local PLAYER_HOLDING_OFFSET_X = 5 │ -local HELD_CARD_IS_HIGHLIGHTED = true │ - │ -local is_touch_controlled = false │ - │ -draw.BTN_ID_AUTO_COMPLETE = "autocomplete" │ -draw.BTN_ID_NEW_GAME = "new_game" │ -draw.BTN_ID_UNDO = "undo" │ - │ ---local card_height = 105 │ ---local card_width = 60 │ -local card_ratio = 75/40 │ -local card_padding_ratio = 10/75 │ - │ -local card_height = 75 │ -local card_width = 40 │ -local card_font_size = 32 │ -local card_padding = 10 │ -local card_stack_offset = 5 │ -local card_revealed_offset = 20 │ - -- for draw 3, how much space to leave between the three cards drawn from the deck │ -local draw_pile_offset = 23 │ - │ -local board_width = nil │ -local board_height = nil │ - │ -local ANIM_MOVE_MS = 150 │ -local anim_start_time_ms = nil │ -local anim_end_time_ms = nil │ -local card_anim_src_y = nil │ -local card_anim_src_x = nil │ -local card_anim_dst_y = nil │ -local card_anim_dst_x = nil │ -local card_anim = nil │ -local card_anim_pos_y = nil │ -local card_anim_pos_x = nil │ -local move_list = {} │ -local last_animation_update_time = nil │ -local anim_finished_callback = nil │ - │ -local anim_state = draw_celebration_anim.new_state({ │ -}) │ --- TODO this probably should be included in the anim state? │ --- Perhaps as an option, for games that don't otherwise require a timer │ -local g_victory_anim_timer = nil │ - │ - │ -function draw.set_is_touch_controlled(arg) │ - is_touch_controlled = arg │ -end │ - │ -function draw.init(board_width_arg, board_height_arg) │ - │ - board_width = board_width_arg │ - board_height = board_height_arg │ - │ - local card_width_max = math.floor(board_width/(core.NUM_PLAY_COLUMNS * (1+card_padding_ratio))) │ - local card_height_max = math.floor(card_width_max * card_ratio) │ - │ - card_width = card_width_max │ - card_height = card_height_max │ - card_padding = math.floor(card_width_max * card_padding_ratio) │ - │ - │ - alexgames.create_btn(draw.BTN_ID_UNDO, "Undo", 1) │ - alexgames.create_btn(draw.BTN_ID_NEW_GAME, "New Game", 1) │ - alexgames.create_btn(draw.BTN_ID_AUTO_COMPLETE, "Auto-Complete", 1) │ -end │ - │ - │ -function draw.get_pos(state, game_section, col, idx) │ - if game_section == core.SECTION_PLAY_COLUMN_UNREVEALED then │ - return { │ - y = card_height + 2*card_padding + (idx-1) * card_stack_offset, │ - x = card_padding + (col-1) * (card_padding + card_width), │ - } │ - elseif game_section == core.SECTION_PLAY_COLUMN_STAGING then │ - local stack = #state.play_columns_unrevealed[col] │ - if idx == nil then │ - idx = #state.play_columns_staging │ - end │ - return { │ - y = card_height + 2*card_padding + stack*card_stack_offset + (idx-1)*card_revealed_offset, │ - x = card_padding + (col-1) * (card_padding + card_width), │ - } │ - elseif game_section == core.SECTION_DECK_UNREVEALED then │ - return { │ - y = card_padding, │ - x = card_padding + (core.NUM_PLAY_COLUMNS-1) * (card_padding + card_width), │ - } │ - elseif game_section == core.SECTION_DECK_DRAW or │ - game_section == core.SECTION_DECK_DISCARD then │ - if game_section == core.SECTION_DECK_DISCARD then │ - if col ~= nil then │ - error("col is nil for get_pos(DISCARD)") │ - end │ - col = 1 │ - end │ - if col == nil then │ - error(string.format("get_pos col is nil"), 3) │ - end │ - -- This is the extra space that we have to divide between the draw 3 cards (if present) │ - local draw_width = card_width + card_padding │ - local draw_idx = 1 │ - if state.draw_type == core.DRAW_TYPE_THREE then │ - draw_idx = 3 - col + 1 │ +function handle_user_clicked(pos_y, pos_x) │ + local pos = wu_ui.user_pos_to_piece_idx(pos_y, pos_x) │ + local player = get_player() │ + local rc = wu.player_move(state, player, pos.y, pos.x) │ + if rc == wu.SUCCESS then │ + if not local_multiplayer then │ + alexgames.send_message("all", string.format("move:%d,%d,%d", player, pos.y, pos.x)); │ end │ - return { │ - y = card_padding, │ - x = math.floor(card_padding + (core.NUM_PLAY_COLUMNS-2) * (card_padding + card_width) - (draw_idx-1)*draw_pile_offset) │ - } │ - elseif game_section == core.SECTION_GOAL_STACKS then │ - return { │ - y = card_padding, │ - x = card_padding + (col-1) * (card_padding + card_width), │ - } │ + alexgames.set_status_err("") │ + alexgames.save_state(session_id, wu.serialize_state(state)) │ else │ - error(string.format("get_pos: unhandled section %s", game_section)) │ + alexgames.set_status_err(wu.err_code_to_str(rc)) │ end │ - │ -end │ - │ -local function in_section(state, pos_y, pos_x, game_section, col, idx) │ - local pos = draw.get_pos(state, game_section, col, idx) │ - return pos.y <= pos_y and pos_y <= pos.y + card_height and │ - pos.x <= pos_x and pos_x <= pos.x + card_width │ + update() │ + update_status_msg_turn(state, ctrl_state) │ + check_for_winner() │ end │ │ -local function get_offset(player_state) │ - if not is_touch_controlled then │ - return { │ - dy = player_state.y_card_offset, │ - dx = player_state.x_card_offset, │ - } │ - else │ - return { │ - dy = math.floor(card_height/2), │ - dx = math.floor(card_width/2), │ - } │ - end │ +function send_state() │ + alexgames.send_message("all", "state:"..wu.serialize_state(state)) │ end │ │ +function handle_msg_received(src, msg) │ + print("handle_msg_received (from src:" .. src .. "): " .. msg); │ │ -function draw.draw_state(session_id, state) │ - alexgames.draw_clear() │ - │ - alexgames.draw_rect(get_bg_colour(), 0, 0, board_height, board_width) │ - │ - for i=1,core.NUM_GOAL_STACKS do │ - local pos = draw.get_pos(state, core.SECTION_GOAL_STACKS, i) │ - alexgames.draw_rect(get_card_space_colour(), │ - pos.y, pos.x, │ - pos.y + card_height, │ - pos.x + card_width) │ - end │ - │ - if state == nil then │ - local pos = draw.get_pos(state, core.SECTION_DECK_UNREVEALED) │ - cards_draw.draw_card(cards.UNREVEALED_CARD, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - local text_size = 24 │ - alexgames.draw_text("Press \"New Game\" button", │ - "#000000", │ - board_height/2 - text_size, │ - board_width/2, │ - text_size, │ - alexgames.TEXT_ALIGN_CENTRE) │ + if local_multiplayer then │ return │ end │ │ - │ - for i=1,#state.play_columns_unrevealed do │ - for j=1,#state.play_columns_unrevealed[i] do │ - local pos = draw.get_pos(state, core.SECTION_PLAY_COLUMN_UNREVEALED, i, j) │ - cards_draw.draw_card(cards.UNREVEALED_CARD, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - │ - for j=1,#state.play_columns_staging[i] do │ - local card = state.play_columns_staging[i][j] │ - local pos = draw.get_pos(state, core.SECTION_PLAY_COLUMN_STAGING, i, j) │ - cards_draw.draw_card(card, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - end │ - │ - -- TODO if deck is empty, draw some sort of an icon in its place │ - local pos = draw.get_pos(state, core.SECTION_DECK_UNREVEALED) │ - if #state.deck_unrevealed > 0 then │ - cards_draw.draw_card(cards.UNREVEALED_CARD, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - else │ - -- TODO draw some sort of an icon, like a green circle, │ - -- to indicate that this can be clicked? │ - alexgames.draw_rect(get_card_space_colour(), │ - pos.y, pos.x, │ - pos.y + card_height, │ - pos.x + card_width) │ - end │ - │ - │ - if #state.deck_draw > 0 then │ - -- Card at top of stack should be drawn on top │ - for i=1,#state.deck_draw do │ - local pos = draw.get_pos(state, core.SECTION_DECK_DRAW, i) │ - local deck_revealed_top = state.deck_draw[i] │ - cards_draw.draw_card(deck_revealed_top, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - -- Maybe only draw this card if the player is holding one? │ - -- what is really bad is if the player isn't holding a card, and there's a bug │ - -- in the core logic that prevents one of the discard cards from being moved to │ - -- the draw pile. There's this card shown (by the below code) that can't be picked up. │ - elseif #state.deck_discard > 0 and state.draw_type == core.DRAW_TYPE_ONE then │ - -- For draw three, if there are no cards here, don't draw any from the deck_discard pile. │ - -- Rely on the core game code to put a discard card here when the user has actually │ - -- placed (stopped holding) │ - local pos = draw.get_pos(state, core.SECTION_DECK_DRAW, 1) │ - local card = state.deck_discard[#state.deck_discard] │ - if card == nil then error("card is nil in case 1234234") end │ - cards_draw.draw_card(card, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - │ - for i=1,#state.goal_stacks do │ - local card = nil │ - if #state.goal_stacks[i] > 0 then │ - card = state.goal_stacks[i][#state.goal_stacks[i]] │ - end │ - local pos = draw.get_pos(state, core.SECTION_GOAL_STACKS, i) │ - if card ~= nil then │ - cards_draw.draw_card(card, │ - pos.y, pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ + if two_player.handle_msg_received(src, msg) then │ + return │ end │ │ - for player=1,state.player_count do │ - local player_state = state.players[player] │ - if player_state.holding ~= nil then │ - local y = player_state.y │ - local x = player_state.x │ - │ - if player_state.y_card_offset ~= nil and │ - player_state.x_card_offset ~= nil then │ - local offset = get_offset(player_state) │ - y = y - offset.dy │ - x = x - offset.dx │ - end │ + local m = msg:gmatch("(%S+):(.*)") │ + local header, payload │ + header, payload = m() │ │ - y = y + PLAYER_HOLDING_OFFSET_Y │ - x = x + PLAYER_HOLDING_OFFSET_X │ + if header == "move" then │ + local m = payload:gmatch"(%d+),(%d+),(%d+)" │ + local player, row, col │ + player, row, col = m() │ + player = tonumber(player) │ + row = tonumber(row) │ + col = tonumber(col) │ + print(string.format("Received player=%s, row=%s, col=%d", player, row, col)) │ │ - for stack_idx, card in ipairs(player_state.holding) do │ - cards_draw.draw_card(card, │ - y + (stack_idx-1)*card_revealed_offset, │ - x, │ - card_width, card_height, card_font_size, │ - HELD_CARD_IS_HIGHLIGHTED, 0) │ - end │ + if player == wu_ctrl.get_player(ctrl_state) then │ + -- TODO make UI visible message for this case? │ + print(string.format("Received message for move from wrong player")) │ + return │ end │ - end │ - │ - if card_anim ~= nil then │ - cards_draw.draw_card(card_anim, │ - math.floor(card_anim_pos_y), math.floor(card_anim_pos_x), │ - card_width, card_height, card_font_size, │ - false, 0) │ - end │ - │ - if draw.show_move_count_and_elapsed_time and state.move_count ~= nil then │ - local moves_str = string.format('Moves: %d', state.move_count) │ - alexgames.draw_text(moves_str, get_text_colour(), │ - board_height - PADDING, │ - PADDING, │ - TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ - end │ - if draw.show_move_count_and_elapsed_time and state.time_elapsed ~= nil then │ - local mins_elapsed = math.floor(state.time_elapsed / 60) │ - local secs_elapsed = state.time_elapsed % 60 │ - local time_str = string.format('%d:%02d', mins_elapsed, secs_elapsed) │ - alexgames.draw_text(time_str, get_text_colour(), │ - board_height - PADDING, │ - board_width - PADDING, │ - TEXT_SIZE, alexgames.TEXT_ALIGN_RIGHT) │ - end │ - │ - draw_celebration_anim.draw(anim_state) │ - alexgames.draw_refresh() │ - │ - │ - -- TODO uncomment once testing is done on this │ - --alexgames.set_btn_enabled(draw.BTN_ID_AUTO_COMPLETE, core.autocomplete_available(state)) │ - alexgames.set_btn_enabled(draw.BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ -end │ - │ - │ -function draw.pos_to_action(state, player, pos_y, pos_x, evt_id) │ - if state == nil then │ - return nil │ - end │ - if #move_list > 0 then │ - return nil │ - end │ - local info = { │ - section_type = nil, │ - col = nil, │ - idx = nil, │ - │ - -- only used for setting player pos │ - y = pos_y, │ - x = pos_x, │ - } │ - │ - if evt_id == 'touchend' and │ - state.players[player].y_card_offset ~= nil and │ - state.players[player].x_card_offset ~= nil then │ - local offset = get_offset(state.players[player]) │ - offset.dy = offset.dy - math.floor(card_height/2) │ - offset.dx = offset.dx - math.floor(card_width/2) │ - │ - pos_y = pos_y - offset.dy │ - pos_x = pos_x - offset.dx │ - │ - print(string.format("offsetting mouse pos with dy=%d, dx=%d, is_touch=%s", offset.dy, offset.dx, is_touch_controlled)) │ - end │ - │ - if in_section(state, pos_y, pos_x, core.SECTION_DECK_UNREVEALED) then │ - info.section_type = core.SECTION_DECK_UNREVEALED │ - return info │ + wu.player_move(state, player, row, col) │ + alexgames.set_status_err("") │ + update() │ + update_status_msg_turn(state, ctrl_state) │ + check_for_winner() │ + elseif header == "get_state" then │ + send_state() │ + elseif header == "state" then │ + local new_state = wu.deserialize_state(payload) │ + -- TODO check with user if they want to overwrite their state with │ + -- this (possibly unsolicited!!) state from the other player │ + state = new_state │ + update() │ + alexgames.set_status_err("") │ + update_status_msg_turn(state, ctrl_state) │ + elseif header == "new_game" then │ + request_state = true │ else │ - for draw_idx=1,state.draw_type do │ - if in_section(state, pos_y, pos_x, core.SECTION_DECK_DRAW, draw_idx) then │ - info.section_type = core.SECTION_DECK_DRAW │ - info.col = draw_idx │ - return info │ - end │ - end │ - for col=1,core.NUM_PLAY_COLUMNS do │ - for idx=#state.play_columns_staging[col],1,-1 do │ - if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_STAGING, col, idx) then │ - info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ - info.col = col │ - info.idx = idx │ - return info │ - end │ - end │ - -- This is the "empty column" case, where you can place kings │ - if #state.play_columns_staging[col] == 0 and │ - #state.play_columns_unrevealed[col] == 0 then │ - if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_STAGING, col, 1) then │ - info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ - info.col = col │ - return info │ - end │ - end │ - end │ - │ - for col=1,core.NUM_PLAY_COLUMNS do │ - │ - for idx=1,#state.play_columns_unrevealed[col] do │ - if in_section(state, pos_y, pos_x, core.SECTION_PLAY_COLUMN_UNREVEALED, col, idx) then │ - info.section_type = core.SECTION_PLAY_COLUMN_UNREVEALED │ - info.col = col │ - info.idx = idx │ - return info │ - end │ - end │ - end │ - │ - for col=1,cards.NUM_SUITS do │ - if in_section(state, pos_y, pos_x, core.SECTION_GOAL_STACKS, col) then │ - info.section_type = core.SECTION_GOAL_STACKS │ - info.col = col │ - return info │ - end │ - end │ + print("Unexpected message header: \""..header.."\"") │ end │ - return nil │ end │ │ -local function start_anim(state, item) │ - --print("start_anim") │ - --if #move_list > 0 then │ - -- return │ - --end │ - if item.item.move == core.ACTION_MOVE then │ - card_anim = core.remove_card_from_move(state, item.item.src) │ - local src_pos = draw.get_pos(state, item.item.src.section_type, item.item.src.col) │ - card_anim_src_y = src_pos.y │ - card_anim_src_x = src_pos.x │ - local dst_pos = draw.get_pos(state, item.item.dst.section_type, item.item.dst.col) │ - card_anim_dst_y = dst_pos.y │ - card_anim_dst_x = dst_pos.x │ - anim_start_time_ms = alexgames.get_time_ms() │ - anim_end_time_ms = item.time │ - │ - card_anim_pos_y = card_anim_src_y │ - card_anim_pos_x = card_anim_src_x │ - core.inc_move_count(state) │ - elseif item.item.move == core.ACTION_DECK_NEXT then │ - core.next_in_deck(state) │ - anim_start_time_ms = alexgames.get_time_ms() │ - anim_end_time_ms = item.time │ +function handle_btn_clicked(btn_id) │ + print("handle_btn_clicked: "..btn_id) │ + if btn_id == wu_ui.BTN_ID_UNDO then │ + load_state_move_offset(-1) │ + elseif btn_id == wu_ui.BTN_ID_REDO then │ + load_state_move_offset(1) │ else │ - error(string.format("unexpected item.item.move=%s", item.item.move)) │ + error(string.format("Unhandled button: \"%s\"", btn_id)) │ end │ - │ end │ │ -function draw.stop_move_animations() │ - anim_start_time_ms = nil │ - anim_end_time_ms = nil │ - card_anim_src_y = nil │ - card_anim_src_x = nil │ - card_anim_dst_y = nil │ - card_anim_dst_x = nil │ - card_anim = nil │ - card_anim_pos_y = nil │ - card_anim_pos_x = nil │ - move_list = {} │ - last_animation_update_time = nil │ - if anim_finished_callback ~= nil then │ - anim_finished_callback() │ +local function get_player_name(player_arg) │ + for name, player_idx in pairs(player_name_to_id) do │ + if player_arg == player_idx then return name end │ end │ - anim_finished_callback = nil │ + return "nil" │ end │ │ -function draw.animate_moves(state, move_list_arg, on_anim_finished) │ - if #move_list > 0 then │ - return │ - end │ +function update_status_msg_turn(state, ctrl_state) │ + if state == nil then return end │ │ - local current_time_ms = alexgames.get_time_ms() │ - for i, item in ipairs(move_list_arg) do │ - local anim_item = { │ - item = item, │ - time = current_time_ms + i * ANIM_MOVE_MS, │ - } │ - table.insert(move_list, anim_item) │ - end │ - if #move_list > 0 then │ - start_anim(state, move_list[1]) │ + local display_name = wu.player_idx_to_colour_name(state.player_turn) │ + if not local_multiplayer then │ + display_name = string.format("%s (%s)", display_name, get_player_name(state.player_turn)) │ end │ - anim_finished_callback = on_anim_finished │ + alexgames.set_status_msg(string.format("Waiting for %s to move", display_name)) │ end │ │ --- While working on this I had added two "animations": │ --- * the autocomplete moves, that's what `draw.animate_moves` does │ --- * the fireworks "victory animation" / "draw_celebration_anim". │ -function draw.update_animations(state, dt_ms) │ - --print("update_animations", dt_ms, "move list len", #move_list) │ - │ - draw.animate_moves(state, move_list, on_anim_finished) │ - draw_celebration_anim.update(anim_state, dt_ms/1000.0) │ - │ - if #move_list == 0 then │ - return │ - end │ - │ - -- TODO REMOVE? │ - if dt_ms == 0 then │ - return │ - end │ - local current_time_ms = alexgames.get_time_ms() │ - --local time_diff = last_animation_update_time - current_time_ms │ - if current_time_ms < move_list[1].time then │ - if move_list[1].item.move == core.ACTION_MOVE then │ - local time_portion = (current_time_ms - anim_start_time_ms) / (anim_end_time_ms - anim_start_time_ms) │ - if time_portion >= 1 then │ - time_portion = 1 │ - end │ - │ - card_anim_pos_y = card_anim_src_y + time_portion * (card_anim_dst_y - card_anim_src_y) │ - card_anim_pos_x = card_anim_src_x + time_portion * (card_anim_dst_x - card_anim_src_x) │ +function handle_popup_btn_clicked(popup_id, btn_idx) │ + if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ + -- handled, no action here │ + elseif popup_id == GAME_OVER_POPUP_ID then │ + if btn_idx == 0 then │ + new_game() │ + alexgames.hide_popup() │ end │ else │ - if move_list[1].item.move == core.ACTION_MOVE then │ - local ary = core.get_card_ary(state, move_list[1].item.dst.section_type, move_list[1].item.dst.col) │ - table.insert(ary, card_anim) │ - card_anim = nil │ - end │ - table.remove(move_list, 1) │ - if #move_list > 0 then │ - start_anim(state, move_list[1]) │ - else │ - if anim_finished_callback ~= nil then │ - anim_finished_callback() │ - end │ - end │ + print(string.format("Unexpected popup_id \"%s\"", popup_id)); │ + alexgames.hide_popup() │ end │ end │ │ -function draw.victory_animation(fps) │ - print("setting timer") │ - if g_victory_anim_timer ~= nil then │ - error(string.format("victory_animation: anim_timer is not nil")) │ - end │ - g_victory_anim_timer = alexgames.set_timer_update_ms(1000/fps) │ - draw_celebration_anim.fireworks_display(anim_state, { │ - on_finish = function () │ - if g_victory_anim_timer == nil then │ - alexgames.set_status_err("warning: g_victory_anim_timer is nil on anim complete") │ - else │ - alexgames.delete_timer(g_victory_anim_timer) │ - g_victory_anim_timer = nil │ +function two_player_init() │ + local args = { │ + supports_local_multiplayer = true, │ + handle_multiplayer_type_choice = function (multiplayer_type) │ + if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ + local_multiplayer = true │ + elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ + local_multiplayer = false │ end │ - --print("animation finished! Resuming timer") │ - --alexgames.set_timer_update_ms(0) │ - --alexgames.set_timer_update_ms(1000/60) │ end, │ - }) │ -end │ - │ - │ -return draw │ -local solve = {} │ - │ -local cards = require("libs/cards/cards") │ -local cards_set = require("libs/cards/cards_set") │ -local utils = require("libs/utils") │ -local core = require("games/solitaire/solitaire_core") │ -local solitaire_serialize = require("games/solitaire/solitaire_serialize") │ - │ ---[[ │ --- TODO: need to try traversing these trees in real time to see what │ --- they manage to do in so much wasted time. │ --- Implement logic to favour moves that I would in real life. │ --- Also keep an eye out for bad moves that should never be allowed, │ --- or should be heavily deprioritized. │ --- To do figure out the most effective ways to fix all this: │ --- * make nodes reference each other, and │ --- * make a nicely readable state to ASCII function, likely using the ascii symbols │ --- for heart/diamond/clubs/spades │ --- * at each state, print a list of all possible moves, and all the moves that each one led to. │ --- This should help estimate how much time is being wasted. │ --- * Allow easily traversing the graph with keyboard shortcuts. │ ---]] │ - │ - │ -local MOVE_POS_DECK = 1 │ -local MOVE_POS_GOAL = 3 │ - │ - │ ---[[ │ --- These priorities seem to get pretty good results │ -local PRI_MOVE_TO_GOAL_STACK = 1 │ -local PRI_MOVE_KING_TO_EMPTY_COL = 2 │ -local PRI_MOVE_LAST_CARDS_IN_STAGING = 3 │ -local PRI_NORMAL = 3 │ -local PRI_MOVE_FROM_DECK = nil │ -local PRI_MOVE_AROUND_STAGING = nil │ -local PRI_MOVE_FROM_GOAL_STACK = 6 │ -local NUM_PRIORITIES = 6 │ ---]] │ - │ -local PRI_MOVE_TO_GOAL_STACK = 1 │ -local PRI_MOVE_KING_TO_EMPTY_COL = 2 │ -local PRI_MOVE_LAST_CARDS_IN_STAGING = 3 -- TODO increasing this above normal doesn't seem to help │ -local PRI_NORMAL = 3 │ -local PRI_MOVE_FROM_DECK = nil │ -local PRI_MOVE_AROUND_STAGING = nil │ -local PRI_MOVE_FROM_GOAL_STACK = 6 │ -local NUM_PRIORITIES = 6 │ - │ -local SECTION_DECK_POS_INDEPENDENT = core.SECTION_LAST + 1 │ - │ -local player = 1 -- TODO │ - │ --- converts suit to an index from 1 to 4. │ --- Used to choose which goal stack to put cards in, │ --- to avoid a bunch of duplicate positions │ -local suit_idx_map = {} │ - │ -for i, suit in ipairs(cards.suits) do │ - suit_idx_map[suit] = i │ -end │ - │ --- TODO: print each move, so I can figure out what is going on. │ --- keep track of prev move │ - │ - │ ---[[ │ --- Here is my plan for a solitaire solving algorithm: │ --- make a "state to hash" api that returns a string that represents a unique │ --- game state-- but returning the same hash for trivial variations of the same state, │ --- such as: │ --- * cycling through the deck, and │ --- * moving a king (or its stack) from one empty column to another │ --- I think I can simply: │ --- * always hash the deck as if it were not opened, and │ --- * have a separate set of columns for kings on an empty column? │ --- │ --- │ --- Then I'd guess that it would be as simple as: │ --- * loop through all possible moves, recurse...? │ --- │ --- Since I'm taking shortcuts, I couldn't consider "reveal next card in deck" as a move. │ --- So I'd have to loop through every possible move for every possible card in the deck. │ --- That's not too hard either. │ --- │ --- Then that's it? Return true once it's possible to reach a state where all the unrevealed │ --- cards are revealed? │ ---]] │ - │ -local function section_type_to_string(section_type) │ - local type_to_str = { │ - [core.SECTION_PLAY_COLUMN_UNREVEALED] = 'PLAY_COL_U', │ - [core.SECTION_PLAY_COLUMN_STAGING] = 'PLAY_COL', │ - [core.SECTION_GOAL_STACKS] = 'GOAL', │ - [SECTION_DECK_POS_INDEPENDENT] = 'DECK_PI', │ - } │ - return type_to_str[section_type] │ -end │ - │ -local function format_int(val, chars) │ - if val == nil then │ - --return string.format("%-*s", chars, val) │ - return string.format("%-" .. chars .. "s", val) │ - else │ - return string.format("%" .. chars .. "d", val) │ - end │ -end │ - │ -local function pos_to_str(pos) │ - local s = string.format("{%-8s, %s, %s;", │ - section_type_to_string(pos.section_type), format_int(pos.col, 3), format_int(pos.idx, 3)) │ - if pos.card ~= nil then │ - s = s .. string.format(" (%-12s)", cards.card_to_string(pos.card)) │ - end │ - s = s .. "}" │ - return s │ -end │ - │ -local function print_move(prev_state_id, move, next_state_id, is_duplicate_state, info) │ - local dup_string = "" │ - if is_duplicate_state then │ - dup_string = "(visited)" │ - end │ - print(string.format("from state id=%3d, src%s -> dst%s to state id %3d%s; %s", │ - prev_state_id, │ - pos_to_str(move.src), │ - pos_to_str(move.dst), │ - next_state_id, dup_string, info)) │ -end │ - │ - │ -local function get_deck_pos_independent(state) │ - local deck = {} │ - for _, card in ipairs(state.deck_revealed) do │ - table.insert(deck, card) │ - end │ - --for _, card in ipairs(state.deck_unrevealed) do │ - for i=#state.deck_unrevealed,1,-1 do │ - local card = state.deck_unrevealed[i] │ - table.insert(deck, card) │ - end │ - │ - return deck │ -end │ - │ - │ --- Returns the serialized card array for each goal stack │ --- in the order of cards.suits │ --- │ --- The purpose is so that a whole new game isn't simulated │ --- if the player chose to put the hearts in goal stack 1 or 2 │ -function solve.get_goal_stacks_hash(state) │ - local hash = '' │ - for _, suit in ipairs(cards.suits) do │ - local stack = {} │ - for i=1,#state.goal_stacks do │ - if #state.goal_stacks[i] > 0 and state.goal_stacks[i][1].suit == suit then │ - stack = state.goal_stacks[i] │ - end │ - end │ - hash = hash .. cards.serialize_card_array(stack) │ - end │ - return hash │ -end │ - │ -function solve.state_to_hash(state) │ - │ - local hash = '' │ - │ - hash = hash .. cards.serialize_card_array(get_deck_pos_independent(state)) │ - hash = hash .. solve.get_goal_stacks_hash(state) │ - │ - local empty_stacks = {} │ - │ - local group_empty_stacks = true │ - │ - for i=1,core.NUM_PLAY_COLUMNS do │ - local unrevealed = state.play_columns_unrevealed[i] │ - local staging = state.play_columns_staging[i] │ - if group_empty_stacks and #unrevealed == 0 then │ - table.insert(empty_stacks, staging) │ - staging = {} │ - end │ - hash = hash .. cards.serialize_card_array(unrevealed) │ - hash = hash .. cards.serialize_card_array(staging) │ - end │ - │ - if group_empty_stacks then │ - for _, suit in ipairs(cards.suits) do │ - local suit_stack = {} │ - for _, stack in ipairs(empty_stacks) do │ - if #stack > 0 and stack[1].suit == suit then │ - suit_stack = stack │ - end │ - end │ - hash = hash .. cards.serialize_card_array(suit_stack) │ - end │ - end │ - │ - return hash │ -end │ - │ -local function get_card_stack_positions_quick_order(num) │ - if num == 0 then return { } │ - elseif num == 1 then return { 1 } │ - else │ - local list = { 1, num } │ - for i=2,num-1 do │ - table.insert(list, i) │ - end │ - return list │ - end │ -end │ - │ -function solve.get_possib_src_cards(state) │ - local src_cards = {} │ - for i=1,core.NUM_PLAY_COLUMNS do │ - local play_col = state.play_columns_staging[i] │ - -- for j=#play_col,1,-1 do │ - for _, j in ipairs(get_card_stack_positions_quick_order(#play_col)) do │ - local card_stack = {} │ - for k=j,#play_col do │ - table.insert(card_stack, play_col[k]) │ + title = "Choose piece colour", │ + player_choices = PLAYER_CHOICE_BTNS, │ + choice_id_to_player_id = function (btn_id) │ + return PLAYER_CHOICE_BTNS_MAP[btn_id] │ + end, │ + player_name_to_id = player_name_to_id, │ + player_id_to_nice_name = function (player_id) │ + local player_colour = wu.player_idx_to_colour_name(player_id) │ + return utils.make_first_char_uppercase(player_colour) │ + end, │ + get_msg = function () │ + local msg = "Black moves first." │ + --local other_player = wu_ctrl.get_other_player(ctrl_state) │ + if utils.table_len(player_name_to_id) == 0 then │ + msg = msg .. "\nThe other player has not yet chosen." │ + else │ + --msg = msg .. string.format("The other player has chosen %s", │ + -- wu.player_idx_to_colour_name(other_player)) │ + for player_name, player_id in pairs(player_name_to_id) do │ + local player_colour = wu.player_idx_to_colour_name(player_id) │ + msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ + end │ end │ - table.insert(src_cards, { │ - section_type = core.SECTION_PLAY_COLUMN_STAGING, │ - col = i, │ - idx = j, │ - cards = card_stack, │ - --card = play_col[j], -- TODO replace with card stack │ - }) │ - end │ - end │ - │ - for i=1,core.NUM_GOAL_STACKS do │ - local stack = state.goal_stacks[i] │ - if #stack > 0 then │ - table.insert(src_cards, { │ - section_type = core.SECTION_GOAL_STACKS, │ - col = i, │ - idx = #stack, │ - cards = {stack[#stack]}, │ - }) │ - end │ - end │ - │ - local deck = get_deck_pos_independent(state) │ - for i=1,#deck do │ - table.insert(src_cards, { │ - section_type = SECTION_DECK_POS_INDEPENDENT, │ - col = i, │ - cards = {deck[i]}, │ - }) │ - end │ - │ - -- return cards_set.card_list_to_set(src_cards) │ - return src_cards │ -end │ - │ -function solve.get_possib_dsts(state) │ - local dsts = {} │ - │ - for i=1,core.NUM_GOAL_STACKS do │ - table.insert(dsts, { │ - section_type = core.SECTION_GOAL_STACKS, │ - col = i │ - }) │ - end │ - │ - for i=1,core.NUM_PLAY_COLUMNS do │ - table.insert(dsts, { │ - section_type = core.SECTION_PLAY_COLUMN_STAGING, │ - col = i, │ - }) │ - end │ - │ - return dsts │ -end │ - │ -function is_useful_move(state, src_info, dst_info) │ - --assert(#src_info.cards > 0) │ - --print(cards.card_array_to_string(src_info.cards)) │ - if src_info.section_type == core.SECTION_GOAL_STACKS and │ - dst_info.section_type == core.SECTION_GOAL_STACKS then │ - return false │ - elseif dst_info.section_type == core.SECTION_GOAL_STACKS and │ - suit_idx_map[src_info.cards[1].suit] ~= dst_info.col then │ - return false │ - -- moving kings around empty columns is not useful │ - elseif src_info.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - dst_info.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - src_info.cards[1].val == cards.KING and │ - #state.play_columns_unrevealed[src_info.col] == 0 then │ - return false │ - end │ - if dst_info.section_type ~= core.SECTION_GOAL_STACKS then │ - --print("WARNING: SKIPPING DST NON GOAL STACKS MOVE FOR TESTING") │ - --return false │ - end │ - │ - return true │ -end │ - │ -function new_move_priority_queue(priorities) │ - local moves = {} │ - for i=1,priorities do │ - table.insert(moves, {}) │ - end │ - return moves │ -end │ - │ -function add_move(moves, priority, move_info) │ - table.insert(moves[priority], move_info) │ -end │ - │ - │ -function has_moves(moves) │ - for _, priority_list in ipairs(moves) do │ - if #priority_list > 0 then return true end │ - end │ - return false │ -end │ - │ -function moves_count(moves) │ - local count = 0 │ - for _, queue in ipairs(moves) do │ - count = count + #queue │ - end │ - return count │ -end │ - │ -function get_move_count_str(moves) │ - s = '{' │ - for i, queue in ipairs(moves) do │ - if i ~= 1 then s = s .. ', ' end │ - s = s .. string.format('%d', #queue) │ - end │ - return s .. '}' │ -end │ - │ -function get_move_priority(state, move) │ - if move.src.section_type == core.SECTION_GOAL_STACKS then │ - return PRI_MOVE_FROM_GOAL_STACK │ - elseif move.dst.section_type == core.SECTION_GOAL_STACKS then │ - return PRI_MOVE_TO_GOAL_STACK │ - │ - elseif move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - -- interestingly, changing this from #col == 1 to #col == #cards_held │ - -- results in the first few tests going from 250 ms to ~10 ms, │ - -- but test 4 goes up from 420 ms to 3480 s. │ - #state.play_columns_staging[move.src.col] == #move.src.cards then │ - -- #state.play_columns_staging[move.src.col] == 1 then │ - return PRI_MOVE_LAST_CARDS_IN_STAGING │ - elseif PRI_MOVE_KING_TO_EMPTY_COL ~= nil and │ - move.src.cards[1].val == cards.KING and │ - move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - move.dst.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - #state.play_columns_staging[move.dst.col] == 0 then │ - return PRI_MOVE_KING_TO_EMPTY_COL │ - elseif PRI_MOVE_FROM_DECK ~= nil and │ - move.src.section_type == SECTION_DECK_POS_INDEPENDENT then │ - return PRI_MOVE_FROM_DECK │ - elseif PRI_MOVE_AROUND_STAGING ~= nil and │ - move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - move.dst.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ - return PRI_MOVE_AROUND_STAGING │ - else │ - return PRI_NORMAL │ - end │ -end │ - │ -function pop_move(moves) │ - for _, queue in ipairs(moves) do │ - if #queue > 0 then │ - return table.remove(queue) │ - end │ - end │ - error("popped on empty queue", 2) │ -end │ - │ -function merge_moves(moves, new_moves) │ - for priority, queue in ipairs(new_moves) do │ - for _, move_info in ipairs(queue) do │ - table.insert(moves[priority], move_info) │ - end │ - end │ -end │ - │ + return msg │ + end, │ + handle_player_choice = function (player_name, player_id) │ + local choice_str = wu.player_idx_to_colour_name(player_id) │ + print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ + if player_name == two_player.LOCAL_PLAYER then │ + wu_ctrl.player_chosen(ctrl_state, player_id) │ + update_status_msg_turn(state, ctrl_state) │ + else │ + wu_ctrl.other_player_chosen(ctrl_state, player_id) │ │ -function solve.get_possib_moves(state, prev_state_id, state) │ - local moves = new_move_priority_queue(NUM_PRIORITIES) │ - -- print("deck: ", #state.deck_unrevealed, #state.deck_revealed, #get_deck_pos_independent(state)) │ - local srcs = solve.get_possib_src_cards(state) │ - local dsts = solve.get_possib_dsts(state) │ - --print(string.format("found %d possib srcs, %d possib dsts", #srcs, #dsts)) │ - for _, src_info in ipairs(srcs) do │ - for _, dst_info in ipairs(dsts) do │ - local useful_move = false │ - if core.can_place_card(state, src_info.cards, dst_info) and │ - is_useful_move(state, src_info, dst_info) then │ - --table.insert(moves, {src = src_info, dst = dst_info}) │ - local move = {src = src_info, dst = dst_info} │ - local priority = get_move_priority(state, move) │ - local move_info = { │ - prev_state_id = prev_state_id, │ - state = state, -- TODO remove this copy │ - move = move, │ - } │ - add_move(moves, priority, move_info) │ - useful_move = true │ end │ - --[[ │ - print(string.format("checking if src=%s card=%-13s can be moved to dst=%s: %s, %s", │ - section_type_to_string(src_info.section_type), │ - cards.card_to_string(src_info.card), │ - section_type_to_string(dst_info.section_type), │ - core.can_place_card(state, src_info.card, dst_info), │ - core.can_place_card(state, src_info.card, dst_info) and is_useful_move(state, src_info, dst_info))) │ - ]] │ - end │ - end │ - return moves │ -end │ - │ -local function make_move(state, move) │ - move = core.copy_move(move) │ - --core.print_state(state) │ - --print(string.format("attempting to move from %s to %s", pos_to_str(move.src), pos_to_str(move.dst))) │ - if move.src.section_type == SECTION_DECK_POS_INDEPENDENT then │ - while #state.deck_revealed ~= move.src.col do │ - core.handle_mouse_down(player, state, {section_type = core.SECTION_DECK_UNREVEALED }) │ - end │ - --print(cards.card_to_string(state.deck_revealed[#state.deck_revealed]), cards.card_to_string(move.src.card)) │ - assert(cards.cards_eq(state.deck_revealed[#state.deck_revealed], move.src.cards[1])) │ - move.src = {section_type = core.SECTION_DECK_REVEALED} │ - end │ - │ - core.handle_move(state, player, move) │ - │ - for i=1,core.NUM_PLAY_COLUMNS do │ - if #state.play_columns_staging[i] == 0 then │ - assert(#state.play_columns_unrevealed[i] == 0) │ - end │ - end │ -end │ - │ -local function get_cards_in_goals(state) │ - local count = 0 │ - for _, goal_stack in ipairs(state.goal_stacks) do │ - count = count + #goal_stack │ - end │ - return count │ -end │ - │ -local function get_hidden_cards(state) │ - local count = 0 │ - for _, hidden_stack in ipairs(state.play_columns_unrevealed) do │ - count = count + #hidden_stack │ - end │ - return count │ -end │ - │ - │ -function solve.new_solve_state(params) │ - local new_solve_state = { │ - params = params, │ - max_goal_cards = 0, │ - min_hidden_cards = nil, │ - best_cards_state = nil, │ - } │ - return new_solve_state │ -end │ - │ -function solve.is_solvable(state, solve_state) │ - if solve_state == nil then │ - solve_state = solve.new_solve_state() │ - end │ - solve_state.start_time = os.time() │ - local seen_states = {} │ - local moves_to_try = new_move_priority_queue(NUM_PRIORITIES) │ - │ - -- TODO I need to think about this. │ - -- * Keep track of the current state. │ - -- * for every possible move from the current state, try │ - -- making each move and see what happens to the state. │ - -- * Then recurse. But stop if you already encountered this state before. │ - -- Return true if all play_columns_unrevealed are empty │ - │ - -- So: │ - -- * store current state in a node, │ - -- * for each possible move, copy state, apply move, check hash. │ - -- * if hash is already in map, skip-- duplicate result. │ - -- * if hash is not in map, then create a new node and repeat │ - │ - local new_moves = solve.get_possib_moves(state, 0, state) │ - --print("new_moves init: ", has_moves(new_moves)) │ - merge_moves(moves_to_try, new_moves) │ - │ - solve_state.counter = 0 │ - solve_state.unique_states_counter = 0 │ - while has_moves(moves_to_try) do │ - --print(string.format("count=%d, unique_states=%d, moves_to_try=%d", counter, unique_states_counter, moves_count(moves_to_try))) │ - solve_state.counter = solve_state.counter + 1 │ - --local move_to_try = table.remove(moves_to_try) │ - local move_to_try = pop_move(moves_to_try) │ - --local move_to_try = table.remove(moves_to_try, 1) │ - local state2 = core.copy_state(move_to_try.state) │ - │ - make_move(state2, move_to_try.move) │ - │ - if core.play_cols_unrevealed_empty(state2) then │ - return true │ - end │ - │ - │ - local state2_hash = solve.state_to_hash(state2) │ - │ - │ - local is_duplicate_state │ - if seen_states[state2_hash] == nil then │ - solve_state.unique_states_counter = solve_state.unique_states_counter + 1 │ - seen_states[state2_hash] = solve_state.unique_states_counter │ - is_duplicate_state = false │ - else │ - is_duplicate_state = true │ - end │ - │ - local goal_cards = get_cards_in_goals(state2) │ - local hidden_cards = get_hidden_cards(state2) │ - --if goal_cards >= max_goal_cards then │ - if solve_state.min_hidden_cards == nil or hidden_cards <= solve_state.min_hidden_cards then │ - solve_state.max_goal_cards = goal_cards │ - solve_state.min_hidden_cards = hidden_cards │ - solve_state.best_cards_state = core.copy_state(state2) │ - end │ - │ - assert(#state.players[player].holding == 0) │ - local next_state_id = seen_states[state2_hash] │ - --print(string.format("%3d: %s", next_state_id, utils.binstr_to_hr_str(state2_hash))) │ - --print(string.format("%3d state ser: %s", next_state_id, utils.binstr_to_hr_str(solitaire_serialize.serialize_state(state2)))) │ - │ - │ - if true or not is_duplicate_state then │ - --print_move(move_to_try.prev_state_id, move_to_try.move, next_state_id, is_duplicate_state, get_cards_in_goals(state2)) │ - end │ + print(string.format("we are %q, other player is %q", │ + wu_ctrl.get_player(ctrl_state), wu_ctrl.get_other_player(ctrl_state))) │ + end, │ │ - if solve_state.params.update_period ~= nil and │ - solve_state.counter % solve_state.params.update_period == 0 then │ - if solve_state.params.id ~= nil then │ - print(solve_state.params.id) │ - end │ - print(string.format("counter %d, min_hidden_cards = %d, max_goal_cards = %d", solve_state.counter, solve_state.min_hidden_cards, solve_state.max_goal_cards)) │ - print(string.format("count=%d, unique_states=%d, moves_to_try=%s", solve_state.counter, solve_state.unique_states_counter, get_move_count_str(moves_to_try))) │ - core.print_state(solve_state.best_cards_state) │ - print(string.format("board_state_ser: %s", utils.binstr_to_hr_str(solitaire_serialize.serialize_board_state(state2)))) │ - collectgarbage("collect") │ - end │ + need_reselect = function () │ + local this_player = wu_ctrl.get_player(ctrl_state) │ + local other_player = wu_ctrl.get_other_player(ctrl_state) │ │ - local time_s = os.time() │ - if solve_state.params.timeout_s ~= nil and │ - time_s - solve_state.start_time >= solve_state.params.timeout_s then │ - error("solvable check timed out") │ - end │ + -- print(string.format("needs_reselect { this_player = %q, other_player = %q }", this_player, this_player == other_player)) │ + return this_player == nil or this_player == other_player │ + end, │ │ - if is_duplicate_state then │ - goto next_move │ + get_local_player_choice = function () │ + return wu_ctrl.get_player(ctrl_state) │ end │ - │ - local new_moves = solve.get_possib_moves(state, seen_states[state2_hash], state2) │ - merge_moves(moves_to_try, new_moves) │ - │ - │ - ::next_move:: │ - end │ - │ - return false │ -end │ - │ - │ -return solve │ -local core = {} │ - │ -local cards = require("libs/cards/cards") │ - │ -core.NUM_PLAY_COLUMNS = 7 │ -core.NUM_GOAL_STACKS = cards.NUM_SUITS │ - │ - │ -core.ACTION_MOVE = 1 │ -core.ACTION_DECK_NEXT = 2 │ - │ -core.SECTION_PLAY_COLUMN_UNREVEALED = 1 │ -core.SECTION_PLAY_COLUMN_STAGING = 2 │ -core.SECTION_DECK_UNREVEALED = 3 │ -core.SECTION_DECK_DRAW = 4 │ -core.SECTION_DECK_DISCARD = 5 │ -core.SECTION_GOAL_STACKS = 6 │ -core.SECTION_LAST = core.SECTION_GOAL_STACKS │ - │ -core.DRAW_TYPE_ONE = 1 │ -core.DRAW_TYPE_THREE = 3 │ - │ --- height and width of a square that the user is allowed to move │ --- their touch/mouse inside before their gesture is interpreted as │ --- moving, rather than just a single click. │ -local MAX_MOVE_FOR_CLICK = 2 │ - │ -function core.new_state_from_board_state(num_players, board_state) │ - local state = board_state │ - state.player_count = num_players │ - state.players = {} │ - │ - for i=1,num_players do │ - state.players[i] = { │ - y = 0, │ - x = 0, │ - │ - y_card_offset = 0, │ - x_card_offset = 0, │ - holding = {}, │ - holding_src = nil, │ - holding_src_col = nil, │ - │ - moved = false, │ - } │ - end │ - return state │ -end │ - │ -function core.new_board_state(draw_type, params) │ - local deck_unrevealed = cards.new_deck() │ - │ - local seed_x, seed_y │ - if params.seed_x and params.seed_y then │ - seed_x, seed_y = math.randomseed(params.seed_x, params.seed_y) │ - else │ - seed_x, seed_y = math.randomseed() │ - end │ - cards.shuffle(deck_unrevealed) │ - │ - local board_state = { │ - draw_type = draw_type, │ - deck_unrevealed = deck_unrevealed, │ - deck_discard = {}, │ - │ - -- Cards taken from the deck, shown to the user. │ - -- In draw one, this is only ever zero or one card. │ - -- In draw three, this can be zero to three cards. │ - -- The card at the end of the list is the one that is on "top" │ - -- and the user can try to move. │ - deck_draw = {}, │ - │ - play_columns_unrevealed = {}, │ - play_columns_staging = {}, │ - goal_stacks = {}, │ - players = {}, │ - │ - seed_x = seed_x, │ - seed_y = seed_y, │ } │ - │ - for i=1,core.NUM_GOAL_STACKS do │ - board_state.goal_stacks[i] = {} │ - end │ - │ - for i=1,core.NUM_PLAY_COLUMNS do │ - board_state.play_columns_unrevealed[i] = {} │ - board_state.play_columns_staging[i] = {} │ - for j=2,i do │ - local card = table.remove(board_state.deck_unrevealed) │ - table.insert(board_state.play_columns_unrevealed[i], card) │ - end │ - local card = table.remove(board_state.deck_unrevealed) │ - table.insert(board_state.play_columns_staging[i], card) │ - end │ - │ - board_state.move_count = 0 │ - board_state.time_elapsed = 0 │ - │ - return board_state │ -end │ - │ -function core.game_won(state) │ - if state == nil then return false end │ - │ - if #state.goal_stacks ~= core.NUM_GOAL_STACKS then │ - error(string.format("Expected num goal stacks (%d) to be equal to %d", #state.goal_stacks, core.NUM_GOAL_STACKS)) │ - end │ - │ - for _, goal_stack in ipairs(state.goal_stacks) do │ - if #goal_stack ~= cards.NUM_VALS then │ - return false │ - end │ - end │ - │ - return true │ -end │ - │ -function core.new_game(num_players, draw_type, params) │ - local board_state = core.new_board_state(draw_type, params) │ - return core.new_state_from_board_state(num_players, board_state) │ -end │ - │ -function core.print_state(state) │ - print('{') │ - for i=1,#state.goal_stacks do │ - print(string.format('goal_stack[%d] = %s,', i, cards.card_ary_to_string(state.goal_stacks[i]))) │ - end │ - print(string.format('deck_unrevealed = %s,', cards.card_ary_to_string(state.deck_unrevealed))) │ - print(string.format('deck_draw = %s,', cards.card_ary_to_string(state.deck_draw))) │ - print(string.format('deck_discard = %s,', cards.card_ary_to_string(state.deck_discard))) │ - for i=1,core.NUM_PLAY_COLUMNS do │ - print(string.format('play_unrevealed[%d] = %s,', i, cards.card_ary_to_string(state.play_columns_unrevealed[i]))) │ - print(string.format('play_revealed[%d] = %s,', i, cards.card_ary_to_string(state.play_columns_staging[i]))) │ - end │ - print('}') │ -end │ - │ -function core.copy_state(state_orig) │ - local state_copy = {} │ - state_copy.draw_type = state_orig.draw_type │ - state_copy.player_count = state_orig.player_count │ - state_copy.move_count = state_orig.move_count │ - state_copy.time_elapsed = state_orig.time_elapsed │ - state_copy.deck_unrevealed = cards.copy_card_ary(state_orig.deck_unrevealed) │ - state_copy.deck_draw = cards.copy_card_ary(state_orig.deck_draw) │ - state_copy.deck_discard = cards.copy_card_ary(state_orig.deck_discard) │ - state_copy.play_columns_unrevealed = cards.copy_card_ary_ary(state_orig.play_columns_unrevealed) │ - state_copy.play_columns_staging = cards.copy_card_ary_ary(state_orig.play_columns_staging) │ - state_copy.goal_stacks = cards.copy_card_ary_ary(state_orig.goal_stacks) │ - state_copy.players = {} │ - for i, player_state in ipairs(state_orig.players) do │ - state_copy.players[i] = {} │ - state_copy.players[i].y = player_state.y │ - state_copy.players[i].x = player_state.x │ - state_copy.players[i].holding = cards.copy_card_ary(player_state.holding) │ - state_copy.players[i].holding_src = player_state.holding_src │ - state_copy.players[i].holding_src_col = player_state.holding_src_col │ - state_copy.players[i].moved = moved │ - end │ - return state_copy │ -end │ - │ -function core.get_held_cards(state, player) │ - return state.players[player].holding │ + two_player.init(args) │ end │ │ --- pos_info = { │ --- section_type = core.SECTION_PLAY_*, │ --- col = int, │ --- } │ -function core.can_place_card(state, held_cards, pos_info) │ - if pos_info == nil then │ - return false │ - end │ - │ - local held_card_top = nil │ - if #held_cards == 0 then │ - return false │ - else │ - held_card_top = held_cards[1] │ - end │ - │ - if pos_info.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ - if #state.play_columns_staging[pos_info.col] > 0 then │ - local dst_card_top = state.play_columns_staging[pos_info.col][#state.play_columns_staging[pos_info.col]] │ - return (cards.suit_is_red(dst_card_top.suit) ~= cards.suit_is_red(held_card_top.suit) and │ - held_card_top.val == dst_card_top.val - 1) │ - else │ - return held_card_top.val == cards.KING │ - end │ - elseif pos_info.section_type == core.SECTION_GOAL_STACKS then │ - if #held_cards > 1 then │ - return false │ - end │ - if #state.goal_stacks[pos_info.col] == 0 then │ - return held_card_top.val == cards.ACE │ - else │ - local dst_card_top = state.goal_stacks[pos_info.col][#state.goal_stacks[pos_info.col]] │ - return (held_card_top.suit == dst_card_top.suit and held_card_top.val == dst_card_top.val + 1) │ - end │ +function handle_game_option_evt(option_id) │ + if option_id == OPTION_ID_NEW_GAME then │ + new_game() │ else │ - print("can_place_card: unhandled section_type", pos_info.section_type) │ - return false │ + error(string.format("Unhandled option_id %s", option_id)) │ end │ end │ │ -function core.handle_mousemove(state, player, pos_y, pos_x) │ - local player = state.players[player] │ - player.y = pos_y │ - player.x = pos_x │ │ - if player.y_start ~= nil and math.abs(player.y_start - pos_y) > MAX_MOVE_FOR_CLICK or │ - player.x_start ~= nil and math.abs(player.x_start - pos_x) > MAX_MOVE_FOR_CLICK then │ - player.moved = true │ - end │ +function get_state() │ + return wu.serialize_state(state) │ end │ │ -function core.get_card_ary(state, section_type, col) │ - -- TODO: change all references to this enum │ - if section_type == core.SECTION_DECK_DRAW then │ - return state.deck_draw │ - elseif section_type == core.SECTION_PLAY_COLUMN_STAGING then │ - return state.play_columns_staging[col] │ - elseif section_type == core.SECTION_GOAL_STACKS then │ - return state.goal_stacks[col] │ - else │ - error(string.format("get_card_ary section_type %s unexpected", section_type)) │ - end │ +function load_state_helper(session_id_arg, serialized_state) │ + session_id = session_id_arg │ + state = wu.deserialize_state(serialized_state) │ end │ │ -function core.next_in_deck(state) │ - -- This can be confusing: for most lists of cards, we always draw from the end. │ - -- For the case where the user clicks the deck, remove from end of deck_unrevealed, and insert at end of deck_draw │ - -- When moving cards from deck_draw to deck_discard, remove from beginning of deck_draw, but insert at end of deck_discard. │ - -- If the player runs out of deck_discard cards, draw from end of deck_discard. │ - if #state.deck_unrevealed > 0 then │ - while #state.deck_draw > 0 do │ - table.insert(state.deck_discard, table.remove(state.deck_draw, 1)) │ - end │ - for _=1,state.draw_type do │ - if #state.deck_unrevealed == 0 then │ - goto draw_from_deck -- continue │ - end │ - local card = table.remove(state.deck_unrevealed) │ - table.insert(state.deck_draw, card) │ - ::draw_from_deck:: │ - end │ - else │ - while #state.deck_draw > 0 do │ - table.insert(state.deck_discard, table.remove(state.deck_draw, 1)) │ - --table.insert(state.deck_discard, table.remove(state.deck_draw)) │ - end │ │ - while #state.deck_discard > 0 do │ - table.insert(state.deck_unrevealed, table.remove(state.deck_discard)) │ - end │ - end │ - core.inc_move_count(state) │ +function load_state_move_offset(move_offset) │ + local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_offset) │ + load_state_helper(session_id, serialized_state) │ + update() │ + send_state() │ end │ │ -function core.handle_mouse_down(player, state, pos_info) │ - local rc = false │ - if pos_info ~= nil then │ - state.players[player].y = pos_info.y │ - state.players[player].x = pos_info.x │ - state.players[player].y_start = pos_info.y │ - state.players[player].x_start = pos_info.x │ - end │ - │ - state.players[player].moved = false │ │ - if pos_info == nil then │ - -- pass │ - elseif pos_info.section_type == core.SECTION_DECK_UNREVEALED then │ - core.next_in_deck(state) │ - rc = true │ - elseif #state.players[player].holding == 0 then │ - if pos_info.section_type == core.SECTION_PLAY_COLUMN_UNREVEALED then │ - if #state.play_columns_staging[pos_info.col] == 0 and │ - #state.play_columns_unrevealed[pos_info.col] > 0 then │ - local card = table.remove(state.play_columns_unrevealed[pos_info.col]) │ - table.insert(state.play_columns_staging[pos_info.col], card) │ - end │ - elseif pos_info.section_type == core.SECTION_DECK_DRAW then │ - if #state.deck_draw > 0 then │ - local card = table.remove(state.deck_draw) │ - state.players[player].holding = {card} │ - state.players[player].holding_src = pos_info.section_type │ - print(string.format("player picked up cards %s", cards.card_ary_to_string(state.players[player].holding))) │ - end │ - elseif pos_info.section_type == core.SECTION_PLAY_COLUMN_STAGING then │ - local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ - if #stack > 0 then │ - state.players[player].holding = {} │ - while #stack >= pos_info.idx do │ - table.insert(state.players[player].holding, table.remove(stack, pos_info.idx)) │ - end │ - state.players[player].holding_src = pos_info.section_type │ - state.players[player].holding_src_col = pos_info.col │ - end │ - elseif pos_info.section_type == core.SECTION_GOAL_STACKS then │ - local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ - if #stack > 0 then │ - state.players[player].holding = {table.remove(stack)} │ - state.players[player].holding_src = pos_info.section_type │ - state.players[player].holding_src_col = pos_info.col │ - end │ +function lua_main() │ + while true do │ + print_board() │ + ::read_input:: │ + local user_input = get_user_input() │ + local rc = handle_user_string_input(user_input) │ + if rc ~= wu.SUCCESS then │ + print('Error: '.. wu.err_code_to_str(rc)) │ + goto read_input │ end │ end │ - │ - if pos_info ~= nil and pos_info.card_src_y ~= nil and pos_info.card_src_x ~= nil then │ - state.players[player].y_card_offset = pos_info.y - pos_info.card_src_y │ - state.players[player].x_card_offset = pos_info.x - pos_info.card_src_x │ - end │ - return rc │ -end │ - │ -local function restore_card(state, player) │ - local player_state = state.players[player] │ - local stack = core.get_card_ary(state, player_state.holding_src, player_state.holding_src_col) │ - while #player_state.holding > 0 do │ - local card = table.remove(player_state.holding, 1) │ - table.insert(stack, card) │ - end │ -end │ - │ -function core.move_held_cards_to_dst(state, player, pos_info) │ - local stack = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ - local player_state = state.players[player] │ - while #player_state.holding > 0 do │ - local card = table.remove(player_state.holding, 1) │ - table.insert(stack, card) │ - end │ -end │ - │ -function core.inc_move_count(state) │ - if state.move_count ~= nil then │ - state.move_count = state.move_count + 1 │ - end │ -end │ - │ -function core.update_time_elapsed(state, dt_ms) │ - if state == nil then return end │ - if state.time_elapsed == nil then │ - return │ - end │ - │ - if core.game_won(state) then │ - return │ - end │ - │ - if state.last_time_elapsed_update == nil then │ - state.last_time_elapsed_update = 0 │ - end │ - state.last_time_elapsed_update = state.last_time_elapsed_update + dt_ms │ - if state.last_time_elapsed_update >= 1000 then │ - state.last_time_elapsed_update = state.last_time_elapsed_update - 1000 │ - state.time_elapsed = state.time_elapsed + 1 │ - end │ end │ │ -function core.handle_mouse_up(player, state, pos_info) │ - local rc = false │ - local player_state = state.players[player] │ - if #player_state.holding == 0 then │ - --print("player not holding anything") │ - goto done │ - end │ - │ - if not player_state.moved then │ - --print("player not moved") │ - if pos_info == nil then │ - print("hitting this case") │ - restore_card(state, player) │ - goto done │ - end │ - │ - -- TODO clean this up... need to put the card back before we attempt an auto move. │ - local stack = core.get_card_ary(state, player_state.holding_src, player_state.holding_src_col) │ - while #player_state.holding > 0 do │ - local card = table.remove(player_state.holding, 1) │ - table.insert(stack, card) │ - end │ - player_state.holding = {} │ - player_state.holding_src = nil │ - │ - if pos_info.section_type == core.SECTION_PLAY_COLUMN_UNREVEALED then │ - pos_info.section_type = core.SECTION_PLAY_COLUMN_STAGING │ - end │ │ - -- print("trying to auto move card") │ - rc = core.auto_move_card(player, state, pos_info) │ - goto done │ - end │ +function start_game(session_id_arg, serialized_state) │ + local last_sess_id = alexgames.get_last_session_id() │ │ - if core.can_place_card(state, core.get_held_cards(state, player), pos_info) then │ - --print("can place card...") │ - core.move_held_cards_to_dst(state, player, pos_info) │ - if #state.deck_draw == 0 and #state.deck_discard > 0 then │ - local card = table.remove(state.deck_discard) │ - table.insert(state.deck_draw, card) │ - end │ - rc = true │ + if serialized_state ~= nil then │ + print("Loading state from URL param") │ + load_state_helper(session_id_arg, serialized_state) │ + elseif last_sess_id ~= nil then │ + print("Loading autosaved state") │ + serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ + load_state_helper(last_sess_id, serialized_state) │ else │ - --print("can not place card, restoring...") │ - restore_card(state, player) │ - end │ - player_state.holding = {} │ - player_state.holding_src = nil │ - │ - │ - ::done:: │ - │ - if rc then │ - core.inc_move_count(state) │ + print("Starting new game, no URL param or autosaved state found") │ + new_game() │ end │ - state.players[player].y_card_offset = 0 │ - state.players[player].x_card_offset = 0 │ - return rc │ - │ -end │ + two_player_init() │ + alexgames.send_message("all", "get_state:") │ │ -function core.copy_pos_info(pos_info) │ - local new_pos_info = { │ - section_type = pos_info.section_type, │ - col = pos_info.col, │ - idx = pos_info.idx, │ - cards = pos_info.cards, │ - } │ - return new_pos_info │ + alexgames.add_game_option(OPTION_ID_NEW_GAME, { type = alexgames.OPTION_TYPE_BTN, label = "New Game"}) │ end │ +local wu_ctrl = {} │ +-- This file should contain the state for things like deciding │ +-- if players have been chosen yet (whether the player choice UI should be shown), │ +-- and what player you are │ │ -function core.copy_move(move) │ - local new_move = { │ - src = core.copy_pos_info(move.src), │ - dst = core.copy_pos_info(move.dst), │ +function wu_ctrl.new_state() │ + return { │ + player_choice = nil, │ + other_player_choice = nil, │ } │ - return new_move │ -end │ - │ -function core.handle_move(state, player, move) │ - assert(#state.players[player].holding == 0) │ - core.handle_mouse_down(player, state, move.src) │ - assert(#state.players[player].holding >= 1) │ - │ - if move.src.cards ~= nil then │ - assert(cards.cards_eq(state.players[player].holding[1], move.src.cards[1])) │ - end │ - state.players[player].moved = true -- TODO CLEAN UP │ - local rc = core.handle_mouse_up(player, state, move.dst) │ - assert(#state.players[player].holding == 0) │ - │ - -- Click to reveal any cards that can now be revealed in the play columns │ - if move.src.section_type == core.SECTION_PLAY_COLUMN_STAGING and │ - #state.play_columns_staging[move.src.col] == 0 and │ - #state.play_columns_unrevealed[move.src.col] > 0 then │ - local new_src = { section_type = core.SECTION_PLAY_COLUMN_UNREVEALED, col = move.src.col } │ - core.handle_mouse_down(player, state, new_src ) │ - core.handle_mouse_up(player, state, new_src ) │ - assert(#state.players[player].holding == 0) │ - end │ - │ - return rc │ -end │ - │ -local function get_card_from_pos_info(state, pos_info) │ - local ary = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ - if #ary == 0 then │ - return nil │ - end │ - │ - return ary[#ary] │ -end │ - │ -local function find_auto_move_card_spot(state, pos_info) │ - local card = get_card_from_pos_info(state, pos_info) │ - │ - if card == nil then │ - return │ - end │ - │ - for i, stack in ipairs(state.goal_stacks) do │ - if card.val == cards.ACE then │ - if #stack == 0 then │ - return i │ - end │ - elseif #stack > 0 and stack[#stack].suit == card.suit then │ - if stack[#stack].val == card.val - 1 then │ - return i │ - else │ - return nil │ - end │ - end │ - end │ - return nil │ -end │ - │ -function core.auto_move_card(player, state, pos_info) │ - local rc = false │ - local idx = find_auto_move_card_spot(state, pos_info) │ - if idx ~= nil then │ - local card = table.remove(core.get_card_ary(state, pos_info.section_type, pos_info.col)) │ - table.insert(state.goal_stacks[idx], card) │ - rc = true │ - end │ - │ - -- If card moved was the last draw card, put one from the discard pile on the draw pile. │ - if pos_info.section_type == core.SECTION_DECK_DRAW and #state.deck_draw == 0 and #state.deck_discard > 0 then │ - local card = table.remove(state.deck_discard) │ - table.insert(state.deck_draw, card) │ - end │ - return rc │ -end │ - │ -function core.autocomplete_available(state) │ - return core.play_cols_unrevealed_empty(state) │ -end │ - │ -function core.play_cols_unrevealed_empty(state) │ - for i=1,core.NUM_PLAY_COLUMNS do │ - if #state.play_columns_unrevealed[i] > 0 then │ - return false │ - end │ - end │ - return true │ -end │ - │ -function core.get_autocomplete_move_list(state_orig) │ - -- TODO there is a bug here where it doesn't check the last card │ - -- if the deck only has one card in it? Something like that │ - -- I tried the autocomplete feature and it got all the way to the end, │ - -- but there was a single king left in the deck that it couldn't find │ - │ - -- TODO uncomment below │ - if false then │ - -- if not core.autocomplete_available(state_orig) then │ - print("autocomplete not available") │ - return │ - end │ - │ - local move_list = {} │ - │ - local state_copy = core.copy_state(state_orig) │ - │ - local changed = true │ - while changed do │ - ::play_columns_loop:: │ - changed = false │ - for i,_ in ipairs(state_copy.play_columns_staging) do │ - local src_pos_info = { │ - section_type = core.SECTION_PLAY_COLUMN_STAGING, │ - col = i, │ - } │ - local idx = find_auto_move_card_spot(state_copy, src_pos_info) │ - if idx ~= nil then │ - local dst_pos_info = { │ - section_type = core.SECTION_GOAL_STACKS, │ - col = idx, │ - } │ - table.insert(move_list, { move = core.ACTION_MOVE, src = src_pos_info, dst = dst_pos_info }) │ - local card = table.remove(core.get_card_ary(state_copy, src_pos_info.section_type, src_pos_info.col)) │ - table.insert(state_copy.goal_stacks[idx], card) │ - changed = true │ - end │ - end │ - if changed then │ - goto play_columns_loop │ - end │ - │ - │ - --local deck_size_start = #state_copy.deck_unrevealed + #state_copy.deck_draw + #state_copy.deck_discard │ - --local deck_pos_start = #state_copy.deck_discard │ - --local deck_pos_end = nil │ - --if deck_size_start > 0 then │ - -- deck_pos_end = (deck_pos_start - 1) % deck_size_start │ - --else │ - -- deck_pos_end = 0 │ - --end │ - local deck_pos_counter = 0 │ - local deck_pos_counter_end = math.ceil((#state_copy.deck_unrevealed + #state_copy.deck_draw + #state_copy.deck_discard)/state_copy.draw_type) │ - │ - while true do │ - ::next_deck:: │ - local src_pos_info = { │ - section_type = core.SECTION_DECK_DRAW, │ - col = 1, │ - } │ - local idx = find_auto_move_card_spot(state_copy, src_pos_info) │ - │ - if idx == nil then │ - deck_pos_counter = deck_pos_counter + 1 │ - -- TODO loop forever here to test error handling on OOM │ - if deck_pos_counter <= deck_pos_counter_end then │ - table.insert(move_list, { move = core.ACTION_DECK_NEXT }) │ - core.next_in_deck(state_copy) │ - goto next_deck │ - end │ - else │ - local dst_pos_info = { │ - section_type = core.SECTION_GOAL_STACKS, │ - col = idx, │ - } │ - table.insert(move_list, { move = core.ACTION_MOVE, src = src_pos_info, dst = dst_pos_info }) │ - local card = table.remove(core.get_card_ary(state_copy, src_pos_info.section_type, src_pos_info.col)) │ - table.insert(state_copy.goal_stacks[idx], card) │ - changed = true │ - goto play_columns_loop │ - end │ - break │ - end │ - end │ - return move_list │ -end │ - │ -function core.autocomplete(state, handle_move_list) │ - local move_list = core.get_autocomplete_move_list(state) │ - if #move_list > 0 then │ - print("autocomplete moves", #move_list) │ - handle_move_list(move_list) │ - else │ - print("can't autocomplete, no moves found") │ - end │ -end │ - │ -function core.remove_card_from_move(state, pos_info) │ - local ary = core.get_card_ary(state, pos_info.section_type, pos_info.col) │ - return table.remove(ary, #ary) │ -end │ - │ -return core │ -local serialize = {} │ - │ -local cards = require("libs/cards/cards") │ -local serialize_lib = require("libs/serialize/serialize") │ - │ -local core = require("games/solitaire/solitaire_core") │ - │ -serialize.VERSION = 2 │ - │ -function serialize.serialize_board_state(state) │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(state.draw_type) │ - output = output .. cards.serialize_card_array(state.deck_unrevealed) │ - output = output .. cards.serialize_card_array(state.deck_draw) │ - output = output .. cards.serialize_card_array(state.deck_discard) │ - for i=1,core.NUM_PLAY_COLUMNS do │ - output = output .. cards.serialize_card_array(state.play_columns_unrevealed[i]) │ - output = output .. cards.serialize_card_array(state.play_columns_staging[i]) │ - end │ - for i=1,core.NUM_GOAL_STACKS do │ - output = output .. cards.serialize_card_array(state.goal_stacks[i]) │ - end │ - │ - if state.move_count ~= nil then │ - output = output .. serialize_lib.serialize_16bit(state.move_count) │ - else │ - output = output .. serialize_lib.serialize_16bit(0) │ - end │ - │ - if state.time_elapsed ~= nil then │ - output = output .. serialize_lib.serialize_16bit(state.time_elapsed) │ - else │ - output = output .. serialize_lib.serialize_16bit(0) │ - end │ - return output │ -end │ - │ -function serialize.serialize_state(state) │ - if state == nil then │ - error("arg is nil", 2) │ - end │ - │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(serialize.VERSION) │ - output = output .. serialize_lib.serialize_byte(state.player_count) │ - output = output .. serialize.serialize_board_state(state) │ - │ - -- TODO I don't like the player state being serialized │ - for _, player_state in ipairs(state.players) do │ - output = output .. serialize_lib.serialize_16bit(player_state.y) │ - output = output .. serialize_lib.serialize_16bit(player_state.x) │ - output = output .. cards.serialize_card_array(player_state.holding) │ - output = output .. serialize_lib.serialize_16bit(player_state.holding_src) │ - output = output .. serialize_lib.serialize_16bit(player_state.holding_src_col) │ - end │ - output = output .. serialize_lib.serialize_u64(state.seed_x) │ - output = output .. serialize_lib.serialize_u64(state.seed_y) │ - return output │ -end │ - │ - │ -local function deserialize_board_state_internal(version, bytes, state) │ - state.draw_type = serialize_lib.deserialize_byte(bytes) │ - state.deck_unrevealed = cards.deserialize_card_array(bytes) │ - state.deck_draw = cards.deserialize_card_array(bytes) │ - state.deck_discard = cards.deserialize_card_array(bytes) state.play_columns_unrevealed = {} │ - state.play_columns_staging = {} │ - for i=1,core.NUM_PLAY_COLUMNS do │ - state.play_columns_unrevealed[i] = cards.deserialize_card_array(bytes) │ - state.play_columns_staging[i] = cards.deserialize_card_array(bytes) │ - end │ - state.goal_stacks = {} │ - for i=1,core.NUM_GOAL_STACKS do │ - state.goal_stacks[i] = cards.deserialize_card_array(bytes) │ - end │ - │ - print(string.format('Deserializing board state version %d', version)) │ - if version == 1 then │ - -- do nothing │ - elseif version == serialize.VERSION then │ - state.move_count = serialize_lib.deserialize_16bit(bytes) │ - state.time_elapsed = serialize_lib.deserialize_16bit(bytes) │ - else │ - error(string.format("Unhandled solitaire serialized state version " .. │ - "%d, expected <= %d", │ - version, │ - serialize.VERSION)) │ - end │ end │ │ -function serialize.deserialize_board_state(bytes) │ - local state = {} │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - deserialize_board_state_internal(version, bytes, state) │ - │ - if #bytes ~= 0 then │ - error(string.format("%d bytes remaining after deserializing", #bytes)) │ - end │ - │ - return state │ +function wu_ctrl.player_chosen(ctrl_state, player_idx) │ + print(string.format("Storing player choice of %q", player_idx)) │ + ctrl_state.player_choice = player_idx │ end │ │ -function serialize.deserialize_state(bytes) │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - local state = {} │ - local first_byte = serialize_lib.deserialize_byte(bytes) │ - local version │ - -- in the first version, I didn't have a byte for version. │ - -- But I did have a player count that was always 1 │ - if first_byte == 1 then │ - state.player_count = 1 │ - version = 1 │ - else │ - version = first_byte │ - if version ~= serialize.VERSION then │ - error(string.format("Received solitaire serialized state for " .. │ - "version %d, but can only handle <= %d", │ - version, serialize.VERSION)) │ - end │ - state.player_count = serialize_lib.deserialize_byte(bytes) │ - end │ - │ - deserialize_board_state_internal(version, bytes, state) │ - │ - state.players = {} │ - for i=1, state.player_count do │ - state.players[i] = {} │ - state.players[i].y = serialize_lib.deserialize_16bit(bytes) │ - state.players[i].x = serialize_lib.deserialize_16bit(bytes) │ - state.players[i].holding = cards.deserialize_card_array(bytes) │ - state.players[i].holding_src = serialize_lib.deserialize_16bit(bytes) │ - state.players[i].holding_src_col = serialize_lib.deserialize_16bit(bytes) │ - end │ - state.seed_x = serialize_lib.deserialize_u64(bytes) │ - state.seed_y = serialize_lib.deserialize_u64(bytes) │ - │ - if #bytes ~= 0 then │ - error(string.format("%d bytes remaining after deserializing", #bytes)) │ - end │ - │ - return state │ +function wu_ctrl.other_player_chosen(ctrl_state, player_idx) │ + print(string.format("Storing other player choice of %q", player_idx)) │ + ctrl_state.other_player_choice = player_idx │ end │ │ -return serialize │ -local serialize = {} │ - │ -local serialize_lib = require("libs/serialize/serialize") │ - │ -local core = require("games/crossword_letters/crossword_letters_core") │ - │ -function serialize.serialize_state(state) │ - if state == nil then return nil end │ - local output = "" │ - output = output .. serialize_lib.serialize_byte(#state.letters) │ - for _, letter in ipairs(state.letters) do │ - output = output .. serialize_lib.serialize_byte(string.byte(letter)) │ - end │ - output = output .. serialize_lib.serialize_byte(#state.finished_crossword.grid) │ - output = output .. serialize_lib.serialize_byte(#state.finished_crossword.grid[1]) │ - output = output .. serialize_lib.serialize_byte(state.finished_crossword.word_count) │ - for word, word_info in pairs(state.finished_crossword.words) do │ - output = output .. serialize_lib.serialize_byte(word_info.pos.y) │ - output = output .. serialize_lib.serialize_byte(word_info.pos.x) │ - output = output .. serialize_lib.serialize_byte(word_info.orientation) │ - output = output .. serialize_lib.serialize_string(word) │ - end │ - │ - output = output .. serialize_lib.serialize_string(state.hint_word) │ - │ - local found_word_count = 0 │ - for word, _ in pairs(state.found_words) do │ - found_word_count = found_word_count + 1 │ - end │ - │ - output = output .. serialize_lib.serialize_16bit(found_word_count) │ - for word, _ in pairs(state.found_words) do │ - output = output .. serialize_lib.serialize_string(word) │ - end │ - │ - output = output .. serialize_lib.serialize_16bit(#state.hint_letters) │ - for _, pos in ipairs(state.hint_letters) do │ - output = output .. serialize_lib.serialize_byte(pos.y) │ - output = output .. serialize_lib.serialize_byte(pos.x) │ - end │ - │ - output = output .. serialize_lib.serialize_16bit(state.puzzle_id) │ - │ - return output │ +function wu_ctrl.get_player(ctrl_state) │ + return ctrl_state.player_choice │ end │ │ -function serialize.deserialize_state(bytes) │ - if bytes == nil then return nil end │ - bytes = serialize_lib.bytestr_to_byteary(bytes) │ - │ - if #bytes == 0 then return nil end │ - │ - local state = {} │ - │ - state.letters = {} │ - local letter_count = serialize_lib.deserialize_byte(bytes) │ - for _=1,letter_count do │ - table.insert(state.letters, string.char(serialize_lib.deserialize_byte(bytes))) │ - end │ - │ - local grid_y_size = serialize_lib.deserialize_byte(bytes) │ - local grid_x_size = serialize_lib.deserialize_byte(bytes) │ - local word_count = serialize_lib.deserialize_byte(bytes) │ - │ - state.finished_crossword = core.generate_empty_crossword(grid_y_size, grid_x_size) │ - for _=1,word_count do │ - local word_info = { │ - pos = {} │ - } │ - word_info.pos.y = serialize_lib.deserialize_byte(bytes) │ - word_info.pos.x = serialize_lib.deserialize_byte(bytes) │ - word_info.orientation = serialize_lib.deserialize_byte(bytes) │ - word_info.word = serialize_lib.deserialize_string(bytes) │ - │ - core.add_word_to_crossword_modify(state.finished_crossword, word_info.pos, word_info.orientation, word_info.word) │ - end │ - │ - state.hint_word = serialize_lib.deserialize_string(bytes) │ - │ - local found_word_count = serialize_lib.deserialize_16bit(bytes) │ - state.found_words = {} │ - for _=1,found_word_count do │ - local found_word = serialize_lib.deserialize_string(bytes) │ - state.found_words[found_word] = true │ - end │ - │ - state.hint_letters = {} │ - local hint_count = serialize_lib.deserialize_16bit(bytes) │ - for _=1,hint_count do │ - local hint = { │ - y = serialize_lib.deserialize_byte(bytes), │ - x = serialize_lib.deserialize_byte(bytes), │ - } │ - table.insert(state.hint_letters, hint) │ - end │ - │ - -- TODO BEFORE PUBLISHING this should be a required field │ - if #bytes > 0 then │ - state.puzzle_id = serialize_lib.deserialize_16bit(bytes) │ - end │ - │ - if #bytes ~= 0 then │ - error(string.format("Found %d bytes remaining after deserialize, expected 0", #bytes)) │ - end │ - │ - return state │ +function wu_ctrl.get_other_player(ctrl_state) │ + return ctrl_state.other_player_choice │ end │ │ -return serialize │ -#!/usr/bin/env python │ -# │ -# This script loops through every single combination of English letters │ -# (including at least one vowel), seeing what words you can make from them. │ -# Despite optimizing it with some good-enough hacks, it still takes forever to run. │ -# I think I got halfway through the 8 letter combinations (and a ~100 GB shelve │ -# file) before deciding that it would be better to only loop through combinations │ -# of letters that actually make up an English word (see gen_crossword_letters2.py). │ - │ -import re │ -import string │ -import itertools │ -import collections │ -import sys │ - │ -import shelve │ -import sqlite3 │ - │ -min_letters = 3 │ -max_letters = 8 │ -min_word_len = 3 │ - │ -db_lookups = 0 │ -shelve_lookups = 0 │ - │ -def sql_regexp(pattern, item): │ - reg = re.compile(pattern) │ - return reg.search(item) is not None │ - │ - │ - │ - │ -def get_letter_counts_in_list(letter_list): │ - counts = {} │ - for letter in letter_list: │ - if letter not in counts: counts[letter] = 0 │ - counts[letter] += 1 │ - return counts │ - │ - │ -WordCombinationInfo = collections.namedtuple('WordCombinationInfo', field_names = ['word_count', 'total_score']) │ -def get_words_containing_only_letters(cur, min_freq, letters, score_only, letter_combo_scores_shelve=None, only_word_len=None, recursive=True): │ - global db_lookups │ - global shelve_lookups │ - │ - letters_shelve_key = ''.join(sorted(letters)) │ - #print("trying letters key %r, only_word_len=%r" % (letters_shelve_key, only_word_len)) │ - │ - if score_only: │ - if letter_combo_scores_shelve is not None: │ - try: │ - cached_value = letter_combo_scores_shelve[letters_shelve_key] │ - shelve_lookups += 1 │ - # print("found cached value %s" % repr(cached_value)) │ - word_count, total_score = cached_value │ - return WordCombinationInfo(word_count, total_score) │ - except KeyError: │ - # print("could not find cached value for key %r" % letters_shelve_key) │ - pass │ - │ - if recursive and not only_word_len: │ - word_count = 0 │ - total_score = 0 │ - for word_len in range(min_letters, len(letters)+1): │ - #print("recursive, trying word_len %d" % word_len) │ - for letters2 in itertools.combinations(letters, word_len): │ - #print("trying letters2 %s" % repr(letters2)) │ - info = get_words_containing_only_letters(cur, min_freq, letters2, score_only=score_only, │ - letter_combo_scores_shelve=letter_combo_scores_shelve, │ - only_word_len=word_len, │ - recursive=recursive) │ - #print("recvd info %s" % repr(info)) │ - word_count += info.word_count │ - if info.total_score: │ - total_score += info.total_score │ - │ - if letter_combo_scores_shelve is not None: │ - #print("storing key %r with value %r" % (letters_shelve_key, word_count)) │ - letter_combo_scores_shelve[letters_shelve_key] = (word_count, total_score) │ - return WordCombinationInfo(word_count, total_score) │ - │ - │ - │ - # pattern matching words that only contain `letters`, │ - # but may contain the same letter more than once │ - word_pattern = '^[' + ''.join(letters) + ']+$' │ - │ - letter_counts = get_letter_counts_in_list(letters) │ - │ - # Create a list of conditions that would invalidate this match: │ - # if it has any letter more than allowed. │ - # I'm not aware of any fancy way to do this with a single regex, │ - # e.g. "word matching any combination of this list of characters" │ - letter_count_conditions = [] │ - for letter in letter_counts: │ - excessive_letter_count = letter_counts[letter] + 1 │ - letter_count_conditions.append("'%" + "%".join([letter]*excessive_letter_count) + "%'") │ - letter_count_conditions = 'word NOT LIKE' + ('AND word NOT LIKE '.join(letter_count_conditions)) │ - │ - │ - if score_only: │ - query_params = 'COUNT(1), SUM(freq)' │ - else: │ - query_params = 'word, freq' │ - │ - if False and only_word_len: │ - #length_condition = 'LENGTH(word) = %d AND ' % only_word_len │ - length_condition = 'word_len = %d AND ' % only_word_len │ - else: │ - length_condition = '' │ - │ - query = ('SELECT {query_params} ' │ - 'FROM words{tbl_suffix} \n' │ - 'WHERE \n' │ - ' LENGTH(word) >= {min_word_len} AND \n' │ - ' {length_condition} \n' │ - ' freq >= {min_freq} AND \n' │ - #' length(word) >= 3 AND \n' │ - #' word_len >= 3 AND \n' │ - ' word REGEXP "{word_pattern}" AND \n' │ - ' {letter_count_conditions} \n' │ - 'ORDER BY \n' │ - ' LENGTH(word) DESC, \n' │ - ' freq DESC').format(min_word_len=min_word_len, │ - tbl_suffix= '%d' % only_word_len if only_word_len else '', │ - length_condition=length_condition, │ - query_params=query_params, │ - min_freq=min_freq, │ - word_pattern=word_pattern, │ - letter_count_conditions=letter_count_conditions) │ - │ - db_lookups += 1 │ - cur.execute(query) │ - #os.system("sqlite3 word_dict.db \"%s\"" % query) │ - │ - if score_only: │ - word_count, total_score = cur.fetchone() │ - if letter_combo_scores_shelve: │ - #print("for key %r, storing count=%d, score=%e" % (letters_shelve_key, word_count, total_score)) │ - letter_combo_scores_shelve[letters_shelve_key] = (word_count, total_score) │ - return WordCombinationInfo(word_count, total_score) │ - │ - else: │ - return cur.fetchall() │ - │ - #for item in cur.fetchall(): │ - # word, freq = item │ - # show_info = 'shown' if freq >= 3e-6 else 'NOT SHOWN' │ - # print('%9s , %e, %s' % (word, freq, show_info)) │ - │ - │ -con = sqlite3.connect(":memory:") │ -cur = con.cursor() │ -cur.execute("CREATE TABLE words (word, freq)") │ -for i in range(1,40): │ - cur.execute("CREATE TABLE words%d (word, freq)" % i) │ - │ -data_src_con = sqlite3.connect("word_dict.db") │ -data_src_cur = data_src_con.cursor() │ -rows = data_src_cur.execute("SELECT word, freq, LENGTH(word) from words") │ -for word, freq, word_length in rows: │ - cur.execute("INSERT INTO words%d VALUES (?, ?)" % word_length, (word, freq)) │ - cur.execute("INSERT INTO words VALUES (?, ?)", (word, freq)) │ - │ - │ - │ -con.create_function("REGEXP", 2, sql_regexp) │ - │ -LETTERS = string.ascii_lowercase │ -VOWELS = [ 'a', 'e', 'i', 'o', 'u' ] │ - │ -min_freq = 3e-6 │ -min_words = 3 │ - │ -LetterCombinationInfo = collections.namedtuple("LetterCombinationInfo", field_names=["letters", "info", "words", "found_on_iter"]) │ - │ -letter_combo_scores = shelve.open("letter_combo_scores.shelve") │ -print("open shelve %r" % letter_combo_scores ) │ - │ -def find_all_word_combos(): │ - good_combos_found = 0 │ - i = 0 │ - for letters_len in range(min_letters-1,max_letters-1+1): │ - good_combinations = [] │ - # TODO use "chain" and include the vowel in here... │ - for other_letter_combinations in itertools.combinations_with_replacement(LETTERS, letters_len): │ - for vowel in VOWELS: │ - letter_combinations = list(other_letter_combinations) + [vowel] │ - #print("trying letters %r" % letter_combinations) │ - info = get_words_containing_only_letters(cur, min_freq, letter_combinations, score_only=True, letter_combo_scores_shelve=letter_combo_scores) │ - i += 1 │ - #if i % 100 == 0: print(i, letter_combinations) │ - if info.word_count >= min_words: │ - │ - #words = get_words_containing_only_letters(cur, min_freq, letter_combinations, score_only=False) │ - #combination_info = LetterCombinationInfo(letter_combinations, info, words, i) │ - good_combinations.append((letter_combinations, info)) │ - #sys.stdout.write(' '.join([str(x) for x in [i, letter_combinations, info, words]]) + '\n') │ - #sys.stdout.flush() │ - good_combos_found += 1 │ - if good_combos_found % 1000 == 0: │ - sys.stdout.write(str(letter_combinations) + str(info)) │ - sys.stdout.write("\n") │ - sys.stdout.flush() │ - │ - print("##########################") │ - print("##########################") │ - print("### sorted info ") │ - print("##########################") │ - good_combinations = sorted(good_combinations, key=lambda x: (x[1].word_count, x[1].total_score), reverse=True) │ - print('len: %d' % len(good_combinations)) │ - for combination_info in good_combinations[:20]: │ - letters, info = combination_info │ - words = get_words_containing_only_letters(cur, min_freq, letters, score_only=False) │ - sys.stdout.write('%s: %s, %s\n' % (letters, info, words)) │ - sys.stdout.flush() │ - │ - print(i) │ - │ -try: │ - find_all_word_combos() │ -except: │ - letter_combo_scores.close() │ - print("\n\n") │ - print("db_lookups = %9d" % db_lookups) │ - print("shelve_lookups = %9d" % shelve_lookups) │ - raise │ - │ - │ -# get_words_containing_only_letters(cur, ["r", "m", "c", "i", "y", "e"]) │ - │ - │ - │ +return wu_ctrl │ #!/usr/bin/env python │ # │ # This script loops through each English word and finds other words that can be │ # made by rearranging all, or a subset of, its letters. │ # │ # It depends on `out/word_dict.db`, so run `src/dictionary/build_word_list_w_freq.py` │ # before running it. │ @@ -25388,14 +28378,658 @@ │ print("shelve_lookups = %9d" % shelve_lookups) │ raise │ │ │ │ │ │ +-- Author: Alex Barry (github.com/alexbarry) │ +local core = {} │ + │ + │ +local LANGUAGE = "en" │ + │ +core.VERTICAL = 1 │ +core.HORIZONTAL = 2 │ + │ +core.EMPTY = " " │ + │ +core.RC_SUCCESS = 0 │ +core.RC_NOT_IN_DICTIONARY = -1 │ +core.RC_NOT_IN_CROSSWORD = -2 │ +core.RC_WORD_ALREADY_FOUND = -3 │ +core.RC_LETTER_NOT_AVAILABLE = -4 │ + │ + │ +local ORIENTATIONS = { │ + core.VERTICAL, │ + core.HORIZONTAL, │ +} │ + │ +local ERR_MSGS = { │ + [core.RC_NOT_IN_DICTIONARY] = "Not in dictionary", │ + [core.RC_NOT_IN_CROSSWORD] = "Not in crossword", │ + [core.RC_WORD_ALREADY_FOUND] = "Word already found", │ + [core.RC_LETTER_NOT_AVAILABLE] = "Letter not available", │ +} │ + │ +local ALPHABET = {} │ +for i=0,25 do │ + table.insert(ALPHABET, string.char(string.byte('a') + i)) │ +end │ + │ +function core.rc_to_msg(rc) │ + return ERR_MSGS[rc] │ +end │ + │ +local g_get_words_func = nil │ + │ +function core.set_get_words_func(get_words_func) │ + g_get_words_func = get_words_func │ +end │ + │ +local function sqlite_query(query) │ + return g_get_words_func(query) │ +end │ + │ + │ +local function get_words_made_from_letters(letters, min_length, min_freq) │ + local letters_count = {} │ + for _, letter in ipairs(letters) do │ + if letters_count[letter] == nil then │ + letters_count[letter] = 0 │ + end │ + letters_count[letter] = letters_count[letter] + 1 │ + end │ + local query = "SELECT word FROM words WHERE\n" │ + query = query .. string.format(" LENGTH(word) <= %d \n", #letters) │ + query = query .. string.format(" AND LENGTH(word) >= %d \n", min_length) │ + query = query .. string.format(" AND freq >= %e \n", min_freq) │ + query = query .. string.format(" AND NOT words.is_vulgar_or_weird \n") │ + local first = true │ + for _, letter in pairs(ALPHABET) do │ + local count = 1 │ + if letters_count[letter] ~= nil then │ + count = letters_count[letter] + 1 │ + end │ + query = query .. " AND word NOT LIKE '%" │ + for _=1,count do │ + query = query .. letter .. "%" │ + end │ + query = query .. "'\n" │ + end │ + query = query .. "ORDER BY LENGTH(word) DESC, freq DESC \n" │ + query = query .. "LIMIT 20 \n" │ + │ + --print(query) │ + return sqlite_query(query) │ +end │ + │ +local function copy_list_except_idx(list, except_idx) │ + local new_list = {} │ + for idx, val in ipairs(list) do │ + if idx ~= except_idx then │ + table.insert(new_list, val) │ + end │ + end │ + return new_list │ +end │ + │ +function core.generate_empty_crossword(height, width) │ + local rows = {} │ + for y=1,height do │ + local row = {} │ + for x=1,width do │ + table.insert(row, core.EMPTY) │ + end │ + table.insert(rows, row) │ + end │ + local crossword = { │ + grid = rows, │ + │ + word_count = 0, │ + -- elements in words should be: { │ + -- word = "crane", │ + -- pos = { y = 1, x = 1}, │ + -- orientation = core.VERTICAL, │ + -- } │ + words = {}, │ + } │ + return crossword │ +end │ + │ +local function get_word_positions(word, start_pos, orientation) │ + if word == nil then error("word is nil", 2) end │ + if start_pos == nil then error("start_pos is nil", 2) end │ + if type(word) ~= "string" then error("word is not str", 2) end │ + local positions = {} │ + for i=1,#word do │ + local letter = word:sub(i,i) │ + local letter_pos = { y = start_pos.y, x = start_pos.x , letter = letter, idx = i } │ + if orientation == core.HORIZONTAL then │ + letter_pos.x = letter_pos.x + (i-1) │ + elseif orientation == core.VERTICAL then │ + letter_pos.y = letter_pos.y + (i-1) │ + else │ + error(string.format("Unexpected orientation %s", orientation), 2) │ + end │ + │ + table.insert(positions, letter_pos) │ + end │ + │ + return positions │ +end │ + │ +-- Only meant to be called by serialize functions. │ +-- Not meant to be called outside this file for any other purpose. │ +function core.add_word_to_crossword_modify(crossword, pos, orientation, word) │ + for _, p in ipairs(get_word_positions(word, pos, orientation)) do │ + crossword.grid[p.y][p.x] = p.letter │ + end │ + │ + crossword.word_count = crossword.word_count + 1 │ + crossword.words[word] = { │ + word = word, │ + pos = pos, │ + orientation = orientation, │ + } │ +end │ + │ +local function get_letters_revealed_for_word(state, word) │ + local crossword = core.get_filled_crossword_grid(state) │ + local word_info = state.finished_crossword.words[word] │ + local letters_revealed = 0 │ + for _, pos in ipairs(get_word_positions(word, word_info.pos, word_info.orientation)) do │ + if crossword[pos.y][pos.x] ~= "?" then │ + letters_revealed = letters_revealed + 1 │ + end │ + end │ + │ + return letters_revealed │ +end │ + │ +local function copy_crossword(crossword) │ + local new_crossword = core.generate_empty_crossword(#crossword.grid, #crossword.grid[1]) │ + │ + for _, word in pairs(crossword.words) do │ + core.add_word_to_crossword_modify(new_crossword, word.pos, word.orientation, word.word) │ + end │ + │ + return new_crossword │ +end │ + │ +local function add_word_to_crossword(crossword, pos, orientation, word) │ + local crossword = copy_crossword(crossword) │ + core.add_word_to_crossword_modify(crossword, pos, orientation, word) │ + return crossword │ +end │ + │ + │ +local function pos_in_range(crossword, pos) │ + return ((1 <= pos.y and pos.y <= #crossword.grid) and │ + (1 <= pos.x and pos.x <= #crossword.grid[1])) │ +end │ + │ +local function other_orientation(orientation) │ + if orientation == core.VERTICAL then return core.HORIZONTAL │ + elseif orientation == core.HORIZONTAL then return core.VERTICAL │ + else error(string.format("unexpected orientation %s", orientation), 2) end │ +end │ + │ +local function get_adjacent_positions(pos, orientation) │ + local adjacent_positions = {} │ + │ + if orientation == core.HORIZONTAL then │ + table.insert(adjacent_positions, { y = pos.y , x = pos.x + 1 }) │ + table.insert(adjacent_positions, { y = pos.y , x = pos.x - 1 }) │ + elseif orientation == core.VERTICAL then │ + table.insert(adjacent_positions, { y = pos.y + 1, x = pos.x }) │ + table.insert(adjacent_positions, { y = pos.y - 1, x = pos.x }) │ + end │ + return adjacent_positions │ +end │ + │ +function core.crossword_to_string(crossword) │ + if crossword == nil then │ + return "crossword is nil" │ + end │ + │ + local output = "" │ + output = output .. ("+") │ + for x=1,#crossword.grid[1] do │ + output = output .. ("-") │ + end │ + output = output .. ("+\n") │ + for y=1,#crossword.grid do │ + output = output .. ("|") │ + for x=1,#crossword.grid[1] do │ + local c = crossword.grid[y][x] │ + --if c == nil then │ + -- c = ' ' │ + --end │ + output = output .. (c) │ + end │ + output = output .. ("|\n") │ + end │ + output = output .. ("+") │ + for x=1,#crossword.grid[1] do │ + output = output .. ("-") │ + end │ + output = output .. ("+\n") │ + │ + return output │ +end │ + │ +function core.print_crossword(crossword) │ + print(core.crossword_to_string(crossword)) │ +end │ + │ +local function get_all_possible_positions(crossword) │ + local positions = {} │ + for y=1,#crossword.grid do │ + for x=1,#crossword.grid[1] do │ + for _, orientation in ipairs(ORIENTATIONS) do │ + table.insert(positions, {y=y, x=x, orientation=orientation}) │ + end │ + end │ + end │ + return positions │ +end │ + │ +local function get_edge_positions(word, pos, orientation) │ + local positions = {} │ + if orientation == core.VERTICAL then │ + table.insert(positions, { y = pos.y - 1 , x = pos.x }) │ + table.insert(positions, { y = pos.y + #word, x = pos.x }) │ + elseif orientation == core.HORIZONTAL then │ + table.insert(positions, { y = pos.y, x = pos.x - 1 }) │ + table.insert(positions, { y = pos.y, x = pos.x + #word }) │ + else │ + error(string.format("unexpected orientation %s", orientation), 2) │ + end │ + │ + return positions │ +end │ + │ +-- Checks if the word fits in the crossword at the specified pos and oritentation. │ +local function word_fits_in_crossword(crossword, word, pos, orientation, empty_ok) │ + │ + local edge_positions = get_edge_positions(word, pos, orientation) │ + for _, edge_pos in ipairs(edge_positions) do │ + if not pos_in_range(crossword, edge_pos) then │ + goto next_edge_pos │ + end │ + │ + if crossword.grid[edge_pos.y][edge_pos.x] ~= core.EMPTY then │ + return false │ + end │ + ::next_edge_pos:: │ + end │ + │ + local found_letter = false │ + local positions = get_word_positions(word, pos, orientation) │ + │ + │ + for _, pos in ipairs(positions) do │ + if not pos_in_range(crossword, pos) then │ + return false │ + end │ + │ + -- ensure destination cell is the same as what we're │ + -- placing over it, or that it's empty │ + if crossword.grid[pos.y][pos.x] ~= pos.letter and │ + crossword.grid[pos.y][pos.x] ~= core.EMPTY then │ + return false │ + end │ + │ + if crossword.grid[pos.y][pos.x] == pos.letter then │ + found_letter = true │ + else │ + -- If this cell isn't already occupied, then make sure that │ + -- it's not adjacent to any existing letters │ + for _, adjacent_pos in ipairs(get_adjacent_positions(pos, other_orientation(orientation))) do │ + if pos_in_range(crossword, adjacent_pos) and │ + crossword.grid[adjacent_pos.y][adjacent_pos.x] ~= core.EMPTY then │ + return false │ + end │ + end │ + end │ + │ + end │ + │ + │ + if empty_ok then │ + return true │ + else │ + return found_letter │ + end │ +end │ + │ +local function get_possible_positions(crossword, word, empty_ok) │ + local positions = {} │ + for y=1,#crossword.grid do │ + for x=1,#crossword.grid[1] do │ + for _, orientation in ipairs(ORIENTATIONS) do │ + local pos = { y = y, x = x } │ + if word_fits_in_crossword(crossword, word, pos, orientation, empty_ok) then │ + table.insert(positions, { pos = pos, orientation = orientation }) │ + end │ + end │ + end │ + end │ + return positions │ +end │ + │ +local function generate_crossword_from_words(words, crossword) │ + │ + -- instead of finding the best, find first │ + local FIND_FIRST = true │ + │ + --core.print_crossword(crossword) │ + local max_score = nil │ + local best_crossword = nil │ + local best_next_word = nil │ + local best_next_pos = nil │ + local best_next_orientation = nil │ + --print(string.format("generate_crossword from %d words...", #words)) │ + for word_idx, word in ipairs(words) do │ + local empty_ok = (crossword.word_count == 0) │ + if type(word) ~= "string" then error("word is not string") end │ + local positions = get_possible_positions(crossword, word, empty_ok) │ + --print(string.format("trying word: %-12s, positions %d", word, #positions)) │ + for _, pos in ipairs(positions) do │ + local crossword2 = add_word_to_crossword(crossword, pos.pos, pos.orientation, word) │ + │ + local words2 = copy_list_except_idx(words, word_idx) │ + │ + local finished_crossword │ + if #words2 == 0 then │ + finished_crossword = crossword2 │ + --core.print_crossword(crossword2) │ + --print("-------") │ + else │ + --print(string.format("Selected word \"%s\", generating crossword with %d other words", word, #words2)) │ + finished_crossword = generate_crossword_from_words(words2, crossword2) │ + end │ + --print(string.format("Successfully generated crossword")) │ + │ + if finished_crossword ~= nil and (max_score == nil or #finished_crossword.word_count >= max_score) then │ + max_score = finished_crossword.word_count │ + best_crossword = finished_crossword │ + best_next_word = word │ + best_next_pos = pos │ + best_next_orientation = orientation │ + end │ + │ + if FIND_FIRST and finished_crossword ~= nil then │ + return finished_crossword │ + end │ + end │ + end │ + │ + return best_crossword │ +end │ + │ + │ +function core.generate_crossword(words, height, width) │ + return generate_crossword_from_words(words, core.generate_empty_crossword(height, width)) │ +end │ + │ +local function take_first_x_vals(vals, x) │ + local new_vals = {} │ + for i=1,#vals do │ + if i > x then return new_vals end │ + table.insert(new_vals, vals[i]) │ + end │ + return new_vals │ +end │ + │ +function core.generate_crossword_from_letters(letters, params) │ + --print("called generate_crossword_from_letters") │ + │ + local words = get_words_made_from_letters(letters, params.min_word_len, params.min_word_freq) │ + --print(string.format("found %d words that can be made from letters", #words)) │ + │ + for _, word in ipairs(words) do │ + --print(word) │ + end │ + │ + if #words <= 4 then │ + local letters_str = "{" │ + local first = true │ + for _, letter in ipairs(letters) do │ + if not first then letters_str = letters_str .. ", " end │ + first = false │ + letters_str = letters_str .. letter │ + end │ + letters_str = letters_str .. "}" │ + error(string.format("Could not find at least 4 words made from letters: %s", letters_str)) │ + end │ + │ + local crossword = nil │ + --for i=4,#words do │ + if true then │ + i = #words │ + local words2 = take_first_x_vals(words, 18) │ + │ + --print(string.format("Generating crossword with first %d words...", #words2)) │ + crossword = core.generate_crossword(words2, params.crossword_height, params.crossword_width) │ + --print(i) │ + --core.print_crossword(crossword) │ + end │ + │ + return crossword │ + │ +end │ + │ +local function orientation_to_lua_str(orientation) │ + if orientation == core.HORIZONTAL then │ + return 'core.HORIZONTAL' │ + elseif orientation == core.VERTICAL then │ + return 'core.VERTICAL' │ + else │ + error(string.format("Unhandled orientation %s", orientation), 2) │ + end │ +end │ + │ +local function str_list_to_hr_str(str_list) │ + local output = "{" │ + local first = true │ + for _, str in ipairs(str_list) do │ + if not first then │ + output = output .. ", " │ + end │ + first = false │ + output = output .. string.format("%q", str) │ + end │ + output = output .. "}" │ + │ + return output │ +end │ + │ +-- Rather than run the computationally expensive act of crossword generation │ +-- on the user's browser/PC before they can play anything, this function is │ +-- used to convert the generated crossword into a string of Lua code │ +-- that can be hardcoded in with the game, to "preload" some pre-generated │ +-- puzzles. │ +function core.crossword_words_to_lua_code(letters, crossword) │ + local output = "{\n" │ + output = output .. string.format("\tletters = %s,\n", str_list_to_hr_str(letters)) │ + output = output .. "\tword_positions = {\n" │ + for _, word in pairs(crossword.words) do │ + output = output .. string.format("\t\t{ word = %-20s, pos = { y = %2d, x = %2d }, orientation = %-17s},\n", │ + string.format("%q", word.word), │ + word.pos.y, word.pos.x, │ + orientation_to_lua_str(word.orientation)) │ + end │ + output = output .. "\t},\n" │ + output = output .. "},\n" │ + return output │ +end │ + │ +--function core.new_game(letters, params) │ +--end │ + │ +function core.new_game_from_crossword(puzzle_id, crossword, letters) │ + local state = { │ + puzzle_id = puzzle_id, │ + letters = letters, │ + finished_crossword = crossword, │ + │ + finished = false, │ + │ + -- key is found word │ + found_words = {}, │ + │ + -- each hint is simply { y = y, x = x} │ + hint_letters = {}, │ + hint_word = nil, │ + } │ + return state │ +end │ + │ +local function crossword_from_word_list(word_positions, params) │ + local crossword = core.generate_empty_crossword(params.crossword_height, params.crossword_width) │ + for _, word in pairs(word_positions) do │ + core.add_word_to_crossword_modify(crossword, word.pos, word.orientation, word.word) │ + end │ + return crossword │ +end │ + │ + │ +function core.new_game_from_pregen_puzzle(puzzle_id, puzzle, params) │ + local crossword = crossword_from_word_list(puzzle.word_positions, params) │ + return core.new_game_from_crossword(puzzle_id, crossword, puzzle.letters, params) │ +end │ + │ +function core.get_filled_crossword_grid(state, show_all) │ + local filled_crossword_grid = core.generate_empty_crossword(#state.finished_crossword.grid, #state.finished_crossword.grid[1]).grid │ + for y=1,#filled_crossword_grid do │ + for x=1,#filled_crossword_grid[y] do │ + --print(string.format("crossword[%d][%d] = %q (%s, %s)", y, x, state.finished_crossword.grid[y][x], state.finished_crossword.grid[y][x] == core.EMPTY, core.EMPTY)) │ + filled_crossword_grid[y][x] = "" │ + if state.finished_crossword.grid[y][x] ~= core.EMPTY then │ + filled_crossword_grid[y][x] = "?" │ + end │ + end │ + end │ + --print(string.format("generated grid of height %d, width %d", #filled_crossword_grid, #filled_crossword_grid[1])) │ + if show_all then │ + for _, word_info in pairs(state.finished_crossword.words) do │ + -- TODO note that this actually solves the crossword in state. │ + -- this is bad. It should only show the words. │ + -- But I am lazy and taking a shortcut since this is just for testing for now. │ + --print(string.format("word is: %s", word_info.word)) │ + state.found_words[word_info.word] = true │ + end │ + end │ + for word, _ in pairs(state.found_words) do │ + local word_info = state.finished_crossword.words[word] │ + local cell_positions = get_word_positions(word_info.word, word_info.pos, word_info.orientation) │ + for _, pos in ipairs(cell_positions) do │ + --print(string.format("populating pos %d %d with letter %s", pos.y, pos.x, pos.letter)) │ + filled_crossword_grid[pos.y][pos.x] = pos.letter │ + end │ + end │ + │ + for _, hint in ipairs(state.hint_letters) do │ + -- they should be the same anyway... but it feels weird │ + -- to overwrite a cell with a hint, if the rest of the word │ + -- was already guessed correctly. │ + if filled_crossword_grid[hint.y][hint.x] == "?" then │ + filled_crossword_grid[hint.y][hint.x] = state.finished_crossword.grid[hint.y][hint.x] │ + end │ + end │ + return filled_crossword_grid │ +end │ + │ +local function is_game_finished(state) │ + for word, _ in pairs(state.finished_crossword.words) do │ + if not state.found_words[word] then │ + return false │ + end │ + end │ + return true │ +end │ + │ +function core.word_input(state, word) │ + word = string.lower(word) │ + if state.finished_crossword.words[word] == nil then │ + return core.RC_NOT_IN_CROSSWORD │ + end │ + if state.found_words[word] then │ + return core.RC_WORD_ALREADY_FOUND │ + end │ + │ + print("User found word %q", word) │ + state.found_words[word] = true │ + if is_game_finished(state) then │ + state.finished = true │ + end │ + return core.RC_SUCCESS │ +end │ + │ +function find_word_with_fewest_letters_revealed(state) │ + local min_letters_revealed = nil │ + local min_letters_word = nil │ + for word, word_info in pairs(state.finished_crossword.words) do │ + if state.found_words[word] ~= nil then │ + goto next_word │ + end │ + local letters_revealed = get_letters_revealed_for_word(state, word) │ + if letters_revealed ~= #word and │ + (min_letters_revealed == nil or │ + letters_revealed <= min_letters_revealed or │ + #min_letters_word < #word) then │ + min_letters_revealed = letters_revealed │ + min_letters_word = word │ + end │ + │ + ::next_word:: │ + end │ + │ + return min_letters_word │ +end │ + │ +function core.hint(state) │ + -- see if the word previously chosen for hints has now been fully revealed │ + if state.hint_word ~= nil then │ + local revealed = get_letters_revealed_for_word(state, state.hint_word) │ + print(string.format("existing hint word %q has %s letters revealed, len %s", state.hint_word, revealed, #state.hint_word)) │ + end │ + if state.hint_word ~= nil and │ + get_letters_revealed_for_word(state, state.hint_word) == #state.hint_word then │ + print(string.format("existing hint word %q has all %d letters revealed, finding new hint word", state.hint_word, #state.hint_word)) │ + state.hint_word = nil │ + end │ + │ + -- if we don't have a chosen hint word, choose one │ + if state.hint_word == nil then │ + state.hint_word = find_word_with_fewest_letters_revealed(state) │ + │ + if state.hint_word == nil then │ + print("Can't provide hint, all letters have been revealed!") │ + return │ + end │ + end │ + │ + local crossword = core.get_filled_crossword_grid(state) │ + print(string.format("Looking for word %q", state.hint_word)) │ + local word_info = state.finished_crossword.words[state.hint_word] │ + │ + for _, pos in ipairs(get_word_positions(state.hint_word, word_info.pos, word_info.orientation)) do │ + if crossword[pos.y][pos.x] == "?" then │ + table.insert(state.hint_letters, { y = pos.y, x = pos.x }) │ + return │ + end │ + end │ + │ +end │ + │ +return core │ local puzzles = {} │ │ local core = require("games/crossword_letters/crossword_letters_core") │ │ puzzles.puzzles = { │ │ --+------------+ │ @@ -27731,782 +31365,385 @@ │ { word = "dawn" , pos = { y = 12, x = 3 }, orientation = core.HORIZONTAL }, │ { word = "read" , pos = { y = 2, x = 7 }, orientation = core.VERTICAL }, │ { word = "warden" , pos = { y = 3, x = 3 }, orientation = core.HORIZONTAL }, │ { word = "warn" , pos = { y = 12, x = 8 }, orientation = core.HORIZONTAL }, │ { word = "nerd" , pos = { y = 7, x = 8 }, orientation = core.VERTICAL }, │ { word = "drawn" , pos = { y = 1, x = 4 }, orientation = core.VERTICAL }, │ { word = "dean" , pos = { y = 9, x = 11 }, orientation = core.VERTICAL }, │ - }, │ -}, │ - │ ---+------------+ │ ---|s s s | │ ---|often f ones| │ ---|f o o o n n | │ ---|t n tones t | │ ---|e e e t e | │ ---|n s s tone| │ ---| t o | │ ---| tens o t | │ ---| e nose | │ ---| toes o | │ ---| s f | │ ---| nest | │ ---+------------+ │ --- │ -{ │ - letters = {"s", "o", "f", "e", "n", "t"}, │ - word_positions = { │ - { word = "note" , pos = { y = 6, x = 11 }, orientation = core.VERTICAL }, │ - { word = "ones" , pos = { y = 2, x = 9 }, orientation = core.HORIZONTAL }, │ - { word = "tons" , pos = { y = 7, x = 8 }, orientation = core.VERTICAL }, │ - { word = "toes" , pos = { y = 10, x = 5 }, orientation = core.HORIZONTAL }, │ - { word = "often" , pos = { y = 2, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "nets" , pos = { y = 8, x = 5 }, orientation = core.VERTICAL }, │ - { word = "onset" , pos = { y = 2, x = 9 }, orientation = core.VERTICAL }, │ - { word = "fonts" , pos = { y = 2, x = 7 }, orientation = core.VERTICAL }, │ - { word = "tone" , pos = { y = 6, x = 9 }, orientation = core.HORIZONTAL }, │ - { word = "soften" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ - { word = "sent" , pos = { y = 1, x = 11 }, orientation = core.VERTICAL }, │ - { word = "tens" , pos = { y = 8, x = 3 }, orientation = core.HORIZONTAL }, │ - { word = "nose" , pos = { y = 9, x = 8 }, orientation = core.HORIZONTAL }, │ - { word = "tones" , pos = { y = 4, x = 5 }, orientation = core.HORIZONTAL }, │ - { word = "nest" , pos = { y = 12, x = 7 }, orientation = core.HORIZONTAL }, │ - { word = "soft" , pos = { y = 9, x = 10 }, orientation = core.VERTICAL }, │ - { word = "stone" , pos = { y = 1, x = 3 }, orientation = core.VERTICAL }, │ - { word = "notes" , pos = { y = 2, x = 5 }, orientation = core.VERTICAL }, │ - }, │ -}, │ - │ ---+------------+ │ ---|lines l | │ ---|e o o lose | │ ---|s i i i n | │ ---|i s lions s | │ ---|ones e l | │ ---|n o i i | │ ---| l lies e | │ ---|nose lion | │ ---| n e i | │ ---| e l | │ ---| ions | │ ---| | │ ---+------------+ │ --- │ -{ │ - letters = {"o", "i", "l", "e", "n", "s"}, │ - word_positions = { │ - { word = "ones" , pos = { y = 5, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "soil" , pos = { y = 1, x = 5 }, orientation = core.VERTICAL }, │ - { word = "noise" , pos = { y = 1, x = 3 }, orientation = core.VERTICAL }, │ - { word = "lone" , pos = { y = 7, x = 2 }, orientation = core.VERTICAL }, │ - { word = "lies" , pos = { y = 7, x = 4 }, orientation = core.HORIZONTAL }, │ - { word = "lien" , pos = { y = 5, x = 10 }, orientation = core.VERTICAL }, │ - { word = "lion" , pos = { y = 8, x = 7 }, orientation = core.HORIZONTAL }, │ - { word = "line" , pos = { y = 2, x = 8 }, orientation = core.VERTICAL }, │ - { word = "lions" , pos = { y = 4, x = 5 }, orientation = core.HORIZONTAL }, │ - { word = "ions" , pos = { y = 11, x = 6 }, orientation = core.HORIZONTAL }, │ - { word = "lose" , pos = { y = 2, x = 8 }, orientation = core.HORIZONTAL }, │ - { word = "isle" , pos = { y = 6, x = 7 }, orientation = core.VERTICAL }, │ - { word = "lesion" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ - { word = "lines" , pos = { y = 1, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "nose" , pos = { y = 8, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "lens" , pos = { y = 1, x = 11 }, orientation = core.VERTICAL }, │ - { word = "sole" , pos = { y = 5, x = 4 }, orientation = core.VERTICAL }, │ - { word = "oils" , pos = { y = 8, x = 9 }, orientation = core.VERTICAL }, │ - }, │ -}, │ - │ ---+------------+ │ ---|a plain | │ ---|l a p | │ ---|plane plan | │ ---|i e e i | │ ---|n alien n | │ ---|e a l | │ ---| p line | │ ---| lien a | │ ---| n a lane | │ ---|pale i e | │ ---| plea | │ ---| pile | │ ---+------------+ │ --- │ -{ │ - letters = {"p", "e", "l", "n", "i", "a"}, │ - word_positions = { │ - { word = "pile" , pos = { y = 12, x = 8 }, orientation = core.HORIZONTAL }, │ - { word = "plain" , pos = { y = 1, x = 4 }, orientation = core.HORIZONTAL }, │ - { word = "alpine" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ - { word = "nail" , pos = { y = 8, x = 6 }, orientation = core.VERTICAL }, │ - { word = "alien" , pos = { y = 5, x = 3 }, orientation = core.HORIZONTAL }, │ - { word = "pale" , pos = { y = 10, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "lien" , pos = { y = 8, x = 3 }, orientation = core.HORIZONTAL }, │ - { word = "pine" , pos = { y = 7, x = 4 }, orientation = core.VERTICAL }, │ - { word = "plea" , pos = { y = 11, x = 5 }, orientation = core.HORIZONTAL }, │ - { word = "leap" , pos = { y = 9, x = 8 }, orientation = core.VERTICAL }, │ - { word = "line" , pos = { y = 7, x = 7 }, orientation = core.HORIZONTAL }, │ - { word = "panel" , pos = { y = 1, x = 4 }, orientation = core.VERTICAL }, │ - { word = "penal" , pos = { y = 3, x = 7 }, orientation = core.VERTICAL }, │ - { word = "plan" , pos = { y = 3, x = 7 }, orientation = core.HORIZONTAL }, │ - { word = "plane" , pos = { y = 3, x = 1 }, orientation = core.HORIZONTAL }, │ - { word = "lean" , pos = { y = 6, x = 10 }, orientation = core.VERTICAL }, │ - { word = "lane" , pos = { y = 9, x = 8 }, orientation = core.HORIZONTAL }, │ - { word = "pain" , pos = { y = 2, x = 9 }, orientation = core.VERTICAL }, │ - }, │ -}, │ - │ -} │ - │ -return puzzles │ - │ --- Author: Alex Barry (github.com/alexbarry) │ -local core = {} │ - │ - │ -local LANGUAGE = "en" │ - │ -core.VERTICAL = 1 │ -core.HORIZONTAL = 2 │ - │ -core.EMPTY = " " │ - │ -core.RC_SUCCESS = 0 │ -core.RC_NOT_IN_DICTIONARY = -1 │ -core.RC_NOT_IN_CROSSWORD = -2 │ -core.RC_WORD_ALREADY_FOUND = -3 │ -core.RC_LETTER_NOT_AVAILABLE = -4 │ - │ - │ -local ORIENTATIONS = { │ - core.VERTICAL, │ - core.HORIZONTAL, │ -} │ - │ -local ERR_MSGS = { │ - [core.RC_NOT_IN_DICTIONARY] = "Not in dictionary", │ - [core.RC_NOT_IN_CROSSWORD] = "Not in crossword", │ - [core.RC_WORD_ALREADY_FOUND] = "Word already found", │ - [core.RC_LETTER_NOT_AVAILABLE] = "Letter not available", │ -} │ - │ -local ALPHABET = {} │ -for i=0,25 do │ - table.insert(ALPHABET, string.char(string.byte('a') + i)) │ -end │ - │ -function core.rc_to_msg(rc) │ - return ERR_MSGS[rc] │ -end │ - │ -local g_get_words_func = nil │ - │ -function core.set_get_words_func(get_words_func) │ - g_get_words_func = get_words_func │ -end │ - │ -local function sqlite_query(query) │ - return g_get_words_func(query) │ -end │ - │ - │ -local function get_words_made_from_letters(letters, min_length, min_freq) │ - local letters_count = {} │ - for _, letter in ipairs(letters) do │ - if letters_count[letter] == nil then │ - letters_count[letter] = 0 │ - end │ - letters_count[letter] = letters_count[letter] + 1 │ - end │ - local query = "SELECT word FROM words WHERE\n" │ - query = query .. string.format(" LENGTH(word) <= %d \n", #letters) │ - query = query .. string.format(" AND LENGTH(word) >= %d \n", min_length) │ - query = query .. string.format(" AND freq >= %e \n", min_freq) │ - query = query .. string.format(" AND NOT words.is_vulgar_or_weird \n") │ - local first = true │ - for _, letter in pairs(ALPHABET) do │ - local count = 1 │ - if letters_count[letter] ~= nil then │ - count = letters_count[letter] + 1 │ - end │ - query = query .. " AND word NOT LIKE '%" │ - for _=1,count do │ - query = query .. letter .. "%" │ - end │ - query = query .. "'\n" │ - end │ - query = query .. "ORDER BY LENGTH(word) DESC, freq DESC \n" │ - query = query .. "LIMIT 20 \n" │ - │ - --print(query) │ - return sqlite_query(query) │ -end │ - │ -local function copy_list_except_idx(list, except_idx) │ - local new_list = {} │ - for idx, val in ipairs(list) do │ - if idx ~= except_idx then │ - table.insert(new_list, val) │ - end │ - end │ - return new_list │ -end │ - │ -function core.generate_empty_crossword(height, width) │ - local rows = {} │ - for y=1,height do │ - local row = {} │ - for x=1,width do │ - table.insert(row, core.EMPTY) │ - end │ - table.insert(rows, row) │ - end │ - local crossword = { │ - grid = rows, │ - │ - word_count = 0, │ - -- elements in words should be: { │ - -- word = "crane", │ - -- pos = { y = 1, x = 1}, │ - -- orientation = core.VERTICAL, │ - -- } │ - words = {}, │ - } │ - return crossword │ -end │ - │ -local function get_word_positions(word, start_pos, orientation) │ - if word == nil then error("word is nil", 2) end │ - if start_pos == nil then error("start_pos is nil", 2) end │ - if type(word) ~= "string" then error("word is not str", 2) end │ - local positions = {} │ - for i=1,#word do │ - local letter = word:sub(i,i) │ - local letter_pos = { y = start_pos.y, x = start_pos.x , letter = letter, idx = i } │ - if orientation == core.HORIZONTAL then │ - letter_pos.x = letter_pos.x + (i-1) │ - elseif orientation == core.VERTICAL then │ - letter_pos.y = letter_pos.y + (i-1) │ - else │ - error(string.format("Unexpected orientation %s", orientation), 2) │ - end │ - │ - table.insert(positions, letter_pos) │ - end │ - │ - return positions │ -end │ - │ --- Only meant to be called by serialize functions. │ --- Not meant to be called outside this file for any other purpose. │ -function core.add_word_to_crossword_modify(crossword, pos, orientation, word) │ - for _, p in ipairs(get_word_positions(word, pos, orientation)) do │ - crossword.grid[p.y][p.x] = p.letter │ - end │ - │ - crossword.word_count = crossword.word_count + 1 │ - crossword.words[word] = { │ - word = word, │ - pos = pos, │ - orientation = orientation, │ - } │ -end │ - │ -local function get_letters_revealed_for_word(state, word) │ - local crossword = core.get_filled_crossword_grid(state) │ - local word_info = state.finished_crossword.words[word] │ - local letters_revealed = 0 │ - for _, pos in ipairs(get_word_positions(word, word_info.pos, word_info.orientation)) do │ - if crossword[pos.y][pos.x] ~= "?" then │ - letters_revealed = letters_revealed + 1 │ - end │ - end │ - │ - return letters_revealed │ -end │ - │ -local function copy_crossword(crossword) │ - local new_crossword = core.generate_empty_crossword(#crossword.grid, #crossword.grid[1]) │ - │ - for _, word in pairs(crossword.words) do │ - core.add_word_to_crossword_modify(new_crossword, word.pos, word.orientation, word.word) │ - end │ - │ - return new_crossword │ -end │ - │ -local function add_word_to_crossword(crossword, pos, orientation, word) │ - local crossword = copy_crossword(crossword) │ - core.add_word_to_crossword_modify(crossword, pos, orientation, word) │ - return crossword │ -end │ - │ - │ -local function pos_in_range(crossword, pos) │ - return ((1 <= pos.y and pos.y <= #crossword.grid) and │ - (1 <= pos.x and pos.x <= #crossword.grid[1])) │ -end │ - │ -local function other_orientation(orientation) │ - if orientation == core.VERTICAL then return core.HORIZONTAL │ - elseif orientation == core.HORIZONTAL then return core.VERTICAL │ - else error(string.format("unexpected orientation %s", orientation), 2) end │ -end │ - │ -local function get_adjacent_positions(pos, orientation) │ - local adjacent_positions = {} │ - │ - if orientation == core.HORIZONTAL then │ - table.insert(adjacent_positions, { y = pos.y , x = pos.x + 1 }) │ - table.insert(adjacent_positions, { y = pos.y , x = pos.x - 1 }) │ - elseif orientation == core.VERTICAL then │ - table.insert(adjacent_positions, { y = pos.y + 1, x = pos.x }) │ - table.insert(adjacent_positions, { y = pos.y - 1, x = pos.x }) │ - end │ - return adjacent_positions │ -end │ - │ -function core.crossword_to_string(crossword) │ - if crossword == nil then │ - return "crossword is nil" │ - end │ - │ - local output = "" │ - output = output .. ("+") │ - for x=1,#crossword.grid[1] do │ - output = output .. ("-") │ - end │ - output = output .. ("+\n") │ - for y=1,#crossword.grid do │ - output = output .. ("|") │ - for x=1,#crossword.grid[1] do │ - local c = crossword.grid[y][x] │ - --if c == nil then │ - -- c = ' ' │ - --end │ - output = output .. (c) │ - end │ - output = output .. ("|\n") │ - end │ - output = output .. ("+") │ - for x=1,#crossword.grid[1] do │ - output = output .. ("-") │ - end │ - output = output .. ("+\n") │ - │ - return output │ -end │ - │ -function core.print_crossword(crossword) │ - print(core.crossword_to_string(crossword)) │ -end │ - │ -local function get_all_possible_positions(crossword) │ - local positions = {} │ - for y=1,#crossword.grid do │ - for x=1,#crossword.grid[1] do │ - for _, orientation in ipairs(ORIENTATIONS) do │ - table.insert(positions, {y=y, x=x, orientation=orientation}) │ - end │ - end │ - end │ - return positions │ -end │ - │ -local function get_edge_positions(word, pos, orientation) │ - local positions = {} │ - if orientation == core.VERTICAL then │ - table.insert(positions, { y = pos.y - 1 , x = pos.x }) │ - table.insert(positions, { y = pos.y + #word, x = pos.x }) │ - elseif orientation == core.HORIZONTAL then │ - table.insert(positions, { y = pos.y, x = pos.x - 1 }) │ - table.insert(positions, { y = pos.y, x = pos.x + #word }) │ - else │ - error(string.format("unexpected orientation %s", orientation), 2) │ - end │ - │ - return positions │ -end │ - │ --- Checks if the word fits in the crossword at the specified pos and oritentation. │ -local function word_fits_in_crossword(crossword, word, pos, orientation, empty_ok) │ - │ - local edge_positions = get_edge_positions(word, pos, orientation) │ - for _, edge_pos in ipairs(edge_positions) do │ - if not pos_in_range(crossword, edge_pos) then │ - goto next_edge_pos │ - end │ - │ - if crossword.grid[edge_pos.y][edge_pos.x] ~= core.EMPTY then │ - return false │ - end │ - ::next_edge_pos:: │ - end │ - │ - local found_letter = false │ - local positions = get_word_positions(word, pos, orientation) │ - │ - │ - for _, pos in ipairs(positions) do │ - if not pos_in_range(crossword, pos) then │ - return false │ - end │ - │ - -- ensure destination cell is the same as what we're │ - -- placing over it, or that it's empty │ - if crossword.grid[pos.y][pos.x] ~= pos.letter and │ - crossword.grid[pos.y][pos.x] ~= core.EMPTY then │ - return false │ - end │ - │ - if crossword.grid[pos.y][pos.x] == pos.letter then │ - found_letter = true │ - else │ - -- If this cell isn't already occupied, then make sure that │ - -- it's not adjacent to any existing letters │ - for _, adjacent_pos in ipairs(get_adjacent_positions(pos, other_orientation(orientation))) do │ - if pos_in_range(crossword, adjacent_pos) and │ - crossword.grid[adjacent_pos.y][adjacent_pos.x] ~= core.EMPTY then │ - return false │ - end │ - end │ - end │ - │ - end │ - │ - │ - if empty_ok then │ - return true │ - else │ - return found_letter │ - end │ -end │ - │ -local function get_possible_positions(crossword, word, empty_ok) │ - local positions = {} │ - for y=1,#crossword.grid do │ - for x=1,#crossword.grid[1] do │ - for _, orientation in ipairs(ORIENTATIONS) do │ - local pos = { y = y, x = x } │ - if word_fits_in_crossword(crossword, word, pos, orientation, empty_ok) then │ - table.insert(positions, { pos = pos, orientation = orientation }) │ - end │ - end │ - end │ - end │ - return positions │ -end │ - │ -local function generate_crossword_from_words(words, crossword) │ - │ - -- instead of finding the best, find first │ - local FIND_FIRST = true │ - │ - --core.print_crossword(crossword) │ - local max_score = nil │ - local best_crossword = nil │ - local best_next_word = nil │ - local best_next_pos = nil │ - local best_next_orientation = nil │ - --print(string.format("generate_crossword from %d words...", #words)) │ - for word_idx, word in ipairs(words) do │ - local empty_ok = (crossword.word_count == 0) │ - if type(word) ~= "string" then error("word is not string") end │ - local positions = get_possible_positions(crossword, word, empty_ok) │ - --print(string.format("trying word: %-12s, positions %d", word, #positions)) │ - for _, pos in ipairs(positions) do │ - local crossword2 = add_word_to_crossword(crossword, pos.pos, pos.orientation, word) │ - │ - local words2 = copy_list_except_idx(words, word_idx) │ - │ - local finished_crossword │ - if #words2 == 0 then │ - finished_crossword = crossword2 │ - --core.print_crossword(crossword2) │ - --print("-------") │ - else │ - --print(string.format("Selected word \"%s\", generating crossword with %d other words", word, #words2)) │ - finished_crossword = generate_crossword_from_words(words2, crossword2) │ - end │ - --print(string.format("Successfully generated crossword")) │ - │ - if finished_crossword ~= nil and (max_score == nil or #finished_crossword.word_count >= max_score) then │ - max_score = finished_crossword.word_count │ - best_crossword = finished_crossword │ - best_next_word = word │ - best_next_pos = pos │ - best_next_orientation = orientation │ - end │ - │ - if FIND_FIRST and finished_crossword ~= nil then │ - return finished_crossword │ - end │ - end │ - end │ - │ - return best_crossword │ -end │ + }, │ +}, │ │ +--+------------+ │ +--|s s s | │ +--|often f ones| │ +--|f o o o n n | │ +--|t n tones t | │ +--|e e e t e | │ +--|n s s tone| │ +--| t o | │ +--| tens o t | │ +--| e nose | │ +--| toes o | │ +--| s f | │ +--| nest | │ +--+------------+ │ +-- │ +{ │ + letters = {"s", "o", "f", "e", "n", "t"}, │ + word_positions = { │ + { word = "note" , pos = { y = 6, x = 11 }, orientation = core.VERTICAL }, │ + { word = "ones" , pos = { y = 2, x = 9 }, orientation = core.HORIZONTAL }, │ + { word = "tons" , pos = { y = 7, x = 8 }, orientation = core.VERTICAL }, │ + { word = "toes" , pos = { y = 10, x = 5 }, orientation = core.HORIZONTAL }, │ + { word = "often" , pos = { y = 2, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "nets" , pos = { y = 8, x = 5 }, orientation = core.VERTICAL }, │ + { word = "onset" , pos = { y = 2, x = 9 }, orientation = core.VERTICAL }, │ + { word = "fonts" , pos = { y = 2, x = 7 }, orientation = core.VERTICAL }, │ + { word = "tone" , pos = { y = 6, x = 9 }, orientation = core.HORIZONTAL }, │ + { word = "soften" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ + { word = "sent" , pos = { y = 1, x = 11 }, orientation = core.VERTICAL }, │ + { word = "tens" , pos = { y = 8, x = 3 }, orientation = core.HORIZONTAL }, │ + { word = "nose" , pos = { y = 9, x = 8 }, orientation = core.HORIZONTAL }, │ + { word = "tones" , pos = { y = 4, x = 5 }, orientation = core.HORIZONTAL }, │ + { word = "nest" , pos = { y = 12, x = 7 }, orientation = core.HORIZONTAL }, │ + { word = "soft" , pos = { y = 9, x = 10 }, orientation = core.VERTICAL }, │ + { word = "stone" , pos = { y = 1, x = 3 }, orientation = core.VERTICAL }, │ + { word = "notes" , pos = { y = 2, x = 5 }, orientation = core.VERTICAL }, │ + }, │ +}, │ │ -function core.generate_crossword(words, height, width) │ - return generate_crossword_from_words(words, core.generate_empty_crossword(height, width)) │ -end │ +--+------------+ │ +--|lines l | │ +--|e o o lose | │ +--|s i i i n | │ +--|i s lions s | │ +--|ones e l | │ +--|n o i i | │ +--| l lies e | │ +--|nose lion | │ +--| n e i | │ +--| e l | │ +--| ions | │ +--| | │ +--+------------+ │ +-- │ +{ │ + letters = {"o", "i", "l", "e", "n", "s"}, │ + word_positions = { │ + { word = "ones" , pos = { y = 5, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "soil" , pos = { y = 1, x = 5 }, orientation = core.VERTICAL }, │ + { word = "noise" , pos = { y = 1, x = 3 }, orientation = core.VERTICAL }, │ + { word = "lone" , pos = { y = 7, x = 2 }, orientation = core.VERTICAL }, │ + { word = "lies" , pos = { y = 7, x = 4 }, orientation = core.HORIZONTAL }, │ + { word = "lien" , pos = { y = 5, x = 10 }, orientation = core.VERTICAL }, │ + { word = "lion" , pos = { y = 8, x = 7 }, orientation = core.HORIZONTAL }, │ + { word = "line" , pos = { y = 2, x = 8 }, orientation = core.VERTICAL }, │ + { word = "lions" , pos = { y = 4, x = 5 }, orientation = core.HORIZONTAL }, │ + { word = "ions" , pos = { y = 11, x = 6 }, orientation = core.HORIZONTAL }, │ + { word = "lose" , pos = { y = 2, x = 8 }, orientation = core.HORIZONTAL }, │ + { word = "isle" , pos = { y = 6, x = 7 }, orientation = core.VERTICAL }, │ + { word = "lesion" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ + { word = "lines" , pos = { y = 1, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "nose" , pos = { y = 8, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "lens" , pos = { y = 1, x = 11 }, orientation = core.VERTICAL }, │ + { word = "sole" , pos = { y = 5, x = 4 }, orientation = core.VERTICAL }, │ + { word = "oils" , pos = { y = 8, x = 9 }, orientation = core.VERTICAL }, │ + }, │ +}, │ │ -local function take_first_x_vals(vals, x) │ - local new_vals = {} │ - for i=1,#vals do │ - if i > x then return new_vals end │ - table.insert(new_vals, vals[i]) │ - end │ - return new_vals │ -end │ +--+------------+ │ +--|a plain | │ +--|l a p | │ +--|plane plan | │ +--|i e e i | │ +--|n alien n | │ +--|e a l | │ +--| p line | │ +--| lien a | │ +--| n a lane | │ +--|pale i e | │ +--| plea | │ +--| pile | │ +--+------------+ │ +-- │ +{ │ + letters = {"p", "e", "l", "n", "i", "a"}, │ + word_positions = { │ + { word = "pile" , pos = { y = 12, x = 8 }, orientation = core.HORIZONTAL }, │ + { word = "plain" , pos = { y = 1, x = 4 }, orientation = core.HORIZONTAL }, │ + { word = "alpine" , pos = { y = 1, x = 1 }, orientation = core.VERTICAL }, │ + { word = "nail" , pos = { y = 8, x = 6 }, orientation = core.VERTICAL }, │ + { word = "alien" , pos = { y = 5, x = 3 }, orientation = core.HORIZONTAL }, │ + { word = "pale" , pos = { y = 10, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "lien" , pos = { y = 8, x = 3 }, orientation = core.HORIZONTAL }, │ + { word = "pine" , pos = { y = 7, x = 4 }, orientation = core.VERTICAL }, │ + { word = "plea" , pos = { y = 11, x = 5 }, orientation = core.HORIZONTAL }, │ + { word = "leap" , pos = { y = 9, x = 8 }, orientation = core.VERTICAL }, │ + { word = "line" , pos = { y = 7, x = 7 }, orientation = core.HORIZONTAL }, │ + { word = "panel" , pos = { y = 1, x = 4 }, orientation = core.VERTICAL }, │ + { word = "penal" , pos = { y = 3, x = 7 }, orientation = core.VERTICAL }, │ + { word = "plan" , pos = { y = 3, x = 7 }, orientation = core.HORIZONTAL }, │ + { word = "plane" , pos = { y = 3, x = 1 }, orientation = core.HORIZONTAL }, │ + { word = "lean" , pos = { y = 6, x = 10 }, orientation = core.VERTICAL }, │ + { word = "lane" , pos = { y = 9, x = 8 }, orientation = core.HORIZONTAL }, │ + { word = "pain" , pos = { y = 2, x = 9 }, orientation = core.VERTICAL }, │ + }, │ +}, │ │ -function core.generate_crossword_from_letters(letters, params) │ - --print("called generate_crossword_from_letters") │ +} │ │ - local words = get_words_made_from_letters(letters, params.min_word_len, params.min_word_freq) │ - --print(string.format("found %d words that can be made from letters", #words)) │ +return puzzles │ │ - for _, word in ipairs(words) do │ - --print(word) │ - end │ +#!/usr/bin/env lua │ +-- Unlike most other Lua scripts in this repo, this script is meant to be run │ +-- on a PC with any Lua program, it doesn't rely on any alexgames APIs. │ +-- It reads the dictionary file as an sqlite3 database. │ +-- Note that this means you need to run `src/dictionary/build_word_list_w_freq.py` │ +-- before you can run this script. │ +-- │ +-- This script only prints to stdout. It outputs Lua code that defines │ +-- some `crossword_letter` puzzles, based on a hardcoded list of words/letters. │ +-- │ +-- To find useful sets of letters, run `gen_crossword_letters2.py`. │ │ - if #words <= 4 then │ - local letters_str = "{" │ - local first = true │ - for _, letter in ipairs(letters) do │ - if not first then letters_str = letters_str .. ", " end │ - first = false │ - letters_str = letters_str .. letter │ - end │ - letters_str = letters_str .. "}" │ - error(string.format("Could not find at least 4 words made from letters: %s", letters_str)) │ - end │ │ - local crossword = nil │ - --for i=4,#words do │ - if true then │ - i = #words │ - local words2 = take_first_x_vals(words, 18) │ - │ - --print(string.format("Generating crossword with first %d words...", #words2)) │ - crossword = core.generate_crossword(words2, params.crossword_height, params.crossword_width) │ - --print(i) │ - --core.print_crossword(crossword) │ - end │ +--local core = require("src/lua_scripts/games/crossword_letters/crossword_letters_core") │ +package.path = 'src/lua_scripts/?.lua' │ +local core = require("games/crossword_letters/crossword_letters_core") │ +local shuffle = require("libs/shuffle") │ │ - return crossword │ - │ -end │ │ -local function orientation_to_lua_str(orientation) │ - if orientation == core.HORIZONTAL then │ - return 'core.HORIZONTAL' │ - elseif orientation == core.VERTICAL then │ - return 'core.VERTICAL' │ - else │ - error(string.format("Unhandled orientation %s", orientation), 2) │ - end │ -end │ │ -local function str_list_to_hr_str(str_list) │ - local output = "{" │ - local first = true │ - for _, str in ipairs(str_list) do │ - if not first then │ - output = output .. ", " │ - end │ - first = false │ - output = output .. string.format("%q", str) │ +local function get_words(query) │ + local rows = {} │ + --print(string.format('Executing query %q', query)) │ + local handle = io.popen(string.format("sqlite3 out/word_dict.db %q", query)) │ + while true do │ + local result = handle:read("*l") │ + if not result then break end │ + --print(string.format("read result: %q", result)) │ + table.insert(rows, result) │ end │ - output = output .. "}" │ - │ - return output │ + handle:close() │ + return rows │ end │ │ --- Rather than run the computationally expensive act of crossword generation │ --- on the user's browser/PC before they can play anything, this function is │ --- used to convert the generated crossword into a string of Lua code │ --- that can be hardcoded in with the game, to "preload" some pre-generated │ --- puzzles. │ -function core.crossword_words_to_lua_code(letters, crossword) │ - local output = "{\n" │ - output = output .. string.format("\tletters = %s,\n", str_list_to_hr_str(letters)) │ - output = output .. "\tword_positions = {\n" │ - for _, word in pairs(crossword.words) do │ - output = output .. string.format("\t\t{ word = %-20s, pos = { y = %2d, x = %2d }, orientation = %-17s},\n", │ - string.format("%q", word.word), │ - word.pos.y, word.pos.x, │ - orientation_to_lua_str(word.orientation)) │ - end │ - output = output .. "\t},\n" │ - output = output .. "},\n" │ - return output │ -end │ +core.set_get_words_func(get_words) │ │ ---function core.new_game(letters, params) │ ---end │ +local params = { │ + min_word_len = 3, │ + min_word_freq = 1e-6, │ + crossword_height = 12, │ + crossword_width = 12, │ +} │ │ -function core.new_game_from_crossword(puzzle_id, crossword, letters) │ - local state = { │ - puzzle_id = puzzle_id, │ - letters = letters, │ - finished_crossword = crossword, │ +local letter_sets = { │ +--[[ │ + { "f", "a", "c", "e", "d", "t"}, │ + { "s", "c", "i", "e", "c", "n"}, │ + { "d", "e", "i", "s", "r", "e"}, │ + { "d", "o", "v", "e", "e", "t"}, │ + { "m", "a", "r", "v", "e", "l"}, │ + { "r", "s", "t", "e", "n", "e"}, │ + { "e", "s", "t", "l", "n", "a"}, │ +--]] │ │ - finished = false, │ - │ - -- key is found word │ - found_words = {}, │ │ - -- each hint is simply { y = y, x = x} │ - hint_letters = {}, │ - hint_word = nil, │ - } │ - return state │ -end │ +--[[ │ + "plates", │ + "easter", │ + "raised", │ + "paints", │ + "traces", │ + "master", │ + "median", │ + "hearts", │ + "ladies", │ + "scrape", │ + "faster", │ + "gamers", │ + "stable", │ + "browse", │ + "sought", │ +--]] │ │ -local function crossword_from_word_list(word_positions, params) │ - local crossword = core.generate_empty_crossword(params.crossword_height, params.crossword_width) │ - for _, word in pairs(word_positions) do │ - core.add_word_to_crossword_modify(crossword, word.pos, word.orientation, word.word) │ - end │ - return crossword │ -end │ +--[[ │ + "soothe", │ + "hustle", │ + "hunted", │ + "yogurt", │ + "outcry", │ + "fronts", │ + "rights", │ + "forget", │ + "births", │ + "snitch", │ + "outing", │ + "bylaws", │ + "covent", │ + "hernia", │ + "beware", │ + "amount", │ + "warren", │ + "renown", │ + "relish", │ + "shiver", │ + "freaky", │ + "retake", │ + "budget", │ + "submit", │ + "sphere", │ + "beaver", │ + "thorns", │ + "reaper", │ + "barker", │ + "banish", │ + "tubing", │ +--]] │ │ +-- TODO uncomment this one, I found these words on 2023-11-27 │ +-- they make up a lot of 5 letter words (20, I think). │ +-- but the lua generate puzzle program was taking forever. │ +-- I suspect that it would be a lot better if I just limit the │ +-- number of words used when there are so many 5 letter words. They might not │ +-- all fit. │ +-- Perhaps the Lua algorithm should simply return the best puzzle it can within a few minutes or │ +-- so many iterations, though. │ +--[[ │ + "pastel", │ + "alerts", │ + "earths", │ + "lasted", │ + "merits", │ + "master", │ + "metals", │ + "metals", │ + "traced", │ + "easter", │ + "insert", │ + "stable", │ + "arches", │ + "stared", │ + "pacers", │ + "faster", │ + "waters", │ + "steals", │ + "shared", │ +--]] │ │ -function core.new_game_from_pregen_puzzle(puzzle_id, puzzle, params) │ - local crossword = crossword_from_word_list(puzzle.word_positions, params) │ - return core.new_game_from_crossword(puzzle_id, crossword, puzzle.letters, params) │ -end │ + "others", │ + "morale", │ + "father", │ + "herald", │ + "metric", │ + "backer", │ + "voters", │ + --"halted", │ + "chapel", │ + "farmed", │ + "skates", │ + "purest", │ + "flared", │ + --"delays", │ + "finder", │ + "loaned", │ + "braids", │ + "course", │ + "chalet", │ + "scaled", │ + "curate", │ + "scored", │ + "hordes", │ + "corset", │ + "angled", │ + "fiesta", │ + "malice", │ + "tigers", │ + "banker", │ + "banter", │ + "brides", │ + "saturn", │ + "unites", │ + "slider", │ + "ponies", │ + "hassle", │ + "washer", │ + "graves", │ + "ratios", │ + "reigns", │ + "daring", │ + "grants", │ + "spores", │ + "hermit", │ + "almost", │ + "modest", │ + "floats", │ + "harmed", │ + "biased", │ + "greasy", │ │ -function core.get_filled_crossword_grid(state, show_all) │ - local filled_crossword_grid = core.generate_empty_crossword(#state.finished_crossword.grid, #state.finished_crossword.grid[1]).grid │ - for y=1,#filled_crossword_grid do │ - for x=1,#filled_crossword_grid[y] do │ - --print(string.format("crossword[%d][%d] = %q (%s, %s)", y, x, state.finished_crossword.grid[y][x], state.finished_crossword.grid[y][x] == core.EMPTY, core.EMPTY)) │ - filled_crossword_grid[y][x] = "" │ - if state.finished_crossword.grid[y][x] ~= core.EMPTY then │ - filled_crossword_grid[y][x] = "?" │ - end │ - end │ - end │ - --print(string.format("generated grid of height %d, width %d", #filled_crossword_grid, #filled_crossword_grid[1])) │ - if show_all then │ - for _, word_info in pairs(state.finished_crossword.words) do │ - -- TODO note that this actually solves the crossword in state. │ - -- this is bad. It should only show the words. │ - -- But I am lazy and taking a shortcut since this is just for testing for now. │ - --print(string.format("word is: %s", word_info.word)) │ - state.found_words[word_info.word] = true │ - end │ - end │ - for word, _ in pairs(state.found_words) do │ - local word_info = state.finished_crossword.words[word] │ - local cell_positions = get_word_positions(word_info.word, word_info.pos, word_info.orientation) │ - for _, pos in ipairs(cell_positions) do │ - --print(string.format("populating pos %d %d with letter %s", pos.y, pos.x, pos.letter)) │ - filled_crossword_grid[pos.y][pos.x] = pos.letter │ - end │ - end │ +-- Added on 2023-12-23 │ + --"slogan", │ + "makers", │ + "permit", │ + "blamed", │ + "parcel", │ + "dancer", │ + "finder", │ + "linear", │ + "course", │ + "dental", │ + "rained", │ + --"meters", │ + "bailed", │ + "wander", │ + "soften", │ + "lesion", │ + "alpine", │ +} │ │ - for _, hint in ipairs(state.hint_letters) do │ - -- they should be the same anyway... but it feels weird │ - -- to overwrite a cell with a hint, if the rest of the word │ - -- was already guessed correctly. │ - if filled_crossword_grid[hint.y][hint.x] == "?" then │ - filled_crossword_grid[hint.y][hint.x] = state.finished_crossword.grid[hint.y][hint.x] │ - end │ +local function string_to_char_list(str) │ + local char_list = {} │ + for i=1,#str do │ + local c = str:sub(i,i) │ + table.insert(char_list, c) │ end │ - return filled_crossword_grid │ + return char_list │ end │ │ -local function is_game_finished(state) │ - for word, _ in pairs(state.finished_crossword.words) do │ - if not state.found_words[word] then │ - return false │ - end │ - end │ - return true │ -end │ +local header = [[ │ +local puzzles = {} │ │ -function core.word_input(state, word) │ - word = string.lower(word) │ - if state.finished_crossword.words[word] == nil then │ - return core.RC_NOT_IN_CROSSWORD │ - end │ - if state.found_words[word] then │ - return core.RC_WORD_ALREADY_FOUND │ - end │ +local core = require("games/crossword_letters/crossword_letters_core") │ │ - print("User found word %q", word) │ - state.found_words[word] = true │ - if is_game_finished(state) then │ - state.finished = true │ - end │ - return core.RC_SUCCESS │ -end │ +puzzles.puzzles = { │ +]] │ │ -function find_word_with_fewest_letters_revealed(state) │ - local min_letters_revealed = nil │ - local min_letters_word = nil │ - for word, word_info in pairs(state.finished_crossword.words) do │ - if state.found_words[word] ~= nil then │ - goto next_word │ - end │ - local letters_revealed = get_letters_revealed_for_word(state, word) │ - if letters_revealed ~= #word and │ - (min_letters_revealed == nil or │ - letters_revealed <= min_letters_revealed or │ - #min_letters_word < #word) then │ - min_letters_revealed = letters_revealed │ - min_letters_word = word │ - end │ +print(header) │ │ - ::next_word:: │ - end │ +for _, letter_set in ipairs(letter_sets) do │ + letter_set = string_to_char_list(letter_set) │ + shuffle.shuffle(letter_set) │ + local crossword = core.generate_crossword_from_letters(letter_set, params) │ │ - return min_letters_word │ + local crossword_str = core.crossword_to_string(crossword) │ + crossword_str = "--" .. crossword_str:gsub("\n", "\n--") │ + print(crossword_str) │ + local output = core.crossword_words_to_lua_code(letter_set, crossword) │ + print(output) │ end │ │ -function core.hint(state) │ - -- see if the word previously chosen for hints has now been fully revealed │ - if state.hint_word ~= nil then │ - local revealed = get_letters_revealed_for_word(state, state.hint_word) │ - print(string.format("existing hint word %q has %s letters revealed, len %s", state.hint_word, revealed, #state.hint_word)) │ - end │ - if state.hint_word ~= nil and │ - get_letters_revealed_for_word(state, state.hint_word) == #state.hint_word then │ - print(string.format("existing hint word %q has all %d letters revealed, finding new hint word", state.hint_word, #state.hint_word)) │ - state.hint_word = nil │ - end │ - │ - -- if we don't have a chosen hint word, choose one │ - if state.hint_word == nil then │ - state.hint_word = find_word_with_fewest_letters_revealed(state) │ - │ - if state.hint_word == nil then │ - print("Can't provide hint, all letters have been revealed!") │ - return │ - end │ - end │ - │ - local crossword = core.get_filled_crossword_grid(state) │ - print(string.format("Looking for word %q", state.hint_word)) │ - local word_info = state.finished_crossword.words[state.hint_word] │ │ - for _, pos in ipairs(get_word_positions(state.hint_word, word_info.pos, word_info.orientation)) do │ - if crossword[pos.y][pos.x] == "?" then │ - table.insert(state.hint_letters, { y = pos.y, x = pos.x }) │ - return │ - end │ - end │ +local footer = [[ │ +} │ │ -end │ +return puzzles │ +]] │ │ -return core │ +print(footer) │ -- Crossword letters │ -- Author: Alex Barry (github.com/alexbarry) │ -- │ -- TODO: │ -- * user still needs to enter words that were revealed completely by hints... │ -- should automatically add word to "found words" if it was revealed with hints. │ -- Make sure to check for the win condition in that case, too. │ @@ -28787,324 +32024,374 @@ │ else │ error(string.format("Unhandled action ID %s", action)) │ end │ draw.draw_state(state.ui_state, state.game_state) │ update_saved_state() │ end │ #!/usr/bin/env python │ +# │ +# This script loops through every single combination of English letters │ +# (including at least one vowel), seeing what words you can make from them. │ +# Despite optimizing it with some good-enough hacks, it still takes forever to run. │ +# I think I got halfway through the 8 letter combinations (and a ~100 GB shelve │ +# file) before deciding that it would be better to only loop through combinations │ +# of letters that actually make up an English word (see gen_crossword_letters2.py). │ + │ +import re │ +import string │ +import itertools │ +import collections │ import sys │ │ +import shelve │ +import sqlite3 │ │ -fname1 = sys.argv[1] │ -fname2 = sys.argv[2] │ +min_letters = 3 │ +max_letters = 8 │ +min_word_len = 3 │ │ -words1 = set() │ -with open(fname1, 'r') as f: │ - for line in f: │ - word = line.strip() │ - words1.add(word) │ +db_lookups = 0 │ +shelve_lookups = 0 │ │ -print('Words in %s that are not present in %s:' % (fname2, fname1)) │ -with open(fname2, 'r') as f: │ - for line in f: │ - word = line.strip() │ - if word not in words1: │ - print(word) │ -#!/usr/bin/env lua │ --- Unlike most other Lua scripts in this repo, this script is meant to be run │ --- on a PC with any Lua program, it doesn't rely on any alexgames APIs. │ --- It reads the dictionary file as an sqlite3 database. │ --- Note that this means you need to run `src/dictionary/build_word_list_w_freq.py` │ --- before you can run this script. │ --- │ --- This script only prints to stdout. It outputs Lua code that defines │ --- some `crossword_letter` puzzles, based on a hardcoded list of words/letters. │ --- │ --- To find useful sets of letters, run `gen_crossword_letters2.py`. │ +def sql_regexp(pattern, item): │ + reg = re.compile(pattern) │ + return reg.search(item) is not None │ │ │ ---local core = require("src/lua_scripts/games/crossword_letters/crossword_letters_core") │ -package.path = 'src/lua_scripts/?.lua' │ -local core = require("games/crossword_letters/crossword_letters_core") │ -local shuffle = require("libs/shuffle") │ │ │ +def get_letter_counts_in_list(letter_list): │ + counts = {} │ + for letter in letter_list: │ + if letter not in counts: counts[letter] = 0 │ + counts[letter] += 1 │ + return counts │ │ -local function get_words(query) │ - local rows = {} │ - --print(string.format('Executing query %q', query)) │ - local handle = io.popen(string.format("sqlite3 out/word_dict.db %q", query)) │ - while true do │ - local result = handle:read("*l") │ - if not result then break end │ - --print(string.format("read result: %q", result)) │ - table.insert(rows, result) │ - end │ - handle:close() │ - return rows │ -end │ │ -core.set_get_words_func(get_words) │ +WordCombinationInfo = collections.namedtuple('WordCombinationInfo', field_names = ['word_count', 'total_score']) │ +def get_words_containing_only_letters(cur, min_freq, letters, score_only, letter_combo_scores_shelve=None, only_word_len=None, recursive=True): │ + global db_lookups │ + global shelve_lookups │ │ -local params = { │ - min_word_len = 3, │ - min_word_freq = 1e-6, │ - crossword_height = 12, │ - crossword_width = 12, │ -} │ + letters_shelve_key = ''.join(sorted(letters)) │ + #print("trying letters key %r, only_word_len=%r" % (letters_shelve_key, only_word_len)) │ │ -local letter_sets = { │ ---[[ │ - { "f", "a", "c", "e", "d", "t"}, │ - { "s", "c", "i", "e", "c", "n"}, │ - { "d", "e", "i", "s", "r", "e"}, │ - { "d", "o", "v", "e", "e", "t"}, │ - { "m", "a", "r", "v", "e", "l"}, │ - { "r", "s", "t", "e", "n", "e"}, │ - { "e", "s", "t", "l", "n", "a"}, │ ---]] │ + if score_only: │ + if letter_combo_scores_shelve is not None: │ + try: │ + cached_value = letter_combo_scores_shelve[letters_shelve_key] │ + shelve_lookups += 1 │ + # print("found cached value %s" % repr(cached_value)) │ + word_count, total_score = cached_value │ + return WordCombinationInfo(word_count, total_score) │ + except KeyError: │ + # print("could not find cached value for key %r" % letters_shelve_key) │ + pass │ + │ + if recursive and not only_word_len: │ + word_count = 0 │ + total_score = 0 │ + for word_len in range(min_letters, len(letters)+1): │ + #print("recursive, trying word_len %d" % word_len) │ + for letters2 in itertools.combinations(letters, word_len): │ + #print("trying letters2 %s" % repr(letters2)) │ + info = get_words_containing_only_letters(cur, min_freq, letters2, score_only=score_only, │ + letter_combo_scores_shelve=letter_combo_scores_shelve, │ + only_word_len=word_len, │ + recursive=recursive) │ + #print("recvd info %s" % repr(info)) │ + word_count += info.word_count │ + if info.total_score: │ + total_score += info.total_score │ │ + if letter_combo_scores_shelve is not None: │ + #print("storing key %r with value %r" % (letters_shelve_key, word_count)) │ + letter_combo_scores_shelve[letters_shelve_key] = (word_count, total_score) │ + return WordCombinationInfo(word_count, total_score) │ + │ + │ │ ---[[ │ - "plates", │ - "easter", │ - "raised", │ - "paints", │ - "traces", │ - "master", │ - "median", │ - "hearts", │ - "ladies", │ - "scrape", │ - "faster", │ - "gamers", │ - "stable", │ - "browse", │ - "sought", │ ---]] │ + # pattern matching words that only contain `letters`, │ + # but may contain the same letter more than once │ + word_pattern = '^[' + ''.join(letters) + ']+$' │ │ ---[[ │ - "soothe", │ - "hustle", │ - "hunted", │ - "yogurt", │ - "outcry", │ - "fronts", │ - "rights", │ - "forget", │ - "births", │ - "snitch", │ - "outing", │ - "bylaws", │ - "covent", │ - "hernia", │ - "beware", │ - "amount", │ - "warren", │ - "renown", │ - "relish", │ - "shiver", │ - "freaky", │ - "retake", │ - "budget", │ - "submit", │ - "sphere", │ - "beaver", │ - "thorns", │ - "reaper", │ - "barker", │ - "banish", │ - "tubing", │ ---]] │ + letter_counts = get_letter_counts_in_list(letters) │ │ --- TODO uncomment this one, I found these words on 2023-11-27 │ --- they make up a lot of 5 letter words (20, I think). │ --- but the lua generate puzzle program was taking forever. │ --- I suspect that it would be a lot better if I just limit the │ --- number of words used when there are so many 5 letter words. They might not │ --- all fit. │ --- Perhaps the Lua algorithm should simply return the best puzzle it can within a few minutes or │ --- so many iterations, though. │ ---[[ │ - "pastel", │ - "alerts", │ - "earths", │ - "lasted", │ - "merits", │ - "master", │ - "metals", │ - "metals", │ - "traced", │ - "easter", │ - "insert", │ - "stable", │ - "arches", │ - "stared", │ - "pacers", │ - "faster", │ - "waters", │ - "steals", │ - "shared", │ ---]] │ + # Create a list of conditions that would invalidate this match: │ + # if it has any letter more than allowed. │ + # I'm not aware of any fancy way to do this with a single regex, │ + # e.g. "word matching any combination of this list of characters" │ + letter_count_conditions = [] │ + for letter in letter_counts: │ + excessive_letter_count = letter_counts[letter] + 1 │ + letter_count_conditions.append("'%" + "%".join([letter]*excessive_letter_count) + "%'") │ + letter_count_conditions = 'word NOT LIKE' + ('AND word NOT LIKE '.join(letter_count_conditions)) │ + │ │ - "others", │ - "morale", │ - "father", │ - "herald", │ - "metric", │ - "backer", │ - "voters", │ - --"halted", │ - "chapel", │ - "farmed", │ - "skates", │ - "purest", │ - "flared", │ - --"delays", │ - "finder", │ - "loaned", │ - "braids", │ - "course", │ - "chalet", │ - "scaled", │ - "curate", │ - "scored", │ - "hordes", │ - "corset", │ - "angled", │ - "fiesta", │ - "malice", │ - "tigers", │ - "banker", │ - "banter", │ - "brides", │ - "saturn", │ - "unites", │ - "slider", │ - "ponies", │ - "hassle", │ - "washer", │ - "graves", │ - "ratios", │ - "reigns", │ - "daring", │ - "grants", │ - "spores", │ - "hermit", │ - "almost", │ - "modest", │ - "floats", │ - "harmed", │ - "biased", │ - "greasy", │ + if score_only: │ + query_params = 'COUNT(1), SUM(freq)' │ + else: │ + query_params = 'word, freq' │ │ --- Added on 2023-12-23 │ - --"slogan", │ - "makers", │ - "permit", │ - "blamed", │ - "parcel", │ - "dancer", │ - "finder", │ - "linear", │ - "course", │ - "dental", │ - "rained", │ - --"meters", │ - "bailed", │ - "wander", │ - "soften", │ - "lesion", │ - "alpine", │ -} │ + if False and only_word_len: │ + #length_condition = 'LENGTH(word) = %d AND ' % only_word_len │ + length_condition = 'word_len = %d AND ' % only_word_len │ + else: │ + length_condition = '' │ │ -local function string_to_char_list(str) │ - local char_list = {} │ - for i=1,#str do │ - local c = str:sub(i,i) │ - table.insert(char_list, c) │ - end │ - return char_list │ -end │ + query = ('SELECT {query_params} ' │ + 'FROM words{tbl_suffix} \n' │ + 'WHERE \n' │ + ' LENGTH(word) >= {min_word_len} AND \n' │ + ' {length_condition} \n' │ + ' freq >= {min_freq} AND \n' │ + #' length(word) >= 3 AND \n' │ + #' word_len >= 3 AND \n' │ + ' word REGEXP "{word_pattern}" AND \n' │ + ' {letter_count_conditions} \n' │ + 'ORDER BY \n' │ + ' LENGTH(word) DESC, \n' │ + ' freq DESC').format(min_word_len=min_word_len, │ + tbl_suffix= '%d' % only_word_len if only_word_len else '', │ + length_condition=length_condition, │ + query_params=query_params, │ + min_freq=min_freq, │ + word_pattern=word_pattern, │ + letter_count_conditions=letter_count_conditions) │ │ -local header = [[ │ -local puzzles = {} │ + db_lookups += 1 │ + cur.execute(query) │ + #os.system("sqlite3 word_dict.db \"%s\"" % query) │ │ -local core = require("games/crossword_letters/crossword_letters_core") │ + if score_only: │ + word_count, total_score = cur.fetchone() │ + if letter_combo_scores_shelve: │ + #print("for key %r, storing count=%d, score=%e" % (letters_shelve_key, word_count, total_score)) │ + letter_combo_scores_shelve[letters_shelve_key] = (word_count, total_score) │ + return WordCombinationInfo(word_count, total_score) │ │ -puzzles.puzzles = { │ -]] │ + else: │ + return cur.fetchall() │ + │ + #for item in cur.fetchall(): │ + # word, freq = item │ + # show_info = 'shown' if freq >= 3e-6 else 'NOT SHOWN' │ + # print('%9s , %e, %s' % (word, freq, show_info)) │ │ -print(header) │ │ -for _, letter_set in ipairs(letter_sets) do │ - letter_set = string_to_char_list(letter_set) │ - shuffle.shuffle(letter_set) │ - local crossword = core.generate_crossword_from_letters(letter_set, params) │ +con = sqlite3.connect(":memory:") │ +cur = con.cursor() │ +cur.execute("CREATE TABLE words (word, freq)") │ +for i in range(1,40): │ + cur.execute("CREATE TABLE words%d (word, freq)" % i) │ │ - local crossword_str = core.crossword_to_string(crossword) │ - crossword_str = "--" .. crossword_str:gsub("\n", "\n--") │ - print(crossword_str) │ - local output = core.crossword_words_to_lua_code(letter_set, crossword) │ - print(output) │ -end │ +data_src_con = sqlite3.connect("word_dict.db") │ +data_src_cur = data_src_con.cursor() │ +rows = data_src_cur.execute("SELECT word, freq, LENGTH(word) from words") │ +for word, freq, word_length in rows: │ + cur.execute("INSERT INTO words%d VALUES (?, ?)" % word_length, (word, freq)) │ + cur.execute("INSERT INTO words VALUES (?, ?)", (word, freq)) │ + │ │ │ -local footer = [[ │ -} │ +con.create_function("REGEXP", 2, sql_regexp) │ │ -return puzzles │ -]] │ +LETTERS = string.ascii_lowercase │ +VOWELS = [ 'a', 'e', 'i', 'o', 'u' ] │ │ -print(footer) │ -#!/usr/bin/env lua │ -package.path = 'src/lua_scripts/?.lua' │ +min_freq = 3e-6 │ +min_words = 3 │ │ -local puzzles = require("games/crossword_letters/crossword_letters_puzzles") │ +LetterCombinationInfo = collections.namedtuple("LetterCombinationInfo", field_names=["letters", "info", "words", "found_on_iter"]) │ │ -local words_list = {} │ -local words_count = {} │ +letter_combo_scores = shelve.open("letter_combo_scores.shelve") │ +print("open shelve %r" % letter_combo_scores ) │ │ -for _, puzzle in ipairs(puzzles.puzzles) do │ - for _, word_pos_info in ipairs(puzzle.word_positions) do │ - local word = word_pos_info.word │ - if not words_count[word] then │ - table.insert(words_list, word) │ - words_count[word] = 1 │ - else │ - words_count[word] = words_count[word] + 1 │ - end │ +def find_all_word_combos(): │ + good_combos_found = 0 │ + i = 0 │ + for letters_len in range(min_letters-1,max_letters-1+1): │ + good_combinations = [] │ + # TODO use "chain" and include the vowel in here... │ + for other_letter_combinations in itertools.combinations_with_replacement(LETTERS, letters_len): │ + for vowel in VOWELS: │ + letter_combinations = list(other_letter_combinations) + [vowel] │ + #print("trying letters %r" % letter_combinations) │ + info = get_words_containing_only_letters(cur, min_freq, letter_combinations, score_only=True, letter_combo_scores_shelve=letter_combo_scores) │ + i += 1 │ + #if i % 100 == 0: print(i, letter_combinations) │ + if info.word_count >= min_words: │ + │ + #words = get_words_containing_only_letters(cur, min_freq, letter_combinations, score_only=False) │ + #combination_info = LetterCombinationInfo(letter_combinations, info, words, i) │ + good_combinations.append((letter_combinations, info)) │ + #sys.stdout.write(' '.join([str(x) for x in [i, letter_combinations, info, words]]) + '\n') │ + #sys.stdout.flush() │ + good_combos_found += 1 │ + if good_combos_found % 1000 == 0: │ + sys.stdout.write(str(letter_combinations) + str(info)) │ + sys.stdout.write("\n") │ + sys.stdout.flush() │ + │ + print("##########################") │ + print("##########################") │ + print("### sorted info ") │ + print("##########################") │ + good_combinations = sorted(good_combinations, key=lambda x: (x[1].word_count, x[1].total_score), reverse=True) │ + print('len: %d' % len(good_combinations)) │ + for combination_info in good_combinations[:20]: │ + letters, info = combination_info │ + words = get_words_containing_only_letters(cur, min_freq, letters, score_only=False) │ + sys.stdout.write('%s: %s, %s\n' % (letters, info, words)) │ + sys.stdout.flush() │ + │ + print(i) │ + │ +try: │ + find_all_word_combos() │ +except: │ + letter_combo_scores.close() │ + print("\n\n") │ + print("db_lookups = %9d" % db_lookups) │ + print("shelve_lookups = %9d" % shelve_lookups) │ + raise │ + │ + │ +# get_words_containing_only_letters(cur, ["r", "m", "c", "i", "y", "e"]) │ + │ + │ + │ +local serialize = {} │ + │ +local serialize_lib = require("libs/serialize/serialize") │ + │ +local core = require("games/crossword_letters/crossword_letters_core") │ + │ +function serialize.serialize_state(state) │ + if state == nil then return nil end │ + local output = "" │ + output = output .. serialize_lib.serialize_byte(#state.letters) │ + for _, letter in ipairs(state.letters) do │ + output = output .. serialize_lib.serialize_byte(string.byte(letter)) │ + end │ + output = output .. serialize_lib.serialize_byte(#state.finished_crossword.grid) │ + output = output .. serialize_lib.serialize_byte(#state.finished_crossword.grid[1]) │ + output = output .. serialize_lib.serialize_byte(state.finished_crossword.word_count) │ + for word, word_info in pairs(state.finished_crossword.words) do │ + output = output .. serialize_lib.serialize_byte(word_info.pos.y) │ + output = output .. serialize_lib.serialize_byte(word_info.pos.x) │ + output = output .. serialize_lib.serialize_byte(word_info.orientation) │ + output = output .. serialize_lib.serialize_string(word) │ end │ -end │ │ ---[[ │ -for word, count in pairs(words_count) do │ - if count > 1 then │ - print(string.format("Found word %-8s %d times", word, count)) │ + output = output .. serialize_lib.serialize_string(state.hint_word) │ + │ + local found_word_count = 0 │ + for word, _ in pairs(state.found_words) do │ + found_word_count = found_word_count + 1 │ end │ -end │ ---]] │ │ + output = output .. serialize_lib.serialize_16bit(found_word_count) │ + for word, _ in pairs(state.found_words) do │ + output = output .. serialize_lib.serialize_string(word) │ + end │ │ -local bad_words_list = { │ -} │ + output = output .. serialize_lib.serialize_16bit(#state.hint_letters) │ + for _, pos in ipairs(state.hint_letters) do │ + output = output .. serialize_lib.serialize_byte(pos.y) │ + output = output .. serialize_lib.serialize_byte(pos.x) │ + end │ │ -local bad_words_set = {} │ + output = output .. serialize_lib.serialize_16bit(state.puzzle_id) │ │ -for _, word in ipairs(bad_words_list) do │ - bad_words_set[word] = true │ + return output │ end │ │ -for _, word in ipairs(words_list) do │ - if bad_words_set[word] then │ - goto next_word │ +function serialize.deserialize_state(bytes) │ + if bytes == nil then return nil end │ + bytes = serialize_lib.bytestr_to_byteary(bytes) │ + │ + if #bytes == 0 then return nil end │ + │ + local state = {} │ + │ + state.letters = {} │ + local letter_count = serialize_lib.deserialize_byte(bytes) │ + for _=1,letter_count do │ + table.insert(state.letters, string.char(serialize_lib.deserialize_byte(bytes))) │ end │ - print(string.format("%-6s", word)) │ - ::next_word:: │ + │ + local grid_y_size = serialize_lib.deserialize_byte(bytes) │ + local grid_x_size = serialize_lib.deserialize_byte(bytes) │ + local word_count = serialize_lib.deserialize_byte(bytes) │ + │ + state.finished_crossword = core.generate_empty_crossword(grid_y_size, grid_x_size) │ + for _=1,word_count do │ + local word_info = { │ + pos = {} │ + } │ + word_info.pos.y = serialize_lib.deserialize_byte(bytes) │ + word_info.pos.x = serialize_lib.deserialize_byte(bytes) │ + word_info.orientation = serialize_lib.deserialize_byte(bytes) │ + word_info.word = serialize_lib.deserialize_string(bytes) │ + │ + core.add_word_to_crossword_modify(state.finished_crossword, word_info.pos, word_info.orientation, word_info.word) │ + end │ + │ + state.hint_word = serialize_lib.deserialize_string(bytes) │ + │ + local found_word_count = serialize_lib.deserialize_16bit(bytes) │ + state.found_words = {} │ + for _=1,found_word_count do │ + local found_word = serialize_lib.deserialize_string(bytes) │ + state.found_words[found_word] = true │ + end │ + │ + state.hint_letters = {} │ + local hint_count = serialize_lib.deserialize_16bit(bytes) │ + for _=1,hint_count do │ + local hint = { │ + y = serialize_lib.deserialize_byte(bytes), │ + x = serialize_lib.deserialize_byte(bytes), │ + } │ + table.insert(state.hint_letters, hint) │ + end │ + │ + -- TODO BEFORE PUBLISHING this should be a required field │ + if #bytes > 0 then │ + state.puzzle_id = serialize_lib.deserialize_16bit(bytes) │ + end │ + │ + if #bytes ~= 0 then │ + error(string.format("Found %d bytes remaining after deserialize, expected 0", #bytes)) │ + end │ + │ + return state │ end │ + │ +return serialize │ +#!/usr/bin/env python │ +import sys │ + │ + │ +fname1 = sys.argv[1] │ +fname2 = sys.argv[2] │ + │ +words1 = set() │ +with open(fname1, 'r') as f: │ + for line in f: │ + word = line.strip() │ + words1.add(word) │ + │ +print('Words in %s that are not present in %s:' % (fname2, fname1)) │ +with open(fname2, 'r') as f: │ + for line in f: │ + word = line.strip() │ + if word not in words1: │ + print(word) │ -- Author: Alex Barry (github.com/alexbarry) │ local alexgames = require("alexgames") │ local draw_shapes = require("libs/draw/draw_shapes") │ │ local draw_celebration_anim = require("libs/draw/draw_celebration_anim") │ local buttons = require("libs/ui/buttons") │ │ @@ -29470,3509 +32757,405 @@ │ end │ │ function draw.handle_btn_clicked(ui_state, btn_id) │ if btn_id == BTN_ID_SUBMIT then │ return draw.ACTION_SUBMIT │ elseif btn_id == BTN_ID_BKSP then │ draw.backspace(ui_state) │ - elseif btn_id == BTN_ID_HINT then │ - return draw.ACTION_HINT │ - end │ -end │ - │ -function draw.handle_popup_btn_clicked(popup_id, btn_id) │ -end │ - │ -function draw.player_won(ui_state) │ - draw_celebration_anim.fireworks_display(ui_state.anim) │ - local dt = 1000/60 -- TODO │ - alexgames.set_timer_update_ms(dt) │ -end │ - │ -return draw │ -local two_player = require("libs/multiplayer/two_player") │ -local utils = require("libs/utils") │ - │ -local core = require("games/checkers/checkers_core") │ -local draw = require("games/checkers/checkers_draw") │ -local serialize = require("games/checkers/checkers_serialize") │ - │ -local alexgames = require("alexgames") │ - │ -local height = 480 │ -local width = 480 │ - │ -draw.init(height, width) │ - │ -local local_multiplayer = nil │ -local player_name_to_id = {} │ -local player = nil │ -local g_other_player = nil │ -local session_id = alexgames.get_new_session_id() │ -local state = core.new_state() │ - │ -local GAME_OPTION_NEW_GAME = "game_option_new_game" │ - │ -local BTN_ID_UNDO = "btn_undo" │ -local BTN_ID_REDO = "btn_redo" │ - │ --- Testing double jump logic and with a king │ ---[[ │ -state.board = { │ - {1,0,1,0,1,0,1,0,}, │ - {0,1,0,1,0,1,0,1,}, │ - {1,0,0,0,0,0,1,0,}, │ - {0,0,0,0,0,1,0,0,}, │ - {2,0,2,0,0,0,0,0,}, │ - {0,2,0,0,0,2,0,2,}, │ - {2,0,2,0,2,0,2,0,}, │ - {0,3,0,0,0,2,0,2,}, │ -} │ -]] │ - │ -function update() │ - draw.update(state) │ - alexgames.set_btn_enabled(BTN_ID_UNDO, alexgames.has_saved_state_offset(session_id, -1)) │ - alexgames.set_btn_enabled(BTN_ID_REDO, alexgames.has_saved_state_offset(session_id, 1)) │ -end │ - │ -local function get_player() │ - if local_multiplayer then │ - return state.player_turn │ - else │ - return player │ - end │ -end │ - │ -function handle_user_clicked(coord_y, coord_x) │ - local piece = draw.coords_to_piece_idx(coord_y, coord_x) │ - local rc = core.player_move(state, get_player(), piece.y, piece.x) │ - │ - if rc ~= core.RC_SUCCESS then │ - alexgames.set_status_err(core.rc_to_string(rc)) │ - else │ - -- TODO this saves even when the player just selects something... that │ - -- shouldn't count as a move. │ - save_state() │ - alexgames.set_status_msg("Waiting for other player to move") │ - if not local_multiplayer then │ - alexgames.send_message("all", string.format("move:%d,%d,%d", player, piece.y, piece.x)) │ - end │ - end │ - │ - core.print_state(state) │ - print(string.format("serialized state is: %s", utils.binstr_to_hr_str(serialize.serialize_state(state)))) │ - update() │ -end │ - │ - │ -local SELECT_PLAYER_POPUP_ID = "select_player" │ -local PLAYER_CHOICE_BTNS = { │ - "Red", │ - "Black", │ -} │ -local BTN_MAP = { │ - [0] = core.PLAYER1, │ - [1] = core.PLAYER2, │ -} │ - │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - if two_player.handle_popup_btn_clicked(popup_id, btn_idx) then │ - -- handled │ - else │ - error(string.format("Unhandled popup_id=%s, btn_idx=%s", popup_id, btn_idx)) │ - end │ -end │ - │ -local function broadcast_state(dst) │ - alexgames.send_message(dst, "state:" .. serialize.serialize_state(state)) │ -end │ - │ -function handle_msg_received(src, msg) │ - print("Recvd msg " .. msg) │ - │ - if two_player.handle_msg_received(src, msg) then │ - return │ - end │ - │ - local m = msg:gmatch("([^:]+):(.*)") │ - if m == nil then │ - print("Unable to parse header from msg " .. msg) │ - return │ - end │ - local header, payload = m() │ - │ - if header == "move" then │ - local m2 = payload:gmatch("(%d+),(%d+),(%d+)") │ - if m2 == nil then │ - error("Invalid \"move\" msg from " .. src) │ - return │ - end │ - local player_idx, y, x = m2() │ - player_idx = tonumber(player_idx) │ - y = tonumber(y) │ - x = tonumber(x) │ - local rc = core.player_move(state, player_idx, y, x) │ - if rc ~= core.RC_SUCCESS then │ - alexgames.set_status_err("Other player made an invalid move") │ - else │ - alexgames.set_status_msg("Your move") │ - update() │ - save_state() │ - end │ - │ - elseif header == "get_state" then │ - broadcast_state(src) │ - elseif header == "state" then │ - local recvd_state = serialize.deserialize_state(payload) │ - print("Recieved state:") │ - core.print_state(recvd_state) │ - state = recvd_state │ - update() │ - save_state() │ - elseif header == "player_left" and src == "ctrl" then │ - elseif header == "player_joined" then │ - else │ - error("Unhandled message: " .. header ) │ - end │ -end │ - │ -function two_player_init() │ - local args = { │ - supports_local_multiplayer = true, │ - title = "Choose piece colour", │ - player_choices = PLAYER_CHOICE_BTNS, │ - handle_multiplayer_type_choice = function (multiplayer_type) │ - if multiplayer_type == two_player.MULTIPLAYER_TYPE_LOCAL then │ - local_multiplayer = true │ - elseif multiplayer_type == two_player.MULTIPLAYER_TYPE_NETWORK then │ - local_multiplayer = false │ - end │ - end, │ - choice_id_to_player_id = function (btn_id) │ - return BTN_MAP[btn_id] │ - end, │ - player_name_to_id = player_name_to_id, │ - player_id_to_nice_name = function (player_id) │ - local player_colour = core.player_id_to_name(player_id) │ - return utils.make_first_char_uppercase(player_colour) │ - end, │ - get_msg = function () │ - local msg = "Red moves first." │ - if utils.table_len(player_name_to_id) == 0 then │ - msg = msg .. "\nThe other player has not yet chosen." │ - else │ - --msg = msg .. string.format("The other player has chosen %s", │ - -- core.player_id_to_name(other_player)) │ - for player_name, player_id in pairs(player_name_to_id) do │ - local player_colour = core.player_id_to_name(player_id) │ - msg = msg .. string.format("\n%s is chosen by %s", utils.make_first_char_uppercase(player_colour), player_name) │ - end │ - end │ - return msg │ - end, │ - handle_player_choice = function (player_name, player_id) │ - local choice_str = core.player_id_to_name(player_id) │ - print(string.format("handle_player_choice{ player_name=\"%s\", choice=%q (%q) }", player_name, player_id, choice_str)) │ - if player_name == two_player.LOCAL_PLAYER then │ - player = player_id │ - else │ - g_other_player = player_id │ - end │ - end, │ - │ - need_reselect = function () │ - local this_player = player │ - local other_player = g_other_player │ - │ - return this_player == nil or this_player == other_player │ - end, │ - │ - get_local_player_choice = function () │ - return player │ - end │ - } │ - │ - two_player.init(args) │ -end │ - │ -local function load_state_move_offset(move_id_offset) │ - local serialized_state = alexgames.adjust_saved_state_offset(session_id, move_id_offset) │ - state = serialize.deserialize_state(serialized_state) │ - update() │ - broadcast_state("all") │ -end │ - │ -function handle_btn_clicked(btn_id) │ - if btn_id == BTN_ID_UNDO then │ - load_state_move_offset(-1) │ - elseif btn_id == BTN_ID_REDO then │ - load_state_move_offset(1) │ - end │ -end │ - │ -function start_game(session_id_arg, serialized_state) │ - local last_sess_id = alexgames.get_last_session_id() │ - if serialized_state then │ - session_id = session_id_arg │ - state = serialize.deserialize_state(serialized_state) │ - elseif last_sess_id ~= nil then │ - serialized_state = alexgames.adjust_saved_state_offset(last_sess_id, 0) │ - session_id = last_sess_id │ - state = serialize.deserialize_state(serialized_state) │ - end │ - two_player_init() │ - │ - --alexgames.send_message("all", "player_joined:") │ - alexgames.send_message("all", "get_state:") │ - │ - alexgames.add_game_option(GAME_OPTION_NEW_GAME, { label = "New Game", type = alexgames.OPTION_TYPE_BTN }) │ - │ - alexgames.create_btn(BTN_ID_UNDO, "Undo", 1) │ - alexgames.create_btn(BTN_ID_REDO, "Redo", 1) │ -end │ - │ -function handle_game_option_evt(option_id) │ - if option_id == GAME_OPTION_NEW_GAME then │ - session_id = alexgames.get_new_session_id() │ - state = core.new_state() │ - save_state() │ - update() │ - broadcast_state("all") │ - end │ -end │ - │ -function save_state() │ - local serialized_state = serialize.serialize_state(state) │ - alexgames.save_state(session_id, serialized_state) │ -end │ - │ -function get_state() │ - local serialized_state = serialize.serialize_state(state) │ - print(string.format("lua: returning %d bytes of state", #serialized_state)) │ - return serialized_state │ -end │ - │ -core = {} │ - │ -core.BOARD_HEIGHT = 8 │ -core.BOARD_WIDTH = 8 │ - │ -core.ROWS_OF_PIECES = 3 │ - │ -core.EMPTY = 0 │ -core.PLAYER1 = 1 │ -core.PLAYER2 = 2 │ -core.PLAYER1_KING = 3 │ -core.PLAYER2_KING = 4 │ - │ -core.RC_SUCCESS = 0 │ -core.RC_NOT_YOUR_TURN = -1 │ --- Can not move to this position │ -core.RC_INVALID_MOVE = -2 │ -core.RC_OCCUPIED = -3 │ -core.RC_NOT_YOUR_PIECE = -4 │ -core.RC_NO_PIECE_TO_SELECT = -5 │ -core.RC_MUST_JUMP_SELECTED = -6 │ -core.RC_MUST_JUMP = -7 │ --- core.RC_UNSELECTED = -6 │ - │ -function core.player_id_to_name(id) │ - if id == nil then return nil │ - elseif id == core.PLAYER1 then return "red" │ - elseif id == core.PLAYER2 then return "black" │ - else │ - error(string.format("Unexpected player id %q", id)) │ - end │ -end │ - │ -local dirs = { │ - { y = 1, x = 1}, │ - { y =-1, x = 1}, │ - { y =-1, x =-1}, │ - { y = 1, x =-1}, │ -} │ - │ -function core.rc_to_string(rc) │ - local rc_to_str_map = { │ - [core.RC_SUCCESS] = "Success", │ - [core.RC_NOT_YOUR_TURN] = "Not your turn", │ - [core.RC_INVALID_MOVE] = "Can not move to this position", │ - [core.RC_OCCUPIED] = "This position is occupied", │ - [core.RC_NOT_YOUR_PIECE] = "This piece is not controlled by you", │ - [core.RC_NO_PIECE_TO_SELECT] = "Must select a piece to move", │ - [core.RC_MUST_JUMP_SELECTED] = "Must jump with currently selected piece", │ - [core.RC_MUST_JUMP] = "You have at least one jump available, so you must jump", │ - } │ - return rc_to_str_map[rc] │ -end │ - │ -local function new_2d_array(height, width, default_val) │ - local ary = {} │ - for y=1,height do │ - ary[y] = {} │ - for x=1,width do │ - ary[y][x] = default_val │ - end │ - end │ - return ary │ -end │ - │ -function core.default_game_settings() │ - return { │ - must_jump_when_able = true, │ - } │ -end │ - │ -function core.new_state(game_settings) │ - if game_settings == nil then │ - game_settings = core.default_game_settings() │ - end │ - local board = new_2d_array(core.BOARD_HEIGHT, core.BOARD_WIDTH, 0) │ - for y=1,core.ROWS_OF_PIECES do │ - local x_start │ - if y % 2 == 1 then │ - x_start = 1 │ - else │ - x_start = 2 │ - end │ - for x=x_start,8,2 do │ - board[y][x] = core.PLAYER1 │ - end │ - end │ - │ - for y=core.BOARD_HEIGHT-core.ROWS_OF_PIECES+1,core.BOARD_HEIGHT do │ - local x_start │ - if y % 2 == 1 then │ - x_start = 1 │ - else │ - x_start = 2 │ - end │ - for x=x_start,8,2 do │ - board[y][x] = core.PLAYER2 │ - end │ - end │ - │ - return { │ - game_settings = game_settings, │ - player_turn = core.PLAYER1, │ - board = board, │ - selected_y = nil, │ - selected_x = nil, │ - -- for the case where you are partway through a double jump │ - must_jump_selected = false, │ - } │ -end │ - │ -function core.print_state(state) │ - io.write("state = {\n") │ - io.write(string.format(" player_turn = %s\n", state.player_turn)) │ - io.write(string.format(" selected_y = %s\n", state.selected_y)) │ - io.write(string.format(" selected_x = %s\n", state.selected_x)) │ - io.write(string.format(" must_jump_selected = %s\n", state.must_jump_selected)) │ - io.write(string.format(" board = {\n", state.selected_x)) │ - for _,row in ipairs(state.board) do │ - io.write(" {") │ - for _,cell in ipairs(row) do │ - io.write(string.format("%d ", cell)) │ - end │ - io.write("}\n") │ - end │ - io.write(" }\n") │ - io.write("}\n") │ -end │ - │ -local val_to_char_map = { │ - [core.EMPTY] = ' ', │ - [core.PLAYER1] = 'x', │ - [core.PLAYER1] = 'o', │ -} │ - │ -function core.print_board(board) │ - io.write("+") │ - for x=1,#board do │ - io.write(string.format("-+")) │ - end │ - io.write("\n") │ - for y=1,#board do │ - io.write("|") │ - for x=1,#board do │ - io.write(string.format("%s|", val_to_char_map[board[y][x]])) │ - end │ - io.write("\n") │ - io.write("+") │ - for x=1,#board do │ - io.write(string.format("-+")) │ - end │ - io.write("\n") │ - end │ -end │ - │ -local function in_range(y,x) │ - return (1 <= y and y <= core.BOARD_HEIGHT and │ - 1 <= x and x <= core.BOARD_WIDTH) │ -end │ - │ -local function is_player(state, y, x, player) │ - local piece = state.board[y][x] │ - if player == core.PLAYER1 then │ - return piece == core.PLAYER1 or piece == core.PLAYER1_KING │ - elseif player == core.PLAYER2 then │ - return piece == core.PLAYER2 or piece == core.PLAYER2_KING │ - else │ - error(string.format("Unexpected player %s", player)) │ - return false │ - end │ -end │ - │ -function core.piece_to_player(piece) │ - if piece == core.EMPTY then │ - return core.EMPTY │ - elseif piece == core.PLAYER1 or piece == core.PLAYER1_KING then │ - return core.PLAYER1 │ - elseif piece == core.PLAYER2 or piece == core.PLAYER2_KING then │ - return core.PLAYER2 │ - else │ - error(string.format("Unexpected piece %s", piece)) │ - return nil │ - end │ -end │ - │ -function core.piece_is_king(piece) │ - return piece == core.PLAYER1_KING or piece == core.PLAYER2_KING │ -end │ - │ -local function other_player(player) │ - if player == core.PLAYER1 then return core.PLAYER2 │ - elseif player == core.PLAYER2 then return core.PLAYER1 │ - else error(string.format("Unexpected player %s", player)) end │ -end │ - │ -local function sign(val) │ - if val > 0 then return 1 │ - elseif val == 0 then return 0 │ - else return -1 end │ -end │ - │ -local function king(player) │ - if player == core.PLAYER1 then return core.PLAYER1_KING │ - elseif player == core.PLAYER2 then return core.PLAYER2_KING │ - else error(string.format("Unexpected player %s", player)) end │ -end │ - │ --- NOTE: does not check if destination is occupied │ -function core.valid_move(state, src_y, src_x, dst_y, dst_x, jumped_pieces) │ - local dy = dst_y - src_y │ - local dx = dst_x - src_x │ - │ - local piece = state.board[src_y][src_x] │ - local player = core.piece_to_player(piece) │ - │ - print(string.format("valid_move, player = %s, dy=%s, dx=%s", player, dy, dx)) │ - │ - if (core.piece_is_king(piece) and math.abs(dy) == 1) or │ - (player == core.PLAYER1 and dy == 1) or │ - (player == core.PLAYER2 and dy == -1) then │ - print("hit dy == 1 case") │ - return dx == 1 or dx == -1 │ - elseif (core.piece_is_king(piece) and math.abs(dy) == 2) or │ - (player == core.PLAYER1 and dy == 2) or │ - (player == core.PLAYER2 and dy == -2) then │ - print("hit dy == 2 case") │ - if math.abs(dx) ~= 2 then │ - print("dx ~= 2") │ - return false │ - end │ - local jumped_y = src_y + sign(dy) │ - local jumped_x = src_x + sign(dx) │ - if is_player(state, jumped_y, jumped_x, other_player(player)) then │ - print("should be jumped") │ - if jumped_pieces ~= nil then │ - table.insert(jumped_pieces, {y= jumped_y, x= jumped_x }) │ - end │ - return core.RC_SUCCESS │ - else │ - print("jumped player is not other player") │ - return false │ - end │ - else │ - print("hit other case") │ - return false │ - end │ - │ -end │ - │ -local function move_piece(state, y, x) │ - local piece = state.board[state.selected_y][state.selected_x] │ - state.board[state.selected_y][state.selected_x] = core.EMPTY │ - state.board[y][x] = piece │ -end │ - │ -local function can_jump(state, y, x) │ - for _,dir in ipairs(dirs) do │ - local y2 = y + 2*dir.y │ - local x2 = x + 2*dir.x │ - │ - if not in_range(y2, x2) then │ - print(string.format("Checking y2=%s, x2=%s, out of range", y2, x2)) │ - goto next_dir │ - end │ - │ - if state.board[y2][x2] ~= core.EMPTY then │ - print(string.format("Checking y2=%s, x2=%s, occupied", y2, x2)) │ - goto next_dir │ - end │ - │ - local dir_valid_move = core.valid_move(state, y, x, y2, x2) │ - print(string.format("Checking y2=%s, x2=%s, valid_move=%q", y2, x2, dir_valid_move)) │ - if dir_valid_move then │ - return true │ - end │ - ::next_dir:: │ - end │ - return false │ -end │ - │ -function move_is_jump(state, y, x) │ - local dy = state.selected_y - y │ - local dx = state.selected_x - x │ - │ - return math.abs(dy) == 2 and math.abs(dx) == 2 │ -end │ - │ -function jumps_available_for_player(state, player) │ - for y=1,core.BOARD_HEIGHT do │ - for x=1,core.BOARD_WIDTH do │ - if core.piece_to_player(state.board[y][x]) ~= player then │ - goto next_cell │ - end │ - if can_jump(state, y, x) then │ - return true │ - end │ - ::next_cell:: │ - end │ - end │ - │ - return false │ -end │ - │ --- Used for both selecting a piece, and choosing where to move it. │ --- (Called twice for a single move) │ -function core.player_move(state, player, y, x) │ - if player ~= state.player_turn then │ - return core.RC_NOT_YOUR_TURN │ - end │ - │ - if not in_range(y,x) then │ - return core.RC_INVALID_MOVE │ - end │ - │ - if state.selected_y == nil or state.selected_x == nil then │ - if state.board[y][x] == core.EMPTY then │ - return core.RC_NO_PIECE_TO_SELECT │ - elseif not is_player(state, y, x, player) then │ - return core.RC_NOT_YOUR_PIECE │ - else │ - state.selected_y = y │ - state.selected_x = x │ - return core.RC_SUCCESS │ - end │ - else │ - if y == state.selected_y and x == state.selected_x then │ - if state.must_jump_selected then │ - return core.RC_MUST_JUMP_SELECTED │ - end │ - state.selected_y = nil │ - state.selected_x = nil │ - -- return core.RC_UNSELECTED │ - return core.RC_SUCCESS │ - end │ - │ - if state.game_settings.must_jump_when_able then │ - if jumps_available_for_player(state, player) and not move_is_jump(state, y, x) then │ - return core.RC_MUST_JUMP │ - end │ - end │ - │ - -- change selection if selected own pieces │ - if is_player(state, y, x, player) then │ - state.selected_y = y │ - state.selected_x = x │ - return core.RC_SUCCESS │ - end │ - │ - if state.board[y][x] ~= core.EMPTY then │ - return core.RC_OCCUPIED │ - end │ - │ - │ - if state.must_jump_selected then │ - if math.abs(state.selected_y - y) ~= 2 and │ - math.abs(state.selected_x - x) ~= 2 then │ - return core.RC_MUST_JUMP_SELECTED │ - end │ - end │ - │ - │ - local jumped_pieces = {} │ - if core.valid_move(state, state.selected_y, state.selected_x, y, x, jumped_pieces) then │ - for _,piece in ipairs(jumped_pieces) do │ - state.board[piece.y][piece.x] = core.EMPTY │ - end │ - move_piece(state, y, x) │ - else │ - return core.RC_INVALID_MOVE │ - end │ - │ - if (player == core.PLAYER1 and y == core.BOARD_HEIGHT) or │ - (player == core.PLAYER2 and y == 1) then │ - state.board[y][x] = king(player) │ - end │ - │ - if #jumped_pieces > 0 and can_jump(state, y, x) then │ - state.must_jump_selected = true │ - -- updated selected indicators to point to this cell │ - -- now that the piece moved here │ - state.selected_y = y │ - state.selected_x = x │ - else │ - state.must_jump_selected = false │ - state.selected_y = nil │ - state.selected_x = nil │ - state.player_turn = (((state.player_turn-1) + 1 ) % 2) + 1 │ - end │ - │ - return core.RC_SUCCESS │ - end │ -end │ - │ -function core.get_square_colour(y, x) │ - return (y%2 == 1) ~= (x%2 == 1) │ -end │ - │ - │ ---local state = core.new_state() │ ---core.print_board(state.board) │ - │ -return core │ -local serialize = {} │ - │ -function serialize_byte(val) │ - if val == nil then val = 128 end │ - return string.char(val) │ -end │ - │ -function deserialize_byte(bytes) │ - local val = string.byte(table.remove(bytes,1)) │ - if val == 128 then val = nil end │ - return val │ -end │ - │ -function bool_to_byte(val) │ - if val then return 1 │ - else return 0 end │ -end │ - │ -function byte_to_bool(val) │ - if val == 1 then return true │ - elseif val == 0 then return false │ - else error(string.format("Expected 1 or 0 for bool, recvd %s", val)) end │ -end │ - │ -function serialize_bool(val) │ - return serialize_byte(bool_to_byte(val)) │ -end │ - │ -function deserialize_bool(bytes) │ - return byte_to_bool(deserialize_byte(bytes)) │ -end │ - │ -function serialize.serialize_state(state) │ - local output = "" │ - output = output .. serialize_bool(state.game_settings.must_jump_when_able) │ - output = output .. serialize_byte(state.player_turn) │ - output = output .. serialize_byte(state.selected_y) │ - output = output .. serialize_byte(state.selected_x) │ - output = output .. serialize_bool(state.must_jump_selected) │ - local board_height = #state.board │ - local board_width = #state.board[1] │ - output = output .. serialize_byte(board_height) │ - output = output .. serialize_byte(board_width) │ - for y=1,board_height do │ - for x=1,board_width do │ - output = output .. serialize_byte(state.board[y][x]) │ - end │ - end │ - │ - return output │ -end │ - │ -function serialize.deserialize_state(byte_str) │ - local bytes = {} │ - for i=1,#byte_str do │ - bytes[i] = byte_str:sub(i,i) │ - end │ - │ - if #bytes ~= 7 + 64 then │ - error(string.format("Expected to recieve %d bytes, recvd %d", 7 + 64, #bytes)) │ - end │ - │ - local state = {} │ - state.game_settings = {} │ - │ - state.game_settings.must_jump_when_able = deserialize_bool(bytes) │ - state.player_turn = deserialize_byte(bytes) │ - state.selected_y = deserialize_byte(bytes) │ - state.selected_x = deserialize_byte(bytes) │ - state.must_jump_selected = deserialize_bool(bytes) │ - │ - local board_height = deserialize_byte(bytes) │ - local board_width = deserialize_byte(bytes) │ - state.board = {} │ - for y=1,board_height do │ - state.board[y] = {} │ - for x=1,board_width do │ - state.board[y][x] = deserialize_byte(bytes) │ - end │ - end │ - return state │ -end │ - │ -return serialize │ -local draw = {} │ -local core = require("games/checkers/checkers_core") │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ - │ -local height = nil │ -local width = nil │ -local square_size = nil │ -local piece_radius = nil │ -local square_padding = 1 │ -local square_size_w_padding = nil │ -local offset_y = nil │ -local offset_x = nil │ - │ - │ -local SQUARE_BORDERS = '#aaaa55' │ -local SQUARE_BLACK = '#000000' │ -local SQUARE_RED = '#882222' │ -local SQUARE_BLACK_HIGHLIGHTED = '#555555' │ -local SQUARE_RED_HIGHLIGHTED = '#aa4444' │ - │ -local PIECE_BLACK = '#444444' │ -local PIECE_RED = '#aa2222' │ --- local PIECE_OUTLINE = '#333333' │ -local PIECE_RED_OUTLINE = '#770000' │ -local PIECE_BLACK_OUTLINE = '#777777' │ - │ -if alexgames.get_user_colour_pref() == "dark" then │ - SQUARE_BORDERS = '#666600' │ - SQUARE_BLACK = '#000000' │ - SQUARE_RED = '#220000' │ - SQUARE_BLACK_HIGHLIGHTED = '#555555' │ - SQUARE_RED_HIGHLIGHTED = '#aa4444' │ - │ - PIECE_BLACK = '#333333' │ - PIECE_RED = '#660000' │ - PIECE_RED_OUTLINE = '#770000' │ - PIECE_BLACK_OUTLINE = '#777777' │ -end │ - │ -function draw.init(height_arg, width_arg) │ - height = height_arg │ - width = width_arg │ - local board_square_count = math.min(core.BOARD_HEIGHT, core.BOARD_WIDTH) │ - square_size = math.floor((math.min(height,width) - (board_square_count+1)*square_padding)*1.0 / board_square_count) │ - square_size_w_padding = square_size + square_padding │ - piece_radius = math.floor(square_size*0.8/2) │ - │ - offset_y = math.floor((height - (core.BOARD_HEIGHT+1)*square_padding - core.BOARD_HEIGHT*square_size)/2) │ - offset_x = math.floor((width - (core.BOARD_WIDTH +1)*square_padding - core.BOARD_WIDTH *square_size)/2) │ -end │ - │ -local function get_colour_of_square(state, y, x) │ - local is_red = core.get_square_colour(y,x) │ - if state.selected_y == y and state.selected_x == x then │ - if is_red then │ - return SQUARE_RED_HIGHLIGHTED │ - else │ - return SQUARE_BLACK_HIGHLIGHTED │ - end │ - end │ - if is_red then │ - return SQUARE_RED │ - else │ - return SQUARE_BLACK │ - end │ -end │ - │ -function draw.update(state) │ - --alexgames.draw_rect('#000000', 0, 0, height, width) │ - alexgames.draw_clear() │ - -- Why do I need to add another 2 pixels here?? Otherwise the gold edge is cutoff │ - alexgames.draw_rect(SQUARE_BORDERS, offset_y, offset_x, │ - math.ceil(core.BOARD_HEIGHT*square_size + (core.BOARD_HEIGHT+2)*square_padding) + 2, │ - math.ceil(core.BOARD_WIDTH*square_size + (core.BOARD_WIDTH +2)*square_padding) + 2) │ - for y=1,core.BOARD_HEIGHT do │ - for x=1,core.BOARD_WIDTH do │ - local colour = get_colour_of_square(state, y, x) │ - alexgames.draw_rect(colour, │ - offset_y + square_padding + (y-1)*square_size_w_padding, │ - offset_x + square_padding + (x-1)*square_size_w_padding, │ - offset_y + (y )*square_size_w_padding, │ - offset_x + (x )*square_size_w_padding) │ - │ - local piece = state.board[y][x] │ - local piece_colour = nil │ - local piece_outline_colour = nil │ - if core.piece_to_player(piece) == core.PLAYER1 then │ - piece_colour = PIECE_RED │ - piece_outline_colour = PIECE_RED_OUTLINE │ - elseif core.piece_to_player(piece) == core.PLAYER2 then │ - piece_colour = PIECE_BLACK │ - piece_outline_colour = PIECE_BLACK_OUTLINE │ - end │ - │ - if piece_colour ~= nil then │ - local coord_y = offset_y + math.floor((y-1+0.5)*square_size_w_padding) │ - local coord_x = offset_x + math.floor((x-1+0.5)*square_size_w_padding) │ - alexgames.draw_circle(piece_colour, piece_outline_colour, │ - coord_y, │ - coord_x, │ - piece_radius) │ - if core.piece_is_king(piece) then │ - draw_more.draw_graphic_ul("piece_king_icon", │ - coord_y - piece_radius, │ - coord_x - piece_radius, │ - 2*piece_radius, │ - 2*piece_radius) │ - end │ - end │ - end │ - end │ - alexgames.draw_refresh() │ -end │ - │ -function draw.coords_to_piece_idx(coord_y, coord_x) │ - local idx_y = math.floor((coord_y - offset_y - square_padding) / square_size_w_padding) + 1 │ - local idx_x = math.floor((coord_x - offset_x - square_padding) / square_size_w_padding) + 1 │ - return { y = idx_y, x = idx_x } │ -end │ - │ -return draw │ - │ -local alexgames = require("alexgames") │ - │ -local TEXT_SIZE = 12 │ -local PADDING = 5 │ -local TEXT_COLOUR = "#ff0000" │ - │ -local BTN_ID_TIMER1_TOGGLE = "timer1_toggle" │ -local BTN_ID_TIMER2_TOGGLE = "timer2_toggle" │ - │ -local TIMER1_PERIOD_MS = 1000 │ -local TIMER2_PERIOD_MS = 1500 │ - │ -local timer1 = nil │ -local timer2 = nil │ - │ -local program_start_time = 0 │ - │ -local total_updates = 0 │ -local recent_updates = {} │ - │ -local function internal_draw_board() │ - alexgames.draw_clear() │ - │ - for i, info in ipairs(recent_updates) do │ - local y = (TEXT_SIZE + PADDING) * (i) │ - local msg = string.format("%3.3f: update fired, dt_ms: %d", info.time_ms/1000, info.dt_ms) │ - alexgames.draw_text(msg, TEXT_COLOUR, y, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ - end │ - │ - alexgames.draw_text(string.format("Timer 1 (1 s) handle: %s", timer1), TEXT_COLOUR, │ - 400, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ - alexgames.draw_text(string.format("Timer 2 (1.5 s) handle: %s", timer2), TEXT_COLOUR, │ - 400 + TEXT_SIZE + PADDING, 0, TEXT_SIZE, alexgames.TEXT_ALIGN_LEFT) │ - alexgames.draw_refresh() │ -end │ - │ -function update(dt_ms) │ - local time_ms = alexgames.get_time_ms() - program_start_time │ - total_updates = total_updates + 1 │ - table.insert(recent_updates, { dt_ms = dt_ms, time_ms = time_ms }) │ - while #recent_updates > 15 do │ - table.remove(recent_updates, 1) │ - end │ - │ - internal_draw_board() │ -end │ - │ -function handle_btn_clicked(btn_id) │ - if btn_id == BTN_ID_TIMER1_TOGGLE then │ - if timer1 == nil then │ - timer1 = alexgames.set_timer_update_ms(TIMER1_PERIOD_MS) │ - else │ - alexgames.delete_timer(timer1) │ - timer1 = nil │ - end │ - else │ - if timer2 == nil then │ - timer2 = alexgames.set_timer_update_ms(TIMER2_PERIOD_MS) │ - else │ - alexgames.delete_timer(timer2) │ - timer2 = nil │ - end │ - end │ - │ - internal_draw_board() │ -end │ - │ - │ -function start_game() │ - program_start_time = alexgames.get_time_ms() │ - timer1 = alexgames.set_timer_update_ms(TIMER1_PERIOD_MS) │ - timer2 = alexgames.set_timer_update_ms(TIMER2_PERIOD_MS) │ - │ - -- TODO remove │ - --alexgames.delete_timer(timer1) │ - --timer1 = nil │ - │ - alexgames.create_btn(BTN_ID_TIMER1_TOGGLE, "Toggle timer 1", 1) │ - alexgames.create_btn(BTN_ID_TIMER2_TOGGLE, "Toggle timer 2", 1) │ -end │ -local alexgames = require("alexgames") │ - │ -local y = 200 │ -local x = 100 │ - │ -local width = 75 │ -local height = 75 │ - │ -local i = 0 │ -local prop = 0 │ - │ -function update() │ - alexgames.draw_clear() │ - │ - if prop % 2 == 0 then │ - flip_y_vals = { false, true } │ - flip_x_vals = { false, true } │ - │ - local flip_y_used = nil │ - local flip_x_used = nil │ - │ - local j = 0 │ - │ - for _, flip_x in ipairs(flip_x_vals) do │ - for _, flip_y in ipairs(flip_y_vals) do │ - if j ~= i % 4 then │ - goto next_iter │ - end │ - │ - alexgames.draw_graphic('hospital_ventilator', y, x, │ - width, height, │ - { flip_y = flip_y, flip_x = flip_x }) │ - flip_y_used = flip_y │ - flip_x_used = flip_x │ - ::next_iter:: │ - j = j + 1 │ - end │ - │ - end │ - │ - local text1 = string.format("flip_y: %s", flip_y_used) │ - local text2 = string.format("flip_x: %s", flip_x_used) │ - alexgames.draw_text(text1, '#000000', 300, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ - alexgames.draw_text(text2, '#000000', 330, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ - │ - │ - else │ - local angle_degrees = i * 15 │ - alexgames.draw_graphic('hospital_ventilator', y, x, │ - width, height, │ - { angle_degrees = angle_degrees }) │ - │ - local text1 = string.format("angle: %s", angle_degrees) │ - alexgames.draw_text(text1, '#000000', 300, 0, 12, alexgames.TEXT_ALIGN_LEFT) │ - │ - end │ - alexgames.draw_circle('#ff0000', '#ff0000', y, x, 5) │ - │ - alexgames.draw_refresh() │ -end │ - │ -local BTN_ID_NEXT_FRAME = "btn_next_frame" │ -local BTN_ID_NEXT_PROP = "btn_next_prop" │ - │ -function handle_btn_clicked(btn_id) │ - if btn_id == BTN_ID_NEXT_FRAME then │ - i = i + 1 │ - update() │ - elseif btn_id == BTN_ID_NEXT_PROP then │ - prop = prop + 1 │ - update() │ - else │ - error(string.format("Unhandled btn id %s", btn_id)) │ - end │ -end │ - │ -function start_game() │ - alexgames.create_btn(BTN_ID_NEXT_FRAME, "Next Frame", 1) │ - alexgames.create_btn(BTN_ID_NEXT_PROP, "Next Property", 1) │ -end │ - │ -local cards = require("libs/cards/cards") │ -local cards_draw = require("libs/cards/cards_draw") │ -local draw_more = require("libs/draw/draw_more") │ -local alexgames = require("alexgames") │ - │ -local padding = 50 │ -local card_height = 100 │ -local card_width = 70 │ ---local card_height = 60 │ ---local card_width = 40 │ -local card_font_size = 24 │ - │ -local BTN_ID_INC_ANGLE = "inc_angle" │ -local BTN_ID_DEC_ANGLE = "dec_angle" │ -local BTN_ID_TOGGLE_FACE_DN_UP = "toggle_face_dn_up" │ - │ -local pos_y = 240 │ -local pos_x = 240 │ - │ -local deck = cards.new_deck() │ -cards.shuffle(deck) │ - │ -local angle_offset = 0 │ -local cards_face_down = true │ - │ -function update() │ - alexgames.set_status_msg(string.format("Drawing cards with angle offset = %d", angle_offset)) │ - alexgames.draw_clear() │ - │ - if not cards_face_down then │ - cards_draw.draw_card(deck[1], pos_y + padding, pos_x, │ - card_width, card_height, │ - card_font_size, false, 0 + angle_offset) │ - │ - cards_draw.draw_card(deck[2], pos_y, pos_x - padding, │ - card_width, card_height, │ - card_font_size, false, 90 + angle_offset) │ - │ - cards_draw.draw_card(deck[3], pos_y - padding, pos_x, │ - card_width, card_height, │ - card_font_size, false, 180 + angle_offset) │ - │ - cards_draw.draw_card(deck[4], pos_y, pos_x + padding, │ - card_width, card_height, │ - card_font_size, false, 270 + angle_offset) │ - alexgames.draw_refresh() │ - else │ - │ - draw_more.draw_graphic_ul("card_facedown", 0, 0, card_width, card_height, { angle_degrees = 0 + angle_offset }) │ - │ - draw_more.draw_graphic_ul("card_facedown", pos_y + padding, pos_x + padding, card_width, card_height, { angle_degrees = 0 + angle_offset }) │ - draw_more.draw_graphic_ul("card_facedown", pos_y + padding, pos_x - padding, card_width, card_height, { angle_degrees = 90 + angle_offset }) │ - draw_more.draw_graphic_ul("card_facedown", pos_y - padding, pos_x - padding, card_width, card_height, { angle_degrees = 180 + angle_offset }) │ - draw_more.draw_graphic_ul("card_facedown", pos_y - padding, pos_x + padding, card_width, card_height, { angle_degrees = 270 + angle_offset }) │ - │ - alexgames.draw_circle('#ff0000', '#ff000055', pos_y + padding, pos_x + padding, 5) │ - alexgames.draw_text('1', '#000000', pos_y + padding, pos_x + padding, 12, 0) │ - alexgames.draw_circle('#ff0000', '#ff000055', pos_y + padding, pos_x - padding, 5) │ - alexgames.draw_text('2', '#000000', pos_y + padding, pos_x - padding, 12, 0) │ - alexgames.draw_circle('#ff0000', '#ff000055', pos_y - padding, pos_x - padding, 5) │ - alexgames.draw_text('3', '#000000', pos_y - padding, pos_x - padding, 12, 0) │ - alexgames.draw_circle('#ff0000', '#ff000055', pos_y - padding, pos_x + padding, 5) │ - alexgames.draw_text('4', '#000000', pos_y - padding, pos_x + padding, 12, 0) │ - end │ -end │ - │ -function handle_btn_clicked(btn_id) │ - if btn_id == BTN_ID_INC_ANGLE then │ - angle_offset = angle_offset + 15 │ - elseif btn_id == BTN_ID_DEC_ANGLE then │ - angle_offset = angle_offset - 15 │ - elseif btn_id == BTN_ID_TOGGLE_FACE_DN_UP then │ - cards_face_down = not cards_face_down │ - end │ - update() │ -end │ - │ -alexgames.create_btn(BTN_ID_INC_ANGLE, "Increment Angle", 1) │ -alexgames.create_btn(BTN_ID_DEC_ANGLE, "Decrement Angle", 1) │ -alexgames.create_btn(BTN_ID_TOGGLE_FACE_DN_UP, "Toggle face dn/up", 1) │ -local core = {} │ --- Notes from what I remember Sabrina telling me: │ --- state.PICK_DISCARD │ --- players are given enough cards that they can discard 0 to 2 and end up with 4 cards in their hand, │ --- and total of 4 discarded cards that form the "crib" of one player. │ --- state.PLAY │ --- A card might be drawn from the deck at this point │ --- Players then take turns playing one of the cards from their hand. │ --- They are awarded points if the running total is 15, 31, there is a run (cards in order (or reverse order?)), │ --- or four of a suit(?), and last card │ --- At the end, the player whose crib it is gets awarded points for the cards in their crib. │ - │ -local cards = require("libs/cards/cards") │ - │ --- TODO implement last card: │ --- * still need to award a point for last card once all cards are played │ --- (should add an acknowledgemepoint phase for that where all players must press "next" │ --- * use this stage once 31 is reached normally │ --- maybe just add a boolean like "wait_for_next_btn" which is set to true │ --- only when a sum of 31 is reached, or when all players' hands are empty? │ --- Need to figure out how to make this co-exist with the "can't move" button. │ --- Maybe rename that one to "next" │ - │ --- TODO should implement winner, make sure points are awarded in the right order │ - │ --- TODO if a card is played resulting in a sum of 31 , clear the play thing? │ - │ --- TODO the last card played in PLAY state isn't visible to the other player(s), it │ --- immediately jumps to showing your old hand. Should add a "next" button to let people acknowledge, │ --- then transition to this state │ - │ --- TODO on a new hand, make sure its the player's turn who is to the left of the crib │ - │ --- TODO add an array of "last_points_reasons" in state, send to other players? │ --- indicating player, points reason, and amount? │ --- set it to true only for events like jack of suit on cut deck card, playing points, last card? │ --- use this to show status messages, so players notice when points are added │ - │ -core.states = { │ - -- Players start with some number of cards and must discard to the "crib" until they have 4 left │ - -- Can only exit this state once all players have discarded. │ - PICK_DISCARD = 1, │ - -- Players play a card, and are awarded points if they get 15/run/4 of the same suit/31 │ - PLAY = 2, │ - │ - -- After the above "PLAY" state, players also get awarded points based on the 4 cards they played, plus │ - -- a card from the deck that is shared by everyone. │ - -- Reveal the cards to the player in this state, and proceed back to PICK_DISCARD once all players │ - -- have acknowledged │ - ACKNOWLEDGE_POINTS = 3, │ - │ - -- Similar to the above state, but only the player whose crib it is gets points │ - ACKNOWLEDGE_CRIB = 4, │ -} │ - │ -core.actions = { │ - HAND = 1, │ - DISCARD_CONFIRM = 2, │ - CANT_MOVE_ACCEPT = 3, │ - NEXT = 4, │ -} │ - │ -core.point_types = { │ - FIFTEEN = 1, │ - RUN = 2, │ - PAIR = 3, │ - THIRTY_ONE = 4, │ - FLUSH = 5, │ - JACK_OF_SUIT = 6, │ -} │ - │ -core.CARDS_PER_HAND = 4 │ -core.MAX_PLAYING_SUM = 31 │ - │ -core.RC_SUCCESS = 0 │ -core.RC_ERROR = -1 │ -core.RC_WAIT_FOR_OTHERS_TO_DISCARD = -2 │ -core.RC_NOT_YOUR_TURN = -3 │ -core.RC_INVALID_PARAM = -4 │ -core.RC_PLAY_HIGHER_THAN_31 = -5 │ -core.RC_MUST_MOVE = -6 │ - │ -local rc_to_str_map = { │ - [core.RC_SUCCESS] = "Success", │ - [core.RC_ERROR] = "Error", │ - [core.RC_WAIT_FOR_OTHERS_TO_DISCARD] = "Wait for other players to discard", │ - [core.RC_NOT_YOUR_TURN] = "Not your turn", │ - -- I don't think the user should be able to hit this unless there's a UI error or state mismatch │ - [core.RC_INVALID_PARAM] = "Invalid parameters", │ - [core.RC_PLAY_HIGHER_THAN_31] = "Must play a card which results in a sum less than 31", │ - [core.RC_MUST_MOVE] = "Can only skip turn if no cards can be played", │ -} │ - │ -local JACK_OF_SUIT_CUT_DECK_POINTS = 2 │ -local JACK_OF_SUIT_HAND_CRIB_POINTS = 1 │ -local LAST_CARD_POINTS = 1 │ - │ -function core.rc_to_str(rc) │ - return rc_to_str_map[rc] │ -end │ - │ -function core.point_type_to_str(reason) │ - local map = { │ - [core.point_types.FIFTEEN] = 'Fifteen', │ - [core.point_types.RUN] = 'Run', │ - [core.point_types.PAIR] = 'Pair', │ - [core.point_types.THIRTY_ONE] = 'Thirty-one', │ - [core.point_types.FLUSH] = 'Flush', │ - [core.point_types.JACK_OF_SUIT] = 'Jack of suit', │ - } │ - return map[reason] │ -end │ - │ -local function deal_new_hand(state, do_shuffle) │ - state.cut_deck_card = nil │ - state.crib = {} │ - state.playing_sequence = {} │ - state.playing_sum = 0 │ - │ - if do_shuffle then │ - state.deck = cards.new_deck() │ - cards.shuffle(state.deck) │ - end │ - │ - -- each player gets at least 4 cards, │ - -- and then an extra 4 cards are distributed among the players evenly (if possible) │ - -- The player must discard cards (into the crib) until they have 4 left. │ - -- If the crib does not have 4 cards right now, add deck cards until it is 4 │ - local player_cards_to_discard = math.floor(core.CARDS_PER_HAND/state.player_count) │ - local cards_per_hand = core.CARDS_PER_HAND + player_cards_to_discard │ - local deck_cards_to_crib = core.CARDS_PER_HAND - player_cards_to_discard * state.player_count │ - for player_idx=1,state.player_count do │ - state.hands[player_idx] = {} │ - state.tentative_discards[player_idx] = {} │ - state.playing[player_idx] = {} │ - state.played[player_idx] = {} │ - for _=1,cards_per_hand do │ - table.insert(state.hands[player_idx], table.remove(state.deck, 1)) │ - table.insert(state.tentative_discards[player_idx], false) │ - end │ - end │ - for _=1,deck_cards_to_crib do │ - table.insert(state.crib, table.remove(state.deck)) │ - end │ -end │ - │ - │ --- deck is optional, if nil or not provided then will generate and shuffle a deck │ -function core.new_game(player_count, deck) │ - if deck == nil then │ - deck = cards.new_deck() │ - cards.shuffle(deck) │ - end │ - local state = { │ - state = core.states.PICK_DISCARD, │ - player_count = player_count, │ - deck = deck, │ - score = {}, │ - hands = {}, │ - │ - -- extra card that is drawn after the discard is done, but before players start playing/pegging │ - cut_deck_card = nil, -- is this name good? │ - │ - -- these are cards that count towards the current total of 31 │ - playing = {}, │ - │ - -- these are cards that at one point counted towards the │ - -- total of 31, but the limit was reached and now │ - -- they are put aside until everyone has played all the cards │ - -- in their hands, so that later all the played cards can be looked │ - -- at to determine points │ - played = {}, │ - │ - -- these are copies of cards that have been played in the `playing` array │ - -- Used to calculate runs/flush/etc │ - playing_sequence = {}, │ - │ - -- these are cards that the user has selected to discard for the crib, but they haven't yet │ - -- pressed the "confirm discard" button │ - tentative_discards = {}, │ - │ - crib = {}, │ - │ - -- array of booleans for if the player has pressed "next" when seeing the points from their hand │ - -- once all have played their cards. │ - -- Once all players press "next", move on to the crib │ - acknowledged_points = {}, │ - │ - player_crib = 1, │ - player_turn = 1, │ - playing_sum = 0, │ - │ - -- set this to the player index when a player can't move. │ - -- * if another player can move, clear it. │ - -- * if another player can not move, leave it set. │ - -- If it is still set when we return to the player who │ - -- set it originally, and that player can not move, then │ - -- end that round of play │ - -- (put `playing` cards in `played`, reset `playing_sum`) │ - first_player_cant_move = 0, │ - } │ - for player_idx=1,state.player_count do │ - state.score[player_idx] = 0 │ - end │ - │ - deal_new_hand(state, false) │ - │ - return state │ -end │ - │ - │ -function core.print_state(state) │ - if state == nil then │ - io.write("state = nil\n") │ - return │ - end │ - io.write("state = {\n") │ - io.write(string.format(" state = %s\n", state.state)) │ - io.write(string.format(" player_turn = %s\n", state.player_turn)) │ - io.write(string.format(" player_crib = %s\n", state.player_crib)) │ - io.write(string.format(" playing_sum = %s\n", state.playing_sum)) │ - if state.deck ~= nil then │ - io.write(string.format(" deck len = %d\n", #state.deck)) │ - else │ - io.write(string.format(" deck = nil\n")) │ - end │ - │ - io.write(string.format(" first_player_cant_move = %d\n", state.first_player_cant_move )) │ - │ - io.write(string.format(" playing_sequence = %s\n", cards.card_array_to_string(state.playing_sequence))) │ - │ - io.write(string.format(" hands[%d] = {\n", #state.hands)) │ - for player_idx, hand in pairs(state.hands) do │ - io.write(string.format(" [%d] = ", player_idx)) │ - io.write(cards.card_array_to_string(hand)) │ - io.write(",\n") │ - end │ - io.write(string.format(" },\n")) │ - │ - io.write(string.format(" playing[%d] = {\n", #state.playing)) │ - for player_idx, playing in pairs(state.playing) do │ - io.write(string.format(" [%d] = ", player_idx)) │ - io.write(cards.card_array_to_string(playing)) │ - io.write(",\n") │ - end │ - io.write(string.format(" },\n")) │ - │ - io.write(string.format(" played[%d] = {\n", #state.played)) │ - for player_idx, played in pairs(state.played) do │ - io.write(string.format(" [%d] = ", player_idx)) │ - io.write(cards.card_array_to_string(played)) │ - io.write(",\n") │ - end │ - io.write(string.format(" },\n")) │ - │ - │ - io.write(string.format(" tentative_discards[%d] = {\n", #state.tentative_discards)) │ - for i=1,#state.tentative_discards do │ - io.write(" ") │ - -- io.write("{") │ - io.write(string.format("[%d] = {", i)) │ - for j=1,#state.tentative_discards[i] do │ - io.write(string.format("%s, ", state.tentative_discards[i][j])) │ - end │ - io.write("},\n") │ - end │ - io.write(string.format(" },\n")) │ - │ - io.write(string.format(" crib = ")) │ - if state.crib ~= nil then │ - io.write(cards.card_array_to_string(state.crib)) │ - else │ - io.write("nil") │ - end │ - io.write(string.format("\n")) │ - │ - io.write(string.format(" score[%d] = {\n", #state.score)) │ - for i=1,#state.score do │ - io.write(string.format(" [%d] = %d,\n", i, state.score[i])) │ - end │ - io.write(" }\n") │ - io.write("}\n") │ -end │ - │ -local function handle_discard_confirm(state, player) │ - if state.state ~= core.states.PICK_DISCARD then │ - error(string.format("Unexpected handle_discard_confirm from state %s", state.state)) │ - end │ - │ - if #state.hands[player] == core.CARDS_PER_HAND then │ - error(string.format("Unexpected handle_discard_confirm when player has 4 cards")) │ - end │ - │ - for i=1,#state.tentative_discards[player] do │ - local i2 = #state.tentative_discards[player] - i + 1 │ - if state.tentative_discards[player][i2] then │ - state.crib[#state.crib+1] = table.remove(state.hands[player], i2) │ - end │ - end │ - │ - state.tentative_discards[player] = {} │ - │ - local discard_done = true │ - for player_idx=1, #state.hands do │ - if #state.hands[player_idx] ~= core.CARDS_PER_HAND then │ - discard_done = false │ - goto done_checking_players │ - end │ - end │ - ::done_checking_players:: │ - │ - if discard_done then │ - state.state = core.states.PLAY │ - state.cut_deck_card = table.remove(state.deck) │ - if state.cut_deck_card.val == cards.JACK then │ - -- TODO notify player that they were awarded points due to this │ - state.score[state.player_crib] = state.score[state.player_crib] + JACK_OF_SUIT_CUT_DECK_POINTS │ - end │ - end │ - │ - return core.RC_SUCCESS │ -end │ - │ --- TODO put in a utility library or something │ -local function copy_ary(ary) │ - local ary_copied = {} │ - for i=1,#ary do │ - ary_copied[i] = ary[i] │ - end │ - return ary_copied │ -end │ - │ - │ -local function get_card_value(card) │ - if card.val <= 10 then return card.val │ - else return 10 end │ -end │ - │ -local function card_order(a,b) │ - return a.val < b.val │ -end │ - │ --- runs can be out of order, │ --- so the way to check is if the sorted │ --- list of cards is sequential │ -local function check_is_run_add_card(sequence, card, len) │ - local new_sequence = {} │ - -- get the last (len-1) cards from sequence │ - local start_i = #sequence - (len-1) + 1 │ - if start_i < 1 then │ - return false │ - end │ - if card == nil then │ - error("card is nil") │ - end │ - │ - for i=start_i,#sequence do │ - new_sequence[#new_sequence+1] = sequence[i] │ - end │ - new_sequence[#new_sequence+1] = card │ - │ - --print("new_sequence = ", cards.card_array_to_string(new_sequence)) │ - --for i=1,#new_sequence-1 do │ - -- print("card_order(...) = ", card_order(new_sequence[i], new_sequence[i+1])) │ - --end │ - table.sort(new_sequence, card_order) │ - --print("new_sequence = ", cards.card_array_to_string(new_sequence)) │ - │ - if #new_sequence < 3 then │ - error(string.format("new_sequence len is %d?", #new_sequence)) │ - end │ - │ - local is_run = true │ - local last_elem = new_sequence[1] │ - for i=2,#new_sequence do │ - if new_sequence[i].val ~= last_elem.val + 1 then │ - is_run = false │ - goto done_run_len_check │ - end │ - last_elem = new_sequence[i] │ - end │ - ::done_run_len_check:: │ - return is_run │ - │ -end │ - │ -local function is_run_sequence_enabled(sequence, cards_enabled) │ - local enabled_seq = {} │ - for i=1,#cards_enabled do │ - if cards_enabled[i] then │ - table.insert(enabled_seq, sequence[i]) │ - end │ - end │ - │ - if #enabled_seq < 3 then │ - return false │ - end │ - │ - table.sort(enabled_seq, card_order) │ - │ - for i=1,#enabled_seq-1 do │ - if enabled_seq[i+1].val ~= enabled_seq[i].val + 1 then │ - return false │ - end │ - end │ - │ - return true │ -end │ - │ -local function cards_enabled_to_card_idx(cards_enabled) │ - local card_idxes = {} │ - for i=1,#cards_enabled do │ - if cards_enabled[i] then │ - table.insert(card_idxes, i) │ - end │ - end │ - return card_idxes │ -end │ - │ -local function run_is_subsequence(run, run_ary) │ - for _, run2 in ipairs(run_ary) do │ - local i=1 │ - for j=1,#run2 do │ - if run2[j] < run[i] then │ - -- pass │ - elseif run2[j] == run[i] then │ - if i == #run then │ - return true │ - end │ - i = i + 1 │ - else │ - goto next_run │ - end │ - end │ - ::next_run:: │ - end │ -end │ - │ --- Only handle sequences of 5 cards, │ --- and only check for runs of length 5, 4, or 3 │ --- Return array of array of indicies of cards that are enabled to make up a run │ --- A run of 4 {2,3,4,5} must only count as one run, but │ --- Two runs of 3 must be counted if they don't make a run of 4, e.g. {2, 2, 3, 4} is two runs of 3 │ -local function check_points_sequence_run(sequence) │ - │ - if #sequence ~= 5 then │ - error(string.format("checked for run on sequences of len %d", #sequence)) │ - end │ - │ - local cards_enabled = {} │ - for i=1,#sequence do │ - cards_enabled[i] = true │ - end │ - │ - if is_run_sequence_enabled(sequence, cards_enabled) then │ - return {cards_enabled_to_card_idx(cards_enabled)} │ - end │ - │ - local runs4 = {} │ - for card_disabled_idx=1,#cards_enabled do │ - cards_enabled[card_disabled_idx] = false │ - if is_run_sequence_enabled(sequence, cards_enabled) then │ - table.insert(runs4, cards_enabled_to_card_idx(cards_enabled)) │ - end │ - cards_enabled[card_disabled_idx] = true │ - end │ - │ - -- TODO need to check for runs of length 3 that are not │ - -- contained within a run of 4 │ - local runs3 = {} │ - for card_disabled_idx1=1, #cards_enabled do │ - cards_enabled[card_disabled_idx1] = false │ - for card_disabled_idx2=card_disabled_idx1+1, #cards_enabled do │ - cards_enabled[card_disabled_idx2] = false │ - if is_run_sequence_enabled(sequence, cards_enabled) then │ - local run_seq = cards_enabled_to_card_idx(cards_enabled) │ - if not run_is_subsequence(run_seq, runs4) then │ - table.insert(runs3, run_seq) │ - end │ - end │ - cards_enabled[card_disabled_idx2] = true │ - end │ - cards_enabled[card_disabled_idx1] = true │ - end │ - │ - local runs = {} │ - for i=1,#runs4 do │ - runs[#runs+1] = runs4[i] │ - end │ - for i=1,#runs3 do │ - runs[#runs+1] = runs3[i] │ - end │ - │ - return runs │ -end │ - │ -local function check_points_sequence_15(sequence) │ - local fifteen_count = 0 │ - local combinations = {} │ - │ - local cards_enabled = {} │ - for i=1,#sequence do │ - cards_enabled[i] = false │ - end │ - │ - │ - -- loop through all combinations of cards, like counting in binary: │ - -- 0 0 0 0 │ - -- 0 0 0 1 │ - -- 0 0 1 0 │ - -- 0 0 1 1 │ - -- 0 1 0 0 │ - -- ... │ - -- io.write(string.format("starting loop... %d %d\n", #sequence, #cards_enabled)) │ - while true do │ - local sum = 0 │ - local debug_str = "" │ - for i=1,#sequence do │ - -- debug_str = debug_str .. string.format("%d ", cards_enabled[i] and 1 or 0) │ - if cards_enabled[i] then │ - sum = sum + get_card_value(sequence[i]) │ - end │ - end │ - --debug_str = debug_str .. string.format("; sum=%d\n", sum) │ - --io.write(debug_str) │ - if sum == 15 then │ - fifteen_count = fifteen_count + 1 │ - local cards_enabled_copy = {} │ - for idx,val in ipairs(cards_enabled) do │ - cards_enabled_copy[idx] = val │ - end │ - table.insert(combinations, cards_enabled_copy) │ - end │ - │ - local j = 1 │ - while j <= #sequence and cards_enabled[j] do │ - cards_enabled[j] = false │ - j = j + 1 │ - end │ - if j > #sequence then │ - goto end_loop │ - else │ - cards_enabled[j] = true │ - end │ - end │ - ::end_loop:: │ - return { │ - count = fifteen_count, │ - combinations = combinations, │ - } │ -end │ - │ -local function pair_count_to_points(pair_count) │ - local pair_points = 0 │ - if pair_count == 2 then │ - pair_points = 2 │ - elseif pair_count == 3 then │ - pair_points = 6 │ - elseif pair_count == 4 then │ - pair_points = 12 │ - end │ - return pair_points │ -end │ - │ - │ - │ -local function check_points_seqeuence_pair(sequence) │ - local card_pairs = {} │ - for val=cards.MIN_VAL,cards.MAX_VAL do │ - local possible_pair = {} │ - for j=1,#sequence do │ - if sequence[j].val == val then │ - table.insert(possible_pair, j) │ - end │ - end │ - if #possible_pair > 1 then │ - table.insert(card_pairs, possible_pair) │ - end │ - end │ - return card_pairs │ -end │ - │ -local function check_points_sequence_flush(sequence, cut_deck_card) │ - local card_flushes = {} │ - for _, suit in ipairs(cards.suits) do │ - local possible_flush = {} │ - for i=1,#sequence do │ - if sequence[i].suit == suit then │ - table.insert(possible_flush, i) │ - end │ - end │ - │ - if #possible_flush >= 4 and suit == cut_deck_card.suit then │ - table.insert(possible_flush, #sequence + 1) │ - end │ - │ - if #possible_flush >= 4 then │ - table.insert(card_flushes, possible_flush) │ - end │ - end │ - return card_flushes │ -end │ - │ -function core.check_points_sequence(sequence, cut_deck_card) │ - local info = { │ - points_reasons = {}, │ - points = 0, │ - } │ - │ - local sequence2 = copy_ary(sequence) │ - table.insert(sequence2, cut_deck_card) │ - │ - local info_15 = check_points_sequence_15(sequence2) │ - │ - for _,combination in ipairs(info_15.combinations) do │ - local card_idxs = {} │ - for j=1,#combination do │ - if combination[j] then │ - table.insert(card_idxs, j) │ - end │ - end │ - info.points_reasons[#info.points_reasons+1] = { │ - reason = core.point_types.FIFTEEN, │ - points = 2, │ - card_idxs = card_idxs, │ - } │ - end │ - │ - info.points = info.points + info_15.count * 2 │ - │ - local runs = check_points_sequence_run(sequence2) │ - for _,run in ipairs(runs) do │ - info.points = info.points + #run │ - info.points_reasons[#info.points_reasons+1] = { │ - reason = core.point_types.RUN, │ - points = #run, │ - card_idxs = run, │ - } │ - end │ - │ - local card_pairs = check_points_seqeuence_pair(sequence2) │ - for _,card_pair in ipairs(card_pairs) do │ - local pair_points = pair_count_to_points(#card_pair) info.points = info.points + pair_points │ - info.points_reasons[#info.points_reasons+1] = { │ - reason = core.point_types.PAIR, │ - points = pair_points, │ - card_idxs = card_pair, │ - } │ - end │ - │ - local card_flushes = check_points_sequence_flush(sequence, cut_deck_card) │ - for _, card_flush in ipairs(card_flushes) do │ - local flush_points = #card_flush │ - info.points = info.points + flush_points │ - info.points_reasons[#info.points_reasons+1] = { │ - reason = core.point_types.FLUSH, │ - points = flush_points, │ - card_idxs = card_flush, │ - } │ - end │ - │ - for card_idx, card in ipairs(sequence) do │ - if card.val == cards.JACK and card.suit == cut_deck_card.suit then │ - info.points_reasons[#info.points_reasons+1] = { │ - reason = core.point_types.JACK_OF_SUIT, │ - points = JACK_OF_SUIT_HAND_CRIB_POINTS, │ - card_idxs = {card_idx}, │ - } │ - end │ - end │ - │ - return info │ -end │ - │ -local function check_points_add_card(playing_sequence, card) │ - local info = { │ - points_reasons = {}, │ - points = 0, │ - } │ - if #playing_sequence == 0 then │ - return info │ - end │ - │ - -- check for runs │ - local run_len = 0 │ - local diff = playing_sequence[#playing_sequence].val - card.val │ - local last_card = playing_sequence[#playing_sequence] │ - for possible_run_len=#playing_sequence+1,3,-1 do │ - if check_is_run_add_card(playing_sequence, card, possible_run_len) then │ - run_len = possible_run_len │ - goto done_run_check │ - end │ - end │ - ::done_run_check:: │ - │ - info.points = info.points + run_len │ - info.points_reasons[#info.points_reasons] = { reason = core.point_types.RUN, points = run_len } │ - │ - -- check for pairs of two or more of cards with the same value │ - local pair_count = 1 │ - for i=#playing_sequence,1,-1 do │ - if playing_sequence[i].val == card.val then │ - pair_count = pair_count + 1 │ - else │ - goto done_pair_check │ - end │ - end │ - ::done_pair_check:: │ - │ - local pair_points = pair_count_to_points(pair_count) │ - │ - if pair_points > 0 then │ - info.points = info.points + pair_points │ - info.points_reasons[#info.points_reasons] = { reason = core.point_types.PAIR, points = pair_points } │ - end │ - │ - return info │ -end │ - │ -local function cards_in_hand_remaining(state) │ - for _,hand in ipairs(state.hands) do │ - if #hand > 0 then │ - return true │ - end │ - end │ - return false │ -end │ - │ - │ - │ -local function handle_play(state, player, idx, points_reasons) │ - if state.player_turn ~= player then │ - return core.RC_NOT_YOUR_TURN │ - end │ - │ - if not (1 <= idx and idx <= #state.hands[player]) then │ - error(string.format("Invalid move card %d of hand with only %d cards", idx, #state.hands[player])) │ - end │ - │ - local tentative_card_played = state.hands[player][idx] │ - │ - local tentative_card_value = get_card_value(tentative_card_played) │ - │ - if state.playing_sum + tentative_card_value > core.MAX_PLAYING_SUM then │ - return core.RC_PLAY_HIGHER_THAN_31 │ - end │ - │ - state.playing_sum = state.playing_sum + tentative_card_value │ - state.first_player_cant_move = 0 │ - │ - if state.playing_sum == 15 then │ - state.score[player] = state.score[player] + 2 │ - points_reasons[#points_reasons+1] = { reason = core.point_types.FIFTEEN, points = 2} │ - elseif state.playing_sum == 31 then │ - state.score[player] = state.score[player] + 2 │ - points_reasons[#points_reasons+1] = { reason = core.point_types.THIRTY_ONE, points = 2} │ - end │ - │ - local card = table.remove(state.hands[player], idx) │ - │ - local points_info = check_points_add_card(state.playing_sequence, card) │ - for _,points_info_elem in ipairs(points_info.points_reasons) do │ - points_reasons[#points_reasons+1] = points_info_elem │ - end │ - state.score[player] = state.score[player] + points_info.points │ - │ - -- TODO what oher cases result in points? │ - -- * a run of 3 or more? │ - -- * pairs? │ - -- * getting 30? │ - -- * last card │ - -- * multiple cards of the same suit? │ - │ - -- TODO do something if score is 31? │ - │ - table.insert(state.playing[player], card) │ - table.insert(state.playing_sequence, card) │ - │ - │ - if not cards_in_hand_remaining(state) then │ - │ - -- move all cards from playing to played │ - for i=1,state.player_count do │ - while #state.playing[i] > 0 do │ - table.insert(state.played[i], table.remove(state.playing[i], 1)) │ - │ - end │ - │ - end │ - │ - state.state = core.states.ACKNOWLEDGE_POINTS │ - else │ - state.player_turn = ((state.player_turn) % state.player_count) + 1 │ - end │ - │ - -- check if player just played their last card and award a point? │ - -- No, it's last card of the run, I think │ - --if #state.hands[player] == 0 then │ - -- state.score[player] = state.score[player] + 1 │ - --end │ - │ - return core.RC_SUCCESS │ -end │ - │ -function core.cant_move(state) │ - local player = state.player_turn │ - for _,card in ipairs(state.hands[player]) do │ - if state.playing_sum + get_card_value(card) <= core.MAX_PLAYING_SUM then │ - return false │ - end │ - end │ - return true │ -end │ - │ -local function handle_cant_move_accept(state, player) │ - if player ~= state.player_turn then │ - return core.RC_NOT_YOUR_TURN │ - end │ - │ - if not core.cant_move(state) then │ - return core.RC_MUST_MOVE │ - end │ - │ - state.player_turn = ((state.player_turn) % state.player_count) + 1 │ - if state.first_player_cant_move == state.player_turn then │ - local last_player_played = (state.first_player_cant_move-2) % state.player_count + 1 │ - -- one point for last card │ - -- TODO make sure this happens when no player has any cards remaining, too │ - -- TODO do not do this if each player pressed "can't move" after 31 was reached. │ - -- Maybe transition to "next" for that case │ - state.score[last_player_played] = state.score[last_player_played] + LAST_CARD_POINTS │ - state.first_player_cant_move = 0 │ - state.playing_sum = 0 │ - for player_idx=1,state.player_count do │ - while #state.playing[player_idx] > 0 do │ - table.insert(state.played[player_idx], table.remove(state.playing[player_idx], 1)) │ - end │ - end │ - -- TODO if "can't move" goes around the whole table and no one can move, │ - -- then must set playing_sum to zero and put the "playing" cards to the "played" tables. │ - -- Also record points that people get during this whole thing │ - -- Also last card gets a point, I think │ - else │ - if state.first_player_cant_move == 0 then │ - state.first_player_cant_move = player │ - end │ - end │ - │ - │ - return core.RC_SUCCESS │ -end │ - │ -function core.has_acknowledged_points(state, player) │ - return state.acknowledged_points[player] │ -end │ - │ -local function handle_acknowledged_points(state, player) │ - local rc = core.RC_SUCCESS │ - state.acknowledged_points[player] = true │ - │ - local all_acknowledged = true │ - for i=1,state.player_count do │ - if not state.acknowledged_points[i] then │ - all_acknowledged = false │ - goto done │ - end │ - end │ - ::done:: │ - │ - if all_acknowledged then │ - state.state = core.states.ACKNOWLEDGE_CRIB │ - │ - -- reset acknowledged_points array │ - for i=1,state.player_count do │ - state.acknowledged_points[i] = false │ - end │ - │ - -- add points │ - for i=1,state.player_count do │ - local points_info = core.check_points_sequence(state.played[i], state.cut_deck_card) │ - │ - state.score[i] = state.score[i] + points_info.points │ - end │ - end │ - │ - return rc │ -end │ - │ -local function handle_acknowledged_crib(state, player) │ - local rc = core.RC_SUCCESS │ - state.acknowledged_points[player] = true │ - │ - local all_acknowledged = true │ - for i=1,state.player_count do │ - if not state.acknowledged_points[i] then │ - all_acknowledged = false │ - goto done │ - end │ - end │ - ::done:: │ - │ - if all_acknowledged then │ - for i=1,state.player_count do │ - state.acknowledged_points[i] = false │ - end │ - │ - local points_info = core.check_points_sequence(state.crib, state.cut_deck_card) │ - │ - state.score[state.player_crib] = state.score[state.player_crib] + points_info.points │ - │ - │ - state.state = core.states.PICK_DISCARD │ - state.player_crib = ((state.player_crib) % state.player_count) + 1 │ - deal_new_hand(state, true) │ - end │ - │ - return rc │ - │ -end │ - │ -function core.handle_move(state, player, action) │ - if state.state == core.states.PICK_DISCARD then │ - if #state.hands[player] == core.CARDS_PER_HAND then │ - return core.RC_WAIT_FOR_OTHERS_TO_DISCARD │ - end │ - if action.action == core.actions.HAND then │ - state.tentative_discards[player][action.idx] = not(state.tentative_discards[player][action.idx]) │ - return core.RC_SUCCESS │ - elseif action.action == core.actions.DISCARD_CONFIRM then │ - return handle_discard_confirm(state, player) │ - end │ - elseif state.state == core.states.PLAY then │ - if action.action == core.actions.HAND then │ - -- TODO get this to the user somehow │ - local points_reasons = {} │ - local rc = handle_play(state, player, action.idx, points_reasons) │ - return rc │ - elseif action.action == core.actions.CANT_MOVE_ACCEPT then │ - return handle_cant_move_accept(state, player) │ - end │ - elseif state.state == core.states.ACKNOWLEDGE_POINTS then │ - if action.action == core.actions.NEXT then │ - return handle_acknowledged_points(state, player) │ - end │ - elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ - if action.action == core.actions.NEXT then │ - return handle_acknowledged_crib(state, player) │ - end │ - end │ - error(string.format("Unhandled action %s from state %s", action.action, state.state)) │ - return core.RC_ERROR │ -end │ - │ --- get number of cards needed to select for discard before we can continue │ -function core.get_tentative_remaining_cards(state, player) │ - local tentative_discard_count = 0 │ - for i=1,#state.tentative_discards[player] do │ - if state.tentative_discards[player][i] then │ - tentative_discard_count = tentative_discard_count + 1 │ - end │ - end │ - │ - local tentative_remaining_cards = #state.hands[player] - tentative_discard_count │ - return tentative_remaining_cards │ -end │ - │ --- Check what cards should be highlighted in the discard state │ -function core.get_highlight_ary(state, player) │ - │ - local highlight_ary = {} │ - if state.state == core.states.PICK_DISCARD then │ - local tentative_remaining_cards = core.get_tentative_remaining_cards(state, player) │ - │ - for i=1,#state.hands[player] do │ - local highlight = nil │ - if tentative_remaining_cards == core.CARDS_PER_HAND then │ - highlight = false │ - elseif tentative_remaining_cards > core.CARDS_PER_HAND then │ - highlight = not state.tentative_discards[player][i] │ - else │ - highlight = state.tentative_discards[player][i] │ - end │ - highlight_ary[i] = highlight │ - end │ - elseif state.state == core.states.PLAY then │ - for i=1,#state.hands[player] do │ - local card = state.hands[player][i] │ - local can_play = nil │ - if state.player_turn ~= player then │ - can_play = false │ - else │ - can_play = (get_card_value(card) + state.playing_sum) <= core.MAX_PLAYING_SUM │ - end │ - highlight_ary[i] = can_play │ - end │ - elseif state.state == core.states.ACKNOWLEDGE_POINTS or │ - state.state == core.states.ACKNOWLEDGE_CRIB then │ - -- no highlights │ - else │ - error(string.format("Unhandled state %s", state.state)) │ - end │ - return highlight_ary │ -end │ - │ -function core.get_discard_status_str(state, player) │ - if state.state ~= core.states.PICK_DISCARD then │ - error("Not waiting for discard but called get_discard_status_str") │ - return "Not waiting for discard..." │ - end │ - │ - if #state.hands[player] == core.CARDS_PER_HAND then │ - return "Waiting for other players to discard" │ - end │ - │ - local tentative_remaining_cards = core.get_tentative_remaining_cards(state, player) │ - │ - local diff = tentative_remaining_cards - core.CARDS_PER_HAND │ - │ - if diff > 0 then │ - return string.format("Please select %d more cards for discard", diff) │ - elseif diff < 0 then │ - return string.format("Please select %d fewer cards for discard", -diff) │ - else │ - return "Press \"discard\" button to discard selected cards" │ - end │ -end │ - │ -tests = { │ - { actual = check_is_run_add_card({{val=9}, {val=11}}, {val=10}, 3), expected = true }, │ - { actual = check_is_run_add_card({{val=9}, {val=12}}, {val=10}, 3), expected = false }, │ - { actual = check_is_run_add_card({{val=2}, {val=5}}, {val=4}, 3), expected = false }, │ - { actual = check_is_run_add_card({{val=3}, {val=5}, {val=4}}, {val=2}, 3), expected = false }, │ - { actual = check_is_run_add_card({{val=2}, {val=5}, {val=4}}, {val=3}, 3), expected = true }, │ - { actual = check_is_run_add_card({{val=2}, {val=5}, {val=4}}, {val=3}, 4), expected = true }, │ - │ - { actual = check_points_sequence_15({{val=10}, {val=4}, {val= 1}}).count, expected = 1}, │ - { actual = check_points_sequence_15({{val= 9}, {val=4}, {val= 1}}).count, expected = 0}, │ - { actual = check_points_sequence_15({{val= 9}, {val=4}, {val= 2}}).count, expected = 1}, │ - { actual = check_points_sequence_15({{val=10}, {val=5}, {val= 3}}).count, expected = 1}, │ - { actual = check_points_sequence_15({{val=10}, {val=5}, {val= 5}}).count, expected = 2}, │ - { actual = check_points_sequence_15({{val=10}, {val=5}, {val=10}}).count, expected = 2}, │ - { actual = check_points_sequence_15({{val= 5}, {val=6}, {val= 4}}).count, expected = 1}, │ - { actual = check_points_sequence_15({{val= 5}, {val=5}, {val= 5}}).count, expected = 1}, │ - { actual = check_points_sequence_15({{val= 5}, {val=5}, {val= 5}, {val=5}}).count, expected = 4}, │ - │ - -- { actual = check_points_sequence_15({{val= 13}, {val=7}, {val= 5}, {val=7}, {val=9}, {val=6}}).count, expected = 2}, │ - { actual = check_points_sequence_15({{val= 8}, {val=5}, {val= 9}, {val=11}, {val=6}, {val=2}}).count, expected = 3}, │ -} │ - │ -for test_idx, test in ipairs(tests) do │ - if test.actual ~= test.expected then │ - error(string.format("Test %d failed, expected %s, received %s", test_idx, test.expected, test.actual)) │ - end │ -end │ - │ -local run_tests = { │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=6}, {val=11}}), runs = 1, run_len = 3}, │ - { actual = check_points_sequence_run({{val=3}, {val=4}, {val=2}, {val=6}, {val=11}}), runs = 1, run_len = 3}, │ - { actual = check_points_sequence_run({{val=4}, {val=2}, {val=6}, {val=3}, {val=11}}), runs = 1, run_len = 3}, │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=11}}), runs = 0, run_len = nil}, │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=5}, {val=11}}), runs = 1, run_len = 4}, │ - { actual = check_points_sequence_run({{val=5}, {val=2}, {val=3}, {val=4}, {val=11}}), runs = 1, run_len = 4}, │ - { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=4}, {val=11}}), runs = 2, run_len = 3}, │ - { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=4}, {val=2}}), runs = 2, run_len = 4}, │ - { actual = check_points_sequence_run({{val=5}, {val=3}, {val=4}, {val=6}, {val=2}}), runs = 1, run_len = 5}, │ - │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=3}, {val=4}}), runs = 4, run_len = 3}, │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=4}, {val=3}, {val=4}}), runs = 4, run_len = 3}, │ - { actual = check_points_sequence_run({{val=4}, {val=2}, {val=4}, {val=2}, {val=3}}), runs = 4, run_len = 3}, │ - │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=7}}), runs = 1, run_len = 3}, │ - { actual = check_points_sequence_run({{val=2}, {val=3}, {val=5}, {val=6}, {val=8}}), runs = 0, run_len = nil}, │ - { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=1}, {val=2}}), runs = 1, run_len = 3}, │ - { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=10}, {val=2}}), runs = 1, run_len = 4}, │ - { actual = check_points_sequence_run({{val=11}, {val=12}, {val=13}, {val=10}, {val=9}}), runs = 1, run_len = 5}, │ - │ -} │ - │ -for test_idx, test in ipairs(run_tests) do │ - if #test.actual ~= test.runs then │ - error(string.format("Run test %d failed, expected %d runs, actual %d", test_idx, test.runs, #test.actual )) │ - end │ - for i=1,#test.actual do │ - if #test.actual[i] ~= test.run_len then │ - error(string.format("Run test %d failed, run %d had len %d, expected %d", │ - test_idx, i, #test.actual[i], test.run_len)) │ - end │ - end │ -end │ - │ -local pair_tests = { │ - { actual = check_points_seqeuence_pair({{val= 5}, {val=13}, {val=13}, {val= 4}}), pair_lens = {2} }, │ - { actual = check_points_seqeuence_pair({{val=13}, {val=13}, {val=13}, {val= 4}}), pair_lens = {3} }, │ - { actual = check_points_seqeuence_pair({{val=13}, {val= 4}, {val=13}, {val= 5}}), pair_lens = {2} }, │ - { actual = check_points_seqeuence_pair({{val=13}, {val= 4}, {val=13}, {val= 4}}), pair_lens = {2, 2} }, │ - { actual = check_points_seqeuence_pair({{val=13}, {val=13}, {val=13}, {val=13}}), pair_lens = {4} }, │ - { actual = check_points_seqeuence_pair({{val= 2}, {val= 2}, {val= 3}, {val= 4}}), pair_lens = {2} }, │ - { actual = check_points_seqeuence_pair({{val= 2}, {val= 2}, {val= 3}, {val= 3}}), pair_lens = {2, 2} }, │ -} │ - │ -for test_idx, test in ipairs(pair_tests) do │ - if #test.actual ~= #test.pair_lens then │ - error(string.format("Pair test %d failed, expected %d pairs, actual %d", test_idx, #test.pair_lens, #test.actual )) │ - end │ - for i=1,#test.actual do │ - if #test.actual[i] ~= test.pair_lens[i] then │ - error(string.format("Pair test %d failed, pair %d had len %d, expected %d", │ - test_idx, i, #test.actual[i], test.pair_lens[i])) │ - end │ - end │ -end │ - │ -local A = cards.DIAMONDS │ -local B = cards.SPADES │ - │ -local flush_tests = { │ - { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=B}}, {suit=A}), expected={} }, │ - { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=A}}, {suit=B}), expected={4} }, │ - { actual = check_points_sequence_flush({{suit=A}, {suit=A}, {suit=A}, {suit=A}}, {suit=A}), expected={5} }, │ - { actual = check_points_sequence_flush({{suit=B}, {suit=A}, {suit=A}, {suit=A}}, {suit=A}), expected={} }, │ -} │ - │ -for test_idx, test in ipairs(flush_tests) do │ - if #test.actual ~= #test.expected then │ - error(string.format("Flush Test %d failed, expected %d flushes, actual %d", test_idx, #test.expected, #test.actual)) │ - end │ - │ - for i=1,#test.expected do │ - if #test.actual[i] ~= test.expected[i] then │ - error(string.format("Flush test %d failed, elem %d has len %d, expected %d", │ - test_idx, i, #test.actual[i], test.expected[i])) │ - end │ - end │ -end │ - │ -return core │ -local core = require("games/crib/crib_core") │ -local cards_draw = require("libs/cards/cards_draw") │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ - │ -local draw = {} │ - │ -draw.ACTION_TYPE_GAME = 'game' │ -draw.ACTION_TYPE_UI = 'ui' │ - │ -draw.ACTION_UI_SHOW_POINTS_POPUP = "show_points" │ -draw.ACTION_UI_HIDE_POINTS_POPUP = "hide_points" │ - │ -local TEXT_COLOUR = '#000000' │ -local TEXT_SIZE = 24 │ -local text_height = 20 │ - │ -local CARD_POINTS_POPUP_BACKGROUND_COLOUR = '#aaaaaaf0' │ -local CARD_POINTS_POPUP_OUTLINE_COLOUR = '#000000' │ -local popup_padding = 40 │ - │ -draw.BTN_ID_DISCARD = "discard" │ -draw.BTN_ID_PASS = "pass" │ -draw.BTN_ID_NEXT = "next" │ - │ -local width = nil │ -local height = nil │ -local card_height = 105 │ -local card_width = 60 │ -local card_font_size = 28 │ -local card_padding = 15 │ -local card_discard_offset = 40 │ --- when drawing a pile of cards, this is the y and x offset │ --- that should be drawn to subsequent cards on the pile so │ --- they appear to form a stack. │ -local card_pile_offset = 3 │ - │ -local more_info_btn_width = 50 │ -local more_info_btn_height = 50 │ - │ -local player_hand_y_centre = nil │ -local player_hand_x_centre = nil │ - │ - │ -local small_card_width = 35 │ -local small_card_height = 50 │ -local small_card_font_size = 12 │ -local small_card_padding = 3 │ - │ -local hand_width = nil │ - │ -function draw.init(height_arg, width_arg) │ - height = height_arg │ - width = width_arg │ - │ - player_hand_y_centre = math.floor(height - card_height/2 - card_padding) │ - player_hand_x_centre = math.floor(width/2) │ - │ - hand_width = core.CARDS_PER_HAND * card_width + (core.CARDS_PER_HAND - 1) * card_padding │ - │ - alexgames.create_btn(draw.BTN_ID_DISCARD, "Discard", 1) │ - alexgames.create_btn(draw.BTN_ID_PASS, "Can't move", 1) │ - alexgames.create_btn(draw.BTN_ID_NEXT, "Next", 1) │ - alexgames.set_btn_enabled(draw.BTN_ID_DISCARD, false) │ - alexgames.set_btn_enabled(draw.BTN_ID_PASS, false) │ - alexgames.set_btn_enabled(draw.BTN_ID_NEXT, false) │ - │ - local ui_state = { │ - points_popup_shown = false, │ - points_popup_player = nil, │ - } │ - return ui_state │ -end │ - │ -local function get_offset_ary(state, player) │ - if state.state ~= core.states.PICK_DISCARD then │ - return nil │ - end │ - local offset_ary = {} │ - for i=1,#state.hands[player] do │ - local offset = nil │ - if state.tentative_discards[player][i] then │ - offset = -card_discard_offset │ - else │ - offset = 0 │ - end │ - offset_ary[i] = offset │ - end │ - return offset_ary │ -end │ - │ -local function get_hand_pos(state, this_player, player) │ - local pos = {} │ - local adjusted_player_pos = ((player - this_player) % state.player_count) │ - if adjusted_player_pos == 0 then │ - pos.y = player_hand_y_centre │ - pos.x = player_hand_x_centre │ - elseif adjusted_player_pos == 1 then │ - pos.y = math.floor(card_height/2 + card_padding) │ - pos.x = math.floor(width/2) │ - else │ - error(string.format("Unhandled this_player=%s, player=%s, adjusted=%s", this_player, player, adjusted_player_pos)) │ - end │ - │ - return pos │ -end │ - │ -local function get_more_info_btn_pos(this_player, player) │ - if this_player == player then │ - return { │ - y = math.floor(height - card_height - 2*card_padding - more_info_btn_height), │ - x = math.floor(width/2 + hand_width/2 - more_info_btn_width), │ - } │ - else │ - return { │ - y = math.floor(card_height + 2*card_padding), │ - x = math.floor(width/2 - hand_width/2), │ - } │ - end │ -end │ - │ -local function get_hand_score_pos(this_player, player) │ - if this_player == player then │ - return { │ - y = math.floor(height - card_height - 2*card_padding), │ - x = math.floor(width/2), │ - } │ - else │ - return { │ - y = math.floor(card_height + 2*card_padding + text_height), │ - x = math.floor(width/2), │ - } │ - end │ -end │ - │ -local function get_played_pos(state, this_player, player) │ - local pos = {} │ - --local adjusted_player_pos = ((player - this_player) % state.player_count) │ - local adjusted_player_pos = nil │ - if (this_player == player) then │ - adjusted_player_pos = 0 │ - else │ - adjusted_player_pos = 1 │ - end │ - │ - local offset_frac_y = 0.6 │ - local offset_card_widths_x = 2.0 │ - │ - if adjusted_player_pos == 0 then │ - pos.y = math.floor(offset_frac_y*height - card_height/2) │ - pos.x = math.floor(width/2 - card_width/2 + offset_card_widths_x*card_width) │ - elseif adjusted_player_pos == 1 then │ - pos.y = math.floor((1-offset_frac_y)*height - card_height/2) │ - pos.x = math.floor(width/2 - card_width/2 - offset_card_widths_x*card_width) │ - else │ - error(string.format("Unhandled this_player=%s, player=%s, adjusted=%s", this_player, player, adjusted_player_pos)) │ - end │ - return pos │ -end │ - │ -local function get_other_player(state, player) │ - if player == 1 then return 2 │ - else return 1 end │ -end │ - │ -local function player_pos_to_idx(state, player, pos) │ - if pos == 1 then return player │ - else return get_other_player(state, player) end │ -end │ - │ -local function draw_points_popup(state, points_info, player) │ - alexgames.draw_rect(CARD_POINTS_POPUP_BACKGROUND_COLOUR, │ - popup_padding, popup_padding, │ - width - popup_padding, height - popup_padding) │ - │ - alexgames.draw_text(string.format("Player %d points: %d", player, points_info.points), TEXT_COLOUR, │ - popup_padding + 2*card_padding, │ - popup_padding + card_padding, │ - TEXT_SIZE, 1, 0) │ - │ - for i,points_reason in ipairs(points_info.points_reasons) do │ - --local text_height = 16*2 │ - local text_height = small_card_height + small_card_padding │ - local text_pos_y = popup_padding + 4*card_padding + (i-1)*text_height │ - local reason_str = core.point_type_to_str(points_reason.reason) │ - alexgames.draw_text(string.format("+%2d %s", points_reason.points, reason_str), TEXT_COLOUR, │ - text_pos_y, popup_padding + 3*card_padding, 16, 1, 0) │ - for j,card_idx in ipairs(points_reason.card_idxs) do │ - local card_pos_x = width - popup_padding - j*(small_card_width + small_card_padding) │ - local card = nil │ - local hand = nil │ - if state.state == core.states.ACKNOWLEDGE_POINTS then │ - hand = state.played[player] │ - elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ - hand = state.crib │ - end │ - │ - if card_idx <= #hand then │ - card = hand[card_idx] │ - elseif card_idx == #state.played[player] + 1 then │ - card = state.cut_deck_card │ - else │ - error(string.format("Unexpected card_idx %s, #hand = %s", card_idx, #hand)) │ - end │ - cards_draw.draw_card(card, │ - math.floor(text_pos_y - small_card_height/2), │ - card_pos_x, │ - small_card_width, │ - small_card_height, │ - small_card_font_size, │ - false, │ - 0) │ - end │ - end │ - │ - local btn_pos_y = height - popup_padding - more_info_btn_height - card_padding │ - local btn_pos_x = popup_padding + card_padding │ - alexgames.draw_rect('#dddddd', │ - btn_pos_y, btn_pos_x, │ - (width - popup_padding - card_padding), -- - btn_pos_x, │ - (height - popup_padding - card_padding)) -- - btn_pos_y) │ - alexgames.draw_text("Close", TEXT_COLOUR, │ - math.floor(btn_pos_y + more_info_btn_height/2), │ - math.floor(width/2), │ - TEXT_SIZE, 0, 0) │ -end │ - │ -local function get_hand_to_draw(state, this_player, player) │ - if state.state == core.states.ACKNOWLEDGE_POINTS then │ - return state.played[player] │ - elseif state.state == core.states.ACKNOWLEDGE_CRIB then │ - if player == state.player_crib then │ - return state.crib │ - else │ - return {} │ - end │ - else │ - if this_player == player then │ - return state.hands[player] │ - else │ - local len = #state.hands[player] │ - local hand = {} │ - for i=1,len do │ - table.insert(hand, cards.UNREVEALED_CARD) │ - end │ - return hand │ - end │ - end │ -end │ - │ -local function get_crib_label_pos(player_crib, player) │ - if player == player_crib then │ - return { │ - y = math.floor(height - card_height - 4*card_padding), │ - x = math.floor(width - 2*card_padding), │ - align = -1, │ - } │ - else │ - return { │ - y = math.floor(card_height + 5*card_padding), │ - x = math.floor(2*card_padding), │ - align = 1, │ - } │ - end │ -end │ - │ -local function get_score(state, player) │ - --if state == nil then return "" end │ - --if player == nil then return "" end │ - return string.format("%d", state.score[player]) │ -end │ - │ -function draw.draw(state, ui_state, player) │ - alexgames.draw_clear() │ - │ - │ - if state == nil then │ - return │ - end │ - │ - local offset_ary = nil │ - local highlight_ary = core.get_highlight_ary(state, player) │ - │ - if state.state == core.states.PICK_DISCARD then │ - offset_ary = get_offset_ary(state, player) │ - elseif state.state == core.states.PLAY then │ - end │ - │ - if state.state == core.states.PLAY then │ - alexgames.draw_text(tostring(state.playing_sum), TEXT_COLOUR, │ - math.floor(height/2), │ - math.floor(width/2 + card_padding), │ - TEXT_SIZE, │ - 1, 0) │ - end │ - │ - if state.cut_deck_card ~= nil then │ - cards_draw.draw_card(state.cut_deck_card, │ - math.floor(height/2 - card_height/2), │ - math.floor(width/2 - card_width), │ - card_width, │ - card_height, │ - card_font_size, │ - false, 0) │ - end │ - │ - alexgames.draw_text(get_score(state, player), TEXT_COLOUR, │ - math.floor(height - card_height - 2*card_padding), │ - math.floor(width - 2*card_padding), │ - TEXT_SIZE, │ - -1, │ - 0) │ - │ - local crib_label_pos = get_crib_label_pos(state.player_crib, player) │ - alexgames.draw_text("crib", TEXT_COLOUR, │ - crib_label_pos.y, │ - crib_label_pos.x, │ - TEXT_SIZE, │ - crib_label_pos.aign, │ - 0) │ - │ - local my_hand = get_hand_pos(state, player, player) │ - cards_draw.draw_card_array(get_hand_to_draw(state, player, player), │ - my_hand.y, │ - my_hand.x, │ - card_width, │ - card_height, │ - card_font_size, │ - highlight_ary, │ - card_padding, │ - offset_ary) │ - │ - if #state.playing[player] > 0 then │ - local pos = get_played_pos(state, player, player) │ - --local card = state.playing[player][#state.playing[player]] │ - -- .draw_card(card, y, x, width, height, font_size, highlight, angle) │ - for card_idx, card in ipairs(state.playing[player]) do │ - cards_draw.draw_card( │ - card, │ - pos.y + card_idx*card_pile_offset, │ - pos.x + card_idx*card_pile_offset, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - end │ - │ - -- TODO loop through all other players and draw their cards │ - -- TODO should draw offset array for other players too │ - local other_player = get_other_player(state, player) │ - alexgames.draw_text(get_score(state, other_player), TEXT_COLOUR, │ - math.floor(card_height + 3*card_padding), -- TODO the other one is 2*padding. Ensure vertical centre? │ - math.floor(2*card_padding), │ - TEXT_SIZE, │ - 1, │ - 0) │ - local hand_pos = get_hand_pos(state, player, other_player) │ - │ - cards_draw.draw_card_array(get_hand_to_draw(state, player, other_player), │ - hand_pos.y, │ - hand_pos.x, │ - card_width, │ - card_height, │ - card_font_size, │ - nil, │ - card_padding, │ - get_offset_ary(state, other_player)) │ - │ - if #state.playing[other_player] > 0 then │ - local pos = get_played_pos(state, player, other_player) │ - local card = state.playing[other_player][#state.playing[other_player]] │ - -- .draw_card(card, y, x, width, height, font_size, highlight, angle) │ - for card_idx,card in ipairs(state.playing[other_player]) do │ - cards_draw.draw_card( │ - card, │ - pos.y + card_idx*card_pile_offset, │ - pos.x + card_idx*card_pile_offset, │ - card_width, │ - card_height, │ - card_font_size, │ - false, │ - 0) │ - end │ - end │ - │ - │ - for player_idx=1,state.player_count do │ - │ - local hand = nil │ - if state.state == core.states.ACKNOWLEDGE_POINTS then │ - hand = state.played[player_idx] │ - elseif state.state == core.states.ACKNOWLEDGE_CRIB and │ - state.player_crib == player_idx then │ - hand = state.crib │ - else │ - goto next_player │ - end │ - │ - local btn_pos = get_more_info_btn_pos(player, player) │ - draw_more.draw_graphic_ul("more_info_btn", │ - btn_pos.y, btn_pos.x, │ - more_info_btn_width, more_info_btn_height) │ - │ - local points_info = core.check_points_sequence(hand, state.cut_deck_card) │ - │ - local hand_score_pos = get_hand_score_pos(player, player_idx) │ - │ - alexgames.draw_text(string.format("+%d", points_info.points), │ - TEXT_COLOUR, │ - hand_score_pos.y, hand_score_pos.x, │ - TEXT_SIZE, 0, 0) │ - │ - if ui_state.points_popup_shown and player_idx == ui_state.points_popup_player then │ - draw_points_popup(state, points_info, player_idx) │ - end │ - │ - ::next_player:: │ - end │ - │ - alexgames.draw_refresh() │ - │ - local visible_btn_discard = (state.state == core.states.PICK_DISCARD) │ - local visible_btn_pass = (state.state == core.states.PLAY) │ - local visible_btn_next = (state.state == core.states.ACKNOWLEDGE_POINTS or │ - state.state == core.states.ACKNOWLEDGE_CRIB) │ - alexgames.set_btn_visible(draw.BTN_ID_DISCARD, visible_btn_discard) │ - alexgames.set_btn_visible(draw.BTN_ID_PASS, visible_btn_pass) │ - alexgames.set_btn_visible(draw.BTN_ID_NEXT, visible_btn_next) │ - │ - local enable_discard_btn = (state.state == core.states.PICK_DISCARD and │ - #state.hands[player] > core.CARDS_PER_HAND and │ - core.get_tentative_remaining_cards(state, player) == core.CARDS_PER_HAND) │ - local enable_pass_btn = (state.state == core.states.PLAY and │ - state.player_turn == player and │ - core.cant_move(state)) │ - local enable_btn_next = ((state.state == core.states.ACKNOWLEDGE_POINTS or │ - state.state == core.states.ACKNOWLEDGE_CRIB) and │ - not core.has_acknowledged_points(state, player)) │ - alexgames.set_btn_enabled(draw.BTN_ID_DISCARD, enable_discard_btn) │ - alexgames.set_btn_enabled(draw.BTN_ID_PASS, enable_pass_btn) │ - alexgames.set_btn_enabled(draw.BTN_ID_NEXT, enable_btn_next) │ -end │ - │ -function draw.coords_to_action(state, ui_state, player, coord_y, coord_x) │ - local action = { │ - action_type = nil, │ - action = nil, │ - idx = nil │ - } │ - │ - -- If clicked anywhere while the popup is shown, hide it │ - if ui_state.points_popup_shown then │ - action.action_type = draw.ACTION_TYPE_UI │ - action.action = draw.ACTION_UI_HIDE_POINTS_POPUP │ - return action │ - end │ - │ - for other_player=1,state.player_count do │ - local btn_pos = get_more_info_btn_pos(player, other_player) │ - if btn_pos.y <= coord_y and coord_y <= btn_pos.y + more_info_btn_height and │ - btn_pos.x <= coord_x and coord_x <= btn_pos.x + more_info_btn_width then │ - action.action_type = draw.ACTION_TYPE_UI │ - action.action = draw.ACTION_UI_SHOW_POINTS_POPUP │ - action.idx = other_player │ - return action │ - end │ - end │ - │ - │ - local offset_ary = get_offset_ary(state, player) │ - │ - local hand_idx = cards_draw.card_array_coords_to_idx( │ - #state.hands[player], │ - player_hand_y_centre, │ - player_hand_x_centre, │ - card_width, │ - card_height, │ - card_padding, │ - offset_ary, │ - coord_y, │ - coord_x) │ - if hand_idx ~= nil then │ - action.action_type = draw.ACTION_TYPE_GAME │ - action.action = core.actions.HAND │ - action.idx = hand_idx │ - end │ - │ - return action │ -end │ - │ -function draw.handle_ui_action(ui_state, ui_action) │ - if ui_action.action == draw.ACTION_UI_SHOW_POINTS_POPUP then │ - ui_state.points_popup_shown = true │ - ui_state.points_popup_player = ui_action.idx │ - elseif ui_action.action == draw.ACTION_UI_HIDE_POINTS_POPUP then │ - ui_state.points_popup_shown = false │ - ui_state.points_popup_player = nil │ - end │ -end │ - │ -return draw │ -local core = require("games/crib/crib_core") │ -local draw = require("games/crib/crib_draw") │ -local crib_serialize = require("games/crib/crib_serialize") │ -local alexgames = require("alexgames") │ - │ -local wait_for_players = require("libs/multiplayer/wait_for_players") │ - │ - │ --- TODO next steps: │ --- end game when first player reaches 121? │ --- │ --- │ --- bug fixes: │ --- * award a point for last card? │ --- * jack of suit? See what other points are missing │ --- * check wikipedia page for any behaviour that I missed │ --- * for hand {K K 5 5} with {J} as cut_deck_card, there are 8 matches (6 fifteens and 2 pairs). │ --- Need to add a separate page or something. 5 can be displayed comfortably │ - │ - │ -local g_session_id = nil │ -local state = nil │ -local players = { │ - [1] = "You", │ -} │ -local player = 1 │ -local is_client = false │ -local player_name_to_idx = {} │ - │ -core.print_state(state) │ - │ -local ui_state = draw.init(480, 480) │ - │ -function new_game(player_count) │ - g_session_id = alexgames.get_new_session_id() │ - state = core.new_game(player_count) │ -end │ - │ -function send_state_updates_if_host() │ - if is_client then │ - return │ - end │ - │ - if state == nil then │ - return │ - end │ - │ - print("sending state to other players") │ - │ - for dst_player, player_name in pairs(players) do │ - if dst_player == player then │ - goto next_player │ - end │ - local state_msg = "state:" .. crib_serialize.serialize_client_state(state, dst_player) │ - alexgames.send_message(player_name, state_msg) │ - ::next_player:: │ - end │ -end │ - │ -function update() │ - if state == nil then │ - return │ - end │ - if state.state == core.states.PICK_DISCARD and #state.hands[player] ~= core.CARDS_PER_HAND then │ - local msg = core.get_discard_status_str(state, player) │ - alexgames.set_status_msg(msg) │ - else │ - -- TODO why is this here? │ - print(string.format("Unhandled state %s", state.state)) │ - end │ - draw.draw(state, ui_state, player) │ -end │ - │ -function handle_move(action) │ - if not is_client then │ - local rc = core.handle_move(state, player, action) │ - if rc ~= core.RC_SUCCESS then │ - alexgames.set_status_err(core.rc_to_str(rc)) │ - end │ - else │ - send_move_msg(action) │ - end │ -end │ - │ -function send_move_msg(action) │ - local msg = "move:"..string.format("%d",action.action) │ - if action.action == core.actions.HAND then │ - msg = msg .. string.format(",%d", action.idx) │ - end │ - print("Sending message: " .. msg) │ - alexgames.send_message("all", msg) -- TODO maybe only message the host │ -end │ - │ -function handle_recv_move(src, payload) │ - local src_player = player_name_to_idx[src] │ - │ - if src_player == nil then │ - error(string.format("Unexpected move from non player %s", src_player)) │ - end │ - │ - local m = payload:gmatch("(%d+)(.*)") │ - if m == nil then │ - error("Expected move message to start with ascii base 10 int") │ - end │ - local action = {} │ - local action_type, data = m() │ - action_type = tonumber(action_type) │ - │ - action.action = action_type │ - │ - if action_type == core.actions.HAND then │ - m = data:gmatch(",(%d+)") │ - if m == nil then │ - error("invalid data" .. data) │ - end │ - local idx = m() │ - action.idx = tonumber(idx) │ - elseif action_type == core.actions.DISCARD_CONFIRM then │ - -- pass │ - elseif action_type == core.actions.CANT_MOVE_ACCEPT then │ - -- pass │ - elseif action_type == core.actions.NEXT then │ - -- pass │ - else │ - error(string.format("Unhandled action_type %s", action_type)) │ - end │ - core.handle_move(state, src_player, action) │ -end │ - │ -function handle_btn_clicked(btn_id) │ - local rc = nil │ - if btn_id == draw.BTN_ID_DISCARD then │ - handle_move({ action = core.actions.DISCARD_CONFIRM }) │ - alexgames.set_status_msg("Waiting for other players to discard") │ - elseif btn_id == draw.BTN_ID_PASS then │ - handle_move({ action = core.actions.CANT_MOVE_ACCEPT}) │ - elseif btn_id == draw.BTN_ID_NEXT then │ - handle_move({ action = core.actions.NEXT}) │ - else │ - error(string.format("Unhandled btn_id %s", btn_id)) │ - end │ - update() │ - save_state() │ - core.print_state(state) │ - send_state_updates_if_host() │ -end │ - │ -function handle_user_clicked(coord_y, coord_x) │ - if state == nil then │ - return │ - end │ - local action = draw.coords_to_action(state, ui_state, player, coord_y, coord_x) │ - local rc = nil │ - if action.action_type == draw.ACTION_TYPE_GAME then │ - if action.action == nil then │ - print("No action") │ - -- do nothing │ - else │ - handle_move(action) │ - end │ - elseif action.action_type == draw.ACTION_TYPE_UI then │ - draw.handle_ui_action(ui_state, action) │ - end │ - update() │ - save_state() │ - core.print_state(state) │ - send_state_updates_if_host() │ -end │ - │ -local function start_host_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as host") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = false │ - if state == nil then │ - new_game(#players) │ - end │ - send_state_updates_if_host() │ - update() │ - core.print_state(state) │ -end │ - │ -local function start_client_game(players_arg, player_arg, player_name_to_idx_arg) │ - print("Starting game as client") │ - players = players_arg │ - player = player_arg │ - player_name_to_idx = player_name_to_idx_arg │ - is_client = true │ - -- no need to draw board here, a state update should soon follow │ + elseif btn_id == BTN_ID_HINT then │ + return draw.ACTION_HINT │ + end │ end │ │ -function handle_msg_received(src, msg) │ - print("handle_msg_received (from src:" .. src .. "): " .. msg); │ +function draw.handle_popup_btn_clicked(popup_id, btn_id) │ +end │ │ - local handled = wait_for_players.handle_msg_received(src, msg) │ - if handled then │ - return │ - end │ +function draw.player_won(ui_state) │ + draw_celebration_anim.fireworks_display(ui_state.anim) │ + local dt = 1000/60 -- TODO │ + alexgames.set_timer_update_ms(dt) │ +end │ │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ +return draw │ +#!/usr/bin/env lua │ +package.path = 'src/lua_scripts/?.lua' │ │ - if header == "state" then │ - if not is_client then │ - error("Received state as host") │ - end │ - print("Received state") │ - state = crib_serialize.deserialize_client_state(payload) │ - core.print_state(state) │ - elseif header == "player_joined" or │ - header == "player_left" then │ - -- ignore I guess? │ - elseif header == "move" then │ - handle_recv_move(src, payload) │ - else │ - error(string.format("Unhandled message %s", header)) │ - end │ +local puzzles = require("games/crossword_letters/crossword_letters_puzzles") │ │ - send_state_updates_if_host() │ - update() │ - core.print_state(state) │ - save_state() │ -end │ +local words_list = {} │ +local words_count = {} │ │ -function handle_popup_btn_clicked(popup_id, btn_idx) │ - local handled = wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ - if handled then │ - return │ +for _, puzzle in ipairs(puzzles.puzzles) do │ + for _, word_pos_info in ipairs(puzzle.word_positions) do │ + local word = word_pos_info.word │ + if not words_count[word] then │ + table.insert(words_list, word) │ + words_count[word] = 1 │ + else │ + words_count[word] = words_count[word] + 1 │ + end │ end │ end │ │ -function save_state() │ - if state == nil then return end │ - -- Only the host can save the state │ - if not is_client then │ - local serialized_state = crib_serialize.serialize_state(state) │ - alexgames.save_state(g_session_id, serialized_state) │ +--[[ │ +for word, count in pairs(words_count) do │ + if count > 1 then │ + print(string.format("Found word %-8s %d times", word, count)) │ end │ end │ +--]] │ │ │ -function start_game(session_id, serialized_state) │ - -- TODO need to implement load state │ - -- which needs proper state serialization for all players (not one client) │ - if serialized_state then │ - g_session_id = session_id │ - state = crib_serialize.deserialize_state(serialized_state, true) │ - end │ - wait_for_players.init(players, player, start_host_game, start_client_game) │ -end │ -local serialize = {} │ -local core = require("games/crib/crib_core") │ +local bad_words_list = { │ +} │ │ -local cards = require("libs/cards/cards") │ +local bad_words_set = {} │ │ -local function serialize_byte(val) │ - if val == nil then error("nil arg", 2) end │ - return string.char(val) │ +for _, word in ipairs(bad_words_list) do │ + bad_words_set[word] = true │ end │ │ -local function deserialize_byte(bytes) │ - return string.byte(table.remove(bytes, 1)) │ +for _, word in ipairs(words_list) do │ + if bad_words_set[word] then │ + goto next_word │ + end │ + print(string.format("%-6s", word)) │ + ::next_word:: │ end │ +local shuffle = {} │ │ -local function bool_to_int(bool) │ - if bool then return 1 │ - else return 0 end │ +local function swap(array, index1, index2) │ + array[index1], array[index2] = array[index2], array[index1] │ end │ │ -local function int_to_bool(val) │ - if val == 0 then return false │ - elseif val == 1 then return true │ - else error(string.format("Unexpected value for bool: %s", val)) end │ +function shuffle.shuffle(array) │ + local counter = #array │ + while counter > 1 do │ + local index = math.random(counter) │ + swap(array, index, counter) │ + counter = counter - 1 │ + end │ end │ │ -local function serialize_255bool_ary(ary) │ - local chars = {} │ - chars[#chars+1] = string.char(#ary) │ +return shuffle │ +local utils = {} │ + │ +function utils.ary_to_str(ary) │ + if ary == nil then return "nil" end │ + local s = "[" │ + local first = true │ + -- Somehow I didn't realize that ipairs will stop after encountering a nil value, │ + -- and pairs will just skip over it. │ + --for _, val in ipairs(ary) do │ for i=1,#ary do │ - chars[#chars+1] = string.char(bool_to_int(ary[i])) │ + local val = ary[i] │ + if not first then │ + s = s .. ", " │ + end │ + first = false │ + s = s .. string.format("%s", val) │ end │ - return table.concat(chars, "") │ + s = s .. "]" │ + return s │ end │ │ -local function deserialize_255bool_ary(bytes) │ - local ary = {} │ - local ary_len = string.byte(table.remove(bytes,1)) │ - if ary_len > #bytes then │ - error(string.format("Read ary_len %d, only %d bytes left", ary_len, #bytes)) │ +function utils.binstr_to_hr_str(binstr) │ + if binstr == nil then │ + error("arg is nil", 2) │ end │ - for i=1,ary_len do │ - ary[i] = int_to_bool(string.byte(table.remove(bytes,1))) │ + local s = "" │ + for i=1,#binstr do │ + local byte = string.byte(binstr:sub(i,i)) │ + s = s .. string.format("%02x ", byte) │ end │ - return ary │ + return s │ end │ │ -function serialize.serialize_state(state) │ - return serialize.serialize_client_state(state, nil) │ +function utils.hr_binstr_to_byte_ary(hr_binstr) │ + local byte_ary = {} │ + while #hr_binstr > 0 do │ + local byte_val_str = hr_binstr:sub(1,3) │ + local byte_val = tonumber(byte_val_str, 16) │ + table.insert(byte_ary, byte_val) │ + if #hr_binstr >= 4 then │ + hr_binstr = hr_binstr:sub(4, #hr_binstr) │ + else │ + break │ + end │ + end │ + return byte_ary │ end │ │ --- If player is nil, then store all players' hands │ --- Otherwise, only serialize the hand for `player`. │ -function serialize.serialize_client_state(state, player) │ - if state == nil then return nil end │ - local output = "" │ - output = output .. serialize_byte(state.state) │ - output = output .. serialize_byte(state.player_turn) │ - output = output .. serialize_byte(state.player_crib) │ - output = output .. serialize_byte(state.player_count) │ - output = output .. serialize_byte(state.playing_sum) │ - output = output .. serialize_byte(state.first_player_cant_move) │ - output = output .. cards.serialize_card(state.cut_deck_card) │ - output = output .. cards.serialize_card_array(state.playing_sequence) │ - │ - local show_all_players = (player == nil) │ +function utils.hr_binstr_to_binstr(hr_binstr) │ + local byte_ary = utils.hr_binstr_to_byte_ary(hr_binstr) │ + local binstr = '' │ + for _, val in ipairs(byte_ary) do │ + binstr = binstr .. string.char(val) │ + end │ + return binstr │ +end │ │ - for player_idx, hand in ipairs(state.hands) do │ - if show_all_players or player == player_idx then │ - output = output .. serialize_byte(player_idx) │ - output = output .. serialize_byte(1) │ - for _, card in ipairs(state.hands[player_idx]) do │ - assert(card ~= cards.UNREVEALED_CARD and type(card) == 'table') │ - end │ - output = output .. cards.serialize_card_array(state.hands[player_idx]) │ - else │ - output = output .. serialize_byte(player_idx) │ - output = output .. serialize_byte(0) │ - output = output .. serialize_byte(#hand) │ - end │ +function utils.binary_to_hr_str(binary) │ + local s = "" │ + for i=1,#binary do │ + local byte = string.byte(binary[i]) │ + s = s .. string.format("%02x ", byte) │ end │ + return s │ +end │ │ - for player_idx,playing in ipairs(state.playing) do │ - output = output .. cards.serialize_card_array(playing) │ +-- If iter_dir is positive, returns something like an inclusive python range(start,end,iter) │ +-- If iter_dir is negative, returns range(end, start, iter) │ +-- The idea being that this can be used and the order can be reserved simply by making iter_dir 1 or -1 │ +function utils.iter_range(start_idx, end_idx, iter_dir) │ + local tbl = {} │ + if iter_dir < 0 then │ + if start_idx < end_idx then │ + local tmp = end_idx │ + end_idx = start_idx │ + start_idx = tmp │ + end │ end │ - for player_idx,played in ipairs(state.played) do │ - output = output .. cards.serialize_card_array(played) │ + for i=start_idx, end_idx, iter_dir do │ + table.insert(tbl, i) │ end │ + return tbl │ +end │ │ - for player_idx,_ in ipairs(state.tentative_discards) do │ - output = output .. serialize_255bool_ary(state.tentative_discards[player_idx]) │ +-- │ +-- Given: │ +-- val_ary = { 10, 20, 30, 40 } │ +-- vals_selected = { 40, 20} │ +-- Will return the indexes in val_ary of vals_selected, e.g.: │ +-- return { 4, 2 } │ +function utils.get_val_indexes(val_ary, vals_selected) │ + if val_ary == nil or vals_selected == nil then │ + error(string.format("get_val_indexes nil args: val_ary = %s, vals_selected = %s", val_ary, vals_selected), 2) │ end │ + local val_idxes = {} │ │ - for player_idx=1,state.player_count do │ - output = output .. serialize_byte(state.score[player_idx]) │ + local vals_used = {} │ + for i=1,#val_ary do │ + vals_used[i] = false │ end │ │ - if show_all_players or state.state == core.states.ACKNOWLEDGE_CRIB then │ - output = output .. cards.serialize_card_array(state.crib) │ - else │ - output = output .. cards.serialize_card_array({}) │ + for _, val_selected in ipairs(vals_selected) do │ + for i, val in ipairs(val_ary) do │ + if val == val_selected and not vals_used[i] then │ + table.insert(val_idxes, i) │ + vals_used[i] = true │ + goto next_val_selected │ + end │ + end │ + error(string.format("Could not find unused val %s in ary %s", val_selected, utils.ary_to_str(val_ary)), 2) │ + ::next_val_selected:: │ end │ - output = output .. serialize_255bool_ary(state.acknowledged_points) │ - return output │ + │ + return val_idxes │ end │ │ -local function bytestr_to_byteary(bytestr) │ - local byteary = {} │ - for i=1,#bytestr do │ - byteary[i] = bytestr:sub(i,i) │ +function utils.any_eq(vals, val_arg) │ + for _, val in ipairs(vals) do │ + if val == val_arg then return true end │ end │ - return byteary │ + return false │ end │ │ --- TODO remove this │ -function serialize.deserialize_client_state(bytes) │ - return serialize.deserialize_state(bytes) │ +function utils.ary_copy(ary) │ + local new_ary = {} │ + for _, val in ipairs(ary) do │ + table.insert(new_ary, val) │ + end │ + return new_ary │ end │ │ -function serialize.deserialize_state(bytes, is_host) │ - if bytes == nil then error("deserialize_state arg is nil", 2) end │ - bytes = bytestr_to_byteary(bytes) │ - local state = {} │ - state.state = deserialize_byte(bytes) │ - state.player_turn = deserialize_byte(bytes) │ - state.player_crib = deserialize_byte(bytes) │ - state.player_count = deserialize_byte(bytes) │ - state.playing_sum = deserialize_byte(bytes) │ - state.first_player_cant_move = deserialize_byte(bytes) │ - state.cut_deck_card = cards.deserialize_card(bytes) │ - state.playing_sequence = cards.deserialize_card_array(bytes) │ - │ - state.playing = {} │ - state.played = {} │ - state.hands = {} │ +function utils.ary_of(val, len) │ + local new_ary = {} │ + for i=1,len do │ + table.insert(new_ary, val) │ + end │ + return new_ary │ +end │ │ - for _=1,state.player_count do │ - local other_player_idx = deserialize_byte(bytes) │ - local cards_visible = deserialize_byte(bytes) │ - if is_host then │ - if cards_visible ~= 1 then │ - error(string.format("as host, deserialized state with cards_visible = %s", cards_visible)) │ - end │ - end │ - if cards_visible == 0 then │ - local count = deserialize_byte(bytes) │ - state.hands[other_player_idx] = {} │ - for _=1,count do │ - table.insert(state.hands[other_player_idx], cards.UNREVEALED_CARD) │ - end │ - elseif cards_visible == 1 then │ - state.hands[other_player_idx] = cards.deserialize_card_array(bytes) │ - for _, card in ipairs(state.hands[other_player_idx]) do │ - if card == cards.UNREVEALED_CARD then │ - error(string.format("Unexpected card value: %d", card)) │ - end │ - if type(card) ~= 'table' then │ - error(string.format("Unexpected card value: %s", type(card))) │ - end │ - end │ - else │ - -- TODO unhandled │ - error(string.format("unhandled cards_visible val=%d", cards_visible)) │ +function utils.reverse_map(map) │ + local reversed_map = {} │ + for key, value in pairs(map) do │ + if reversed_map[value] ~= nil then │ + error(string.format("utils.reverse_map: found duplicate values \"%s\" in map", value)) │ end │ + reversed_map[value] = key │ end │ + return reversed_map │ +end │ │ - for other_player_idx=1,state.player_count do │ - state.playing[other_player_idx] = cards.deserialize_card_array(bytes) │ +function utils.table_len(tbl) │ + if tbl == nil then │ + error("utils.table_len arg is nil", 2) │ end │ - for other_player_idx=1,state.player_count do │ - state.played[other_player_idx] = cards.deserialize_card_array(bytes) │ + local count = 0 │ + for _, _ in pairs(tbl) do │ + count = count + 1 │ end │ + return count │ +end │ │ - state.tentative_discards = {} │ - for player_idx=1,state.player_count do │ - state.tentative_discards[player_idx] = deserialize_255bool_ary(bytes) │ - end │ +function utils.make_first_char_uppercase(str) │ + if str == nil then return nil end │ + return (str:gsub("^%l", string.upper)) │ +end │ │ - state.score = {} │ - for player_idx=1,state.player_count do │ - state.score[player_idx] = deserialize_byte(bytes) │ +function utils.gmatch_to_list(pattern, str) │ + local vals = {} │ + for token in str:gmatch(pattern) do │ + table.insert(vals, token) │ end │ │ - state.crib = cards.deserialize_card_array(bytes) │ - │ - state.acknowledged_points = deserialize_255bool_ary(bytes) │ + return vals │ +end │ │ +function utils.slice_list(list, start_idx, end_idx) │ + return {table.unpack(list, start_idx, end_idx)} │ +end │ │ - if #bytes ~= 0 then │ - error(string.format("%d bytes remaining after deserializing", #bytes)) │ +function utils.number_to_boolean(num) │ + if type(num) ~= 'number' then │ + error(string.format("Argument is type %s, expected number", num, type(num)), 2) │ end │ │ - return state │ + return num ~= 0 │ end │ │ -return serialize │ --- Run this script by the standalone lua interpeter, from either repo root or src/lua_scripts │ -package.path = 'src/lua_scripts/?.lua;?.lua' │ - │ -local core = require("games/crib/crib_core") │ -local cards = require("libs/cards/cards") │ - │ -local print_test_passes = false │ - │ -local test_passes = 0 │ -local test_failures = 0 │ -local error_on_failure = false │ +function utils.boolean_to_number(val) │ + if type(val) ~= 'boolean' then │ + error(string.format('Argument %s is type %s, expected boolean', type(val)), 2) │ + end │ │ --- TODO extract all this boilerplate test stuff into a generic module that accepts │ --- running a function or something │ -local function test_hand(msg, hand, extra_card, expected_points) │ - local actual_points = core.check_points_sequence(hand, extra_card).points │ - if expected_points ~= actual_points then │ - test_failures = test_failures + 1 │ - local msg_to_print = string.format("Expected hand=%s, extra_card=%s to be worth " .. │ - "%d points, was worth %d. Msg=%s", │ - cards.card_array_to_string(hand), │ - cards.card_to_string(extra_card), │ - expected_points, actual_points, msg) │ - if error_on_failure then │ - error(msg_to_print) │ - else │ - print(msg_to_print) │ - end │ - else │ - test_passes = test_passes + 1 │ - if print_test_passes then │ - print(string.format("Hand=%s, extra_card=%s was correctly worth %d points. Msg=%s", │ - cards.card_array_to_string(hand), cards.card_to_string(extra_card), actual_points, msg)) │ - end │ + if val == nil then │ + error(string.format('Argument is nil'), 2) │ end │ + │ + if val then return 1 │ + else return 0 end │ end │ │ -test_hand("nothing", { │ - { suit = cards.DIAMONDS, val = 2 }, │ - { suit = cards.CLUBS, val = 4 }, │ - { suit = cards.DIAMONDS, val = 6 }, │ - { suit = cards.DIAMONDS, val = 8 }, │ - }, │ - { suit = cards.CLUBS, val = cards.KING}, │ - 0 │ -) │ +return utils │ +local words_lib = {} │ │ -test_hand("4 of suit", { │ - { suit = cards.DIAMONDS, val = 2 }, │ - { suit = cards.DIAMONDS, val = 4 }, │ - { suit = cards.DIAMONDS, val = 6 }, │ - { suit = cards.DIAMONDS, val = 8 }, │ - }, │ - { suit = cards.CLUBS, val = cards.KING}, │ -4) │ +local alex_dict = require("alexgames.dict") │ │ -test_hand("run of 4 + one 15", { │ - { suit = cards.DIAMONDS, val = 7 }, │ - { suit = cards.CLUBS, val = 8 }, │ - { suit = cards.DIAMONDS, val = 9 }, │ - { suit = cards.DIAMONDS, val = 10 }, │ - }, │ - { suit = cards.CLUBS, val = 2}, │ - 4 + 2 │ -) │ +words_lib.FUN_WORD_FREQ = 3e-6 │ │ -test_hand("two runs of 4 + pair + fifteen", { │ - { suit = cards.DIAMONDS, val = 7 }, │ - { suit = cards.CLUBS, val = 8 }, │ - { suit = cards.DIAMONDS, val = 9 }, │ - { suit = cards.DIAMONDS, val = 10 }, │ - }, │ - { suit = cards.CLUBS, val = 10}, │ - 2*4 + 2 + 2 │ -) │ +local ALPHABET = {} │ +for i=0,25 do │ + table.insert(ALPHABET, string.char(string.byte('a') + i)) │ +end │ │ -test_hand("run of 5 + two fifteen (6+9, 8+7)", { │ - { suit = cards.DIAMONDS, val = 6 }, │ - { suit = cards.CLUBS, val = 7 }, │ - { suit = cards.DIAMONDS, val = 8 }, │ - { suit = cards.DIAMONDS, val = 9 }, │ - }, │ - { suit = cards.CLUBS, val = 10}, │ - 5 + 2*2 │ -) │ │ -test_hand("run of 5 + two fifteen (6+9, 8+7) + flush", { │ - { suit = cards.DIAMONDS, val = 6 }, │ - { suit = cards.DIAMONDS, val = 7 }, │ - { suit = cards.DIAMONDS, val = 8 }, │ - { suit = cards.DIAMONDS, val = 9 }, │ - }, │ - { suit = cards.CLUBS, val = 10}, │ - 5 + 2*2 + 4 │ -) │ +local function get_sql_word_pattern(len) │ + local sql_word_pattern = '' │ + for _=1,len do │ + sql_word_pattern = sql_word_pattern .. '_' │ + end │ + return sql_word_pattern │ +end │ │ --- TODO why is this one failing? │ -test_hand("three 10s + two 5s = 6 fifteens + 1 pair of two + 1 pair of three", { │ - { suit = cards.DIAMONDS, val = 10 }, │ - { suit = cards.CLUBS, val = cards.KING }, │ - { suit = cards.DIAMONDS, val = 5 }, │ - { suit = cards.HEARTS, val = 5 }, │ - }, │ - { suit = cards.SPADES, val = 10}, │ - 6*2 + 2 + 6 │ -) │ +function words_lib.is_ready() │ + return alex_dict.is_ready() │ +end │ │ -test_hand("pair of three", { │ - { suit = cards.DIAMONDS, val = 10 }, │ - { suit = cards.CLUBS, val = 10 }, │ - { suit = cards.SPADES, val = 10 }, │ - { suit = cards.HEARTS, val = 9 }, │ - }, │ - { suit = cards.SPADES, val = 2}, │ - 6 │ -) │ +function words_lib.get_random_word(language, freq, len) │ + -- TODO avoid SQL injection on all of these queries │ + --[[ │ + local rows = alex_dict.get_words(string.format("SELECT word FROM words WHERE freq > %e AND word LIKE '%s' ORDER BY RANDOM() LIMIT 1", │ + freq, get_sql_word_pattern(len)), language) │ + local word = rows[1][1] │ + --]] │ │ -test_hand("pair of four", { │ - { suit = cards.DIAMONDS, val = 10 }, │ - { suit = cards.CLUBS, val = 10 }, │ - { suit = cards.SPADES, val = 10 }, │ - { suit = cards.HEARTS, val = 10 }, │ - }, │ - { suit = cards.SPADES, val = 2}, │ - 12 │ -) │ + local word = alex_dict.get_random_word({min_length = len, max_length = len, min_freq = freq}) │ + return word │ +end │ │ -print(string.format("Tests passed: %d", test_passes)) │ -print(string.format("Tests failed: %d", test_failures)) │ +function words_lib.get_possib_word_count(language, freq, len) │ + --local rows = alex_dict.get_words(string.format("SELECT COUNT(1) FROM words WHERE freq > %e AND word LIKE '%s'", │ + -- freq, get_sql_word_pattern(len)), language) │ + --return tonumber(rows[1][1]) │ │ -if test_failures > 0 or test_passes == 0 then │ + -- TODO │ return -1 │ end │ -local touch_to_mouse_evts = {} │ │ -local alexgames = require("alexgames") │ +function words_lib.is_valid_word(language, word) │ + word = string.lower(word) │ + --[[ │ + local rows = alex_dict.get_words(string.format("SELECT COUNT(1) FROM words WHERE word = '%s'", word), language) │ + local count_str = rows[1][1] │ + local count = tonumber(count_str) │ + return count > 0 │ + --]] │ │ -function touch_to_mouse_evts.init(funcs) │ - local state = { │ - active_touch_id = nil, │ - handle_mouse_evt = funcs.handle_mouse_evt, │ - handle_mousemove = funcs.handle_mousemove, │ - } │ - alexgames.enable_evt("touch") │ - return state │ + return alex_dict.is_valid_word(word) │ end │ │ -function touch_to_mouse_evts.handle_touch_evt(state, evt_id, changed_touches) │ - local params = { │ - is_touch = true, │ - } │ - for _, touch in ipairs(changed_touches) do │ - local y = math.floor(touch.y) │ - local x = math.floor(touch.x) │ - if state.active_touch == touch.id then │ - if evt_id == 'touchmove' then │ - state.handle_mousemove(y, x) │ - elseif evt_id == 'touchend' then │ - state.handle_mouse_evt(alexgames.MOUSE_EVT_UP, y, x, params) │ - state.active_touch = nil │ - elseif evt_id == 'touchcancel' then │ - state.handle_mouse_evt(alexgames.MOUSE_EVT_DOWN, y, x, params) │ - state.active_touch = nil │ - end │ - end │ - │ - if evt_id == 'touchstart' then │ - if state.active_touch == nil then │ - state.active_touch = touch.id │ - state.handle_mouse_evt(alexgames.MOUSE_EVT_DOWN, y, x, params) │ - end │ - end │ +function words_lib.get_words_made_from_letters(language, letters_arg, min_length, min_freq) │ + print("get_words_made_from_letters") │ + local letters = {} │ + for _, letter_arg in ipairs(letters_arg) do │ + table.insert(letters, string.lower(letter_arg)) │ end │ - │ -end │ - │ -return touch_to_mouse_evts │ -local combinations = {} │ - │ -local utils = require("libs/utils") │ - │ --- Loops through every combination of possible combinations │ --- of elements in the input, where order does not matter │ --- │ --- It is like looping through binary: │ --- 0 0 0 1 │ --- 0 0 1 0 │ --- 0 0 1 1 │ --- 0 1 0 0 │ --- 0 1 0 1 │ --- 0 1 1 0 │ --- 0 1 1 1 │ --- ... etc │ -function combinations.get_combos(ary) │ - │ - local chosen = {} │ - for i=1,#ary do │ - chosen[i] = false │ + local letters_count = {} │ + for _, letter in ipairs(letters) do │ + if letters_count[letter] == nil then │ + letters_count[letter] = 0 │ + end │ + letters_count[letter] = letters_count[letter] + 1 │ end │ - │ - │ - local to_return_combos = {} │ - -- loop through all combinations of cards, like counting in binary: │ - -- 0 0 0 0 │ - -- 0 0 0 1 │ - -- 0 0 1 0 │ - -- 0 0 1 1 │ - -- 0 1 0 0 │ - -- ... │ - -- io.write(string.format("starting loop... %d %d\n", #ary, #chosen)) │ - while true do │ - --[[ │ - local chosen_copy = {} │ - for idx,val in ipairs(chosen) do │ - chosen_copy[idx] = val │ + local query = "SELECT word FROM words WHERE\n" │ + query = query .. string.format(" LENGTH(word) <= %d \n", #letters) │ + query = query .. string.format(" AND LENGTH(word) >= %d \n", min_length) │ + query = query .. string.format(" AND freq >= %e \n", min_freq) │ + for _, letter in pairs(ALPHABET) do │ + local count = 1 │ + if letters_count[letter] ~= nil then │ + count = letters_count[letter] + 1 │ end │ - table.insert(to_return_combos, chosen_copy) │ - ]] │ - local combo = {} │ - for idx,val in ipairs(chosen) do │ - if val then │ - table.insert(combo, ary[idx]) │ - end │ + print("letter: %s, count: %d", letter, count-1) │ + query = query .. " AND word NOT LIKE '%" │ + for _=1,count do │ + query = query .. letter .. "%" │ end │ - table.insert(to_return_combos, combo) │ + query = query .. "' \n" │ + end │ + query = query .. "ORDER BY LENGTH(word) DESC, freq DESC \n" │ + query = query .. "LIMIT 20 \n" │ │ - local i = 1 │ - while i <= #ary and chosen[i] do │ - chosen[i] = false │ - i = i + 1 │ - end │ - if i > #ary then │ - goto end_loop │ - else │ - chosen[i] = true │ - end │ + print(query) │ + local rows = alex_dict.get_words(query, language) │ + local words = {} │ + print(string.format("found %d words fromt these letters", #words)) │ + for row_idx, row in ipairs(rows) do │ + table.insert(words, row[1]) │ + print(string.format("%3d: %s", row_idx, row[1])) │ end │ - ::end_loop:: │ - return to_return_combos │ + return words │ end │ │ -local function sum(ary) │ - local val = 0 │ - for _, elem in ipairs(ary) do │ - val = val + elem │ - end │ - return val │ +function words_lib.get_word_freq(language, word) │ + local query = string.format("SELECT freq from words WHERE word = %q", word) │ + local rows = alex_dict.get_words(query, language) │ + if #rows == 0 then return nil end │ + return tonumber(rows[1][1]) │ end │ │ --- Given an array of values e.g. {a, b, c} │ --- Returns every distinct sum and the pieces that make it up, e.g.: │ --- { │ --- { val = a, parts = {a} }, │ --- { val = a+b, parts = {a, b} }, │ --- { val = a+b+c, parts = {a, b, c} }, │ --- { val = a+c, parts = {a, c} }, │ --- -- Note that any duplicate sums (say if a == b) would only be included once │ --- } │ -function combinations.get_distinct_sums(ary) │ - local sums_map = {} │ - local combos = combinations.get_combos(ary) │ - for _, vals in ipairs(combos) do │ - -- skip any combinations with zero in them, so that the "selected indexes" (`parts`) will │ - -- not contain unused values │ - if utils.any_eq(vals, 0) then │ - goto next_val_combo │ - end │ - local sum_val = sum(vals) │ - sums_map[sum_val] = vals │ - ::next_val_combo:: │ - end │ +function words_lib.init(language) │ + return alex_dict.init(language) │ +end │ │ - local distinct_sums = {} │ - for sum_val, parts in pairs(sums_map) do │ - table.insert(distinct_sums, { val = sum_val, parts = parts }) │ - end │ │ - return distinct_sums │ -end │ │ -return combinations │ +return words_lib │ local letter_tiles = {} │ │ -- TODO: │ -- * tear out a bunch of the way moving tiles works (maybe save it in a branch first) │ -- * need to distinguish between "floating in row" and "floating in grid" │ -- * change it so that when you pick up a tile from the row or grid, it sets the row or grid's value to 0 │ -- * held tile has metadata of where it came from │ @@ -33647,1382 +33830,368 @@ │ end │ │ function letter_tiles.clear_placed_tiles(tiles_state) │ tiles_state.placed_tiles = {} │ end │ │ return letter_tiles │ -local words_lib = {} │ - │ -local alex_dict = require("alexgames.dict") │ - │ -words_lib.FUN_WORD_FREQ = 3e-6 │ - │ -local ALPHABET = {} │ -for i=0,25 do │ - table.insert(ALPHABET, string.char(string.byte('a') + i)) │ -end │ - │ - │ -local function get_sql_word_pattern(len) │ - local sql_word_pattern = '' │ - for _=1,len do │ - sql_word_pattern = sql_word_pattern .. '_' │ - end │ - return sql_word_pattern │ -end │ - │ -function words_lib.is_ready() │ - return alex_dict.is_ready() │ -end │ - │ -function words_lib.get_random_word(language, freq, len) │ - -- TODO avoid SQL injection on all of these queries │ - --[[ │ - local rows = alex_dict.get_words(string.format("SELECT word FROM words WHERE freq > %e AND word LIKE '%s' ORDER BY RANDOM() LIMIT 1", │ - freq, get_sql_word_pattern(len)), language) │ - local word = rows[1][1] │ - --]] │ - │ - local word = alex_dict.get_random_word({min_length = len, max_length = len, min_freq = freq}) │ - return word │ -end │ - │ -function words_lib.get_possib_word_count(language, freq, len) │ - --local rows = alex_dict.get_words(string.format("SELECT COUNT(1) FROM words WHERE freq > %e AND word LIKE '%s'", │ - -- freq, get_sql_word_pattern(len)), language) │ - --return tonumber(rows[1][1]) │ - │ - -- TODO │ - return -1 │ -end │ - │ -function words_lib.is_valid_word(language, word) │ - word = string.lower(word) │ - --[[ │ - local rows = alex_dict.get_words(string.format("SELECT COUNT(1) FROM words WHERE word = '%s'", word), language) │ - local count_str = rows[1][1] │ - local count = tonumber(count_str) │ - return count > 0 │ - --]] │ - │ - return alex_dict.is_valid_word(word) │ -end │ - │ -function words_lib.get_words_made_from_letters(language, letters_arg, min_length, min_freq) │ - print("get_words_made_from_letters") │ - local letters = {} │ - for _, letter_arg in ipairs(letters_arg) do │ - table.insert(letters, string.lower(letter_arg)) │ - end │ - local letters_count = {} │ - for _, letter in ipairs(letters) do │ - if letters_count[letter] == nil then │ - letters_count[letter] = 0 │ - end │ - letters_count[letter] = letters_count[letter] + 1 │ - end │ - local query = "SELECT word FROM words WHERE\n" │ - query = query .. string.format(" LENGTH(word) <= %d \n", #letters) │ - query = query .. string.format(" AND LENGTH(word) >= %d \n", min_length) │ - query = query .. string.format(" AND freq >= %e \n", min_freq) │ - for _, letter in pairs(ALPHABET) do │ - local count = 1 │ - if letters_count[letter] ~= nil then │ - count = letters_count[letter] + 1 │ - end │ - print("letter: %s, count: %d", letter, count-1) │ - query = query .. " AND word NOT LIKE '%" │ - for _=1,count do │ - query = query .. letter .. "%" │ - end │ - query = query .. "' \n" │ - end │ - query = query .. "ORDER BY LENGTH(word) DESC, freq DESC \n" │ - query = query .. "LIMIT 20 \n" │ - │ - print(query) │ - local rows = alex_dict.get_words(query, language) │ - local words = {} │ - print(string.format("found %d words fromt these letters", #words)) │ - for row_idx, row in ipairs(rows) do │ - table.insert(words, row[1]) │ - print(string.format("%3d: %s", row_idx, row[1])) │ - end │ - return words │ -end │ - │ -function words_lib.get_word_freq(language, word) │ - local query = string.format("SELECT freq from words WHERE word = %q", word) │ - local rows = alex_dict.get_words(query, language) │ - if #rows == 0 then return nil end │ - return tonumber(rows[1][1]) │ -end │ - │ -function words_lib.init(language) │ - return alex_dict.init(language) │ -end │ - │ - │ +local combinations = {} │ │ -return words_lib │ -local utils = {} │ +local utils = require("libs/utils") │ │ -function utils.ary_to_str(ary) │ - if ary == nil then return "nil" end │ - local s = "[" │ - local first = true │ - -- Somehow I didn't realize that ipairs will stop after encountering a nil value, │ - -- and pairs will just skip over it. │ - --for _, val in ipairs(ary) do │ +-- Loops through every combination of possible combinations │ +-- of elements in the input, where order does not matter │ +-- │ +-- It is like looping through binary: │ +-- 0 0 0 1 │ +-- 0 0 1 0 │ +-- 0 0 1 1 │ +-- 0 1 0 0 │ +-- 0 1 0 1 │ +-- 0 1 1 0 │ +-- 0 1 1 1 │ +-- ... etc │ +function combinations.get_combos(ary) │ + │ + local chosen = {} │ for i=1,#ary do │ - local val = ary[i] │ - if not first then │ - s = s .. ", " │ - end │ - first = false │ - s = s .. string.format("%s", val) │ - end │ - s = s .. "]" │ - return s │ -end │ - │ -function utils.binstr_to_hr_str(binstr) │ - if binstr == nil then │ - error("arg is nil", 2) │ - end │ - local s = "" │ - for i=1,#binstr do │ - local byte = string.byte(binstr:sub(i,i)) │ - s = s .. string.format("%02x ", byte) │ - end │ - return s │ -end │ - │ -function utils.hr_binstr_to_byte_ary(hr_binstr) │ - local byte_ary = {} │ - while #hr_binstr > 0 do │ - local byte_val_str = hr_binstr:sub(1,3) │ - local byte_val = tonumber(byte_val_str, 16) │ - table.insert(byte_ary, byte_val) │ - if #hr_binstr >= 4 then │ - hr_binstr = hr_binstr:sub(4, #hr_binstr) │ - else │ - break │ - end │ - end │ - return byte_ary │ -end │ - │ -function utils.hr_binstr_to_binstr(hr_binstr) │ - local byte_ary = utils.hr_binstr_to_byte_ary(hr_binstr) │ - local binstr = '' │ - for _, val in ipairs(byte_ary) do │ - binstr = binstr .. string.char(val) │ + chosen[i] = false │ end │ - return binstr │ -end │ │ -function utils.binary_to_hr_str(binary) │ - local s = "" │ - for i=1,#binary do │ - local byte = string.byte(binary[i]) │ - s = s .. string.format("%02x ", byte) │ - end │ - return s │ -end │ │ --- If iter_dir is positive, returns something like an inclusive python range(start,end,iter) │ --- If iter_dir is negative, returns range(end, start, iter) │ --- The idea being that this can be used and the order can be reserved simply by making iter_dir 1 or -1 │ -function utils.iter_range(start_idx, end_idx, iter_dir) │ - local tbl = {} │ - if iter_dir < 0 then │ - if start_idx < end_idx then │ - local tmp = end_idx │ - end_idx = start_idx │ - start_idx = tmp │ + local to_return_combos = {} │ + -- loop through all combinations of cards, like counting in binary: │ + -- 0 0 0 0 │ + -- 0 0 0 1 │ + -- 0 0 1 0 │ + -- 0 0 1 1 │ + -- 0 1 0 0 │ + -- ... │ + -- io.write(string.format("starting loop... %d %d\n", #ary, #chosen)) │ + while true do │ + --[[ │ + local chosen_copy = {} │ + for idx,val in ipairs(chosen) do │ + chosen_copy[idx] = val │ end │ - end │ - for i=start_idx, end_idx, iter_dir do │ - table.insert(tbl, i) │ - end │ - return tbl │ -end │ - │ --- │ --- Given: │ --- val_ary = { 10, 20, 30, 40 } │ --- vals_selected = { 40, 20} │ --- Will return the indexes in val_ary of vals_selected, e.g.: │ --- return { 4, 2 } │ -function utils.get_val_indexes(val_ary, vals_selected) │ - if val_ary == nil or vals_selected == nil then │ - error(string.format("get_val_indexes nil args: val_ary = %s, vals_selected = %s", val_ary, vals_selected), 2) │ - end │ - local val_idxes = {} │ - │ - local vals_used = {} │ - for i=1,#val_ary do │ - vals_used[i] = false │ - end │ - │ - for _, val_selected in ipairs(vals_selected) do │ - for i, val in ipairs(val_ary) do │ - if val == val_selected and not vals_used[i] then │ - table.insert(val_idxes, i) │ - vals_used[i] = true │ - goto next_val_selected │ + table.insert(to_return_combos, chosen_copy) │ + ]] │ + local combo = {} │ + for idx,val in ipairs(chosen) do │ + if val then │ + table.insert(combo, ary[idx]) │ end │ end │ - error(string.format("Could not find unused val %s in ary %s", val_selected, utils.ary_to_str(val_ary)), 2) │ - ::next_val_selected:: │ - end │ - │ - return val_idxes │ -end │ - │ -function utils.any_eq(vals, val_arg) │ - for _, val in ipairs(vals) do │ - if val == val_arg then return true end │ - end │ - return false │ -end │ - │ -function utils.ary_copy(ary) │ - local new_ary = {} │ - for _, val in ipairs(ary) do │ - table.insert(new_ary, val) │ - end │ - return new_ary │ -end │ - │ -function utils.ary_of(val, len) │ - local new_ary = {} │ - for i=1,len do │ - table.insert(new_ary, val) │ - end │ - return new_ary │ -end │ + table.insert(to_return_combos, combo) │ │ -function utils.reverse_map(map) │ - local reversed_map = {} │ - for key, value in pairs(map) do │ - if reversed_map[value] ~= nil then │ - error(string.format("utils.reverse_map: found duplicate values \"%s\" in map", value)) │ + local i = 1 │ + while i <= #ary and chosen[i] do │ + chosen[i] = false │ + i = i + 1 │ + end │ + if i > #ary then │ + goto end_loop │ + else │ + chosen[i] = true │ end │ - reversed_map[value] = key │ - end │ - return reversed_map │ -end │ - │ -function utils.table_len(tbl) │ - if tbl == nil then │ - error("utils.table_len arg is nil", 2) │ - end │ - local count = 0 │ - for _, _ in pairs(tbl) do │ - count = count + 1 │ - end │ - return count │ -end │ - │ -function utils.make_first_char_uppercase(str) │ - if str == nil then return nil end │ - return (str:gsub("^%l", string.upper)) │ -end │ - │ -function utils.gmatch_to_list(pattern, str) │ - local vals = {} │ - for token in str:gmatch(pattern) do │ - table.insert(vals, token) │ - end │ - │ - return vals │ -end │ - │ -function utils.slice_list(list, start_idx, end_idx) │ - return {table.unpack(list, start_idx, end_idx)} │ -end │ - │ -function utils.number_to_boolean(num) │ - if type(num) ~= 'number' then │ - error(string.format("Argument is type %s, expected number", num, type(num)), 2) │ end │ - │ - return num ~= 0 │ + ::end_loop:: │ + return to_return_combos │ end │ │ -function utils.boolean_to_number(val) │ - if type(val) ~= 'boolean' then │ - error(string.format('Argument %s is type %s, expected boolean', type(val)), 2) │ - end │ - │ - if val == nil then │ - error(string.format('Argument is nil'), 2) │ +local function sum(ary) │ + local val = 0 │ + for _, elem in ipairs(ary) do │ + val = val + elem │ end │ - │ - if val then return 1 │ - else return 0 end │ -end │ - │ -return utils │ -local shuffle = {} │ - │ -local function swap(array, index1, index2) │ - array[index1], array[index2] = array[index2], array[index1] │ -end │ - │ -function shuffle.shuffle(array) │ - local counter = #array │ - while counter > 1 do │ - local index = math.random(counter) │ - swap(array, index, counter) │ - counter = counter - 1 │ - end │ + return val │ end │ │ -return shuffle │ -local dice_draw = {} │ - │ -local alexgames = require("alexgames") │ -local draw_more = require("libs/draw/draw_more") │ - │ -local DICE_IMG_MAP = { │ - "dice1", │ - "dice2", │ - "dice3", │ - "dice4", │ - "dice5", │ - "dice6", │ -} │ - │ -function dice_draw.draw_one_die(die_val, y_pos, x_pos, y_size, x_size, idx, args) │ - if args ~= nil and args.background_colour ~= nil then │ - alexgames.draw_rect(args.background_colour, │ - y_pos, x_pos, │ - y_pos + y_size, x_pos + x_size) │ - end │ - local img_id = DICE_IMG_MAP[die_val] │ - local graphic_params = nil │ - if args ~= nil then │ - graphic_params = { │ - brightness_percent = args.brightness_percent, │ - invert = args.invert │ - } │ - end │ - draw_more.draw_graphic_ul(img_id, y_pos, x_pos, x_size, y_size, graphic_params) │ - if args.used_dice ~= nil and args.used_dice[idx] then │ - if args.dice_used_overlay_colour == nil then │ - error("args.dice_used_overlay_colour is nil, but args.used_dice is specified", 2) │ +-- Given an array of values e.g. {a, b, c} │ +-- Returns every distinct sum and the pieces that make it up, e.g.: │ +-- { │ +-- { val = a, parts = {a} }, │ +-- { val = a+b, parts = {a, b} }, │ +-- { val = a+b+c, parts = {a, b, c} }, │ +-- { val = a+c, parts = {a, c} }, │ +-- -- Note that any duplicate sums (say if a == b) would only be included once │ +-- } │ +function combinations.get_distinct_sums(ary) │ + local sums_map = {} │ + local combos = combinations.get_combos(ary) │ + for _, vals in ipairs(combos) do │ + -- skip any combinations with zero in them, so that the "selected indexes" (`parts`) will │ + -- not contain unused values │ + if utils.any_eq(vals, 0) then │ + goto next_val_combo │ end │ - alexgames.draw_rect(args.dice_used_overlay_colour, y_pos, x_pos, y_pos + y_size, x_pos + x_size) │ + local sum_val = sum(vals) │ + sums_map[sum_val] = vals │ + ::next_val_combo:: │ end │ -end │ │ -function dice_draw.draw_dice(dice_vals, y_pos, x_pos, y_size, x_size, args) │ - for dice_idx, dice_val in ipairs(dice_vals) do │ - x_pos2 = x_pos + (dice_idx-1)*x_size │ - if args ~= nil and args.padding ~= nil then │ - x_pos2 = x_pos2 + (dice_idx-1)*args.padding │ - end │ - dice_draw.draw_one_die(dice_val, y_pos, x_pos2, y_size, x_size, dice_idx, args) │ + local distinct_sums = {} │ + for sum_val, parts in pairs(sums_map) do │ + table.insert(distinct_sums, { val = sum_val, parts = parts }) │ end │ -end │ - │ -return dice_draw │ - │ - │ -local dice = {} │ - │ -function dice.roll_dice(dice_max) │ - return math.random(1,dice_max) │ -end │ │ -function dice.roll_multiple_dice(num_dice, dice_max) │ - local ary = {} │ - for i=1,num_dice do │ - table.insert(ary, dice.roll_dice(dice_max)) │ - end │ - return ary │ + return distinct_sums │ end │ │ -return dice │ -local storage_helpers = {} │ - │ -local utils = require("libs/utils") │ +return combinations │ +local touch_to_mouse_evts = {} │ │ local alexgames = require("alexgames") │ │ -function storage_helpers.store_bool(key, val) │ - if type(val) ~= 'boolean' then │ - error(string.format("Expected arg val to be type boolean, was %s", type(val)),2) │ - end │ - │ - data = { utils.boolean_to_number(val) } │ - │ - alexgames.store_data(key, data) │ -end │ - │ -function storage_helpers.read_bool(key, default_val) │ - local data = alexgames.read_stored_data(key) │ - │ - if data == nil then │ - return default_val │ - end │ - │ - if #data ~= 1 then │ - error(string.format("Expected a single byte when reading stored value %s, received %d bytes", key, #data)) │ - end │ - │ - local val = string.byte(data:sub(1,1)) │ - print(string.format("val = %s", val)) │ - │ - return utils.number_to_boolean(val) │ -end │ - │ -return storage_helpers │ -local bit_pack = {} │ - │ -local function bit_mask(pos) │ - return (1< 0 then │ - bin_str = bin_str .. '1' │ - elseif places ~= nil or #bin_str > 0 then │ - bin_str = bin_str .. '0' │ - end │ - end │ - │ - if #bin_str == 0 then │ - return '0' │ - else │ - return bin_str │ - end │ -end │ - │ -function bit_pack.pack(vals_list, bit_count) │ - local packed_bytes = {} │ - local bit_buff = 0 │ - local bits_written = 0 │ - for _, val in ipairs(vals_list) do │ - bit_buff = (bit_buff << bit_count) | (val & bit_mask(bit_count)) │ - bits_written = bits_written + bit_count │ - │ - if bits_written >= 8 then │ - local byte_to_write = bit_buff >> (bits_written - 8) │ - bits_written = bits_written - 8 │ - bit_buff = bit_buff & bit_mask(bits_written) │ - table.insert(packed_bytes, byte_to_write) │ - end │ - end │ - │ - if bits_written > 0 then │ - table.insert(packed_bytes, bit_buff << (8 - bits_written)) │ - else │ - bits_written = 8 │ - end │ - │ - table.insert(packed_bytes, bits_written) │ - │ - return packed_bytes │ +function touch_to_mouse_evts.init(funcs) │ + local state = { │ + active_touch_id = nil, │ + handle_mouse_evt = funcs.handle_mouse_evt, │ + handle_mousemove = funcs.handle_mousemove, │ + } │ + alexgames.enable_evt("touch") │ + return state │ end │ │ -function bit_pack.unpack(packed_bytes, bit_count) │ - local vals = {} │ - local bits_in_last_byte = packed_bytes[ #packed_bytes ] │ - local bits_in_buff = 0 │ - local bit_buff = 0 │ - │ - for idx, byte in ipairs(packed_bytes) do │ - local bits_to_read │ - local offset │ - if idx == #packed_bytes - 1 then │ - bits_to_read = bits_in_last_byte │ - offset = 8 - bits_in_last_byte │ - elseif idx < #packed_bytes - 1 then │ - bits_to_read = 8 │ - offset = 0 │ - elseif idx == #packed_bytes then │ - goto next_idx │ - else │ - error(string.format("Unhandled idx %d, len %d", idx, #packed_bytes)) │ - end │ - │ - bits_to_read = bits_to_read + bits_in_buff │ - bit_buff = (bit_buff << 8) | byte │ - while bits_to_read >= bit_count do │ - local val = bit_buff >> (bits_to_read - bit_count + offset) │ - bits_to_read = bits_to_read - bit_count │ - bit_buff = bit_buff & (bit_mask(bits_to_read) << offset) │ - table.insert(vals, val) │ +function touch_to_mouse_evts.handle_touch_evt(state, evt_id, changed_touches) │ + local params = { │ + is_touch = true, │ + } │ + for _, touch in ipairs(changed_touches) do │ + local y = math.floor(touch.y) │ + local x = math.floor(touch.x) │ + if state.active_touch == touch.id then │ + if evt_id == 'touchmove' then │ + state.handle_mousemove(y, x) │ + elseif evt_id == 'touchend' then │ + state.handle_mouse_evt(alexgames.MOUSE_EVT_UP, y, x, params) │ + state.active_touch = nil │ + elseif evt_id == 'touchcancel' then │ + state.handle_mouse_evt(alexgames.MOUSE_EVT_DOWN, y, x, params) │ + state.active_touch = nil │ + end │ end │ │ - bits_in_buff = bits_to_read │ - ::next_idx:: │ - end │ - │ - return vals │ -end │ - │ -local function lists_eq(list1, list2) │ - if #list1 ~= list2 then return false end │ - for i, val1 in ipairs(list1) do │ - if list1[i] ~= list2[i] then │ - return false │ + if evt_id == 'touchstart' then │ + if state.active_touch == nil then │ + state.active_touch = touch.id │ + state.handle_mouse_evt(alexgames.MOUSE_EVT_DOWN, y, x, params) │ + end │ end │ end │ │ - return true │ end │ │ - │ +return touch_to_mouse_evts │ --[[ │ -local packed = bit_pack.pack({ 0, 1, 2, 3, 4, 5, 6, 7 }, 3) │ -local expected_output = { tonumber("000".."001" .. "01", 2), │ - tonumber("0" .. "011".."100" .. "1", 2), │ - tonumber("01" .. "110" .. "111", 2), │ - 8 } │ -print(string.format('eq: %s', lists_eq(expected_output, packed))) │ - │ -print('') │ -for i=7,0,-1 do │ - io.write(i) │ -end │ -io.write('\n') │ -print('---------') │ -for i, val in ipairs(packed) do │ - print(val) │ - assert(val < 256) │ - print(to_bin_str(val, 8), to_bin_str(expected_output[i], 8), val == expected_output[i]) │ -end │ - │ -print('---expected:') │ -for _, val in ipairs(expected_output) do │ - print(to_bin_str(val, 8)) │ -end │ - │ --- 000 001 01 │ --- 0 011 110 1 │ --- 01 110 001 │ --- 00 000000 │ +-- This library allows for 0 or more players to join a game hosted by a player. │ +-- │ +-- It is best suited for games where the players don't need to pick a role (e.g. │ +-- black or white pieces in a game like chess), they will simply be e.g. "Player 2" │ +-- │ --]] │ │ -return bit_pack │ -local serialize = {} │ - │ -function serialize.bytestr_to_byteary(bytestr) │ - if bytestr == nil then │ - error("arg is nil", 2) │ - end │ - local byteary = {} │ - for i=1,#bytestr do │ - byteary[i] = bytestr:sub(i,i) │ - end │ - return byteary │ -end │ - │ -function serialize.serialize_byte(val) │ - if val == nil then │ - val = 255 │ - end │ - -- return string.char(val) │ - local output │ - local state, err = pcall(function() output = string.char(val) end ) │ - if not state then │ - error(string.format("bad argument to serialize_byte: %s", val), 2) │ - end │ - return output │ -end │ - │ -function serialize.deserialize_byte(bytes) │ - if bytes == nil then │ - error("arg is nil", 2) │ - elseif #bytes == 0 then │ - error("arg is length 0", 2) │ - end │ - if type(bytes) ~= "table" then │ - error(string.format("arg is %s, expected table", type(bytes)), 2) │ - end │ - local val = string.byte(table.remove(bytes, 1)) │ - if val == 255 then return nil end │ - return val │ -end │ - │ - │ - │ - │ -function serialize.serialize_16bit(val) │ - local output = "" │ - local orig_val = val │ - if val == nil then │ - val = 0x7fff │ - else │ - val = math.floor(val) │ - end │ - val = val + 0x7fff │ - if not(0 <= val and val <= 0xffff) then │ - error(string.format("Need 16 bit val, recvd %s", orig_val)) │ - return nil │ - end │ - output = output .. string.char(math.floor((val/256))&0xff) │ - output = output .. string.char(math.floor(val%256)) │ - return output │ -end │ - │ -function serialize.deserialize_16bit(bytes) │ - if #bytes < 2 then │ - error(string.format("Expected at least 2 bytes, recvd %d", #bytes)) │ - end │ - local msb = string.byte(table.remove(bytes,1)) │ - local lsb = string.byte(table.remove(bytes,1)) │ - local val = ((msb << 8) | lsb) - 0x7fff │ - --print(string.format("deserialize_16bit %02x %02x returning %s", msb, lsb, val)) │ - if val == 0x7fff then │ - return nil │ - else │ - return val │ - end │ -end │ - │ -function serialize.serialize_s32(val) │ - if val == nil then │ - error("nil arg", 2) │ - end │ - local bytes = {} │ - local byte_count = 4 │ - local orig_val = val │ - val = val + 0x7fffffff │ - if not(0 <= val and val <= 0xffffffff) then │ - error(string.format("val %s is out of range for s32", orig_val)) │ - end │ - │ - for i=1,byte_count do │ - bytes[byte_count-i+1] = string.char(val & 0xFF) │ - val = val >> 8 │ - end │ - return table.concat(bytes, "") │ -end │ - │ -local s32_nil = 0x7ffffffe │ -function serialize.serialize_s32_nilable(val) │ - if val == nil then │ - val = s32_nil │ - end │ - return serialize.serialize_s32(val) │ -end │ - │ -function serialize.deserialize_s32_nilable(bytes) │ - local val = serialize.deserialize_s32(bytes) │ - if val == s32_nil then │ - return nil │ - else │ - return val │ - end │ -end │ - │ -function serialize.deserialize_s32(bytes) │ - local val = 0 │ - local byte_count = 4 │ - if #bytes < byte_count then │ - error(string.format("Expected at least %d bytes, recvd %d", byte_count, #bytes)) │ - return │ - end │ - for i=1,byte_count do │ - local bit_pos = 8 * (byte_count-i) │ - val = val | (string.byte(table.remove(bytes,1))<> 8 │ - end │ - return table.concat(bytes, "") │ -end │ - │ -function serialize.deserialize_u64(bytes) │ - local val = 0 │ - local byte_count = 8 │ - if #bytes < byte_count then │ - error(string.format("Expected at least %d bytes, recvd %d", byte_count, #bytes)) │ - return │ - end │ - for i=1,byte_count do │ - local bit_pos = 8 * (byte_count-i) │ - val = val | (string.byte(table.remove(bytes,1))< 255 then │ - error(string.format("serialize_bytes: Found val %d at idx %d, must be between 0 and 255", val, i), 2) │ - end │ - table.insert(chars, string.char(val)) │ - end │ - return table.concat(chars, "") │ -end │ - │ -function serialize.deserialize_bytes(bytes_chars) │ - print(string.format("arg is %s",bytes_chars)) │ - if bytes_chars == nil then error("nil arg", 2) end │ - local vals = {} │ - for i=1,#bytes_chars do │ - table.insert(vals, string.byte(bytes_chars[1])) │ - table.remove(bytes_chars, 1) │ - end │ - return vals │ -end │ - │ -return serialize │ - │ -cards = {} │ - │ -cards.DIAMONDS = "diamonds" │ -cards.HEARTS = "hearts" │ -cards.SPADES = "spades" │ -cards.CLUBS = "clubs" │ - │ -cards.ACE = 1 │ -cards.JACK = 11 │ -cards.QUEEN = 12 │ -cards.KING = 13 │ - │ -cards.MIN_VAL = cards.ACE │ -cards.MAX_VAL = cards.KING │ - │ -cards.NUM_SUITS = 4 │ -cards.NUM_VALS = 13 │ - │ -cards.suits = { │ - cards.DIAMONDS, │ - cards.HEARTS, │ - cards.SPADES, │ - cards.CLUBS, │ -} │ - │ -cards.suit_to_idx = { │ - [cards.DIAMONDS] = 0, │ - [cards.HEARTS] = 1, │ - [cards.SPADES] = 2, │ - [cards.CLUBS] = 3, │ -} │ - │ -cards.idx_to_suit = { │ -} │ - │ -for suit, suit_idx in pairs(cards.suit_to_idx) do │ - cards.idx_to_suit[suit_idx] = suit │ -end │ +local wait_for_players = {} │ │ -cards.UNREVEALED_CARD = 53 │ +local alexgames = require("alexgames") │ +local show_buttons_popup = require("libs/ui/show_buttons_popup") │ │ -cards.vals = { │ - cards.ACE, │ - 2, │ - 3, │ - 4, │ - 5, │ - 6, │ - 7, │ - 8, │ - 9, │ - 10, │ - cards.JACK, │ - cards.QUEEN, │ - cards.KING, │ +local POPUP_ID_WAITING_FOR_PLAYERS = "waiting_for_players" │ +-- Only the host can start the game │ +local POPUP_WAITING_FOR_PLAYERS_HOST_BTNS = { │ + "Start game", │ } │ │ -function cards.card_to_int(card) │ - if card == nil then error("card_to_int arg is nil", 2) end │ - if card == cards.UNREVEALED_CARD then │ - return card │ - end │ - return cards.suit_to_idx[card.suit] * cards.NUM_VALS + (card.val-1) │ -end │ - │ -function cards.int_to_card(card_int) │ - if card_int == cards.UNREVEALED_CARD then │ - return card_int │ - end │ - if not(0 <= card_int and card_int < cards.NUM_SUITS * cards.NUM_VALS) then │ - return nil │ - end │ - local card = {} │ - card.suit = cards.idx_to_suit[math.floor(card_int / cards.NUM_VALS)] │ - card.val = (card_int % cards.NUM_VALS) + 1 │ - return card │ -end │ - │ -function cards.copy_card(card) │ - if card == nil then │ - return nil │ - end │ - local card_int = cards.card_to_int(card) │ - return cards.int_to_card(card_int) │ -end │ - │ -function cards.copy_card_ary(card_ary_orig) │ - local card_ary_copy = {} │ - for _, card in ipairs(card_ary_orig) do │ - table.insert(card_ary_copy, cards.copy_card(card)) │ - end │ - return card_ary_copy │ -end │ - │ -function cards.copy_card_ary_ary(card_ary_ary_orig) │ - local ary_copy = {} │ - for _, card_ary in ipairs(card_ary_ary_orig) do │ - table.insert(ary_copy, cards.copy_card_ary(card_ary)) │ - end │ - return ary_copy │ -end │ - │ - │ -function cards.val_to_string(val) │ - if val == nil then │ - return "nil" │ - end │ - local to_letter = { │ - [cards.ACE] = "A", │ - [cards.JACK] = "J", │ - [cards.QUEEN] = "Q", │ - [cards.KING] = "K", │ - } │ - │ - if 2 <= val and val <= 10 then │ - return string.format("%d", val) │ - else │ - return to_letter[val] │ - end │ -end │ - │ -function cards.card_to_string(card) │ - if card == nil then return 'nil' end │ - local val_str = cards.val_to_str(card.val) │ - local suit_str = cards.suit │ - return string.format('[%s %s]', suit_str, val_str) │ -end │ - │ -function cards.card_ary_to_string(card_ary) │ - local s = '{' │ - for i, card in ipairs(card_ary) do │ - if i == 1 then s = s .. ' ' │ - else s = s .. ', ' end │ - s = s .. cards.card_to_string(card) │ - end │ - s = s .. '}' │ - return s │ -end │ │ -local function swap(array, index1, index2) │ - array[index1], array[index2] = array[index2], array[index1] │ -end │ +local players = nil │ +local player = nil │ +local player_name_to_idx = {} │ +local is_client = nil │ +local start_game_host_func = nil │ +local start_game_client_func = nil │ │ -local function shuffle(array) │ - local counter = #array │ - while counter > 1 do │ - local index = math.random(counter) │ - swap(array, index, counter) │ - counter = counter - 1 │ - end │ -end │ +function wait_for_players.init(players_arg, player_arg, │ + start_game_host_arg, start_game_client_arg) │ + │ + players = players_arg │ + player = player_arg │ + is_client = false │ + start_game_host_func = start_game_host_arg │ + start_game_client_func = start_game_client_arg │ │ -local function new_card(suit,val) │ - return { suit = suit, val = val } │ + alexgames.set_status_msg("Waiting for players to join as host") │ + wait_for_players.show_waiting_for_players_popup() │ + alexgames.send_message("all", string.format("joined:")) │ end │ │ -function cards.new_deck() │ - local deck = {} │ - for _, suit in ipairs(cards.suits) do │ - for _, val in ipairs(cards.vals) do │ - local card = new_card(suit, val) │ - deck[#deck+1] = card │ +local function get_vacant_player_spot(players) │ + local idx = 1 │ + while true do │ + if players[idx] == nil then │ + return idx │ end │ + idx = idx + 1 │ end │ - return deck │ end │ │ -function cards.shuffle(deck) │ - return shuffle(deck) │ -end │ │ -function cards.card_to_string(card) │ - if card == nil then return "nil" │ - elseif card == cards.UNREVEALED_CARD then return "[unrevealed]" end │ - return string.format("[%s %s]", card.suit, cards.val_to_string(card.val)) │ +function wait_for_players.is_host_tentative() │ + return not is_client │ end │ │ -function cards.card_array_to_string(card_array) │ - local str = "{" │ - for i=1,#card_array do │ - str = str .. cards.card_to_string(card_array[i]) .. ", " │ - end │ - str = str .. "}" │ - return str │ +function wait_for_players.players_tentative() │ + print("returning players count ", #players) │ + return players │ end │ │ -function cards.serialize_card(card) │ - local byte = nil │ - if card == nil then │ - byte = 255 │ - else │ - byte = cards.card_to_int(card) │ +function wait_for_players.show_waiting_for_players_popup() │ + local body_txt = string.format("Players joined: %d", #players) │ + print("Player is %q", player) │ + for player_id, player_ip in pairs(players) do │ + local more_info = "" │ + if player_id == player then │ + if is_client then │ + more_info = "(you) " │ + else │ + more_info = "(you, host) " │ + end │ + end │ + print(string.format("Player %d: %s%s", player_id, more_info, player_ip)) │ + body_txt = body_txt .. string.format("\nPlayer %d: %s%s", player_id, more_info, player_ip) │ end │ - local chars = {string.char(byte)} │ - return table.concat(chars, "") │ -end │ │ -function cards.deserialize_card(bytes) │ - local card_int = string.byte(table.remove(bytes,1)) │ - if card_int == 255 then │ - return nil │ + local btns = {} │ + if is_client then │ + body_txt = body_txt .. "\nWaiting for host to start the game" │ else │ - return cards.int_to_card(card_int) │ - end │ -end │ - │ -function cards.serialize_card_array(card_array) │ - if card_array == nil then │ - error("arg is nil", 2) │ - return │ - end │ - local bytes = {} │ - bytes[#bytes+1] = string.char(#card_array) │ - for i=1,#card_array do │ - bytes[#bytes+1] = string.char(cards.card_to_int(card_array[i])) │ - end │ - local msg = table.concat(bytes, "") │ - return msg │ -end │ - │ --- Also removes the elements from the table `bytes` │ -function cards.deserialize_card_array(bytes) │ - local card_array = {} │ - --local num_cards = string.byte(bytes:sub(1,1)) │ - local num_cards = string.byte(table.remove(bytes, 1)) │ - if #bytes < num_cards then │ - error(string.format("expected %d bytes, only had %d", num_cards, #bytes)) │ - return │ - end │ - for i=1,num_cards do │ - --card_array[#card_array+1] = cards.int_to_card(string.byte(bytes:sub(i,i))) │ - local card_int = string.byte(table.remove(bytes,1)) │ - card_array[#card_array+1] = cards.int_to_card(card_int) │ - end │ - return card_array │ -end │ - │ -function cards.suit_is_red(suit) │ - return suit == cards.DIAMONDS or suit == cards.HEARTS │ -end │ - │ -function cards.cards_eq(card1, card2) │ - return (card1.suit == card2.suit and │ - card1.val == card2.val) │ -end │ - │ - │ ---[[ │ -for i=0,51 do │ - local card = cards.int_to_card(i) │ - local i2 = cards.card_to_int(card) │ - if i ~= i2 then │ - error(string.format("%q ~= %q", i, i2)) │ - end │ - --print(string.format("i=%d, card=%s, i2=%d", i, cards.card_to_string(card), i2)) │ -end │ -]] │ - │ -return cards │ - │ - │ -local cards_draw = require("libs/cards/cards_draw") │ - │ -local canvas_width = 480 │ -local canvas_height = 480 │ - │ -local card_width = 40 │ -local card_height = 70 │ -local font_size = 24 │ -local padding = 5 │ - │ -if false then │ - card_width = 70 │ - card_height = 120 │ - font_size = 48 │ - padding = 5 │ -end │ - │ -cards_draw.draw_facedown_card(padding, padding, card_width, card_height) │ - │ -local deck2 = cards.new_deck() │ -cards.shuffle(deck2) │ - │ - │ -local dx = card_width + padding │ -local dy = card_height + padding │ - │ -local y = padding │ -local x = padding + dx │ - │ -for i, card in ipairs(deck2) do │ - │ - │ - print("Drawing card " .. cards.card_to_string(card)) │ - cards_draw.draw_card(card, y, x, card_width, card_height, font_size) │ - │ - x = x + dx │ - │ - if x + card_width + padding >= canvas_width then │ - x = padding │ - y = y + dy │ + btns = POPUP_WAITING_FOR_PLAYERS_HOST_BTNS │ end │ + show_buttons_popup.show_popup(POPUP_ID_WAITING_FOR_PLAYERS, │ + "Waiting for players", │ + body_txt, │ + btns) │ end │ -local cards_set = {} │ - │ -local cards = require("libs/cards/cards") │ - │ -function cards_set.card_list_to_set(card_list) │ - local card_set = { │ - suits = {}, │ - list = card_list, │ - } │ - for _, suit in ipairs(cards.suits) do │ - card_set.suits[suit] = {} │ - end │ │ - for _, card in ipairs(card_list) do │ - card_set.suits[card.suit][card.val] = true │ +function wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ + if popup_id == POPUP_ID_WAITING_FOR_PLAYERS then │ + if btn_idx == 0 then │ + alexgames.send_message("all", "start_game:") │ + start_game_host_func(players, player, player_name_to_idx) │ + alexgames.hide_popup() │ + return true │ + end │ end │ - │ - return card_set │ + return false │ end │ -local cards = require("libs/cards/cards") │ -local draw_more = require("libs/draw/draw_more") │ -local draw_shapes = require("libs/draw/draw_shapes") │ -local alexgames = require("alexgames") │ - │ --- TODO make definitions of this in alexgames │ -local ALIGN_CENTRE = 0 │ -local ALIGN_LEFT = 1 │ - │ -local DARK_OVERLAY_COLOUR_CARD_FACE = "#000000aa" │ -local DARK_OVERLAY_COLOUR_CARD_BACK = "#000000aa" │ - │ -local font_size_small = 16 │ --- local font_size_small = 12 │ - │ -local cards_draw = {} │ - │ -function cards_draw.draw_facedown_card(y, x, width, height, higlight, angle, brightness_percent) │ - brightness_percent = nil -- overriding this because I am drawing the DARK_OVERLAY over the card │ - draw_more.draw_graphic_ul("card_facedown", y, x, width, height, { angle_degrees = angle, brightness_percent = brightness_percent }) │ - │ - if alexgames.get_user_colour_pref() == "dark" then │ - local pts = draw_more.get_rotated_pts_ul(y, x, width, height, angle) │ - alexgames.draw_rect(DARK_OVERLAY_COLOUR_CARD_BACK, │ - pts.y, pts.x, │ - pts.y + pts.height, pts.x + pts.width) │ - end │ - │ - if higlight then │ - local padding = math.floor(math.max(height*0.05, width*0.05)) │ - draw_more.draw_graphic_ul("card_highlight", │ - y - padding, x - padding, │ - width + 2*padding, height + 2*padding, │ - { angle_degrees = angle }) │ - end │ │ +local function become_client_player(player_idx, player_name) │ + alexgames.set_status_msg(string.format("You are player %d (client), %s", player_idx, player_name)) │ + is_client = true │ + player = player_idx │ + players = { [player_idx] = "You" } │ + -- I don't remember why I left this comment... it was originally on the 31's game main │ + -- TODO call some game31s API to return client state │ end │ │ -function cards_draw.draw_card(card, y, x, width, height, font_size, highlight, angle) │ - if card == nil then │ - error("card is nil"); │ - end │ - │ - │ - local suits_to_graphic = { │ - [cards.DIAMONDS] = "card_diamonds", │ - [cards.HEARTS] = "card_hearts", │ - [cards.SPADES] = "card_spades", │ - [cards.CLUBS] = "card_clubs", │ - } │ - │ - local blank_card_colour = '#ffffff' │ - local suit_colour_red = "#ff0000" │ - local suit_colour_black = "#000000" │ - local card_outline = '#000000' │ - local card_outline_thickness = 2 │ - local brightness_percent_suit_icon = nil │ - local brightness_percent_facedown_card = nil │ - │ - -- This looks fine on every browser except safari, which │ - -- doesn't support it. │ - -- So I will comment this out for now and just draw a transparent grey │ - -- rectangle over all the cards │ - -- Checking alexgames.is_feature_supported() here would be nice, │ - -- but I wasn't sure how to check if these features are supported │ - -- (or even if the user is using safari or not) │ - if false and alexgames.get_user_colour_pref() == "dark" then │ - blank_card_colour = '#444444' │ - suit_colour_red = "#AA0000" │ - suit_colour_black = "#000000" │ - card_outline = '#000000' │ - brightness_percent_suit_icon = 50 │ - brightness_percent_facedown_card = 35 │ - end │ - │ - if card == cards.UNREVEALED_CARD then │ - cards_draw.draw_facedown_card(y, x, width, height, highlight, angle, brightness_percent_facedown_card) │ - return │ - end │ - │ - │ - local suits_to_text_colour = { │ - [cards.DIAMONDS] = suit_colour_red, │ - [cards.HEARTS] = suit_colour_red, │ - [cards.SPADES] = suit_colour_black, │ - [cards.CLUBS] = suit_colour_black, │ - } │ - │ - local small_padding = math.floor(width*0.1) │ - │ - local suit_icon_big_width = math.floor(width*0.45) │ - local suit_icon_big_height = math.floor(height*0.45) │ - │ - local suit_icon_big_y │ - local suit_icon_big_x │ - local text_icon_big_y │ - local text_icon_big_x │ - │ - local suit_icon_little_y │ - local suit_icon_little_x │ - local text_icon_little_y │ - local text_icon_little_x │ - │ - local draw_big_suit_icon = false │ - │ - if angle ~= nil and angle ~= 0 and angle ~= 90 and angle ~= 180 and angle ~= 270 then │ - error(string.format("draw_card for angle %s not supported", angle), 2) │ - end │ - │ - if angle == 0 or angle == nil then │ - suit_icon_big_y = y + width*0.1 │ - suit_icon_big_x = x + math.floor(width*(1-0.45)/2) │ - text_icon_big_y = y + 0.9*height │ - text_icon_big_x = x + 0.5*width │ - │ - suit_icon_little_y = y + small_padding │ - suit_icon_little_x = x + math.floor(width*0.5) │ - text_icon_little_y = y + math.floor(width*0.35) │ - text_icon_little_x = x + math.floor(width*0.1) │ - elseif angle == 90 then │ - suit_icon_big_y = y + math.floor(width*(1-0.45)/2) │ - suit_icon_big_x = x - height*0.1 │ - text_icon_big_y = y + 0.7*width │ - text_icon_big_x = x - 0.8*height │ - │ - suit_icon_little_y = y + math.floor(width*0.5) │ - suit_icon_little_x = x - small_padding │ - text_icon_little_y = y + math.floor(width*0.35) │ - text_icon_little_x = x - math.floor(width*0.35) │ - elseif angle == 180 then │ - suit_icon_big_y = y - width*0.1 │ - suit_icon_big_x = x - math.floor(width*(1 - 0.45)/2) │ - text_icon_big_y = y - 0.6*height │ - text_icon_big_x = x - 0.5*width │ - │ - suit_icon_little_y = y - small_padding │ - suit_icon_little_x = x - math.floor(width*0.5) │ - text_icon_little_y = y - math.floor(width*0.1) │ - text_icon_little_x = x - math.floor(width*0.35) │ - elseif angle == 270 then │ - suit_icon_big_y = y - math.floor(width*(1-0.45)/2) │ - suit_icon_big_x = x + height*0.1 │ - text_icon_big_y = y - 0.3*width │ - text_icon_big_x = x + 0.8*height │ - │ - suit_icon_little_y = y - math.floor(width*0.5) │ - suit_icon_little_x = x + small_padding │ - text_icon_little_y = y - math.floor(width*0.1) │ - text_icon_little_x = x + math.floor(width*0.1) │ - end │ - │ - text_icon_big_y = math.floor(text_icon_big_y) │ - text_icon_big_x = math.floor(text_icon_big_x) │ - suit_icon_big_y = math.floor(suit_icon_big_y) │ - suit_icon_big_x = math.floor(suit_icon_big_x) │ - │ - │ - if angle ~= nil and angle ~= 0 then │ - draw_more.draw_graphic_ul("card_blank", y, x, width, height, { angle_degrees = angle }); │ - else │ - alexgames.draw_rect(blank_card_colour, y, x, y + height, x + width) │ - draw_shapes.draw_rect_outline(card_outline, card_outline_thickness, y, x, y + height, x + width) │ - end │ - │ - -- TODO clean this up, make sure it looks good for small cards (card sim, crib) │ - -- maybe have the option to display either type of card │ - -- maybe now is the time to refactor this to take in a table of size params, │ - -- rather than a ton of integer arguments │ - if not draw_big_suit_icon then │ - -- TODO adjust the position for rotation here │ - draw_more.draw_graphic_ul(suits_to_graphic[card.suit], │ - suit_icon_little_y, suit_icon_little_x, │ - math.floor(width/2) - small_padding, │ - math.floor(1.2*width/2) - small_padding, │ - { angle_degrees = angle , brightness_percent = brightness_percent_suit_icon}) │ - alexgames.draw_text(cards.val_to_string(card.val), suits_to_text_colour[card.suit], │ - text_icon_little_y, text_icon_little_x, │ - font_size_small, ALIGN_LEFT, angle) │ - else │ - draw_more.draw_graphic_ul(suits_to_graphic[card.suit], │ - suit_icon_big_y, suit_icon_big_x, │ - suit_icon_big_width, suit_icon_big_height, │ - { angle_degrees = angle, brightness_percent = brightness_percent_suit_icon}) │ - end │ - alexgames.draw_text(cards.val_to_string(card.val), suits_to_text_colour[card.suit], │ - text_icon_big_y, text_icon_big_x, font_size, ALIGN_CENTRE, angle) │ - │ - if alexgames.get_user_colour_pref() == "dark" then │ - alexgames.draw_rect(DARK_OVERLAY_COLOUR_CARD_FACE, │ - y, x, │ - y + height, x + width) │ - end │ - if highlight then │ - local padding = math.floor(math.max(height*0.05, width*0.05)) │ - draw_more.draw_graphic_ul("card_highlight", │ - y - padding, x - padding, │ - width + 2*padding, height + 2*padding, │ - { angle_degrees = angle }) │ - end │ -end │ │ -function cards_draw.draw_card_array(card_array, y_centre, x_centre, width, height, font_size, highlight, padding, offset_array) │ - if #card_array > 0 and offset_ary ~= nil and #offset_array ~= #card_array then │ - error(string.format("offset_ary len %d, card_array len %d", #offset_ary, #card_array)) │ - end │ +function wait_for_players.handle_msg_received(src, msg) │ + local m = msg:gmatch("([^:]+):(.*)") │ + local header, payload │ + header, payload = m() │ │ - for card_idx=1,#card_array do │ - local y = math.floor(y_centre - height/2) │ - if offset_array ~= nil then │ - y = y + offset_array[card_idx] │ + if header == "player" then │ + local m = payload:gmatch("(%d+),(.*)") │ + local new_player_idx, new_player_name = m() │ + become_client_player(tonumber(new_player_idx), new_player_name) │ + wait_for_players.show_waiting_for_players_popup() │ + elseif header == "clear_players" then │ + if is_client then │ + print("Clearing players") │ + player = nil │ + players = {} │ end │ - local x = (x_centre - width/2) + math.floor(((card_idx-0.5 - #card_array/2))*(width + padding)) │ - cards_draw.draw_card(card_array[card_idx], y, x, width, height, font_size, highlight ~= nil and highlight[card_idx], 0) │ - end │ -end │ - │ -function cards_draw.draw_card_array_facedown(count, y_centre, x_centre, width, height, highlight, padding, offset_array) │ - for card_idx=1,count do │ - local y = math.floor(y_centre - height/2) │ - if offset_array ~= nil then │ - y = y + offset_array[card_idx] │ + elseif header == "add_player" then │ + local m = payload:gmatch("(%d+),(.*)") │ + local new_player_idx, new_player_name = m() │ + new_player_idx = tonumber(new_player_idx) │ + alexgames.set_status_msg(string.format("Player %d joined from %s", new_player_idx, new_player_name)) │ + players[new_player_idx] = new_player_name │ + player_name_to_idx[new_player_name] = new_player_idx │ + wait_for_players.show_waiting_for_players_popup() │ + elseif header == "player_left" then │ + if src ~= "ctrl" then │ + error("Received 'player_left' message from another player") │ + return │ end │ - local x = (x_centre - width/2) + math.floor(((card_idx-0.5 - count/2))*(width + padding)) │ - cards_draw.draw_facedown_card(y, x, width, height, highlight, 0) │ - end │ -end │ + local player_left_name = payload │ + local player_left_idx = player_name_to_idx[player_left_name] │ + local player_left_msg = string.format("Player %s \"%s\" left", player_left_idx, player_left_name) │ + alexgames.set_status_msg(player_left_msg) │ + if player_left_idx == nil then │ + print(string.format("Player leaving \"%s\" is not in players map", player_left_name)) │ + return │ + end │ + table.remove(players, player_left_idx) │ + player_name_to_idx[player_left_name] = nil │ │ -function cards_draw.card_array_coords_to_idx(count, y_centre, x_centre, │ - width, height, padding, │ - offset_array, │ - coord_y, coord_x) │ - local x_start = (x_centre - width/2) + math.floor(((0 -0.5 - count/2))*(width + padding)) │ - local x_end = (x_centre - width/2) + math.floor(((count+1-0.5 - count/2))*(width + padding)) │ - if x_start <= coord_x and coord_x <= x_end then │ - local idx = math.floor((coord_x - x_start) / (width + padding)) │ - if not(1 <= idx and idx <= count) then │ - return nil │ + alexgames.send_message("all", "clear_players:") │ + -- Must update all players with their number, since │ + -- they've changed (if player 2 leaves, player 3 will now be player 2) │ + for player_idx,_ in ipairs(players) do │ + local player_name = players[player_idx] │ + alexgames.send_message(player_name, string.format("player:%d,%s", player_idx, player_name)) │ end │ - local y_start = math.floor(y_centre - height/2) │ - local y_end = math.floor(y_centre + height/2) │ - if offset_ary ~= nil then │ - y_start = y_start + offset_array[idx] │ - y_end = y_end + offset_array[idx] │ + for player_idx,_ in ipairs(players) do │ + alexgames.send_message("all", string.format("add_player:%d,%s", player_idx, players[player_idx])) │ end │ - if y_start <= coord_y and coord_y <= y_end then │ - local pos_within_card = (coord_x - x_start) % (width + padding) │ - if pos_within_card <= width then │ - return idx │ + wait_for_players.show_waiting_for_players_popup() │ + elseif header == "joined" then │ + if not is_client then │ + players_joined = get_vacant_player_spot(players) │ + local new_player_idx = players_joined │ + -- TODO will need to let new players choose their player idx │ + players[new_player_idx] = src │ + player_name_to_idx[src] = new_player_idx │ + │ + -- TODO don't show this if the game has started? │ + wait_for_players.show_waiting_for_players_popup() │ + │ + alexgames.send_message(src, string.format("player:%d,%s", new_player_idx, src)) │ + for player_id, player_name in pairs(players) do │ + if player_id == new_player_idx then │ + goto next_player │ + end │ + if player_name == "You" then │ + player_name = "Host" │ + end │ + alexgames.send_message(src, string.format("add_player:%d,%s", player_id, player_name)) │ + ::next_player:: │ end │ + -- Should loop through existing players and tell only this new one │ + -- who else has already joined │ + alexgames.send_message("all", string.format("add_player:%d,%s", new_player_idx, src)) │ + alexgames.set_status_msg(string.format("Player %d joined from %s", new_player_idx, src)) │ + │ + -- TODO originally, in 31's, I called this here. │ + -- Need to re-examine all this if a game is ongoing... │ + -- send_state_updates_if_host() │ + end │ + elseif header == "start_game" then │ + if is_client then │ + alexgames.hide_popup() │ + start_game_client_func(players, player, player_name_to_idx) │ end │ + else │ + return false │ end │ │ - return nil │ + return true │ end │ │ -return cards_draw │ +return wait_for_players │ --[[ │ -- This is a simple helper class for games that require exactly two players, │ -- optionally supporting local multiplayer, or network multiplayer │ -- where it is desirable to allow a player to quit, rejoin later, and even │ -- select a different player (perhaps even the player that is already joined). │ -- This seems good for strategy games, where there is no hidden information. │ -- Though I'm now adding the ability to indicate which player selected their │ @@ -35324,220 +34493,388 @@ │ else │ return false │ end │ end │ │ │ return two_player │ ---[[ │ --- This library allows for 0 or more players to join a game hosted by a player. │ --- │ --- It is best suited for games where the players don't need to pick a role (e.g. │ --- black or white pieces in a game like chess), they will simply be e.g. "Player 2" │ --- │ ---]] │ - │ -local wait_for_players = {} │ +local buttons = {} │ │ local alexgames = require("alexgames") │ -local show_buttons_popup = require("libs/ui/show_buttons_popup") │ - │ -local POPUP_ID_WAITING_FOR_PLAYERS = "waiting_for_players" │ --- Only the host can start the game │ -local POPUP_WAITING_FOR_PLAYERS_HOST_BTNS = { │ - "Start game", │ -} │ - │ +local draw_shapes = require("libs/draw/draw_shapes") │ │ -local players = nil │ -local player = nil │ -local player_name_to_idx = {} │ -local is_client = nil │ -local start_game_host_func = nil │ -local start_game_client_func = nil │ +buttons.BTN_SHAPE_RECT = "rect" -- sending nil instead of this works too │ +buttons.BTN_SHAPE_TRIANGLE = "triangle" │ │ -function wait_for_players.init(players_arg, player_arg, │ - start_game_host_arg, start_game_client_arg) │ - │ - players = players_arg │ - player = player_arg │ - is_client = false │ - start_game_host_func = start_game_host_arg │ - start_game_client_func = start_game_client_arg │ +function buttons.new_state() │ + local state = { │ + buttons = {}, │ + btn_id_map = {}, │ + } │ + return state │ +end │ │ - alexgames.set_status_msg("Waiting for players to join as host") │ - wait_for_players.show_waiting_for_players_popup() │ - alexgames.send_message("all", string.format("joined:")) │ +function buttons.new_button(state, btn_params) │ + if state == nil then error("state is nil", 2) end │ + if btn_params.id == nil then │ + error("btn_params.id is nil", 2) │ + end │ + if btn_params.text == nil then │ + error("btn_params.text is nil", 2) │ + end │ + local enabled = true │ + if btn_params.enabled ~= nil then │ + enabled = btn_params.enabled │ + end │ + local btn_info = { │ + id = btn_params.id, │ + text = btn_params.text, │ + bg_colour = btn_params.bg_colour, │ + fg_colour = btn_params.fg_colour, │ + outline_colour = btn_params.outline_colour, │ + outline_width = btn_params.outline_width, │ + btn_shape = btn_params.btn_shape, │ + shape_param = btn_params.shape_param, │ + text_size = btn_params.text_size, │ + padding = btn_params.padding, │ + y_start = btn_params.y_start, │ + x_start = btn_params.x_start, │ + --y_end = btn_params.y_start + btn_params.y_size, │ + --x_end = btn_params.x_start + btn_params.x_size, │ + y_end = btn_params.y_end, │ + x_end = btn_params.x_end, │ + enabled = enabled, │ + visible = true, │ + callback = btn_params.callback, │ + } │ + table.insert(state.buttons, btn_info) │ + state.btn_id_map[btn_params.id] = btn_info │ end │ │ -local function get_vacant_player_spot(players) │ - local idx = 1 │ - while true do │ - if players[idx] == nil then │ - return idx │ +function buttons.on_user_click(state, y_pos, x_pos) │ + for _, btn_info in ipairs(state.buttons) do │ + if btn_info.enabled and btn_info.visible and │ + btn_info.y_start <= y_pos and y_pos <= btn_info.y_end and │ + btn_info.x_start <= x_pos and x_pos <= btn_info.x_end then │ + --print(string.format("Pressed button \"%s\"", btn_info.text)) │ + if btn_info.callback then │ + btn_info.callback(btn_info.id) │ + end │ + return btn_info.id │ end │ - idx = idx + 1 │ end │ end │ │ +function buttons.set_enabled(state, btn_id, is_enabled) │ + state.btn_id_map[btn_id].enabled = is_enabled │ +end │ │ -function wait_for_players.is_host_tentative() │ - return not is_client │ +function buttons.set_visible(state, btn_id, is_visible) │ + state.btn_id_map[btn_id].visible = is_visible │ end │ │ -function wait_for_players.players_tentative() │ - print("returning players count ", #players) │ - return players │ +function buttons.set_text(state, btn_id, text) │ + state.btn_id_map[btn_id].text = text │ end │ │ -function wait_for_players.show_waiting_for_players_popup() │ - local body_txt = string.format("Players joined: %d", #players) │ - print("Player is %q", player) │ - for player_id, player_ip in pairs(players) do │ - local more_info = "" │ - if player_id == player then │ - if is_client then │ - more_info = "(you) " │ +function buttons.draw(state) │ + for _, btn_info in ipairs(state.buttons) do │ + if not btn_info.visible then │ + goto next_button │ + end │ + local btn_width = btn_info.x_end - btn_info.x_start │ + local text_align = 0 │ + │ + local outline_colour = btn_info.outline_colour │ + local bg_colour = btn_info.bg_colour │ + local fg_colour = btn_info.fg_colour │ + │ + if not btn_info.enabled then │ + outline_colour = '#cccccc88' │ + bg_colour = '#eeeeee88' │ + fg_colour = '#aaaaaa88' │ + end │ + │ + if btn_info.btn_shape == buttons.BTN_SHAPE_TRIANGLE then │ + draw_shapes.draw_triangle_lr(outline_colour, btn_info.outline_width, bg_colour, │ + btn_info.shape_param, │ + btn_info.y_start, btn_info.x_start, │ + btn_info.y_end, btn_info.x_end) │ + if btn_info.shape_param then │ + text_align = 1 │ else │ - more_info = "(you, host) " │ + text_align = -1 │ end │ + else │ + alexgames.draw_rect(bg_colour, │ + btn_info.y_start, btn_info.x_start, │ + btn_info.y_end, btn_info.x_end) │ + draw_shapes.draw_rect_outline(outline_colour, btn_info.outline_width, │ + btn_info.y_start, btn_info.x_start, │ + btn_info.y_end, btn_info.x_end) │ end │ - print(string.format("Player %d: %s%s", player_id, more_info, player_ip)) │ - body_txt = body_txt .. string.format("\nPlayer %d: %s%s", player_id, more_info, player_ip) │ + │ + local text_y_start = math.floor((btn_info.y_start + btn_info.y_end + btn_info.text_size)/2) │ + alexgames.draw_text(btn_info.text, fg_colour, │ + text_y_start, math.floor(btn_info.x_start + btn_width/2), │ + btn_info.text_size, text_align) │ + ::next_button:: │ end │ +end │ │ - local btns = {} │ - if is_client then │ - body_txt = body_txt .. "\nWaiting for host to start the game" │ +return buttons │ +local soft_numpad = {} │ + │ +local buttons = require("libs/ui/buttons") │ + │ +function soft_numpad.btn_id(num) │ + return string.format("numpad_%d", num) │ +end │ + │ +local BUTTON_ID_CLEAR = "numpad_clear" │ +local BUTTON_ID_BKSP = "numpad_bksp" │ + │ +local BUTTON_ID_TO_NUM = { │ +} │ +for i=0,9 do │ + BUTTON_ID_TO_NUM[soft_numpad.btn_id(i)] = i │ +end │ + │ +local function button_pressed(state, btn_id) │ + if btn_id == BUTTON_ID_CLEAR then │ + state.input_presses = {} │ + elseif btn_id == BUTTON_ID_BKSP then │ + table.remove(state.input_presses) │ + elseif BUTTON_ID_TO_NUM[btn_id] then │ + local num = BUTTON_ID_TO_NUM[btn_id] │ + table.insert(state.input_presses, num) │ else │ - btns = POPUP_WAITING_FOR_PLAYERS_HOST_BTNS │ + return │ end │ - show_buttons_popup.show_popup(POPUP_ID_WAITING_FOR_PLAYERS, │ - "Waiting for players", │ - body_txt, │ - btns) │ + │ + local output_str = '' │ + for i, val in ipairs(state.input_presses) do │ + if i ~= 1 then output_str = output_str .. ', ' end │ + output_str = output_str .. val │ + end │ + print("input_presses is now: " .. output_str) │ end │ │ -function wait_for_players.handle_popup_btn_clicked(popup_id, btn_idx) │ - if popup_id == POPUP_ID_WAITING_FOR_PLAYERS then │ - if btn_idx == 0 then │ - alexgames.send_message("all", "start_game:") │ - start_game_host_func(players, player, player_name_to_idx) │ - alexgames.hide_popup() │ - return true │ - end │ +function soft_numpad.init(numpad_params) │ + local state = { │ + buttons = nil, │ + input_presses = {}, │ + } │ + state.buttons = buttons.new_state() │ + │ + -- [clr] [bksp] │ + -- 7 8 9 │ + -- 4 5 6 │ + -- 1 2 3 │ + -- 0 │ + │ + local num_buttons_y = 5 │ + local num_buttons_x = 3 │ + │ + local padding = 5 │ + if numpad_params.padding ~= nil then │ + padding = numpad_params.padding │ end │ - return false │ + │ + local numpad_width = numpad_params.x_end - numpad_params.x_start │ + │ + local button_size_y = math.floor((numpad_params.y_end - numpad_params.y_start)/num_buttons_y) │ + local button_size_x = math.floor(numpad_width/num_buttons_x) │ + local meta_button_size_x = math.floor(numpad_width/2) │ + │ + local meta_buttons = { │ + { │ + id = BUTTON_ID_CLEAR, │ + text = "clear", │ + }, │ + │ + { │ + id = BUTTON_ID_BKSP, │ + text = "bksp", │ + }, │ + } │ + for meta_btn_idx, btn_info in ipairs(meta_buttons) do │ + local x_start = numpad_params.x_start + (meta_btn_idx-1) * meta_button_size_x + padding │ + buttons.new_button(state.buttons, { │ + id = btn_info.id, │ + text = btn_info.text, │ + bg_colour = numpad_params.btn_bg_colour, │ + fg_colour = numpad_params.btn_fg_colour, │ + text_size = button_size_y - 4*padding, │ + outline_colour = numpad_params.btn_outline_colour, │ + outline_width = numpad_params.btn_outline_width, │ + padding = padding, │ + y_start = numpad_params.y_start + padding, │ + x_start = x_start, │ + y_end = numpad_params.y_start + button_size_y - padding, │ + x_end = x_start + meta_button_size_x - padding, │ + callback = function (btn_id) button_pressed(state, btn_id) end, │ + }) │ + end │ + │ + │ + local nums = { │ + [7] = { y = 1, x = 1 }, │ + [8] = { y = 1, x = 2 }, │ + [9] = { y = 1, x = 3 }, │ + │ + [4] = { y = 2, x = 1 }, │ + [5] = { y = 2, x = 2 }, │ + [6] = { y = 2, x = 3 }, │ + │ + [1] = { y = 3, x = 1 }, │ + [2] = { y = 3, x = 2 }, │ + [3] = { y = 3, x = 3 }, │ + │ + [0] = { y = 4, x = 2 }, │ + } │ + │ + for num, pos in pairs(nums) do │ + local y_start = numpad_params.y_start + (pos.y-1+1)*button_size_y + padding │ + local x_start = numpad_params.x_start + (pos.x-1)*button_size_x + padding │ + local btn_params = { │ + id = soft_numpad.btn_id(num), │ + text = string.format("%d", num), │ + bg_colour = numpad_params.btn_bg_colour, │ + fg_colour = numpad_params.btn_fg_colour, │ + text_size = math.floor(button_size_y/2), │ + padding = padding, │ + y_start = y_start, │ + x_start = x_start, │ + y_end = y_start + button_size_y - padding, │ + x_end = x_start + button_size_x - padding, │ + callback = function (btn_id) button_pressed(state, btn_id) end, │ + } │ + buttons.new_button(state.buttons, btn_params) │ + end │ + │ + return state │ end │ │ -local function become_client_player(player_idx, player_name) │ - alexgames.set_status_msg(string.format("You are player %d (client), %s", player_idx, player_name)) │ - is_client = true │ - player = player_idx │ - players = { [player_idx] = "You" } │ - -- I don't remember why I left this comment... it was originally on the 31's game main │ - -- TODO call some game31s API to return client state │ +function soft_numpad.draw(state) │ + buttons.draw(state.buttons) │ end │ │ +function soft_numpad.on_user_click(state, y_pos, x_pos) │ + buttons.on_user_click(state.buttons, y_pos, x_pos) │ +end │ │ -function wait_for_players.handle_msg_received(src, msg) │ - local m = msg:gmatch("([^:]+):(.*)") │ - local header, payload │ - header, payload = m() │ +function soft_numpad.get_val(state) │ + local val_str = '' │ + for _, num in ipairs(state.input_presses) do │ + val_str = val_str .. num │ + end │ + return val_str │ +end │ │ - if header == "player" then │ - local m = payload:gmatch("(%d+),(.*)") │ - local new_player_idx, new_player_name = m() │ - become_client_player(tonumber(new_player_idx), new_player_name) │ - wait_for_players.show_waiting_for_players_popup() │ - elseif header == "clear_players" then │ - if is_client then │ - print("Clearing players") │ - player = nil │ - players = {} │ - end │ - elseif header == "add_player" then │ - local m = payload:gmatch("(%d+),(.*)") │ - local new_player_idx, new_player_name = m() │ - new_player_idx = tonumber(new_player_idx) │ - alexgames.set_status_msg(string.format("Player %d joined from %s", new_player_idx, new_player_name)) │ - players[new_player_idx] = new_player_name │ - player_name_to_idx[new_player_name] = new_player_idx │ - wait_for_players.show_waiting_for_players_popup() │ - elseif header == "player_left" then │ - if src ~= "ctrl" then │ - error("Received 'player_left' message from another player") │ - return │ - end │ - local player_left_name = payload │ - local player_left_idx = player_name_to_idx[player_left_name] │ - local player_left_msg = string.format("Player %s \"%s\" left", player_left_idx, player_left_name) │ - alexgames.set_status_msg(player_left_msg) │ - if player_left_idx == nil then │ - print(string.format("Player leaving \"%s\" is not in players map", player_left_name)) │ - return │ - end │ - table.remove(players, player_left_idx) │ - player_name_to_idx[player_left_name] = nil │ +function soft_numpad.set_val(state, val) │ + local val_str │ + if val ~= 0 then │ + val_str = tostring(val) │ + else │ + val_str = '' │ + end │ + state.input_presses = {} │ + for i=1,#val_str do │ + table.insert(state.input_presses, val_str:sub(i,i)) │ + end │ +end │ │ - alexgames.send_message("all", "clear_players:") │ - -- Must update all players with their number, since │ - -- they've changed (if player 2 leaves, player 3 will now be player 2) │ - for player_idx,_ in ipairs(players) do │ - local player_name = players[player_idx] │ - alexgames.send_message(player_name, string.format("player:%d,%s", player_idx, player_name)) │ - end │ - for player_idx,_ in ipairs(players) do │ - alexgames.send_message("all", string.format("add_player:%d,%s", player_idx, players[player_idx])) │ - end │ - wait_for_players.show_waiting_for_players_popup() │ - elseif header == "joined" then │ - if not is_client then │ - players_joined = get_vacant_player_spot(players) │ - local new_player_idx = players_joined │ - -- TODO will need to let new players choose their player idx │ - players[new_player_idx] = src │ - player_name_to_idx[src] = new_player_idx │ +return soft_numpad │ +local show_buttons_popup = {} │ │ - -- TODO don't show this if the game has started? │ - wait_for_players.show_waiting_for_players_popup() │ +local alexgames = require("alexgames") │ │ - alexgames.send_message(src, string.format("player:%d,%s", new_player_idx, src)) │ - for player_id, player_name in pairs(players) do │ - if player_id == new_player_idx then │ - goto next_player │ - end │ - if player_name == "You" then │ - player_name = "Host" │ - end │ - alexgames.send_message(src, string.format("add_player:%d,%s", player_id, player_name)) │ - ::next_player:: │ - end │ - -- Should loop through existing players and tell only this new one │ - -- who else has already joined │ - alexgames.send_message("all", string.format("add_player:%d,%s", new_player_idx, src)) │ - alexgames.set_status_msg(string.format("Player %d joined from %s", new_player_idx, src)) │ +-- This shows a popup with a single message and 0 to many buttons. │ +-- │ +-- This is originally how the show_popup API worked, so I'm adding │ +-- this API for compatibility, rather than changing all the old │ +-- games to use the new API. │ +function show_buttons_popup.show_popup(popup_id, title, msg, btn_ary) │ + local info = { │ + title = title, │ + items = {}, │ + } │ │ - -- TODO originally, in 31's, I called this here. │ - -- Need to re-examine all this if a game is ongoing... │ - -- send_state_updates_if_host() │ + table.insert(info.items, { │ + item_type = alexgames.POPUP_ITEM_TYPE_MSG, │ + msg = msg, │ + }) │ + │ + for btn_id, btn_text in ipairs(btn_ary) do │ + table.insert(info.items, { │ + item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ + text = btn_ary[btn_id], │ + id = (btn_id - 1), │ + }) │ + end │ + │ + alexgames.show_popup(popup_id, info) │ +end │ + │ +return show_buttons_popup │ +local touchpad = {} │ + │ +function touchpad.new_state(touchpad_pos, touchpad_radius) │ + return { │ + pos = touchpad_pos, │ + radius = touchpad_radius, │ + active_touch = nil, │ + │ + player_vec = { y = 0, x = 0 }, │ + } │ +end │ + │ +local function touch_in_dirpad(state, touch) │ + local dy = (touch.y - state.pos.y) │ + local dx = (touch.x - state.pos.x) │ + │ + return (math.abs(dy) <= state.radius and │ + math.abs(dx) <= state.radius) │ +end │ + │ +function touchpad.handle_touch_evts(state, evt_id, touches) │ + local touch_changed = false │ + for _, touch in ipairs(touches) do │ + if evt_id == 'touchstart' and state.active_touch == nil and touch_in_dirpad(state, touch) then │ + state.active_touch = touch.id │ + touch_changed = true │ + elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and state.active_touch == touch.id then │ + state.active_touch = nil │ + state.player_vec = { y = 0, x = 0 } │ + touch_changed = true │ end │ - elseif header == "start_game" then │ - if is_client then │ - alexgames.hide_popup() │ - start_game_client_func(players, player, player_name_to_idx) │ + │ + if state.active_touch == touch.id then │ + local dy = (touch.y - state.pos.y) │ + local dx = (touch.x - state.pos.x) │ + local mag = math.sqrt(dy*dy + dx*dx) / state.radius │ + mag = math.min(mag, 1) │ + local angle = math.atan(dy,dx) │ + state.player_vec = { │ + y = mag*math.sin(angle), │ + x = mag*math.cos(angle), │ + } │ + touch_changed = true │ end │ - else │ - return false │ end │ │ - return true │ + if touch_changed then │ + return state.player_vec │ + else │ + return nil │ + end │ end │ │ -return wait_for_players │ +return touchpad │ local draw_colours = {} │ │ -- highlight is bright yellow, useful for a "can click here" move │ -- alt highlight is blue (useful for highlighting a selected piece, where the │ -- yellow highlight is used to show possible destinations) │ -- │ -- "..._remote" variants are for network multiplayer, to show what the │ @@ -35553,14 +34890,61 @@ │ draw_colours.HIGHLIGHT_FILL_REMOTE = '#ffffcc88' │ │ draw_colours.ALT_HIGHLIGHT_OUTLINE_REMOTE = '#88cccc88' │ draw_colours.ALT_HIGHLIGHT_FILL_REMOTE = '#88cccc88' │ │ │ return draw_colours │ + │ +local draw_shapes = {} │ +local alexgames = require("alexgames") │ + │ +function draw_shapes.draw_rect_outline(colour, line_width, y1, x1, y2, x2) │ + alexgames.draw_line(colour, line_width, y1, x1, y1, x2) │ + alexgames.draw_line(colour, line_width, y1, x1, y2, x1) │ + alexgames.draw_line(colour, line_width, y2, x2, y1, x2) │ + alexgames.draw_line(colour, line_width, y2, x2, y2, x1) │ +end │ + │ +function draw_shapes.draw_triangle_lr(line_colour, line_width, bg_colour, pointing_left, y1, x1, y2, x2) │ + │ + local pt1, pt2, pt3 │ + if pointing_left then │ + pt1 = { y = math.floor((y2 + y1)/2), x = x1 } │ + pt2 = { y = y1, x = x2 } │ + pt3 = { y = y2, x = x2 } │ + else │ + pt1 = { y = math.floor((y2 + y1)/2), x = x2 } │ + pt2 = { y = y1, x = x1 } │ + pt3 = { y = y2, x = x1 } │ + end │ + │ + if bg_colour ~= nil then │ + -- TODO this file was written before I added a "fill_triangle" API. │ + -- obviously it should use that instead │ + alexgames.draw_rect(bg_colour, y1, x1, y2, x2) │ + end │ + │ + if line_colour ~= nil then │ + alexgames.draw_line(line_colour, line_width, pt1.y, pt1.x, pt2.y, pt2.x) │ + alexgames.draw_line(line_colour, line_width, pt2.y, pt2.x, pt3.y, pt3.x) │ + alexgames.draw_line(line_colour, line_width, pt3.y, pt3.x, pt1.y, pt1.x) │ + end │ +end │ + │ +function draw_shapes.draw_triangle_outline(line_colour, line_width, │ + y1, x1, │ + y2, x2, │ + y3, x3) │ + alexgames.draw_line(line_colour, line_width, y1, x1, y2, x2) │ + alexgames.draw_line(line_colour, line_width, y2, x2, y3, x3) │ + alexgames.draw_line(line_colour, line_width, y3, x3, y1, x1) │ +end │ + │ +return draw_shapes │ local draw_more = {} │ │ local alexgames = require("alexgames") │ │ -- Same as alexgames.draw_graphic, but the position is │ -- from the top left instead of the centre. │ -- │ @@ -35991,61 +35375,14 @@ │ end │ │ end │ end │ │ │ return draw_celebration_anim │ - │ -local draw_shapes = {} │ -local alexgames = require("alexgames") │ - │ -function draw_shapes.draw_rect_outline(colour, line_width, y1, x1, y2, x2) │ - alexgames.draw_line(colour, line_width, y1, x1, y1, x2) │ - alexgames.draw_line(colour, line_width, y1, x1, y2, x1) │ - alexgames.draw_line(colour, line_width, y2, x2, y1, x2) │ - alexgames.draw_line(colour, line_width, y2, x2, y2, x1) │ -end │ - │ -function draw_shapes.draw_triangle_lr(line_colour, line_width, bg_colour, pointing_left, y1, x1, y2, x2) │ - │ - local pt1, pt2, pt3 │ - if pointing_left then │ - pt1 = { y = math.floor((y2 + y1)/2), x = x1 } │ - pt2 = { y = y1, x = x2 } │ - pt3 = { y = y2, x = x2 } │ - else │ - pt1 = { y = math.floor((y2 + y1)/2), x = x2 } │ - pt2 = { y = y1, x = x1 } │ - pt3 = { y = y2, x = x1 } │ - end │ - │ - if bg_colour ~= nil then │ - -- TODO this file was written before I added a "fill_triangle" API. │ - -- obviously it should use that instead │ - alexgames.draw_rect(bg_colour, y1, x1, y2, x2) │ - end │ - │ - if line_colour ~= nil then │ - alexgames.draw_line(line_colour, line_width, pt1.y, pt1.x, pt2.y, pt2.x) │ - alexgames.draw_line(line_colour, line_width, pt2.y, pt2.x, pt3.y, pt3.x) │ - alexgames.draw_line(line_colour, line_width, pt3.y, pt3.x, pt1.y, pt1.x) │ - end │ -end │ - │ -function draw_shapes.draw_triangle_outline(line_colour, line_width, │ - y1, x1, │ - y2, x2, │ - y3, x3) │ - alexgames.draw_line(line_colour, line_width, y1, x1, y2, x2) │ - alexgames.draw_line(line_colour, line_width, y2, x2, y3, x3) │ - alexgames.draw_line(line_colour, line_width, y3, x3, y1, x1) │ -end │ - │ -return draw_shapes │ local draw_keyboard = {} │ │ local alexgames = require("alexgames") │ │ local KEYS = { │ "qwertyuiop", │ "asdfghjkl", │ @@ -36180,381 +35517,1044 @@ │ pos.text_size, │ alexgames.TEXT_ALIGN_CENTRE) │ │ end │ end │ │ return draw_keyboard │ -local show_buttons_popup = {} │ +local storage_helpers = {} │ + │ +local utils = require("libs/utils") │ │ local alexgames = require("alexgames") │ │ --- This shows a popup with a single message and 0 to many buttons. │ --- │ --- This is originally how the show_popup API worked, so I'm adding │ --- this API for compatibility, rather than changing all the old │ --- games to use the new API. │ -function show_buttons_popup.show_popup(popup_id, title, msg, btn_ary) │ - local info = { │ - title = title, │ - items = {}, │ - } │ +function storage_helpers.store_bool(key, val) │ + if type(val) ~= 'boolean' then │ + error(string.format("Expected arg val to be type boolean, was %s", type(val)),2) │ + end │ │ - table.insert(info.items, { │ - item_type = alexgames.POPUP_ITEM_TYPE_MSG, │ - msg = msg, │ - }) │ + data = { utils.boolean_to_number(val) } │ │ - for btn_id, btn_text in ipairs(btn_ary) do │ - table.insert(info.items, { │ - item_type = alexgames.POPUP_ITEM_TYPE_BTN, │ - text = btn_ary[btn_id], │ - id = (btn_id - 1), │ - }) │ + alexgames.store_data(key, data) │ +end │ + │ +function storage_helpers.read_bool(key, default_val) │ + local data = alexgames.read_stored_data(key) │ + │ + if data == nil then │ + return default_val │ end │ │ - alexgames.show_popup(popup_id, info) │ -end │ + if #data ~= 1 then │ + error(string.format("Expected a single byte when reading stored value %s, received %d bytes", key, #data)) │ + end │ │ -return show_buttons_popup │ -local soft_numpad = {} │ + local val = string.byte(data:sub(1,1)) │ + print(string.format("val = %s", val)) │ │ -local buttons = require("libs/ui/buttons") │ + return utils.number_to_boolean(val) │ +end │ │ -function soft_numpad.btn_id(num) │ - return string.format("numpad_%d", num) │ +return storage_helpers │ +local bit_pack = {} │ + │ +local function bit_mask(pos) │ + return (1< 0 then │ + bin_str = bin_str .. '1' │ + elseif places ~= nil or #bin_str > 0 then │ + bin_str = bin_str .. '0' │ + end │ + end │ │ -local BUTTON_ID_TO_NUM = { │ -} │ -for i=0,9 do │ - BUTTON_ID_TO_NUM[soft_numpad.btn_id(i)] = i │ + if #bin_str == 0 then │ + return '0' │ + else │ + return bin_str │ + end │ end │ │ -local function button_pressed(state, btn_id) │ - if btn_id == BUTTON_ID_CLEAR then │ - state.input_presses = {} │ - elseif btn_id == BUTTON_ID_BKSP then │ - table.remove(state.input_presses) │ - elseif BUTTON_ID_TO_NUM[btn_id] then │ - local num = BUTTON_ID_TO_NUM[btn_id] │ - table.insert(state.input_presses, num) │ +function bit_pack.pack(vals_list, bit_count) │ + local packed_bytes = {} │ + local bit_buff = 0 │ + local bits_written = 0 │ + for _, val in ipairs(vals_list) do │ + bit_buff = (bit_buff << bit_count) | (val & bit_mask(bit_count)) │ + bits_written = bits_written + bit_count │ + │ + if bits_written >= 8 then │ + local byte_to_write = bit_buff >> (bits_written - 8) │ + bits_written = bits_written - 8 │ + bit_buff = bit_buff & bit_mask(bits_written) │ + table.insert(packed_bytes, byte_to_write) │ + end │ + end │ + │ + if bits_written > 0 then │ + table.insert(packed_bytes, bit_buff << (8 - bits_written)) │ else │ - return │ + bits_written = 8 │ end │ │ - local output_str = '' │ - for i, val in ipairs(state.input_presses) do │ - if i ~= 1 then output_str = output_str .. ', ' end │ - output_str = output_str .. val │ + table.insert(packed_bytes, bits_written) │ + │ + return packed_bytes │ +end │ + │ +function bit_pack.unpack(packed_bytes, bit_count) │ + local vals = {} │ + local bits_in_last_byte = packed_bytes[ #packed_bytes ] │ + local bits_in_buff = 0 │ + local bit_buff = 0 │ + │ + for idx, byte in ipairs(packed_bytes) do │ + local bits_to_read │ + local offset │ + if idx == #packed_bytes - 1 then │ + bits_to_read = bits_in_last_byte │ + offset = 8 - bits_in_last_byte │ + elseif idx < #packed_bytes - 1 then │ + bits_to_read = 8 │ + offset = 0 │ + elseif idx == #packed_bytes then │ + goto next_idx │ + else │ + error(string.format("Unhandled idx %d, len %d", idx, #packed_bytes)) │ + end │ + │ + bits_to_read = bits_to_read + bits_in_buff │ + bit_buff = (bit_buff << 8) | byte │ + while bits_to_read >= bit_count do │ + local val = bit_buff >> (bits_to_read - bit_count + offset) │ + bits_to_read = bits_to_read - bit_count │ + bit_buff = bit_buff & (bit_mask(bits_to_read) << offset) │ + table.insert(vals, val) │ + end │ + │ + bits_in_buff = bits_to_read │ + ::next_idx:: │ end │ - print("input_presses is now: " .. output_str) │ + │ + return vals │ end │ │ -function soft_numpad.init(numpad_params) │ - local state = { │ - buttons = nil, │ - input_presses = {}, │ - } │ - state.buttons = buttons.new_state() │ +local function lists_eq(list1, list2) │ + if #list1 ~= list2 then return false end │ + for i, val1 in ipairs(list1) do │ + if list1[i] ~= list2[i] then │ + return false │ + end │ + end │ │ - -- [clr] [bksp] │ - -- 7 8 9 │ - -- 4 5 6 │ - -- 1 2 3 │ - -- 0 │ + return true │ +end │ │ - local num_buttons_y = 5 │ - local num_buttons_x = 3 │ │ - local padding = 5 │ - if numpad_params.padding ~= nil then │ - padding = numpad_params.padding │ +--[[ │ +local packed = bit_pack.pack({ 0, 1, 2, 3, 4, 5, 6, 7 }, 3) │ +local expected_output = { tonumber("000".."001" .. "01", 2), │ + tonumber("0" .. "011".."100" .. "1", 2), │ + tonumber("01" .. "110" .. "111", 2), │ + 8 } │ +print(string.format('eq: %s', lists_eq(expected_output, packed))) │ + │ +print('') │ +for i=7,0,-1 do │ + io.write(i) │ +end │ +io.write('\n') │ +print('---------') │ +for i, val in ipairs(packed) do │ + print(val) │ + assert(val < 256) │ + print(to_bin_str(val, 8), to_bin_str(expected_output[i], 8), val == expected_output[i]) │ +end │ + │ +print('---expected:') │ +for _, val in ipairs(expected_output) do │ + print(to_bin_str(val, 8)) │ +end │ + │ +-- 000 001 01 │ +-- 0 011 110 1 │ +-- 01 110 001 │ +-- 00 000000 │ +--]] │ + │ +return bit_pack │ +local serialize = {} │ + │ +function serialize.bytestr_to_byteary(bytestr) │ + if bytestr == nil then │ + error("arg is nil", 2) │ + end │ + local byteary = {} │ + for i=1,#bytestr do │ + byteary[i] = bytestr:sub(i,i) │ end │ + return byteary │ +end │ │ - local numpad_width = numpad_params.x_end - numpad_params.x_start │ +function serialize.serialize_byte(val) │ + if val == nil then │ + val = 255 │ + end │ + -- return string.char(val) │ + local output │ + local state, err = pcall(function() output = string.char(val) end ) │ + if not state then │ + error(string.format("bad argument to serialize_byte: %s", val), 2) │ + end │ + return output │ +end │ │ - local button_size_y = math.floor((numpad_params.y_end - numpad_params.y_start)/num_buttons_y) │ - local button_size_x = math.floor(numpad_width/num_buttons_x) │ - local meta_button_size_x = math.floor(numpad_width/2) │ +function serialize.deserialize_byte(bytes) │ + if bytes == nil then │ + error("arg is nil", 2) │ + elseif #bytes == 0 then │ + error("arg is length 0", 2) │ + end │ + if type(bytes) ~= "table" then │ + error(string.format("arg is %s, expected table", type(bytes)), 2) │ + end │ + local val = string.byte(table.remove(bytes, 1)) │ + if val == 255 then return nil end │ + return val │ +end │ │ - local meta_buttons = { │ - { │ - id = BUTTON_ID_CLEAR, │ - text = "clear", │ - }, │ │ - { │ - id = BUTTON_ID_BKSP, │ - text = "bksp", │ - }, │ - } │ - for meta_btn_idx, btn_info in ipairs(meta_buttons) do │ - local x_start = numpad_params.x_start + (meta_btn_idx-1) * meta_button_size_x + padding │ - buttons.new_button(state.buttons, { │ - id = btn_info.id, │ - text = btn_info.text, │ - bg_colour = numpad_params.btn_bg_colour, │ - fg_colour = numpad_params.btn_fg_colour, │ - text_size = button_size_y - 4*padding, │ - outline_colour = numpad_params.btn_outline_colour, │ - outline_width = numpad_params.btn_outline_width, │ - padding = padding, │ - y_start = numpad_params.y_start + padding, │ - x_start = x_start, │ - y_end = numpad_params.y_start + button_size_y - padding, │ - x_end = x_start + meta_button_size_x - padding, │ - callback = function (btn_id) button_pressed(state, btn_id) end, │ - }) │ + │ + │ +function serialize.serialize_16bit(val) │ + local output = "" │ + local orig_val = val │ + if val == nil then │ + val = 0x7fff │ + else │ + val = math.floor(val) │ + end │ + val = val + 0x7fff │ + if not(0 <= val and val <= 0xffff) then │ + error(string.format("Need 16 bit val, recvd %s", orig_val)) │ + return nil │ end │ + output = output .. string.char(math.floor((val/256))&0xff) │ + output = output .. string.char(math.floor(val%256)) │ + return output │ +end │ │ +function serialize.deserialize_16bit(bytes) │ + if #bytes < 2 then │ + error(string.format("Expected at least 2 bytes, recvd %d", #bytes)) │ + end │ + local msb = string.byte(table.remove(bytes,1)) │ + local lsb = string.byte(table.remove(bytes,1)) │ + local val = ((msb << 8) | lsb) - 0x7fff │ + --print(string.format("deserialize_16bit %02x %02x returning %s", msb, lsb, val)) │ + if val == 0x7fff then │ + return nil │ + else │ + return val │ + end │ +end │ │ - local nums = { │ - [7] = { y = 1, x = 1 }, │ - [8] = { y = 1, x = 2 }, │ - [9] = { y = 1, x = 3 }, │ +function serialize.serialize_s32(val) │ + if val == nil then │ + error("nil arg", 2) │ + end │ + local bytes = {} │ + local byte_count = 4 │ + local orig_val = val │ + val = val + 0x7fffffff │ + if not(0 <= val and val <= 0xffffffff) then │ + error(string.format("val %s is out of range for s32", orig_val)) │ + end │ │ - [4] = { y = 2, x = 1 }, │ - [5] = { y = 2, x = 2 }, │ - [6] = { y = 2, x = 3 }, │ + for i=1,byte_count do │ + bytes[byte_count-i+1] = string.char(val & 0xFF) │ + val = val >> 8 │ + end │ + return table.concat(bytes, "") │ +end │ │ - [1] = { y = 3, x = 1 }, │ - [2] = { y = 3, x = 2 }, │ - [3] = { y = 3, x = 3 }, │ +local s32_nil = 0x7ffffffe │ +function serialize.serialize_s32_nilable(val) │ + if val == nil then │ + val = s32_nil │ + end │ + return serialize.serialize_s32(val) │ +end │ │ - [0] = { y = 4, x = 2 }, │ - } │ +function serialize.deserialize_s32_nilable(bytes) │ + local val = serialize.deserialize_s32(bytes) │ + if val == s32_nil then │ + return nil │ + else │ + return val │ + end │ +end │ │ - for num, pos in pairs(nums) do │ - local y_start = numpad_params.y_start + (pos.y-1+1)*button_size_y + padding │ - local x_start = numpad_params.x_start + (pos.x-1)*button_size_x + padding │ - local btn_params = { │ - id = soft_numpad.btn_id(num), │ - text = string.format("%d", num), │ - bg_colour = numpad_params.btn_bg_colour, │ - fg_colour = numpad_params.btn_fg_colour, │ - text_size = math.floor(button_size_y/2), │ - padding = padding, │ - y_start = y_start, │ - x_start = x_start, │ - y_end = y_start + button_size_y - padding, │ - x_end = x_start + button_size_x - padding, │ - callback = function (btn_id) button_pressed(state, btn_id) end, │ - } │ - buttons.new_button(state.buttons, btn_params) │ +function serialize.deserialize_s32(bytes) │ + local val = 0 │ + local byte_count = 4 │ + if #bytes < byte_count then │ + error(string.format("Expected at least %d bytes, recvd %d", byte_count, #bytes)) │ + return │ + end │ + for i=1,byte_count do │ + local bit_pos = 8 * (byte_count-i) │ + val = val | (string.byte(table.remove(bytes,1))<> 8 │ + end │ + return table.concat(bytes, "") │ end │ │ -function soft_numpad.draw(state) │ - buttons.draw(state.buttons) │ +function serialize.deserialize_u64(bytes) │ + local val = 0 │ + local byte_count = 8 │ + if #bytes < byte_count then │ + error(string.format("Expected at least %d bytes, recvd %d", byte_count, #bytes)) │ + return │ + end │ + for i=1,byte_count do │ + local bit_pos = 8 * (byte_count-i) │ + val = val | (string.byte(table.remove(bytes,1))< 255 then │ + error(string.format("serialize_bytes: Found val %d at idx %d, must be between 0 and 255", val, i), 2) │ + end │ + table.insert(chars, string.char(val)) │ + end │ + return table.concat(chars, "") │ +end │ │ -function touchpad.new_state(touchpad_pos, touchpad_radius) │ - return { │ - pos = touchpad_pos, │ - radius = touchpad_radius, │ - active_touch = nil, │ +function serialize.deserialize_bytes(bytes_chars) │ + print(string.format("arg is %s",bytes_chars)) │ + if bytes_chars == nil then error("nil arg", 2) end │ + local vals = {} │ + for i=1,#bytes_chars do │ + table.insert(vals, string.byte(bytes_chars[1])) │ + table.remove(bytes_chars, 1) │ + end │ + return vals │ +end │ │ - player_vec = { y = 0, x = 0 }, │ +return serialize │ +local cards = require("libs/cards/cards") │ +local draw_more = require("libs/draw/draw_more") │ +local draw_shapes = require("libs/draw/draw_shapes") │ +local alexgames = require("alexgames") │ + │ +-- TODO make definitions of this in alexgames │ +local ALIGN_CENTRE = 0 │ +local ALIGN_LEFT = 1 │ + │ +local DARK_OVERLAY_COLOUR_CARD_FACE = "#000000aa" │ +local DARK_OVERLAY_COLOUR_CARD_BACK = "#000000aa" │ + │ +local font_size_small = 16 │ +-- local font_size_small = 12 │ + │ +local cards_draw = {} │ + │ +function cards_draw.draw_facedown_card(y, x, width, height, higlight, angle, brightness_percent) │ + brightness_percent = nil -- overriding this because I am drawing the DARK_OVERLAY over the card │ + draw_more.draw_graphic_ul("card_facedown", y, x, width, height, { angle_degrees = angle, brightness_percent = brightness_percent }) │ + │ + if alexgames.get_user_colour_pref() == "dark" then │ + local pts = draw_more.get_rotated_pts_ul(y, x, width, height, angle) │ + alexgames.draw_rect(DARK_OVERLAY_COLOUR_CARD_BACK, │ + pts.y, pts.x, │ + pts.y + pts.height, pts.x + pts.width) │ + end │ + │ + if higlight then │ + local padding = math.floor(math.max(height*0.05, width*0.05)) │ + draw_more.draw_graphic_ul("card_highlight", │ + y - padding, x - padding, │ + width + 2*padding, height + 2*padding, │ + { angle_degrees = angle }) │ + end │ + │ +end │ + │ +function cards_draw.draw_card(card, y, x, width, height, font_size, highlight, angle) │ + if card == nil then │ + error("card is nil"); │ + end │ + │ + │ + local suits_to_graphic = { │ + [cards.DIAMONDS] = "card_diamonds", │ + [cards.HEARTS] = "card_hearts", │ + [cards.SPADES] = "card_spades", │ + [cards.CLUBS] = "card_clubs", │ + } │ + │ + local blank_card_colour = '#ffffff' │ + local suit_colour_red = "#ff0000" │ + local suit_colour_black = "#000000" │ + local card_outline = '#000000' │ + local card_outline_thickness = 2 │ + local brightness_percent_suit_icon = nil │ + local brightness_percent_facedown_card = nil │ + │ + -- This looks fine on every browser except safari, which │ + -- doesn't support it. │ + -- So I will comment this out for now and just draw a transparent grey │ + -- rectangle over all the cards │ + -- Checking alexgames.is_feature_supported() here would be nice, │ + -- but I wasn't sure how to check if these features are supported │ + -- (or even if the user is using safari or not) │ + if false and alexgames.get_user_colour_pref() == "dark" then │ + blank_card_colour = '#444444' │ + suit_colour_red = "#AA0000" │ + suit_colour_black = "#000000" │ + card_outline = '#000000' │ + brightness_percent_suit_icon = 50 │ + brightness_percent_facedown_card = 35 │ + end │ + │ + if card == cards.UNREVEALED_CARD then │ + cards_draw.draw_facedown_card(y, x, width, height, highlight, angle, brightness_percent_facedown_card) │ + return │ + end │ + │ + │ + local suits_to_text_colour = { │ + [cards.DIAMONDS] = suit_colour_red, │ + [cards.HEARTS] = suit_colour_red, │ + [cards.SPADES] = suit_colour_black, │ + [cards.CLUBS] = suit_colour_black, │ } │ + │ + local small_padding = math.floor(width*0.1) │ + │ + local suit_icon_big_width = math.floor(width*0.45) │ + local suit_icon_big_height = math.floor(height*0.45) │ + │ + local suit_icon_big_y │ + local suit_icon_big_x │ + local text_icon_big_y │ + local text_icon_big_x │ + │ + local suit_icon_little_y │ + local suit_icon_little_x │ + local text_icon_little_y │ + local text_icon_little_x │ + │ + local draw_big_suit_icon = false │ + │ + if angle ~= nil and angle ~= 0 and angle ~= 90 and angle ~= 180 and angle ~= 270 then │ + error(string.format("draw_card for angle %s not supported", angle), 2) │ + end │ + │ + if angle == 0 or angle == nil then │ + suit_icon_big_y = y + width*0.1 │ + suit_icon_big_x = x + math.floor(width*(1-0.45)/2) │ + text_icon_big_y = y + 0.9*height │ + text_icon_big_x = x + 0.5*width │ + │ + suit_icon_little_y = y + small_padding │ + suit_icon_little_x = x + math.floor(width*0.5) │ + text_icon_little_y = y + math.floor(width*0.35) │ + text_icon_little_x = x + math.floor(width*0.1) │ + elseif angle == 90 then │ + suit_icon_big_y = y + math.floor(width*(1-0.45)/2) │ + suit_icon_big_x = x - height*0.1 │ + text_icon_big_y = y + 0.7*width │ + text_icon_big_x = x - 0.8*height │ + │ + suit_icon_little_y = y + math.floor(width*0.5) │ + suit_icon_little_x = x - small_padding │ + text_icon_little_y = y + math.floor(width*0.35) │ + text_icon_little_x = x - math.floor(width*0.35) │ + elseif angle == 180 then │ + suit_icon_big_y = y - width*0.1 │ + suit_icon_big_x = x - math.floor(width*(1 - 0.45)/2) │ + text_icon_big_y = y - 0.6*height │ + text_icon_big_x = x - 0.5*width │ + │ + suit_icon_little_y = y - small_padding │ + suit_icon_little_x = x - math.floor(width*0.5) │ + text_icon_little_y = y - math.floor(width*0.1) │ + text_icon_little_x = x - math.floor(width*0.35) │ + elseif angle == 270 then │ + suit_icon_big_y = y - math.floor(width*(1-0.45)/2) │ + suit_icon_big_x = x + height*0.1 │ + text_icon_big_y = y - 0.3*width │ + text_icon_big_x = x + 0.8*height │ + │ + suit_icon_little_y = y - math.floor(width*0.5) │ + suit_icon_little_x = x + small_padding │ + text_icon_little_y = y - math.floor(width*0.1) │ + text_icon_little_x = x + math.floor(width*0.1) │ + end │ + │ + text_icon_big_y = math.floor(text_icon_big_y) │ + text_icon_big_x = math.floor(text_icon_big_x) │ + suit_icon_big_y = math.floor(suit_icon_big_y) │ + suit_icon_big_x = math.floor(suit_icon_big_x) │ + │ + │ + if angle ~= nil and angle ~= 0 then │ + draw_more.draw_graphic_ul("card_blank", y, x, width, height, { angle_degrees = angle }); │ + else │ + alexgames.draw_rect(blank_card_colour, y, x, y + height, x + width) │ + draw_shapes.draw_rect_outline(card_outline, card_outline_thickness, y, x, y + height, x + width) │ + end │ + │ + -- TODO clean this up, make sure it looks good for small cards (card sim, crib) │ + -- maybe have the option to display either type of card │ + -- maybe now is the time to refactor this to take in a table of size params, │ + -- rather than a ton of integer arguments │ + if not draw_big_suit_icon then │ + -- TODO adjust the position for rotation here │ + draw_more.draw_graphic_ul(suits_to_graphic[card.suit], │ + suit_icon_little_y, suit_icon_little_x, │ + math.floor(width/2) - small_padding, │ + math.floor(1.2*width/2) - small_padding, │ + { angle_degrees = angle , brightness_percent = brightness_percent_suit_icon}) │ + alexgames.draw_text(cards.val_to_string(card.val), suits_to_text_colour[card.suit], │ + text_icon_little_y, text_icon_little_x, │ + font_size_small, ALIGN_LEFT, angle) │ + else │ + draw_more.draw_graphic_ul(suits_to_graphic[card.suit], │ + suit_icon_big_y, suit_icon_big_x, │ + suit_icon_big_width, suit_icon_big_height, │ + { angle_degrees = angle, brightness_percent = brightness_percent_suit_icon}) │ + end │ + alexgames.draw_text(cards.val_to_string(card.val), suits_to_text_colour[card.suit], │ + text_icon_big_y, text_icon_big_x, font_size, ALIGN_CENTRE, angle) │ + │ + if alexgames.get_user_colour_pref() == "dark" then │ + alexgames.draw_rect(DARK_OVERLAY_COLOUR_CARD_FACE, │ + y, x, │ + y + height, x + width) │ + end │ + if highlight then │ + local padding = math.floor(math.max(height*0.05, width*0.05)) │ + draw_more.draw_graphic_ul("card_highlight", │ + y - padding, x - padding, │ + width + 2*padding, height + 2*padding, │ + { angle_degrees = angle }) │ + end │ end │ │ -local function touch_in_dirpad(state, touch) │ - local dy = (touch.y - state.pos.y) │ - local dx = (touch.x - state.pos.x) │ +function cards_draw.draw_card_array(card_array, y_centre, x_centre, width, height, font_size, highlight, padding, offset_array) │ + if #card_array > 0 and offset_ary ~= nil and #offset_array ~= #card_array then │ + error(string.format("offset_ary len %d, card_array len %d", #offset_ary, #card_array)) │ + end │ │ - return (math.abs(dy) <= state.radius and │ - math.abs(dx) <= state.radius) │ + for card_idx=1,#card_array do │ + local y = math.floor(y_centre - height/2) │ + if offset_array ~= nil then │ + y = y + offset_array[card_idx] │ + end │ + local x = (x_centre - width/2) + math.floor(((card_idx-0.5 - #card_array/2))*(width + padding)) │ + cards_draw.draw_card(card_array[card_idx], y, x, width, height, font_size, highlight ~= nil and highlight[card_idx], 0) │ + end │ end │ │ -function touchpad.handle_touch_evts(state, evt_id, touches) │ - local touch_changed = false │ - for _, touch in ipairs(touches) do │ - if evt_id == 'touchstart' and state.active_touch == nil and touch_in_dirpad(state, touch) then │ - state.active_touch = touch.id │ - touch_changed = true │ - elseif (evt_id == 'touchend' or evt_id == 'touchcancel') and state.active_touch == touch.id then │ - state.active_touch = nil │ - state.player_vec = { y = 0, x = 0 } │ - touch_changed = true │ +function cards_draw.draw_card_array_facedown(count, y_centre, x_centre, width, height, highlight, padding, offset_array) │ + for card_idx=1,count do │ + local y = math.floor(y_centre - height/2) │ + if offset_array ~= nil then │ + y = y + offset_array[card_idx] │ end │ + local x = (x_centre - width/2) + math.floor(((card_idx-0.5 - count/2))*(width + padding)) │ + cards_draw.draw_facedown_card(y, x, width, height, highlight, 0) │ + end │ +end │ │ - if state.active_touch == touch.id then │ - local dy = (touch.y - state.pos.y) │ - local dx = (touch.x - state.pos.x) │ - local mag = math.sqrt(dy*dy + dx*dx) / state.radius │ - mag = math.min(mag, 1) │ - local angle = math.atan(dy,dx) │ - state.player_vec = { │ - y = mag*math.sin(angle), │ - x = mag*math.cos(angle), │ - } │ - touch_changed = true │ +function cards_draw.card_array_coords_to_idx(count, y_centre, x_centre, │ + width, height, padding, │ + offset_array, │ + coord_y, coord_x) │ + local x_start = (x_centre - width/2) + math.floor(((0 -0.5 - count/2))*(width + padding)) │ + local x_end = (x_centre - width/2) + math.floor(((count+1-0.5 - count/2))*(width + padding)) │ + if x_start <= coord_x and coord_x <= x_end then │ + local idx = math.floor((coord_x - x_start) / (width + padding)) │ + if not(1 <= idx and idx <= count) then │ + return nil │ + end │ + local y_start = math.floor(y_centre - height/2) │ + local y_end = math.floor(y_centre + height/2) │ + if offset_ary ~= nil then │ + y_start = y_start + offset_array[idx] │ + y_end = y_end + offset_array[idx] │ + end │ + if y_start <= coord_y and coord_y <= y_end then │ + local pos_within_card = (coord_x - x_start) % (width + padding) │ + if pos_within_card <= width then │ + return idx │ + end │ end │ end │ │ - if touch_changed then │ - return state.player_vec │ - else │ + return nil │ +end │ + │ +return cards_draw │ + │ +cards = {} │ + │ +cards.DIAMONDS = "diamonds" │ +cards.HEARTS = "hearts" │ +cards.SPADES = "spades" │ +cards.CLUBS = "clubs" │ + │ +cards.ACE = 1 │ +cards.JACK = 11 │ +cards.QUEEN = 12 │ +cards.KING = 13 │ + │ +cards.MIN_VAL = cards.ACE │ +cards.MAX_VAL = cards.KING │ + │ +cards.NUM_SUITS = 4 │ +cards.NUM_VALS = 13 │ + │ +cards.suits = { │ + cards.DIAMONDS, │ + cards.HEARTS, │ + cards.SPADES, │ + cards.CLUBS, │ +} │ + │ +cards.suit_to_idx = { │ + [cards.DIAMONDS] = 0, │ + [cards.HEARTS] = 1, │ + [cards.SPADES] = 2, │ + [cards.CLUBS] = 3, │ +} │ + │ +cards.idx_to_suit = { │ +} │ + │ +for suit, suit_idx in pairs(cards.suit_to_idx) do │ + cards.idx_to_suit[suit_idx] = suit │ +end │ + │ +cards.UNREVEALED_CARD = 53 │ + │ +cards.vals = { │ + cards.ACE, │ + 2, │ + 3, │ + 4, │ + 5, │ + 6, │ + 7, │ + 8, │ + 9, │ + 10, │ + cards.JACK, │ + cards.QUEEN, │ + cards.KING, │ +} │ + │ +function cards.card_to_int(card) │ + if card == nil then error("card_to_int arg is nil", 2) end │ + if card == cards.UNREVEALED_CARD then │ + return card │ + end │ + return cards.suit_to_idx[card.suit] * cards.NUM_VALS + (card.val-1) │ +end │ + │ +function cards.int_to_card(card_int) │ + if card_int == cards.UNREVEALED_CARD then │ + return card_int │ + end │ + if not(0 <= card_int and card_int < cards.NUM_SUITS * cards.NUM_VALS) then │ return nil │ end │ + local card = {} │ + card.suit = cards.idx_to_suit[math.floor(card_int / cards.NUM_VALS)] │ + card.val = (card_int % cards.NUM_VALS) + 1 │ + return card │ end │ │ -return touchpad │ -local buttons = {} │ +function cards.copy_card(card) │ + if card == nil then │ + return nil │ + end │ + local card_int = cards.card_to_int(card) │ + return cards.int_to_card(card_int) │ +end │ │ -local alexgames = require("alexgames") │ -local draw_shapes = require("libs/draw/draw_shapes") │ +function cards.copy_card_ary(card_ary_orig) │ + local card_ary_copy = {} │ + for _, card in ipairs(card_ary_orig) do │ + table.insert(card_ary_copy, cards.copy_card(card)) │ + end │ + return card_ary_copy │ +end │ │ -buttons.BTN_SHAPE_RECT = "rect" -- sending nil instead of this works too │ -buttons.BTN_SHAPE_TRIANGLE = "triangle" │ +function cards.copy_card_ary_ary(card_ary_ary_orig) │ + local ary_copy = {} │ + for _, card_ary in ipairs(card_ary_ary_orig) do │ + table.insert(ary_copy, cards.copy_card_ary(card_ary)) │ + end │ + return ary_copy │ +end │ │ -function buttons.new_state() │ - local state = { │ - buttons = {}, │ - btn_id_map = {}, │ + │ +function cards.val_to_string(val) │ + if val == nil then │ + return "nil" │ + end │ + local to_letter = { │ + [cards.ACE] = "A", │ + [cards.JACK] = "J", │ + [cards.QUEEN] = "Q", │ + [cards.KING] = "K", │ } │ - return state │ + │ + if 2 <= val and val <= 10 then │ + return string.format("%d", val) │ + else │ + return to_letter[val] │ + end │ end │ │ -function buttons.new_button(state, btn_params) │ - if state == nil then error("state is nil", 2) end │ - if btn_params.id == nil then │ - error("btn_params.id is nil", 2) │ +function cards.card_to_string(card) │ + if card == nil then return 'nil' end │ + local val_str = cards.val_to_str(card.val) │ + local suit_str = cards.suit │ + return string.format('[%s %s]', suit_str, val_str) │ +end │ + │ +function cards.card_ary_to_string(card_ary) │ + local s = '{' │ + for i, card in ipairs(card_ary) do │ + if i == 1 then s = s .. ' ' │ + else s = s .. ', ' end │ + s = s .. cards.card_to_string(card) │ end │ - if btn_params.text == nil then │ - error("btn_params.text is nil", 2) │ + s = s .. '}' │ + return s │ +end │ + │ +local function swap(array, index1, index2) │ + array[index1], array[index2] = array[index2], array[index1] │ +end │ + │ +local function shuffle(array) │ + local counter = #array │ + while counter > 1 do │ + local index = math.random(counter) │ + swap(array, index, counter) │ + counter = counter - 1 │ + end │ +end │ + │ +local function new_card(suit,val) │ + return { suit = suit, val = val } │ +end │ + │ +function cards.new_deck() │ + local deck = {} │ + for _, suit in ipairs(cards.suits) do │ + for _, val in ipairs(cards.vals) do │ + local card = new_card(suit, val) │ + deck[#deck+1] = card │ + end │ end │ - local enabled = true │ - if btn_params.enabled ~= nil then │ - enabled = btn_params.enabled │ + return deck │ +end │ + │ +function cards.shuffle(deck) │ + return shuffle(deck) │ +end │ + │ +function cards.card_to_string(card) │ + if card == nil then return "nil" │ + elseif card == cards.UNREVEALED_CARD then return "[unrevealed]" end │ + return string.format("[%s %s]", card.suit, cards.val_to_string(card.val)) │ +end │ + │ +function cards.card_array_to_string(card_array) │ + local str = "{" │ + for i=1,#card_array do │ + str = str .. cards.card_to_string(card_array[i]) .. ", " │ end │ - local btn_info = { │ - id = btn_params.id, │ - text = btn_params.text, │ - bg_colour = btn_params.bg_colour, │ - fg_colour = btn_params.fg_colour, │ - outline_colour = btn_params.outline_colour, │ - outline_width = btn_params.outline_width, │ - btn_shape = btn_params.btn_shape, │ - shape_param = btn_params.shape_param, │ - text_size = btn_params.text_size, │ - padding = btn_params.padding, │ - y_start = btn_params.y_start, │ - x_start = btn_params.x_start, │ - --y_end = btn_params.y_start + btn_params.y_size, │ - --x_end = btn_params.x_start + btn_params.x_size, │ - y_end = btn_params.y_end, │ - x_end = btn_params.x_end, │ - enabled = enabled, │ - visible = true, │ - callback = btn_params.callback, │ - } │ - table.insert(state.buttons, btn_info) │ - state.btn_id_map[btn_params.id] = btn_info │ + str = str .. "}" │ + return str │ end │ │ -function buttons.on_user_click(state, y_pos, x_pos) │ - for _, btn_info in ipairs(state.buttons) do │ - if btn_info.enabled and btn_info.visible and │ - btn_info.y_start <= y_pos and y_pos <= btn_info.y_end and │ - btn_info.x_start <= x_pos and x_pos <= btn_info.x_end then │ - --print(string.format("Pressed button \"%s\"", btn_info.text)) │ - if btn_info.callback then │ - btn_info.callback(btn_info.id) │ - end │ - return btn_info.id │ - end │ +function cards.serialize_card(card) │ + local byte = nil │ + if card == nil then │ + byte = 255 │ + else │ + byte = cards.card_to_int(card) │ end │ + local chars = {string.char(byte)} │ + return table.concat(chars, "") │ end │ │ -function buttons.set_enabled(state, btn_id, is_enabled) │ - state.btn_id_map[btn_id].enabled = is_enabled │ +function cards.deserialize_card(bytes) │ + local card_int = string.byte(table.remove(bytes,1)) │ + if card_int == 255 then │ + return nil │ + else │ + return cards.int_to_card(card_int) │ + end │ end │ │ -function buttons.set_visible(state, btn_id, is_visible) │ - state.btn_id_map[btn_id].visible = is_visible │ +function cards.serialize_card_array(card_array) │ + if card_array == nil then │ + error("arg is nil", 2) │ + return │ + end │ + local bytes = {} │ + bytes[#bytes+1] = string.char(#card_array) │ + for i=1,#card_array do │ + bytes[#bytes+1] = string.char(cards.card_to_int(card_array[i])) │ + end │ + local msg = table.concat(bytes, "") │ + return msg │ end │ │ -function buttons.set_text(state, btn_id, text) │ - state.btn_id_map[btn_id].text = text │ +-- Also removes the elements from the table `bytes` │ +function cards.deserialize_card_array(bytes) │ + local card_array = {} │ + --local num_cards = string.byte(bytes:sub(1,1)) │ + local num_cards = string.byte(table.remove(bytes, 1)) │ + if #bytes < num_cards then │ + error(string.format("expected %d bytes, only had %d", num_cards, #bytes)) │ + return │ + end │ + for i=1,num_cards do │ + --card_array[#card_array+1] = cards.int_to_card(string.byte(bytes:sub(i,i))) │ + local card_int = string.byte(table.remove(bytes,1)) │ + card_array[#card_array+1] = cards.int_to_card(card_int) │ + end │ + return card_array │ end │ │ -function buttons.draw(state) │ - for _, btn_info in ipairs(state.buttons) do │ - if not btn_info.visible then │ - goto next_button │ - end │ - local btn_width = btn_info.x_end - btn_info.x_start │ - local text_align = 0 │ +function cards.suit_is_red(suit) │ + return suit == cards.DIAMONDS or suit == cards.HEARTS │ +end │ │ - local outline_colour = btn_info.outline_colour │ - local bg_colour = btn_info.bg_colour │ - local fg_colour = btn_info.fg_colour │ +function cards.cards_eq(card1, card2) │ + return (card1.suit == card2.suit and │ + card1.val == card2.val) │ +end │ │ - if not btn_info.enabled then │ - outline_colour = '#cccccc88' │ - bg_colour = '#eeeeee88' │ - fg_colour = '#aaaaaa88' │ - end │ │ - if btn_info.btn_shape == buttons.BTN_SHAPE_TRIANGLE then │ - draw_shapes.draw_triangle_lr(outline_colour, btn_info.outline_width, bg_colour, │ - btn_info.shape_param, │ - btn_info.y_start, btn_info.x_start, │ - btn_info.y_end, btn_info.x_end) │ - if btn_info.shape_param then │ - text_align = 1 │ - else │ - text_align = -1 │ - end │ - else │ - alexgames.draw_rect(bg_colour, │ - btn_info.y_start, btn_info.x_start, │ - btn_info.y_end, btn_info.x_end) │ - draw_shapes.draw_rect_outline(outline_colour, btn_info.outline_width, │ - btn_info.y_start, btn_info.x_start, │ - btn_info.y_end, btn_info.x_end) │ +--[[ │ +for i=0,51 do │ + local card = cards.int_to_card(i) │ + local i2 = cards.card_to_int(card) │ + if i ~= i2 then │ + error(string.format("%q ~= %q", i, i2)) │ + end │ + --print(string.format("i=%d, card=%s, i2=%d", i, cards.card_to_string(card), i2)) │ +end │ +]] │ + │ +return cards │ + │ + │ +local cards_draw = require("libs/cards/cards_draw") │ + │ +local canvas_width = 480 │ +local canvas_height = 480 │ + │ +local card_width = 40 │ +local card_height = 70 │ +local font_size = 24 │ +local padding = 5 │ + │ +if false then │ + card_width = 70 │ + card_height = 120 │ + font_size = 48 │ + padding = 5 │ +end │ + │ +cards_draw.draw_facedown_card(padding, padding, card_width, card_height) │ + │ +local deck2 = cards.new_deck() │ +cards.shuffle(deck2) │ + │ + │ +local dx = card_width + padding │ +local dy = card_height + padding │ + │ +local y = padding │ +local x = padding + dx │ + │ +for i, card in ipairs(deck2) do │ + │ + │ + print("Drawing card " .. cards.card_to_string(card)) │ + cards_draw.draw_card(card, y, x, card_width, card_height, font_size) │ + │ + x = x + dx │ + │ + if x + card_width + padding >= canvas_width then │ + x = padding │ + y = y + dy │ + end │ +end │ +local cards_set = {} │ + │ +local cards = require("libs/cards/cards") │ + │ +function cards_set.card_list_to_set(card_list) │ + local card_set = { │ + suits = {}, │ + list = card_list, │ + } │ + for _, suit in ipairs(cards.suits) do │ + card_set.suits[suit] = {} │ + end │ + │ + for _, card in ipairs(card_list) do │ + card_set.suits[card.suit][card.val] = true │ + end │ + │ + return card_set │ +end │ + │ +local dice = {} │ + │ +function dice.roll_dice(dice_max) │ + return math.random(1,dice_max) │ +end │ + │ +function dice.roll_multiple_dice(num_dice, dice_max) │ + local ary = {} │ + for i=1,num_dice do │ + table.insert(ary, dice.roll_dice(dice_max)) │ + end │ + return ary │ +end │ + │ +return dice │ +local dice_draw = {} │ + │ +local alexgames = require("alexgames") │ +local draw_more = require("libs/draw/draw_more") │ + │ +local DICE_IMG_MAP = { │ + "dice1", │ + "dice2", │ + "dice3", │ + "dice4", │ + "dice5", │ + "dice6", │ +} │ + │ +function dice_draw.draw_one_die(die_val, y_pos, x_pos, y_size, x_size, idx, args) │ + if args ~= nil and args.background_colour ~= nil then │ + alexgames.draw_rect(args.background_colour, │ + y_pos, x_pos, │ + y_pos + y_size, x_pos + x_size) │ + end │ + local img_id = DICE_IMG_MAP[die_val] │ + local graphic_params = nil │ + if args ~= nil then │ + graphic_params = { │ + brightness_percent = args.brightness_percent, │ + invert = args.invert │ + } │ + end │ + draw_more.draw_graphic_ul(img_id, y_pos, x_pos, x_size, y_size, graphic_params) │ + if args.used_dice ~= nil and args.used_dice[idx] then │ + if args.dice_used_overlay_colour == nil then │ + error("args.dice_used_overlay_colour is nil, but args.used_dice is specified", 2) │ end │ + alexgames.draw_rect(args.dice_used_overlay_colour, y_pos, x_pos, y_pos + y_size, x_pos + x_size) │ + end │ +end │ │ - local text_y_start = math.floor((btn_info.y_start + btn_info.y_end + btn_info.text_size)/2) │ - alexgames.draw_text(btn_info.text, fg_colour, │ - text_y_start, math.floor(btn_info.x_start + btn_width/2), │ - btn_info.text_size, text_align) │ - ::next_button:: │ +function dice_draw.draw_dice(dice_vals, y_pos, x_pos, y_size, x_size, args) │ + for dice_idx, dice_val in ipairs(dice_vals) do │ + x_pos2 = x_pos + (dice_idx-1)*x_size │ + if args ~= nil and args.padding ~= nil then │ + x_pos2 = x_pos2 + (dice_idx-1)*args.padding │ + end │ + dice_draw.draw_one_die(dice_val, y_pos, x_pos2, y_size, x_size, dice_idx, args) │ end │ end │ │ -return buttons │ +return dice_draw │ +